Logo Search packages:      
Sourcecode: saga version File versions  Download package

wxPropertyGrid Class Reference

#include <propgrid.h>

Inheritance diagram for wxPropertyGrid:

wxPropertyGridInterface

List of all members.


Detailed Description

wxPropertyGrid is a specialized two-column grid for editing properties such as strings, numbers, flagsets, fonts, and colours. wxPropertySheet used to do the very same thing, but it hasn't been updated for a while and it is currently deprecated.

Please note that most member functions are inherited and as such not documented on this page. This means you will probably also want to read wxPropertyGridInterface class reference.

Derived from

wxPropertyGridInterface
wxScrolledWindow
wxPanel
wxWindow
wxEvtHandler
wxObject

Include files

<wx/propertygrid/propertygrid.h>

Window styles

Additional Window Styles

Event handling

To process input from a propertygrid control, use these event handler macros to direct input to member functions that take a wxPropertyGridEvent argument.

EVT_PG_SELECTED (id, func)Property is selected.
EVT_PG_CHANGED (id, func)Property value is modified.
EVT_PG_CHANGING (id, func)Property value is about to be changed. Use wxPropertyGridEvent::GetValue() to take a peek at the pending value, and wxPropertyGridEvent::Veto() to prevent change from taking place, if necessary.
EVT_PG_HIGHLIGHTED (id, func)Mouse moves over property. Event's property is NULL if hovered on area that is not a property.
EVT_PG_RIGHT_CLICK (id, func)Mouse right-clicked on a property.
EVT_PG_DOUBLE_CLICK (id, func)Mouse double-clicked on a property.
EVT_PG_ITEM_COLLAPSED (id, func)User collapses a property or category.
EVT_PG_ITEM_EXPANDED (id, func)User expands a property or category.
EVT_BUTTON (id, func)Button in a property editor was clicked. Only occurs if the property doesn't handle button clicks itself.
EVT_TEXT (id, func)wxTextCtrl based editor was updated (but property value was not yet modified)

See also:
wxPropertyGridEvent
Remarks:

For code examples, see the main page.

Definition at line 5962 of file propgrid.h.


Public Types

enum  EditableStateFlags {
  SelectionState = 0x01, ExpandedState = 0x02, ScrollPosState = 0x04, PageState = 0x08,
  SplitterPosState = 0x10, DescBoxState = 0x20, AllStates
}

Public Member Functions

