X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4e7a37b4b048689e934f02fa20bc10176bd9787a..86ac84b8ce086e6bbda58f422d41f84268606e35:/include/wx/propgrid/manager.h diff --git a/include/wx/propgrid/manager.h b/include/wx/propgrid/manager.h index 5459534ea7..3371c5695e 100644 --- a/include/wx/propgrid/manager.h +++ b/include/wx/propgrid/manager.h @@ -27,7 +27,7 @@ // ----------------------------------------------------------------------- #ifndef SWIG -extern WXDLLIMPEXP_PROPGRID const wxChar *wxPropertyGridManagerNameStr; +extern WXDLLIMPEXP_DATA_PROPGRID(const char) wxPropertyGridManagerNameStr[]; #endif /** @class wxPropertyGridPage @@ -65,9 +65,7 @@ class WXDLLIMPEXP_PROPGRID wxPropertyGridPage : public wxEvtHandler, public wxPropertyGridPageState { friend class wxPropertyGridManager; -#ifndef SWIG DECLARE_CLASS(wxPropertyGridPage) -#endif public: wxPropertyGridPage(); @@ -163,14 +161,8 @@ protected: */ virtual void DoSetSplitterPosition( int pos, int splitterColumn = 0, - bool allPages = false ); - - /** Propagate to other pages. - */ - void DoSetSplitterPositionThisPage( int pos, int splitterColumn = 0 ) - { - wxPropertyGridPageState::DoSetSplitterPosition( pos, splitterColumn ); - } + bool allPages = false, + bool fromAutoCenter = false ); /** Page label (may be referred as name in some parts of documentation). Can be set in constructor, or passed in @@ -218,39 +210,18 @@ private: class WXDLLIMPEXP_PROPGRID wxPropertyGridManager : public wxPanel, public wxPropertyGridInterface { -#ifndef SWIG DECLARE_CLASS(wxPropertyGridManager) -#endif friend class wxPropertyGridPage; public: -#ifdef SWIG - %pythonAppend wxPropertyGridManager { - self._setOORInfo(self) - self.DoDefaultTypeMappings() - self.edited_objects = {} - self.DoDefaultValueTypeMappings() - if not hasattr(self.__class__,'_vt2setter'): - self.__class__._vt2setter = {} - } - %pythonAppend wxPropertyGridManager() "" - - wxPropertyGridManager( wxWindow *parent, wxWindowID id = wxID_ANY, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = wxPGMAN_DEFAULT_STYLE, - const wxChar* name = - wxPyPropertyGridManagerNameStr ); - %RenameCtor(PrePropertyGridManager, wxPropertyGridManager()); - -#else - +#ifndef SWIG /** Two step constructor. Call Create when this constructor is called to build up the wxPropertyGridManager. */ wxPropertyGridManager(); +#endif /** The default constructor. The styles to be used are styles valid for the wxWindow. @@ -260,13 +231,11 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPGMAN_DEFAULT_STYLE, - const wxChar* name = wxPropertyGridManagerNameStr ); + const wxString& name = wxPropertyGridManagerNameStr ); /** Destructor */ virtual ~wxPropertyGridManager(); -#endif - /** Creates new property page. Note that the first page is not created automatically. @param label @@ -320,7 +289,7 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxPGMAN_DEFAULT_STYLE, - const wxChar* name = wxPropertyGridManagerNameStr ); + const wxString& name = wxPropertyGridManagerNameStr ); /** Enables or disables (shows/hides) categories according to parameter @@ -448,10 +417,12 @@ public: */ int GetPageByState( const wxPropertyGridPageState* pstate ) const; +protected: /** Returns wxPropertyGridPageState of given page, current page's for -1. */ virtual wxPropertyGridPageState* GetPageState( int page ) const; +public: /** Returns number of managed pages. */ size_t GetPageCount() const; @@ -592,39 +563,28 @@ public: */ void SetSplitterPosition( int pos, int column = 0 ); -#ifdef SWIG - %pythoncode { - def GetValuesFromPage(self, - page, - dict_=None, - as_strings=False, - inc_attributes=False): - "Same as GetValues, but returns values from specific page only." - "For argument descriptions, see GetValues." - return page.GetPropertyValues(dict_, as_strings, inc_attributes) - } -#endif - protected: // // Subclassing helpers // - /** Creates property grid for the manager. Override to use subclassed - wxPropertyGrid. + /** + Creates property grid for the manager. Reimplement in derived class to + use subclassed wxPropertyGrid. However, if you you do this then you + must also use the two-step construction (ie. default constructor and + Create() instead of constructor with arguments) when creating the + manager. */ virtual wxPropertyGrid* CreatePropertyGrid() const; - virtual void RefreshProperty( wxPGProperty* p ); - public: + virtual void RefreshProperty( wxPGProperty* p ); // // Overridden functions - no documentation required. // - virtual wxSize DoGetBestSize() const; void SetId( wxWindowID winid ); virtual void Freeze(); @@ -632,8 +592,10 @@ public: virtual void SetExtraStyle ( long exStyle ); virtual bool SetFont ( const wxFont& font ); virtual void SetWindowStyleFlag ( long style ); + virtual bool Reparent( wxWindowBase *newParent ); protected: + virtual wxSize DoGetBestSize() const; public: @@ -711,6 +673,8 @@ protected: virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle) const; #endif*/ + virtual bool ProcessEvent( wxEvent& event ); + /** Recalculates new positions for components, according to the given size. */ @@ -719,13 +683,12 @@ protected: /** (Re)creates/destroys controls, according to the window style bits. */ void RecreateControls(); - void RefreshHelpBox( int new_splittery, int new_width, int new_height ); + void UpdateDescriptionBox( int new_splittery, int new_width, int new_height ); - void RepaintSplitter( wxDC& dc, - int new_splittery, - int new_width, - int new_height, - bool desc_too ); + void RepaintDescBoxDecorations( wxDC& dc, + int newSplitterY, + int newWidth, + int newHeight ); void SetDescribedProperty( wxPGProperty* p ); @@ -733,8 +696,6 @@ protected: virtual bool SetEditableStateItem( const wxString& name, wxVariant value ); virtual wxVariant GetEditableStateItem( const wxString& name ) const; - virtual bool ProcessEvent( wxEvent& event ); - private: DECLARE_EVENT_TABLE() #endif // #ifndef SWIG