wxPGCachedString m_strbool;
wxPGCachedString m_strlist;
+ wxPGCachedString m_strDefaultValue;
wxPGCachedString m_strMin;
wxPGCachedString m_strMax;
wxPGCachedString m_strUnits;
#define wxPGVariant_Bool(A) (A?wxPGVariant_True:wxPGVariant_False)
+// When wxPG is loaded dynamically after the application is already running
+// then the built-in module system won't pick this one up. Add it manually.
+WXDLLIMPEXP_PROPGRID void wxPGInitResourceModule();
+
#endif // !SWIG
// -----------------------------------------------------------------------
friend class wxPropertyGridManager;
friend class wxPGCanvas;
-#ifndef SWIG
DECLARE_DYNAMIC_CLASS(wxPropertyGrid)
-#endif
public:
-#ifdef SWIG
- %pythonAppend wxPropertyGrid {
- self._setOORInfo(self)
- self.DoDefaultTypeMappings()
- self.edited_objects = {}
- self.DoDefaultValueTypeMappings()
- if not hasattr(self.__class__,'_vt2setter'):
- self.__class__._vt2setter = {}
- }
- %pythonAppend wxPropertyGrid() ""
-
- wxPropertyGrid( wxWindow *parent, wxWindowID id = wxID_ANY,
- const wxPoint& pos = wxDefaultPosition,
- const wxSize& size = wxDefaultSize,
- long style = wxPG_DEFAULT_STYLE,
- const wxChar* name = wxPyPropertyGridNameStr );
- %RenameCtor(PrePropertyGrid, wxPropertyGrid());
-#else
-
+#ifndef SWIG
/**
Two step constructor.
wxPropertyGrid
*/
wxPropertyGrid();
+#endif
/** The default constructor. The styles to be used are styles valid for
the wxWindow and wxScrolledWindow.
/** Destructor */
virtual ~wxPropertyGrid();
-#endif
/** Adds given key combination to trigger given action.
*/
bool IsFrozen() const { return (m_frozen>0)?true:false; }
+ /**
+ Call this any time your code causes wxPropertyGrid's top-level parent
+ to change.
+
+ @param newTLP
+ New top-level parent that is about to be set. Old top-level parent
+ window should still exist as the current one.
+
+ @remarks This function is automatically called from wxPropertyGrid::
+ Reparent() and wxPropertyGridManager::Reparent(). You only
+ need to use it if you reparent wxPropertyGrid indirectly.
+ */
+ void OnTLPChanging( wxWindow* newTLP );
+
/** Redraws given property.
*/
virtual void RefreshProperty( wxPGProperty* p );
Pointer to the editor class instance that should be used.
*/
static wxPGEditor* RegisterEditorClass( wxPGEditor* editor,
- bool noDefCheck = false );
+ bool noDefCheck = false )
+ {
+ return DoRegisterEditorClass(editor, wxEmptyString, noDefCheck);
+ }
+
+ static wxPGEditor* DoRegisterEditorClass( wxPGEditor* editorClass,
+ const wxString& editorName,
+ bool noDefCheck = false );
#endif
/** Resets all colours to the original system values.
virtual void Freeze();
virtual void SetExtraStyle( long exStyle );
virtual void Thaw();
-
+ virtual bool Reparent( wxWindowBase *newParent );
protected:
virtual wxSize DoGetBestSize() const;
// handling mess).
wxWindow* m_curFocused;
- // wxPGTLWHandler
- wxEvtHandler* m_tlwHandler;
-
- // Top level parent
+ // Last known top-level parent
wxWindow* m_tlp;
// Sort function
void OnSysColourChanged( wxSysColourChangedEvent &event );
+ void OnTLPClose( wxCloseEvent& event );
+
protected:
/**
return 0;
}
+inline void wxPGProperty::SetDefaultValue( wxVariant& value )
+{
+ SetAttribute(wxPG_ATTR_DEFAULT_VALUE, value);
+}
+
inline void wxPGProperty::SetEditor( const wxString& editorName )
{
m_customEditor = wxPropertyGridInterface::GetEditorByName(editorName);