void AddActionTrigger (int action, int keycode, int modifiers=0)
void AddPropertyChoice (wxPGPropArg id, const wxString &label, int value=wxPG_INVALID_VALUE)
bool AdjustPosForClipperWindow (wxWindow *topCtrlWnd, int *x, int *y)
wxPGPropertyAppend (wxPGProperty *property)
wxPGPropertyAppendIn (wxPGPropArg id, wxPGProperty *newproperty)
void BeginAddChildren (wxPGPropArg id)
bool CanClose ()
void CenterSplitter (bool enable_auto_centering=false)
bool ChangePropertyValue (wxPGPropArg id, wxVariant newValue)
virtual void Clear ()
void ClearActionTriggers (int action)
void ClearInternalFlag (long flag)
void ClearModifiedStatus ()
void ClearModifiedStatus (wxPGPropArg id)
bool ClearPropertyValue (wxPGPropArg id)
bool ClearSelection (bool validation=true)
bool Collapse (wxPGPropArg id)
bool CollapseAll ()
virtual bool CommitChangesFromEditor (wxUint32 flags=0)
bool Create (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxPG_DEFAULT_STYLE, const wxChar *name=wxPropertyGridNameStr)
void DecFrozen ()
void DeleteProperty (wxPGPropArg id)
void DeletePropertyChoice (wxPGPropArg id, int index)
bool DisableProperty (wxPGPropArg id)
virtual bool DoOnValidationFailure (wxPGProperty *property, wxVariant &invalidValue)
virtual void DoOnValidationFailureReset (wxPGProperty *property)
virtual bool DoPropertyChanged (wxPGProperty *p, unsigned int selFlags=0)
virtual void DoShowPropertyError (wxPGProperty *property, const wxString &msg)
void DrawItem (wxPGProperty *p)
virtual void DrawItemAndChildren (wxPGProperty *p)
void DrawItemAndValueRelated (wxPGProperty *p)
void EditorsValueWasModified ()
void EditorsValueWasNotModified ()
bool EditorValidate ()
bool EnableCategories (bool enable)
bool EnableProperty (wxPGPropArg id, bool enable=true)
void EndAddChildren (wxPGPropArg id)
bool EnsureVisible (wxPGPropArg id)
bool Expand (wxPGPropArg id)
bool ExpandAll (bool expand=true)
wxSize FitColumns ()
void FixPosForTextCtrl (wxWindow *ctrl, const wxPoint &offset=wxPoint(0, 0))
wxWindow * GenerateEditorButton (const wxPoint &pos, const wxSize &sz)
wxWindow * GenerateEditorTextCtrl (const wxPoint &pos, const wxSize &sz, const wxString &value, wxWindow *secondary, int extraStyle=0, int maxLen=0)
wxWindow * GenerateEditorTextCtrlAndButton (const wxPoint &pos, const wxSize &sz, wxWindow **psecondary, int limited_editing, wxPGProperty *property)
wxColour GetCaptionBackgroundColour () const
const wxFont & GetCaptionFont () const
wxFont & GetCaptionFont ()
wxColour GetCaptionForegroundColour () const
wxColour GetCellBackgroundColour () const
wxColour GetCellDisabledTextColour () const
wxColour GetCellTextColour () const
unsigned int GetChildrenCount (wxPGPropArg id) const
unsigned int GetChildrenCount ()
unsigned int GetColumnCount () const
const wxPGCommonValueGetCommonValue (unsigned int i) const
unsigned int GetCommonValueCount () const
wxString GetCommonValueLabel (unsigned int i) const
wxWindow * GetEditorControl () const
wxWindow * GetEditorControlSecondary () const
wxTextCtrl * GetEditorTextCtrl () const
wxColour GetEmptySpaceColour () const
wxArrayPGProperty GetExpandedProperties () const
const wxPGPropertyGetFirst (int flags=wxPG_ITERATE_ALL) const
wxPGPropertyGetFirst (int flags=wxPG_ITERATE_ALL)
wxPGPropertyGetFirstCategory () const
wxPGPropertyGetFirstChild (wxPGPropArg id)
wxPGPropertyGetFirstProperty ()
wxPGPropertyGetFirstVisible ()
const wxPGPropertyGetFirstVisible () const
int GetFontHeight () const
wxPoint GetGoodEditorDialogPosition (wxPGProperty *p, const wxSize &sz)
wxPropertyGridGetGrid ()
wxRect GetImageRect (wxPGProperty *p, int item) const
wxSize GetImageSize (wxPGProperty *p=NULL, int item=-1) const
long GetInternalFlags () const
wxPGPropertyGetItemAtY (int y) const
wxPropertyGridConstIterator GetIterator (int flags, int startPos) const
wxPropertyGridIterator GetIterator (int flags, int startPos)
wxPropertyGridConstIterator GetIterator (int flags=wxPG_ITERATE_DEFAULT, wxPGProperty *firstProp=NULL) const
wxPropertyGridIterator GetIterator (int flags=wxPG_ITERATE_DEFAULT, wxPGProperty *firstProp=NULL)
wxPGPropertyGetLastChild (wxPGPropArg id)
const wxPGPropertyGetLastItem (int flags=wxPG_ITERATE_DEFAULT) const
wxPGPropertyGetLastItem (int flags=wxPG_ITERATE_DEFAULT)
wxPGPropertyGetLastProperty ()
wxPGPropertyGetLastVisible ()
wxColour GetLineColour () const
wxColour GetMarginColour () const
wxPGPropertyGetNextCategory (wxPGPropArg id) const
wxPGPropertyGetNextProperty (wxPGPropArg id)
wxPGPropertyGetNextSiblingProperty (wxPGPropArg id)
wxPGPropertyGetNextVisible (wxPGPropArg id) const
wxPanel * GetPanel () const
wxPGPropertyGetPrevProperty (wxPGPropArg id)
wxPGPropertyGetPrevSiblingProperty (wxPGPropArg id)
wxPGPropertyGetPrevVisible (wxPGPropArg id)
wxWindow * GetPrimaryEditor () const
void GetPropertiesWithFlag (wxArrayPGProperty *targetArr, wxPGProperty::FlagType flags, bool inverse=false, int iterFlags=(wxPG_ITERATE_PROPERTIES|wxPG_ITERATE_HIDDEN|wxPG_ITERATE_CATEGORIES)) const
wxPGPropertyGetProperty (wxPGPropNameStr name) const
wxVariant GetPropertyAttribute (wxPGPropArg id, const wxString &attrName) const
const wxPGAttributeStorageGetPropertyAttributes (wxPGPropArg id) const
wxColour GetPropertyBackgroundColour (wxPGPropArg id) const
wxPGPropertyGetPropertyByLabel (const wxString &name) const
wxPGPropertyGetPropertyByName (wxPGPropNameStr name, wxPGPropNameStr subname) const
wxPGPropertyGetPropertyByName (wxPGPropNameStr name) const
wxPGPropertyGetPropertyByNameA (wxPGPropNameStr name) const
wxPropertyCategoryGetPropertyCategory (wxPGPropArg id) const
wxPGChoicesGetPropertyChoices (wxPGPropArg id)
wxPG_CONST_WXCHAR_PTR GetPropertyClassName (wxPGPropArg id) const
wxPGProperty::ClientDataType GetPropertyClientData (wxPGPropArg id) const
wxColour GetPropertyColour (wxPGPropArg id) const
const wxPGEditorGetPropertyEditor (wxPGPropArg id) const
wxString GetPropertyHelpString (wxPGPropArg id) const
wxBitmap * GetPropertyImage (wxPGPropArg id) const
unsigned int GetPropertyIndex (wxPGPropArg id)
const wxString & GetPropertyLabel (wxPGPropArg id)
wxString GetPropertyName (wxPGPropArg id)
wxPGPropertyGetPropertyParent (wxPGPropArg id)
wxPGPropertyGetPropertyPtr (wxPGPropArg id) const
wxRect GetPropertyRect (const wxPGProperty *p1, const wxPGProperty *p2) const
wxString GetPropertyShortClassName (wxPGPropArg id)
wxColour GetPropertyTextColour (wxPGPropArg id) const
wxValidator * GetPropertyValidator (wxPGPropArg id)
wxVariant GetPropertyValue (wxPGPropArg id)
wxArrayInt GetPropertyValueAsArrayInt (wxPGPropArg id) const
wxArrayString GetPropertyValueAsArrayString (wxPGPropArg id) const
bool GetPropertyValueAsBool (wxPGPropArg id) const
wxDateTime GetPropertyValueAsDateTime (wxPGPropArg id) const
double GetPropertyValueAsDouble (wxPGPropArg id) const
int GetPropertyValueAsInt (wxPGPropArg id) const
long GetPropertyValueAsLong (wxPGPropArg id) const
wxLongLong_t GetPropertyValueAsLongLong (wxPGPropArg id) const
wxPoint GetPropertyValueAsPoint (wxPGPropArg id) const
wxSize GetPropertyValueAsSize (wxPGPropArg id) const
wxString GetPropertyValueAsString (wxPGPropArg id) const
unsigned long GetPropertyValueAsULong (wxPGPropArg id) const
wxULongLong_t GetPropertyValueAsULongLong (wxPGPropArg id) const
void * GetPropertyValueAsVoidPtr (wxPGPropArg id) const
wxObject * GetPropertyValueAsWxObjectPtr (wxPGPropArg id) const
wxVariant GetPropertyValues (const wxString &listname=wxEmptyString, wxPGProperty *baseparent=NULL, long flags=0) const
wxString GetPropertyValueType (wxPGPropArg id)
wxPGPropertyGetRoot () const
int GetRowHeight () const
wxPGPropertyGetSelectedProperty () const
wxPGPropertyGetSelection () const
wxColour GetSelectionBackgroundColour () const
wxColour GetSelectionForegroundColour () const
wxPGSortCallback GetSortFunction () const
int GetSpacingY () const
int GetSplitterPosition () const
wxPropertyGridStateGetState () const
int GetUnspecifiedCommonValue () const
wxPGValidationInfoGetValidationInfo ()
int GetVerticalSpacing () const
virtual wxPGVIterator GetVIterator (int flags) const
bool HasInternalFlag (long flag) const
bool HasSelection () const
bool HasVirtualWidth () const
bool HideProperty (wxPGPropArg id, bool hide=true, int flags=wxPG_RECURSE)
wxPropertyGridHitTestResult HitTest (const wxPoint &pt) const
void IncFrozen ()
wxPGPropertyInsert (wxPGPropArg parent, int index, wxPGProperty *newproperty)
wxPGPropertyInsert (wxPGPropArg priorThis, wxPGProperty *newproperty)
wxPGPropertyInsertCategory (wxPGPropArg id, int index, const wxString &label, const wxString &name=wxPG_LABEL)
void InsertPropertyChoice (wxPGPropArg id, const wxString &label, int index, int value=wxPG_INVALID_VALUE)
bool IsAnyModified () const
bool IsEditorFocused () const
bool IsEditorsValueModified () const
bool IsFrozen () const
bool IsMainButtonEvent (const wxEvent &event)
bool IsPropertyCategory (wxPGPropArg id) const
bool IsPropertyEnabled (wxPGPropArg id) const
bool IsPropertyExpanded (wxPGPropArg id) const
bool IsPropertyKindOf (wxPGPropArg id, wxClassInfo *info) const
bool IsPropertyModified (wxPGPropArg id) const
bool IsPropertyShown (wxPGPropArg id) const
bool IsPropertyUnspecified (wxPGPropArg id) const
void LimitPropertyEditing (wxPGPropArg id, bool limit=true)
void NamesToProperties (wxArrayPGProperty *properties, const wxArrayString &names) const
void OnComboItemPaint (wxPGCustomComboControl *pCb, int item, wxDC &dc, wxRect &rect, int flags)
void OnCustomEditorEvent (wxCommandEvent &event)
void OnTLPChanging (wxWindow *newTLP)
bool OnValidationFailure (wxPGProperty *property, wxVariant &invalidValue)
void OnValidationFailureReset (wxPGProperty *property)
virtual bool PerformValidation (wxPGProperty *p, wxVariant &pendingValue)
void PropertiesToNames (wxArrayString *names, const wxArrayPGProperty &properties) const
void RefreshEditor ()
virtual void RefreshGrid (wxPropertyGridState *state=NULL)
virtual void RefreshProperty (wxPGProperty *p)
wxPGPropertyRemoveProperty (wxPGPropArg id)
wxPGPropertyReplaceProperty (wxPGPropArg id, wxPGProperty *property)
void ResetColours ()
bool RestoreEditableState (const wxString &src, int restoreStates=AllStates)
wxString SaveEditableState (int includedStates=AllStates) const
bool SelectProperty (wxPGPropArg id, bool focus=false)
void SendNavigationKeyEvent (int dir)
void SetButtonShortcut (int keycode, bool ctrlDown=false, bool altDown=false)
void SetCaptionBackgroundColour (const wxColour &col)
void SetCaptionForegroundColour (const wxColour &col)
void SetCaptionTextColour (wxPGPropArg id, const wxColour &col)
void SetCellBackgroundColour (const wxColour &col)
void SetCellDisabledTextColour (const wxColour &col)
void SetCellTextColour (const wxColour &col)
void SetColumnCount (int colCount)
void SetCurrentCategory (wxPGPropArg id)
void SetEmptySpaceColour (const wxColour &col)
void SetExpandedProperties (const wxArrayPGProperty &array, bool expand=true)
void SetInternalFlag (long flag)
void SetLineColour (const wxColour &col)
void SetMarginColour (const wxColour &col)
void SetPropertiesFlag (const wxArrayPGProperty &srcArr, wxPGProperty::FlagType flags, bool inverse=false)
void SetPropertyAttribute (wxPGPropArg id, const wxString &attrName, wxVariant value, long argFlags=0)
void SetPropertyAttributeAll (const wxString &attrName, wxVariant value)
void SetPropertyAttributes (wxPGPropArg id, const wxPGAttributeStorage &attributes)
void SetPropertyBackgroundColour (wxPGPropArg id, const wxColour &col)
void SetPropertyCell (wxPGPropArg id, int column, const wxString &text=wxEmptyString, const wxBitmap &bitmap=wxNullBitmap, const wxColour &fgCol=wxNullColour, const wxColour &bgCol=wxNullColour)
void SetPropertyChoices (wxPGPropArg id, wxPGChoices &choices)
void SetPropertyChoicesExclusive (wxPGPropArg id)
void SetPropertyClientData (wxPGPropArg id, wxPGProperty::ClientDataType clientData)
void SetPropertyColourToDefault (wxPGPropArg id)
void SetPropertyEditor (wxPGPropArg id, const wxString &editorName)
void SetPropertyEditor (wxPGPropArg id, const wxPGEditor *editor)
void SetPropertyHelpString (wxPGPropArg id, const wxString &helpString)
void SetPropertyImage (wxPGPropArg id, wxBitmap &bmp)
void SetPropertyLabel (wxPGPropArg id, const wxString &newproplabel)
bool SetPropertyMaxLength (wxPGPropArg id, int maxLen)
void SetPropertyName (wxPGPropArg id, const wxString &newname)
void SetPropertyReadOnly (wxPGPropArg id, bool set=true, int flags=wxPG_RECURSE)
void SetPropertyTextColour (wxPGPropArg id, const wxColour &col)
void SetPropertyValidator (wxPGPropArg id, const wxValidator &validator)
void SetPropertyValue (wxPGPropArg id, wxVariant value)
void SetPropertyValue (wxPGPropArg id, wxObject &value)
void SetPropertyValue (wxPGPropArg id, void *value)
void SetPropertyValue (wxPGPropArg id, const wxChar *value)
void SetPropertyValue (wxPGPropArg id, int value)
void SetPropertyValueArrint2 (wxPGPropArg id, const wxArrayInt &value)
void SetPropertyValueArrstr2 (wxPGPropArg id, const wxArrayString &value)
void SetPropertyValueBool (wxPGPropArg id, bool value)
void SetPropertyValueDatetime (wxPGPropArg id, const wxDateTime &value)
void SetPropertyValueDouble (wxPGPropArg id, double value)
void SetPropertyValueLong (wxPGPropArg id, long value)
void SetPropertyValueLongLong (wxPGPropArg id, wxLongLong_t value)
void SetPropertyValuePoint (wxPGPropArg id, const wxPoint &value)
void SetPropertyValues (const wxVariant &list, wxPGPropArg defaultCategory=wxNullProperty)
void SetPropertyValues (const wxVariantList &list, wxPGPropArg defaultCategory=wxNullProperty)
void SetPropertyValueSize (wxPGPropArg id, const wxSize &value)
void SetPropertyValueString (wxPGPropArg id, const wxString &value)
void SetPropertyValueULongLong (wxPGPropArg id, wxULongLong_t value)
void SetPropertyValueUnspecified (wxPGPropArg id)
void SetPropertyValueWxObjectPtr (wxPGPropArg id, wxObject *value)
void SetPropVal (wxPGPropArg id, wxVariant &value)
void SetSelectionBackground (const wxColour &col)
void SetSelectionForeground (const wxColour &col)
void SetSortFunction (wxPGSortCallback sortFunction)
void SetSplitterLeft (bool subProps=false)
void SetSplitterPosition (int newxpos, bool refresh=true)
void SetUnspecifiedCommonValue (int index)
void SetupTextCtrlValue (const wxString text)
void SetValidationFailureBehavior (int vfbFlags)
void SetVerticalSpacing (int vspacing)
void SetVirtualWidth (int width)
virtual void SetWindowStyleFlag (long style)
void ShowPropertyError (wxPGPropArg id, const wxString &msg)
void Sort (wxPGPropArg id)
void Sort ()
void SwitchState (wxPropertyGridState *pNewState)
bool UnfocusEditor ()
void ValueChangeInEvent (wxVariant variant)
bool WasValueChangedInEvent () const
 wxDEPRECATED (bool IsModified(wxPGPropArg id) const )
 wxDEPRECATED (bool IsPropertyValueType(wxPGPropArg id, const wxChar *typestr) const )
 wxDEPRECATED (bool Disable(wxPGPropArg id))
 wxDEPRECATED (void Delete(wxPGPropArg id))
 wxDEPRECATED (wxPGProperty *AppendCategory(const wxString &label, const wxString &name=wxPG_LABEL))
 wxDEPRECATED (void SetPropertyColour(wxPGPropArg id, const wxColour &col))
 wxDEPRECATED (bool IsPropertySelected(wxPGPropArg id) const )
 wxDEPRECATED (void ClearTargetPage())
 wxPropertyGrid (wxWindow *parent, wxWindowID id=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxPG_DEFAULT_STYLE, const wxChar *name=wxPropertyGridNameStr)
 wxPropertyGrid ()
