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

ap_CocoaFrame.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  * Copyright (C) 2001-2003 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 #ifndef AP_COCOAFRAME_H
00022 #define AP_COCOAFRAME_H
00023 
00024 #import <Cocoa/Cocoa.h>
00025 
00026 class XAP_CocoaApp;
00027 class XAP_Frame;
00028 class AP_CocoaFrame;
00029 class FL_DocLayout;
00030 class GR_Graphics;
00031 
00032 #include "ap_Frame.h"
00033 #include "ie_types.h"
00034 #include "ut_assert.h"
00035 
00036 
00037 /*****************************************************************/
00038 
00039 
00040 
00041 class AP_CocoaFrame : public AP_Frame
00042 {
00043 public:
00044     AP_CocoaFrame();
00045     AP_CocoaFrame(AP_CocoaFrame * f);
00046     virtual ~AP_CocoaFrame(void);
00047 
00048     virtual bool                initialize(XAP_FrameMode frameMode=XAP_NormalFrame);
00049     virtual XAP_Frame *         cloneFrame(void);
00050 
00051     virtual void                setXScrollRange(void);
00052     virtual void                setYScrollRange(void);
00053     virtual void                translateDocumentToScreen(UT_sint32 &x, UT_sint32 &y);
00054     virtual void                setStatusMessage(const char * szMsg);
00055 
00056     virtual void                toggleRuler(bool bRulerOn);
00057     virtual void                            toggleTopRuler(bool bRulerOn);
00058     virtual void                            toggleLeftRuler(bool bRulerOn);
00059     virtual void                toggleBar(UT_uint32 iBarNb, bool bBarOn);
00060     virtual void                toggleStatusBar(bool bStatusBarOn);
00061 
00062 protected:
00063     virtual bool _createViewGraphics(GR_Graphics *& pG, UT_uint32 iZoom);
00064 
00065     static void                 _scrollFuncX(void * pData, UT_sint32 xoff, UT_sint32 xlimit);
00066     static void                 _scrollFuncY(void * pData, UT_sint32 yoff, UT_sint32 ylimit);
00067     virtual bool _createScrollBarListeners(AV_View * pView, AV_ScrollObj *& pScrollObj,
00068                        ap_ViewListener *& pViewListener,
00069                        ap_Scrollbar_ViewListener *& pScrollbarViewListener,
00070                        AV_ListenerId &lid,
00071                        AV_ListenerId &lidScrollbarViewListener);
00072 
00073     virtual void _bindToolbars(AV_View *pView);
00074     virtual void _setViewFocus(AV_View *pView);
00075 
00076     virtual UT_sint32           _getDocumentAreaWidth();
00077     virtual UT_sint32           _getDocumentAreaHeight();
00078     void                        _getHScrollValues (UT_sint32 &min, UT_sint32 &max, UT_sint32 &current);
00079     void                        _getVScrollValues (UT_sint32 &min, UT_sint32 &max, UT_sint32 &current);
00080     void                        _setHScrollValues (UT_sint32 min, UT_sint32 max, UT_sint32 current);
00081     void                        _setVScrollValues (UT_sint32 min, UT_sint32 max, UT_sint32 current);
00082 };
00083 
00084 #endif /* AP_COCOAFRAME_H */
00085 

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1