propgrid.h File Reference


Classes

class  wxPGValidationInfo
 wxPGValidationInfo More...
class  wxPropertyGrid
 wxPropertyGrid is a specialized grid for editing properties - in other words name = value pairs. More...
class  wxPropertyGridEvent
 A property grid event holds information about events associated with wxPropertyGrid objects. More...

Typedefs

typedef wxByte wxPGVFBFlags
typedef int(* wxPGSortCallback )(wxPropertyGrid *propGrid, wxPGProperty *p1, wxPGProperty *p2)
 This callback function is used for sorting properties.

Enumerations

enum  wxPG_VALIDATION_FAILURE_BEHAVIOR_FLAGS {
  wxPG_VFB_STAY_IN_PROPERTY = 0x01,
  wxPG_VFB_BEEP = 0x02,
  wxPG_VFB_MARK_CELL = 0x04,
  wxPG_VFB_SHOW_MESSAGE = 0x08,
  wxPG_VFB_DEFAULT = wxPG_VFB_STAY_IN_PROPERTY|wxPG_VFB_BEEP
}
enum  wxPG_KEYBOARD_ACTIONS {
  wxPG_ACTION_INVALID = 0,
  wxPG_ACTION_NEXT_PROPERTY,
  wxPG_ACTION_PREV_PROPERTY,
  wxPG_ACTION_EXPAND_PROPERTY,
  wxPG_ACTION_COLLAPSE_PROPERTY,
  wxPG_ACTION_CANCEL_EDIT,
  wxPG_ACTION_MAX
}

Define Documentation

#define wxPG_DEFAULT_STYLE   (0)

Combines various styles.

#define wxPGMAN_DEFAULT_STYLE   (0)

Combines various styles.


Typedef Documentation

typedef int(* wxPGSortCallback)(wxPropertyGrid *propGrid, wxPGProperty *p1, wxPGProperty *p2)

This callback function is used for sorting properties.

Call wxPropertyGrid::SetSortFunction() to set it.

Sort function should return a value greater than 0 if position of p1 is after p2. So, for instance, when comparing property names, you can use following implementation:

            int MyPropertySortFunction(wxPropertyGrid* propGrid,
                                       wxPGProperty* p1,
                                       wxPGProperty* p2)
            {
                return p1->GetBaseName().compare( p2->GetBaseName() );
            }


Enumeration Type Documentation

Combines various styles.

Enumerator:
wxPG_EX_INIT_NOCAT  NOTE: wxPG_EX_xxx are extra window styles and must be set using SetExtraStyle() member function.

Speeds up switching to wxPG_HIDE_CATEGORIES mode. Initially, if wxPG_HIDE_CATEGORIES is not defined, the non-categorized data storage is not activated, and switching the mode first time becomes somewhat slower. wxPG_EX_INIT_NOCAT activates the non-categorized data storage right away.

NOTE: If you do plan not switching to non-categoric mode, or if you don't plan to use categories at all, then using this style will result in waste of resources.

wxPG_EX_NO_FLAT_TOOLBAR  Extended window style that sets wxPropertyGridManager tool bar to not use flat style.
wxPG_EX_MODE_BUTTONS  Shows alphabetic/categoric mode buttons from tool bar.
wxPG_EX_HELP_AS_TOOLTIPS  Show property help strings as tool tips instead as text on the status bar.

You can set the help strings using SetPropertyHelpString member function.

wxPG_EX_NATIVE_DOUBLE_BUFFERING  Allows relying on native double-buffering.
wxPG_EX_AUTO_UNSPECIFIED_VALUES  Set this style to let user have ability to set values of properties to unspecified state.

Same as setting wxPG_PROP_AUTO_UNSPECIFIED for all properties.

wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES  If this style is used, built-in attributes (such as wxPG_FLOAT_PRECISION and wxPG_STRING_PASSWORD) are not stored into property's attribute storage (thus they are not readable).

Note that this option is global, and applies to all wxPG property containers.

wxPG_EX_HIDE_PAGE_BUTTONS  Hides page selection buttons from tool bar.

wxPropertyGrid Action Identifiers

These are used with wxPropertyGrid::AddActionTrigger() and wxPropertyGrid::ClearActionTriggers().
Enumerator:
wxPG_ACTION_INVALID 
wxPG_ACTION_NEXT_PROPERTY 
wxPG_ACTION_PREV_PROPERTY 
wxPG_ACTION_EXPAND_PROPERTY 
wxPG_ACTION_COLLAPSE_PROPERTY 
wxPG_ACTION_CANCEL_EDIT 
wxPG_ACTION_MAX 

wxPropertyGrid Validation Failure Behavior Flags

Enumerator:
wxPG_VFB_STAY_IN_PROPERTY  Prevents user from leaving property unless value is valid.

If this behavior flag is not used, then value change is instead cancelled.

wxPG_VFB_BEEP  Calls wxBell() on validation failure.
wxPG_VFB_MARK_CELL  Cell with invalid value will be marked (with red colour).
wxPG_VFB_SHOW_MESSAGE  Display customizable text message explaining the situation.
wxPG_VFB_DEFAULT  Defaults.

wxPropertyGrid Window Styles

SetWindowStyleFlag method can be used to modify some of these at run-time.
Enumerator:
wxPG_AUTO_SORT  This will cause Sort() automatically after an item is added.

When inserting a lot of items in this mode, it may make sense to use Freeze() before operations and Thaw() afterwards to increase performance.

wxPG_HIDE_CATEGORIES  Categories are not initially shown (even if added).

IMPORTANT NOTE: If you do not plan to use categories, then this style will waste resources. This flag can also be changed using wxPropertyGrid::EnableCategories method.

wxPG_ALPHABETIC_MODE  This style combines non-categoric mode and automatic sorting.
wxPG_BOLD_MODIFIED  Modified values are shown in bold font.

Changing this requires Refresh() to show changes.

wxPG_SPLITTER_AUTO_CENTER  When wxPropertyGrid is resized, splitter moves to the center.

This behavior stops once the user manually moves the splitter.

wxPG_TOOLTIPS  Display tool tips for cell text that cannot be shown completely.

If wxUSE_TOOLTIPS is 0, then this doesn't have any effect.

wxPG_HIDE_MARGIN  Disables margin and hides all expand/collapse buttons that would appear outside the margin (for sub-properties).

Toggling this style automatically expands all collapsed items.

wxPG_STATIC_SPLITTER  This style prevents user from moving the splitter.
wxPG_STATIC_LAYOUT  Combination of other styles that make it impossible for user to modify the layout.
wxPG_LIMITED_EDITING  Disables wxTextCtrl based editors for properties which can be edited in another way.

Equals calling wxPropertyGrid::LimitPropertyEditing() for all added properties.

wxPG_TOOLBAR  wxPropertyGridManager only: Show tool bar for mode and page selection.
wxPG_DESCRIPTION  wxPropertyGridManager only: Show adjustable text box showing description or help text, if available, for currently selected property.



wxWidgets logo

[ top ]