X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b7d1985040f01dd84ed89646aed2ab49f48737bd..4f671eebc9595a81ef2380bb7d9541bf401ce700:/include/wx/propgrid/propgrid.h?ds=sidebyside diff --git a/include/wx/propgrid/propgrid.h b/include/wx/propgrid/propgrid.h index 29d257b336..6ebd16505d 100644 --- a/include/wx/propgrid/propgrid.h +++ b/include/wx/propgrid/propgrid.h @@ -894,8 +894,9 @@ public: bool IsFrozen() const { return (m_frozen>0)?true:false; } /** - Call this any time your code causes wxPropertyGrid's top-level parent - to change. + It is recommended that you call this function any time your code causes + wxPropertyGrid's top-level parent to change. wxPropertyGrid's OnIdle() + handler should be able to detect most changes, but it is not perfect. @param newTLP New top-level parent that is about to be set. Old top-level parent @@ -1283,6 +1284,21 @@ public: m_iFlags |= wxPG_FL_VALUE_CHANGE_IN_EVENT; } + /** + You can use this member function, for instance, to detect in + wxPGProperty::OnEvent() if wxPGProperty::SetValueInEvent() was + already called in wxPGEditor::OnEvent(). It really only detects + if was value was changed using wxPGProperty::SetValueInEvent(), which + is usually used when a 'picker' dialog is displayed. If value was + written by "normal means" in wxPGProperty::StringToValue() or + IntToValue(), then this function will return false (on the other hand, + wxPGProperty::OnEvent() is not even called in those cases). + */ + bool WasValueChangedInEvent() const + { + return (m_iFlags & wxPG_FL_VALUE_CHANGE_IN_EVENT) ? true : false; + } + /** Returns true if given event is from first of an array of buttons (as can be in case when wxPGMultiButton is used). */ @@ -1630,6 +1646,12 @@ protected: // Last known top-level parent wxWindow* m_tlp; + // Last closed top-level parent + wxWindow* m_tlpClosed; + + // Local time ms when tlp was closed. + wxLongLong m_tlpClosedTime; + // Sort function wxPGSortCallback m_sortFunction;