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_WIN32APP_H
00023 #define XAP_WIN32APP_H
00024
00025 #include <windows.h>
00026 #include <tchar.h>
00027 #include "xap_App.h"
00028 #include "xap_Win32DialogFactory.h"
00029 #include "xap_Win32_TB_CFactory.h"
00030 #include "xap_Strings.h"
00031
00032 #define MAX_CONVBUFFER 256
00033
00034 class XAP_Win32Slurp;
00035 class XAP_Win32Toolbar_Icons;
00036
00037
00038
00039
00040
00041
00042
00043 class ABI_EXPORT XAP_Win32App : public XAP_App
00044 {
00045 public:
00046 XAP_Win32App(HINSTANCE hInstance, const char * szAppName);
00047 virtual ~XAP_Win32App(void);
00048
00049 virtual const char * getDefaultEncoding () const;
00050
00051 static const WCHAR * getWideString (const char * p_str);
00052 static const char * getUTF8String (const WCHAR * p_str);
00053
00054 virtual bool initialize(const char * szKeyBindingsKey, const char * szKeyBindingsDefaultValue);
00055 virtual XAP_Frame * newFrame(void) = 0;
00056 virtual void reallyExit(void);
00057
00058 virtual HINSTANCE getInstance() const;
00059
00060 virtual XAP_DialogFactory * getDialogFactory(void);
00061 virtual XAP_Toolbar_ControlFactory * getControlFactory(void);
00062 virtual const XAP_StringSet * getStringSet(void) const = 0;
00063 virtual const char * getAbiSuiteAppDir(void) const = 0;
00064 virtual void copyToClipboard(PD_DocumentRange * pDocRange, bool bUseClipboard = true) = 0;
00065 virtual void pasteFromClipboard(PD_DocumentRange * pDocRange, bool, bool) = 0;
00066 virtual bool canPasteFromClipboard(void) = 0;
00067 virtual void cacheCurrentSelection(AV_View *) = 0;
00068 virtual const char * getUserPrivateDirectory(void) const;
00069
00070 virtual HICON getIcon(void) = 0;
00071 virtual HICON getSmallIcon(void) = 0;
00072
00073 virtual UT_Error fileOpen(XAP_Frame * pFrame, const char * pNewFile) = 0;
00074
00075 void enableAllTopLevelWindows(bool);
00076 virtual UT_sint32 setupWindowFromPrefs(UT_sint32 iCmdShow, HWND hwndFrame);
00077 virtual XAP_App::BidiSupportType theOSHasBidiSupport() const {return m_eBidiOS;}
00078
00079 void getDefaultGeometry(UT_uint32& width,
00080 UT_uint32& height,
00081 UT_uint32& flags);
00082
00083 void setHKL(HKL hkl) {m_hkl = hkl;}
00084 HKL getHKL()const {return m_hkl;}
00085 void setKbdLanguage(HKL hkl);
00086
00087 protected:
00088 UT_uint32 _getExeDir(LPWSTR pDirBuf, UT_uint32 iBufLen);
00089 void _setAbiSuiteLibDir(void);
00090 void _setBidiOS(void);
00091 virtual const char * _getKbdLanguage();
00092
00093 HINSTANCE m_hInstance;
00094 AP_Win32DialogFactory m_dialogFactory;
00095 AP_Win32Toolbar_ControlFactory m_controlFactory;
00096
00097 XAP_Win32Slurp * m_pSlurp;
00098 static char m_buffer[MAX_CONVBUFFER*6];
00099 static WCHAR m_wbuffer[MAX_CONVBUFFER];
00100
00101 private:
00102 XAP_App::BidiSupportType m_eBidiOS;
00103 HKL m_hkl;
00104
00105 };
00106
00107 #endif