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

ap_Win32Frame.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 #ifndef AP_WIN32FRAME_H
00021 #define AP_WIN32FRAME_H
00022 
00023 #include "ie_types.h"
00024 #include "ut_assert.h"
00025 #include "ap_Frame.h"
00026 #include "ap_Win32FrameImpl.h"
00027 #include "xap_Win32App.h"
00028 #include "ap_StatusBar.h"
00029 
00030 /*****************************************************************/
00031 
00032 class ABI_EXPORT AP_Win32Frame : public AP_Frame
00033 {
00034  public:
00035     AP_Win32Frame();
00036     AP_Win32Frame(AP_Win32Frame * f);
00037     virtual ~AP_Win32Frame(void);
00038 
00039     virtual bool                initialize(XAP_FrameMode frameMode=XAP_NormalFrame);
00040     virtual XAP_Frame *         cloneFrame(void);
00041 
00042     virtual void                setStatusMessage(const char * szMsg);
00043     virtual void                setXScrollRange(void) {  getAPWin32FrameImpl()->_setXScrollRange(static_cast<AP_FrameData*>(m_pData), m_pView);  }
00044     virtual void                setYScrollRange(void) {  getAPWin32FrameImpl()->_setYScrollRange(static_cast<AP_FrameData*>(m_pData), m_pView);  }
00045 
00046     static bool                 RegisterClass(XAP_Win32App * app) {  return AP_Win32FrameImpl::_RegisterClass(app); }
00047 
00048     virtual void                toggleRuler(bool bRulerOn)     {  toggleTopRuler(bRulerOn);  toggleLeftRuler(bRulerOn);  }
00049     virtual void                toggleTopRuler(bool bRulerOn)  {  getAPWin32FrameImpl()->_toggleTopRuler(this, bRulerOn);  }
00050     virtual void                toggleLeftRuler(bool bRulerOn) {  getAPWin32FrameImpl()->_toggleLeftRuler(this, bRulerOn);  }
00051 
00052     virtual HWND                getTopLevelWindow(void) const {  return getAPWin32FrameImpl()->_getTopLevelWindow();  }
00053 
00054     void                        toggleBar(UT_uint32 iBarNb, bool bBarOn) { getAPWin32FrameImpl()->_toggleBar(iBarNb, bBarOn); }
00055     void                        toggleStatusBar(bool bStatusBarOn);
00056 
00057     // save from thousands of casts
00058     AP_Win32FrameImpl *         getAPWin32FrameImpl(void) const { return static_cast<AP_Win32FrameImpl *>(getFrameImpl()); }
00059     AP_FrameData *              getAPFrameData(void) const { return static_cast<AP_FrameData*>(getFrameData()); }
00060 
00061  protected:
00062     // helper methods for _showDocument
00063     virtual bool _createViewGraphics(GR_Graphics *& pG, UT_uint32 iZoom);
00064     virtual void _setViewFocus(AV_View *pView);
00065     virtual bool _createScrollBarListeners(AV_View * pView, AV_ScrollObj *& pScrollObj,
00066                       ap_ViewListener *& pViewListener,
00067                       ap_Scrollbar_ViewListener *& pScrollbarViewListener,
00068                       AV_ListenerId &lid,
00069                       AV_ListenerId &lidScrollbarViewListener);
00070     virtual void _bindToolbars(AV_View *pView) { getAPWin32FrameImpl()->_bindToolbars(pView); }
00071     virtual void _replaceView(GR_Graphics * pG, FL_DocLayout *pDocLayout,
00072               AV_View *pView, AV_ScrollObj * pScrollObj,
00073               ap_ViewListener *pViewListener, AD_Document *pOldDoc,
00074               ap_Scrollbar_ViewListener *pScrollbarViewListener,
00075               AV_ListenerId lid, AV_ListenerId lidScrollbarViewListener,
00076               UT_uint32 iZoom);
00077 
00078     // helper methods for helper methods for _showDocument (meta-helper-methods?) :-)
00079     virtual UT_sint32 _getDocumentAreaWidth(void) { return getAPWin32FrameImpl()->_getDocumentAreaWidth(); }
00080     virtual UT_sint32 _getDocumentAreaHeight(void) { return getAPWin32FrameImpl()->_getDocumentAreaHeight(); }
00081 
00082  private:
00083 
00084     static void                 _scrollFuncX(void * pData, UT_sint32 xoff, UT_sint32 xlimit);
00085     static void                 _scrollFuncY(void * pData, UT_sint32 yoff, UT_sint32 ylimit);
00086 };
00087 
00088 #endif /* AP_WIN32FRAME_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1