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
00023
00024
00025
00026
00027
00028 #ifndef XAP_UNIXAPP_H
00029 #define XAP_UNIXAPP_H
00030
00031 #ifdef HAVE_CONFIG_H
00032 #include "config.h"
00033 #endif
00034
00035 #include <unistd.h>
00036 #include <sys/stat.h>
00037 #include "xap_App.h"
00038 #include "xap_UnixDialogFactory.h"
00039 #include "xap_Unix_TB_CFactory.h"
00040
00041 class AP_UnixToolbar_Icons;
00042 class AV_View;
00043 class XAP_UnixClipboard;
00044
00045
00046
00047
00048
00049
00050
00051 class ABI_EXPORT XAP_UnixApp : public XAP_App
00052 {
00053 public:
00054 XAP_UnixApp(const char* szAppName);
00055 virtual ~XAP_UnixApp();
00056
00057 virtual const char * getDefaultEncoding () const
00058 {
00059 return "UTF-8" ;
00060 }
00061
00062 virtual bool initialize(const char * szKeyBindingsKey, const char * szKeyBindingsDefaultValue);
00063 void shutdown();
00064 virtual XAP_Frame * newFrame() = 0;
00065 virtual void reallyExit();
00066
00067 virtual XAP_DialogFactory * getDialogFactory();
00068 virtual XAP_Toolbar_ControlFactory * getControlFactory();
00069 virtual const XAP_StringSet * getStringSet() const = 0;
00070 virtual const char * getAbiSuiteAppDir() const = 0;
00071 virtual const std::string& getAbiSuiteAppUIDir() const = 0;
00072 virtual void copyToClipboard(PD_DocumentRange * pDocRange, bool bUseClipboard = true) = 0;
00073 virtual void pasteFromClipboard(PD_DocumentRange * pDocRange, bool bUseClipboard, bool bHonorFormatting = true) = 0;
00074 virtual bool canPasteFromClipboard() = 0;
00075 virtual const char * getUserPrivateDirectory();
00076
00077 virtual void setSelectionStatus(AV_View * pView) = 0;
00078 virtual void clearSelection() = 0;
00079 virtual bool getCurrentSelection(const char** formatList,
00080 void ** ppData, UT_uint32 * pLen,
00081 const char **pszFormatFound) = 0;
00082 virtual void cacheCurrentSelection(AV_View *) = 0;
00083
00084 virtual XAP_UnixClipboard * getClipboard () = 0;
00085
00086 enum
00087 {
00088 GEOMETRY_FLAG_POS = 1 << 0,
00089 GEOMETRY_FLAG_SIZE = 1 << 1
00090 };
00091
00092 struct windowGeometry
00093 {
00094 int x, y;
00095 UT_uint32 width, height;
00096 UT_uint32 flags;
00097 };
00098
00099 virtual void setWinGeometry(int x, int y, UT_uint32 width, UT_uint32 height,
00100 UT_uint32 flags);
00101 virtual void getWinGeometry(int * x, int * y, UT_uint32 * width, UT_uint32 * height,
00102 UT_uint32* flags);
00103
00104 void setTimeOfLastEvent(UT_uint32 eventTime);
00105 UT_uint32 getTimeOfLastEvent() const { return m_eventTime; };
00106 virtual UT_sint32 makeDirectory(const char * szPath, const UT_sint32 mode ) const;
00107 virtual XAP_App::BidiSupportType theOSHasBidiSupport() const {return BIDI_SUPPORT_GUI;}
00108 char ** getTmpFile(void)
00109 { return &m_szTmpFile;}
00110 void removeTmpFile(void);
00111 protected:
00112 void _setAbiSuiteLibDir();
00113
00114 AP_UnixDialogFactory m_dialogFactory;
00115 AP_UnixToolbar_ControlFactory m_controlFactory;
00116
00117 windowGeometry m_geometry;
00118 UT_uint32 m_eventTime;
00119
00120
00121
00122 #if defined(EMBEDDED_TARGET) && EMBEDDED_TARGET == EMBEDDED_TARGET_HILDON
00123 class XAP_UnixHildonApp * m_pUnixHildonApp;
00124 #endif
00125 char * m_szTmpFile;
00126 };
00127
00128 #endif