virtual ~wxPropertyGrid ()

Static Public Member Functions

static void ArrayStringToString (wxString &dst, const wxArrayString &src, wxChar preDelim, wxChar postDelim, int flags)
static void AutoGetTranslation (bool enable)
static wxString & CreateEscapeSequences (wxString &dst_str, wxString &src_str)
static wxPGPropertyCreatePropertyByClass (const wxString &classname, const wxString &label, const wxString &name)
static wxPGPropertyCreatePropertyByType (const wxString &valuetype, const wxString &label, const wxString &name)
static void DoubleToString (wxString &target, double value, int precision, bool removeZeroes, wxString *precTemplate)
static wxString & ExpandEscapeSequences (wxString &dst_str, wxString &src_str)
static wxPGEditorGetEditorByName (const wxString &editorName)
static void InitAllTypeHandlers ()
static void RegisterAdditionalEditors ()
static wxPGEditorRegisterEditorClass (wxPGEditor *editor, const wxString &name, bool noDefCheck=false)
static void SetBoolChoices (const wxString &true_choice, const wxString &false_choice)

Protected Member Functions

virtual wxPropertyGridStateCreateState () const
virtual wxPGPropertyDoGetPropertyByName (wxPGPropNameStr name) const
virtual bool DoSelectPage (int WXUNUSED(index))
void DoSetPropertyAttribute (wxPGPropArg id, const wxString &name, wxVariant &value, long argFlags)
virtual wxVariant GetEditableStateItem (const wxString &name) const
virtual wxPropertyGridStateGetPageState (int pageIndex) const
virtual bool SetEditableStateItem (const wxString &name, wxVariant value)

Protected Attributes

wxString m_emptyString
wxPropertyGridStatem_pState

Friends

class wxPGCanvas
class wxPropertyGridInterface
class wxPropertyGridManager
class wxPropertyGridState

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index