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 #ifndef XAP_Win32PropertySheet_H
00021 #define XAP_Win32PropertySheet_H
00022
00023 #include <commctrl.h>
00024 #include "ut_vector.h"
00025 #include "xap_Frame.h"
00026 #include "xap_Win32DialogBase.h"
00027 #define ID_APPLY 0x3021
00028
00029
00030
00031 class XAP_Win32PropertySheet;
00032
00033
00034 #ifdef STRICT
00035 #define WHICHPROC WNDPROC
00036 #else
00037 #define WHICHPROC FARPROC
00038 #endif
00039
00040 #define ID_APPLY_NOW 0x3021
00041
00042
00043 class ABI_EXPORT XAP_Win32PropertyPage : public XAP_Win32DialogBase
00044 {
00045 public:
00046
00047 XAP_Win32PropertyPage();
00048 virtual ~XAP_Win32PropertyPage();
00049
00050 void createPage(XAP_Win32App* pWin32App, WORD wRscID, XAP_String_Id nID = 0);
00051 PROPSHEETPAGEW* getStruct(){return &m_page;}
00052 XAP_Win32App* getApp(){return m_pWin32App;}
00053 HWND getHandle(){return m_hDlg;}
00054 void setDialogProc(DLGPROC pfnDlgProc){m_pfnDlgProc=pfnDlgProc;};
00055 virtual void _onInitDialog(){};
00056 virtual void _onKillActive(){};
00057 virtual void _onOK(){};
00058 virtual void _onApply(){};
00059 virtual void _onNotify(LPNMHDR , int ){};
00060 static INT_PTR CALLBACK s_pageWndProc(HWND hWnd, UINT msg, WPARAM wParam,LPARAM lParam);
00061 void setChanged (bool bChanged);
00062
00063
00064 private:
00065
00066 PROPSHEETPAGEW m_page;
00067 HPROPSHEETPAGE m_hdle;
00068 XAP_Win32App* m_pWin32App;
00069 XAP_Win32PropertySheet* m_pParent;
00070 DLGPROC m_pfnDlgProc;
00071 UT_Win32LocaleString m_title;
00072
00073 };
00074
00075
00076 class ABI_EXPORT XAP_Win32PropertySheet
00077 {
00078 public:
00079 XAP_Win32PropertySheet();
00080
00081 public:
00082
00083 int runModal(XAP_Win32App* pWin32App,XAP_Frame* pFrame, XAP_String_Id nID = 0);
00084 int runModeless (XAP_Win32App* pWin32App, XAP_Frame * pFrame, XAP_String_Id nID = 0);
00085 void addPage(XAP_Win32PropertyPage* pPage);
00086 PROPSHEETPAGEW* _buildPageArray(void);
00087 static INT_PTR CALLBACK s_sheetWndProc(HWND hWnd, UINT msg, WPARAM wParam,LPARAM lParam);
00088 virtual void _onInitDialog(HWND ){};
00089 virtual void destroy(void);
00090 virtual void cleanup(void);
00091 HWND getHandle(){return m_hWnd;}
00092
00093 void setCallBack(PFNPROPSHEETCALLBACK pCallback) {m_pCallback=pCallback;};
00094 void setDialogProc(DLGPROC pfnDlgProc){m_pfnDlgProc=pfnDlgProc;};
00095 void setApplyButton(bool b){m_bApplyButton=b;};
00096 void setOkButton(bool b){m_bOkButton=b;};
00097 void setCancelButton(bool b){m_bCancelButton=b;};
00098
00099
00100 virtual BOOL _onCommand(HWND , WPARAM , LPARAM ){return 1;};
00101 virtual void _onOK(){};
00102 virtual void _onApply(){};
00103 virtual void _onCancel(){};
00104
00105 int m_nRslt;
00106 private:
00107
00108 HWND m_hWnd;
00109 UT_Vector m_vecPages;
00110 PROPSHEETHEADERW m_psh;
00111 PFNPROPSHEETCALLBACK m_pCallback;
00112 DLGPROC m_pfnDlgProc;
00113 WHICHPROC m_lpfnDefSheet;
00114 bool m_bApplyButton;
00115 bool m_bOkButton;
00116 bool m_bCancelButton;
00117 PROPSHEETPAGEW* m_pages;
00118 bool m_modeless;
00119
00120 };
00121
00122 #endif