X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03f68f123bc79f23ff77821cfe80bfa76b0e68c4..2356708db31b737c6eae53c2316b642aa5a2e68d:/utils/dialoged/src/winprop.h diff --git a/utils/dialoged/src/winprop.h b/utils/dialoged/src/winprop.h index 025ddfb263..197963d61a 100644 --- a/utils/dialoged/src/winprop.h +++ b/utils/dialoged/src/winprop.h @@ -20,14 +20,14 @@ class wxPropertyInfo; -class wxDialogEditorPropertyListDialog: public wxPropertyListDialog +class wxDialogEditorPropertyListFrame: public wxPropertyListFrame { friend class wxPropertyInfo; public: - wxDialogEditorPropertyListDialog(wxPropertyListView *v, wxWindow *parent, const wxString& title, + wxDialogEditorPropertyListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox"); - ~wxDialogEditorPropertyListDialog(); + long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"); + ~wxDialogEditorPropertyListFrame(); private: wxPropertySheet* m_propSheet; @@ -40,15 +40,16 @@ private: class wxResourcePropertyListView: public wxPropertyListView { public: - wxPropertyInfo *propertyInfo; - wxResourcePropertyListView(wxPropertyInfo *info, wxPanel *propPanel = NULL, long flags = wxPROP_BUTTON_DEFAULT): wxPropertyListView(propPanel, flags) { - propertyInfo = info; + m_propertyInfo = info; } void OnPropertyChanged(wxProperty *property); bool OnClose(void); + + wxPropertyInfo* m_propertyInfo; + }; // Generic class for relating an object to a collection of properties. @@ -57,7 +58,7 @@ class wxResourcePropertyListView: public wxPropertyListView // them with separate classes. class wxPropertyInfo: public wxObject { - friend class wxDialogEditorPropertyListDialog; + friend class wxDialogEditorPropertyListFrame; protected: static wxWindow *sm_propertyWindow; wxPropertyInfo(void) @@ -76,9 +77,6 @@ class wxPropertyInfo: public wxObject // For all windows class wxWindowPropertyInfo: public wxPropertyInfo { - protected: - wxWindow *propertyWindow; - wxItemResource *propertyResource; public: wxWindowPropertyInfo(wxWindow *win, wxItemResource *res = NULL); ~wxWindowPropertyInfo(void); @@ -86,9 +84,9 @@ class wxWindowPropertyInfo: public wxPropertyInfo bool SetProperty(wxString& name, wxProperty *property); void GetPropertyNames(wxStringList& names); - inline void SetPropertyWindow(wxWindow *win) { propertyWindow = win; } + inline void SetPropertyWindow(wxWindow *win) { m_propertyWindow = win; } - inline void SetResource(wxItemResource *res) { propertyResource = res; } + inline void SetResource(wxItemResource *res) { m_propertyResource = res; } // Helper functions for font properties @@ -97,6 +95,13 @@ class wxWindowPropertyInfo: public wxPropertyInfo // Fill in the wxItemResource members to mirror the current window settings virtual bool InstantiateResource(wxItemResource *resource); + + // Set the window style + void SetWindowStyle(wxWindow* win, long style, bool set); + + protected: + wxWindow* m_propertyWindow; + wxItemResource* m_propertyResource; }; // For panel items @@ -211,6 +216,20 @@ class wxChoicePropertyInfo: public wxItemPropertyInfo bool InstantiateResource(wxItemResource *resource); }; +// For choice items +class wxComboBoxPropertyInfo: public wxChoicePropertyInfo +{ + protected: + public: + wxComboBoxPropertyInfo(wxWindow *win, wxItemResource *res = NULL): + wxChoicePropertyInfo(win, res) {} + ~wxComboBoxPropertyInfo(void) {} + wxProperty *GetProperty(wxString& name); + bool SetProperty(wxString& name, wxProperty *property); + void GetPropertyNames(wxStringList& names); + bool InstantiateResource(wxItemResource *resource); +}; + // For radiobox items class wxRadioBoxPropertyInfo: public wxItemPropertyInfo { @@ -321,6 +340,9 @@ class wxPanelPropertyInfo: public wxWindowPropertyInfo bool SetProperty(wxString& name, wxProperty *property); void GetPropertyNames(wxStringList& names); bool InstantiateResource(wxItemResource *resource); + + // Convert this dialog, and its children, to or from dialog units + void ConvertDialogUnits(bool toDialogUnits); }; int wxStringToFontWeight(wxString& val); @@ -367,7 +389,7 @@ class wxResourceSymbolDialog: public wxDialog public: wxResourceSymbolDialog(wxWindow* parent, const wxWindowID id, const wxString& title, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE); + const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE|wxDIALOG_MODAL); void Init(); @@ -379,6 +401,8 @@ public: bool CheckValues(); void OnOK(wxCommandEvent& event); + void OnComboBoxSelect(wxCommandEvent& event); + void OnSymbolNameUpdate(wxCommandEvent& event); protected: wxString m_symbolName;