• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

xap_CocoaFrame.h

Go to the documentation of this file.
00001 /* AbiSource Application Framework
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  * Copyright (C) 2001, 2009 Hubert Figuiere
00004  *
00005  * This program is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU General Public License
00007  * as published by the Free Software Foundation; either version 2
00008  * of the License, or (at your option) any later version.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program; if not, write to the Free Software
00017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00018  * 02110-1301 USA.
00019  */
00020 
00021 
00022 #ifndef XAP_COCOAFRAME_H
00023 #define XAP_COCOAFRAME_H
00024 
00025 #import <Cocoa/Cocoa.h>
00026 
00027 #include "xap_Frame.h"
00028 
00029 class XAP_CocoaApp;
00030 class EV_CocoaKeyboard;
00031 class EV_CocoaMouse;
00032 class EV_CocoaMenuBar;
00033 class EV_CocoaMenuPopup;
00034 
00035 /*****************************************************************
00036 ******************************************************************
00037 ** This file defines the cocoa-platform-specific class for the
00038 ** cross-platform application frame.  This is used to hold all
00039 ** cocoa-specific data.  One of these is created for each top-level
00040 ** document window.
00041 ******************************************************************
00042 *****************************************************************/
00043 
00044 class GR_CocoaCairoGraphics;
00045 class FV_View;
00046 
00047 @protocol XAP_MouseEventDelegate
00048 - (void)mouseDown:(NSEvent *)theEvent from:(id)sender;
00049 - (void)mouseDragged:(NSEvent *)theEvent from:(id)sender;
00050 - (void)mouseUp:(NSEvent *)theEvent from:(id)sender;
00051 @end
00052 
00053 
00054 // TODO should figure out if need default values
00055 @interface XAP_CocoaNSView : NSView
00056 {
00057     NSCursor        *_cursor;
00058     XAP_Frame       *m_pFrame;
00059     GR_CocoaCairoGraphics   *m_pGR;
00060     NSObject<XAP_MouseEventDelegate>    *_eventDelegate;
00061 }
00062 - (id)initWith:(XAP_Frame *)frame andFrame:(NSRect)windowFrame;
00063 - (BOOL)acceptsFirstResponder;
00064 - (BOOL)becomeFirstResponder;
00065 - (XAP_Frame *)xapFrame;
00066 - (void)setGraphics:(GR_CocoaCairoGraphics *)gr;
00067 - (void)setEventDelegate:(NSObject<XAP_MouseEventDelegate>*)delegate;
00068 - (NSObject<XAP_MouseEventDelegate>*)eventDelegate;
00069 - (void)drawRect:(NSRect)aRect;
00070 - (BOOL)isFlipped;
00071 - (BOOL)isOpaque;
00072 - (void)hasBeenResized:(NSNotification*)notif;
00073 - (void)setCursor:(NSCursor*)cursor;
00074 @end
00075 
00076 
00077 #endif /* XAP_COCOAFRAME_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1