X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e90c1d2a19361551eb07778280f22be3e759cf64..b4b830ec00c099ae83596fa3fe9d8a4398fd2929:/include/wx/proplist.h diff --git a/include/wx/proplist.h b/include/wx/proplist.h index 2a7bc18e83..5fdf1bdcce 100644 --- a/include/wx/proplist.h +++ b/include/wx/proplist.h @@ -46,7 +46,10 @@ #pragma interface "proplist.h" #endif +#if wxUSE_PROPSHEET + #include "wx/prop.h" +#include "wx/panel.h" #define wxPROP_BUTTON_CLOSE 1 #define wxPROP_BUTTON_OK 2 @@ -191,15 +194,22 @@ private: class WXDLLEXPORT wxPropertyTextEdit: public wxTextCtrl { - DECLARE_CLASS(wxPropertyTextEdit) - public: - wxPropertyTextEdit(wxPropertyListView *v, wxWindow *parent, const wxWindowID id, - const wxString& value, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, long style = 0, const wxString& name = "text"); - void OnSetFocus(void); - void OnKillFocus(void); +public: + wxPropertyTextEdit(wxPropertyListView *v = NULL, + wxWindow *parent = NULL, + const wxWindowID id = -1, + const wxString& value = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = _T("text")); + + void OnSetFocus(); + void OnKillFocus(); - wxPropertyListView* m_view; + wxPropertyListView* m_view; + + DECLARE_CLASS(wxPropertyTextEdit) }; #define wxPROP_ALLOW_TEXT_EDITING 1 @@ -272,22 +282,27 @@ class WXDLLEXPORT wxPropertyListValidator: public wxPropertyValidator class WXDLLEXPORT wxPropertyListDialog: public wxDialog { - DECLARE_CLASS(wxPropertyListDialog) - public: - wxPropertyListDialog(wxPropertyListView *v, wxWindow *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox"); - void OnCloseWindow(wxCloseEvent& event); - void OnDefaultAction(wxControl *item); - void OnCancel(wxCommandEvent& event); +public: + wxPropertyListDialog(wxPropertyListView *v = NULL, + wxWindow *parent = NULL, + const wxString& title = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_DIALOG_STYLE, + const wxString& name = _T("dialogBox")); - // Extend event processing to search the view's event table - virtual bool ProcessEvent(wxEvent& event); + void OnCloseWindow(wxCloseEvent& event); + void OnDefaultAction(wxControl *item); + void OnCancel(wxCommandEvent& event); - private: - wxPropertyListView* m_view; + // Extend event processing to search the view's event table + virtual bool ProcessEvent(wxEvent& event); -DECLARE_EVENT_TABLE() +private: + wxPropertyListView* m_view; + + DECLARE_CLASS(wxPropertyListDialog) + DECLARE_EVENT_TABLE() }; /* @@ -296,31 +311,34 @@ DECLARE_EVENT_TABLE() class WXDLLEXPORT wxPropertyListPanel: public wxPanel { - DECLARE_CLASS(wxPropertyListPanel) - public: - wxPropertyListPanel(wxPropertyListView *v, wxWindow *parent, const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, const wxString& name = "panel"): - wxPanel(parent, -1, pos, size, style, name) - { - m_view = v; - } - ~wxPropertyListPanel(); - void OnDefaultAction(wxControl *item); - - inline void SetView(wxPropertyListView* v) { m_view = v; } - inline wxPropertyListView* GetView() const { return m_view; } - - // Extend event processing to search the view's event table - virtual bool ProcessEvent(wxEvent& event); - - // Call Layout() - void OnSize(wxSizeEvent& event); +public: + wxPropertyListPanel(wxPropertyListView *v = NULL, + wxWindow *parent = NULL, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = _T("panel")) + : wxPanel(parent, -1, pos, size, style, name) + { + m_view = v; + } + ~wxPropertyListPanel(); + void OnDefaultAction(wxControl *item); + + inline void SetView(wxPropertyListView* v) { m_view = v; } + inline wxPropertyListView* GetView() const { return m_view; } + + // Extend event processing to search the view's event table + virtual bool ProcessEvent(wxEvent& event); + + // Call Layout() + void OnSize(wxSizeEvent& event); - private: - wxPropertyListView* m_view; +private: + wxPropertyListView* m_view; -DECLARE_EVENT_TABLE() + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxPropertyListPanel) }; /* @@ -329,28 +347,33 @@ DECLARE_EVENT_TABLE() class WXDLLEXPORT wxPropertyListFrame: public wxFrame { - DECLARE_CLASS(wxPropertyListFrame) - public: - wxPropertyListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title, - const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"): - wxFrame(parent, -1, title, pos, size, style, name) - { - m_view = v; - m_propertyPanel = NULL; - } - void OnCloseWindow(wxCloseEvent& event); - - // Must call this to create panel and associate view - virtual bool Initialize(void); - virtual wxPropertyListPanel *OnCreatePanel(wxFrame *parent, wxPropertyListView *v); - inline virtual wxPropertyListPanel *GetPropertyPanel(void) const { return m_propertyPanel; } - - private: - wxPropertyListView* m_view; - wxPropertyListPanel* m_propertyPanel; +public: + wxPropertyListFrame(wxPropertyListView *v = NULL, + wxFrame *parent = NULL, + const wxString& title = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = wxDEFAULT_FRAME_STYLE, + const wxString& name = _T("frame")) + : wxFrame(parent, -1, title, pos, size, style, name) + { + m_view = v; + m_propertyPanel = NULL; + } + void OnCloseWindow(wxCloseEvent& event); + + // Must call this to create panel and associate view + virtual bool Initialize(void); + virtual wxPropertyListPanel *OnCreatePanel(wxFrame *parent, wxPropertyListView *v); + inline virtual wxPropertyListPanel *GetPropertyPanel(void) const { return m_propertyPanel; } + inline wxPropertyListView* GetView() const { return m_view; } -DECLARE_EVENT_TABLE() +private: + wxPropertyListView* m_view; + wxPropertyListPanel* m_propertyPanel; + + DECLARE_EVENT_TABLE() + DECLARE_CLASS(wxPropertyListFrame) }; /* @@ -478,7 +501,7 @@ class WXDLLEXPORT wxFilenameListValidator: public wxPropertyListValidator { DECLARE_DYNAMIC_CLASS(wxFilenameListValidator) public: - wxFilenameListValidator(wxString message = "Select a file", wxString wildcard = "*.*", long flags = 0); + wxFilenameListValidator(wxString message = "Select a file", wxString wildcard = wxALL_FILES_PATTERN, long flags = 0); ~wxFilenameListValidator(void); @@ -552,11 +575,14 @@ class WXDLLEXPORT wxListOfStringsListValidator: public wxPropertyListValidator // Called when the property is double clicked. bool OnDoubleClick(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); - bool EditStringList(wxWindow *parent, wxStringList *stringList, const wxChar *title = T("String List Editor")); + bool EditStringList(wxWindow *parent, wxStringList *stringList, const wxChar *title = wxT("String List Editor")); // Called when the edit (...) button is pressed. void OnEdit(wxProperty *property, wxPropertyListView *view, wxWindow *parentWindow); }; +#endif + // wxUSE_PROPSHEET + #endif // _WX_PROPLIST_H_