Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef XAP_WIN32FRAMEIMPL_H
00023 #define XAP_WIN32FRAMEIMPL_H
00024
00025 #include <windows.h>
00026 #include <winuser.h>
00027 #include "xap_FrameImpl.h"
00028 #include "xap_Win32App.h"
00029 #include "xap_Win32DialogFactory.h"
00030 #include "xap_Win32DragAndDrop.h"
00031
00032 #include "ev_Win32Keyboard.h"
00033 #include "ev_Win32Mouse.h"
00034 #include "ev_Win32Menu.h"
00035 #include "ev_Win32Toolbar.h"
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 class ABI_EXPORT XAP_Win32FrameImpl : public XAP_FrameImpl
00048 {
00049 public:
00050 XAP_Win32FrameImpl(XAP_Frame *pFrame);
00051 virtual ~XAP_Win32FrameImpl(void);
00052
00053 virtual XAP_FrameImpl * createInstance(XAP_Frame *pFrame) = 0;
00054
00055 inline HWND getTopLevelWindow(void) const { return _getTopLevelWindow(); }
00056 inline HWND getToolbarWindow(void) const { return m_hwndRebar; }
00057
00058 protected:
00059 friend class XAP_Frame;
00060
00061 virtual UT_RGBColor getColorSelBackground () const;
00062 virtual UT_RGBColor getColorSelForeground () const;
00063
00064 #if 0
00065 void _startViewAutoUpdater(void);
00066 static void viewAutoUpdater(UT_Worker *wkr);
00067 #endif
00068
00069 virtual bool _updateTitle(void);
00070
00071 virtual void _initialize(void);
00072 virtual bool _close(void);
00073 virtual bool _raise(void);
00074 virtual bool _show(void);
00075
00076 virtual XAP_DialogFactory * _getDialogFactory(void);
00077 virtual EV_Toolbar * _newToolbar(XAP_Frame *frame, const char *szLayout, const char *szLanguage);
00078 virtual EV_Menu* _getMainMenu(void);
00079 virtual void _rebuildMenus(void);
00080
00081
00082
00083
00084 virtual void _queue_resize(void);
00085
00086 virtual bool _runModalContextMenu(AV_View * pView, const char * szMenuName,
00087 UT_sint32 x, UT_sint32 y);
00088 virtual void _setFullScreen(bool isFullScreen);
00089 virtual void _nullUpdate (void) const;
00090 virtual void _setCursor(GR_Graphics::Cursor cursor);
00091
00092 static bool _RegisterClass(XAP_Win32App * app);
00093
00094
00095 virtual void _translateDocumentToScreen(UT_sint32 &x, UT_sint32 &y) = 0;
00096 virtual HWND _getTopLevelWindow(void) const { return m_hwndFrame; }
00097
00098 virtual HWND _createDocumentWindow(XAP_Frame *pFrame, HWND hwndParent,
00099 UT_uint32 iLeft, UT_uint32 iTop, UT_uint32 iWidth, UT_uint32 iHeight) = 0;
00100 virtual HWND _createStatusBarWindow(XAP_Frame *pFrame, HWND hwndParent,
00101 UT_uint32 iLeft, UT_uint32 iTop, UT_uint32 iWidth) = 0;
00102 void _createTopLevelWindow(void);
00103
00104 void _setHwndRebar(HWND hWnd) { m_hwndRebar = hWnd; }
00105 HWND _getHwndRebar(void) { return m_hwndRebar; }
00106 void _setHwndContainer(HWND hWnd) { m_hwndContainer = hWnd; }
00107 HWND _getHwndContainer(void) { return m_hwndContainer; }
00108 void _setHwndStatusBar(HWND hWnd) { m_hwndStatusBar = hWnd; }
00109 HWND _getHwndStatusBar(void) { return m_hwndStatusBar; }
00110
00111 UT_uint32 _getBarHeight(void) { return m_iBarHeight; }
00112 void _setBarHeight(UT_uint32 iBarHeight) { m_iBarHeight = iBarHeight; }
00113 UT_uint32 _getSizeWidth(void) { return m_iSizeWidth; }
00114 UT_uint32 _getSizeHeight(void) { return m_iSizeHeight; }
00115
00117 static LRESULT CALLBACK _FrameWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam);
00118
00119 private:
00120 HWND m_hwndFrame;
00121 HWND m_hwndRebar;
00122 HWND m_hwndContainer;
00123 HWND m_hwndStatusBar;
00124
00125 AP_Win32DialogFactory m_dialogFactory;
00126
00127 EV_Win32MenuBar * m_pWin32Menu;
00128 EV_Win32MenuPopup * m_pWin32Popup;
00129 UT_uint32 m_iBarHeight;
00130 UT_uint32 m_iStatusBarHeight;
00131 UT_uint32 m_iRealSizeHeight;
00132 UT_uint32 m_iRealSizeWidth;
00133 UT_uint32 m_iWindowStateBeforeFS;
00134 UT_uint32 m_iWindowXBeforeFS;
00135 UT_uint32 m_iWindowYBeforeFS;
00136 UT_uint32 m_iWindowHeightBeforeFS;
00137 UT_uint32 m_iWindowWidthBeforeFS;
00138
00139 UINT m_mouseWheelMessage;
00140 XAP_Win32DropTarget m_dropTarget;
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150
00151
00152
00153
00154 UT_uint32 m_iSizeWidth;
00155 UT_uint32 m_iSizeHeight;
00156
00157 public:
00158
00159 UT_UTF8String m_sColorBack;
00160 UT_UTF8String m_sColorFore;
00161
00162 };
00163
00164 #endif