Version: 3.0.3
wxPropertyGridPageState Class Reference

#include <wx/propgrid/propgridpagestate.h>

+ Inheritance diagram for wxPropertyGridPageState:

Detailed Description

Contains low-level property page information (properties, column widths, etc) of a single wxPropertyGrid or single wxPropertyGridPage.

Generally you should not use this class directly, but instead member functions in wxPropertyGridInterface, wxPropertyGrid, wxPropertyGridPage, and wxPropertyGridManager.

Remarks
  • In separate wxPropertyGrid component this class was known as wxPropertyGridState.
  • Currently this class is not implemented in wxPython.

Library:  wxPropertyGrid
Category:  wxPropertyGrid

Public Member Functions

 wxPropertyGridPageState ()
 Default constructor. More...
 
virtual ~wxPropertyGridPageState ()
 Destructor. More...
 
void CheckColumnWidths (int widthChange=0)
 Makes sure all columns have minimum width. More...
 
virtual void DoDelete (wxPGProperty *item, bool doDelete=true)
 Override this member function to add custom behaviour on property deletion. More...
 
wxSize DoFitColumns (bool allowGridResize=false)
 
wxPGPropertyDoGetItemAtY (int y) const
 
virtual wxPGPropertyDoInsert (wxPGProperty *parent, int index, wxPGProperty *property)
 Override this member function to add custom behaviour on property insertion. More...
 
virtual void DoSetSplitterPosition (int pos, int splitterColumn=0, int flags=0)
 This needs to be overridden in grid used the manager so that splitter changes can be propagated to other pages. More...
 
bool EnableCategories (bool enable)
 
void EnsureVirtualHeight ()
 Make sure virtual height is up-to-date. More...
 
unsigned int GetVirtualHeight () const
 Returns (precalculated) height of contained visible properties. More...
 
unsigned int GetVirtualHeight ()
 Returns (precalculated) height of contained visible properties. More...
 
unsigned int GetActualVirtualHeight () const
 Returns actual height of contained visible properties. More...
 
unsigned int GetColumnCount () const
 
int GetColumnMinWidth (int column) const
 
int GetColumnWidth (unsigned int column) const
 
wxPropertyGridGetGrid () const
 
wxPGPropertyGetLastItem (int flags=wxPG_ITERATE_DEFAULT)
 Returns last item which could be iterated using given flags. More...
 
const wxPGPropertyGetLastItem (int flags=wxPG_ITERATE_DEFAULT) const
 
wxPGPropertyGetSelection () const
 Returns currently selected property. More...
 
void DoSetSelection (wxPGProperty *prop)
 
bool DoClearSelection ()
 
void DoRemoveFromSelection (wxPGProperty *prop)
 
void DoSetColumnProportion (unsigned int column, int proportion)
 
int DoGetColumnProportion (unsigned int column) const
 
void ResetColumnSizes (int setSplitterFlags)
 
wxPropertyCategoryGetPropertyCategory (const wxPGProperty *p) const
 
wxPGPropertyGetPropertyByLabel (const wxString &name, wxPGProperty *parent=NULL) const
 
wxVariant DoGetPropertyValues (const wxString &listname, wxPGProperty *baseparent, long flags) const
 
wxPGPropertyDoGetRoot () const
 
void DoSetPropertyName (wxPGProperty *p, const wxString &newName)
 
int GetVirtualWidth () const
 
int GetColumnFitWidth (wxClientDC &dc, wxPGProperty *pwc, unsigned int col, bool subProps) const
 Returns minimal width for given column so that all images and texts will fit entirely. More...
 
int GetColumnFullWidth (wxClientDC &dc, wxPGProperty *p, unsigned int col)
 
wxPropertyGridHitTestResult HitTest (const wxPoint &pt) const
 Returns information about arbitrary position in the grid. More...
 
bool IsDisplayed () const
 Returns true if page is visibly displayed. More...
 
bool IsInNonCatMode () const
 
void DoLimitPropertyEditing (wxPGProperty *p, bool limit=true)
 
bool DoSelectProperty (wxPGProperty *p, unsigned int flags=0)
 
void OnClientWidthChange (int newWidth, int widthChange, bool fromOnResize=false)
 widthChange is non-client. More...
 
void RecalculateVirtualHeight ()
 Recalculates m_virtualHeight. More...
 
void SetColumnCount (int colCount)
 
void PropagateColSizeDec (int column, int decrease, int dir)
 
bool DoHideProperty (wxPGProperty *p, bool hide, int flags=wxPG_RECURSE)
 
bool DoSetPropertyValueString (wxPGProperty *p, const wxString &value)
 
bool DoSetPropertyValue (wxPGProperty *p, wxVariant &value)
 
bool DoSetPropertyValueWxObjectPtr (wxPGProperty *p, wxObject *value)
 
void DoSetPropertyValues (const wxVariantList &list, wxPGProperty *default_category)
 
void SetSplitterLeft (bool subProps=false)
 
void SetVirtualWidth (int width)
 Set virtual width for this particular page. More...
 
void DoSortChildren (wxPGProperty *p, int flags=0)
 
void DoSort (int flags=0)
 
bool PrepareAfterItemsAdded ()
 
void VirtualHeightChanged ()
 Called after virtual height needs to be recalculated. More...
 
wxPGPropertyDoAppend (wxPGProperty *property)
 Base append. More...
 
wxPGPropertyBaseGetPropertyByName (const wxString &name) const
 Returns property by its name. More...
 
void DoClear ()
 Called in, for example, wxPropertyGrid::Clear. More...
 
bool DoIsPropertySelected (wxPGProperty *prop) const
 
bool DoCollapse (wxPGProperty *p)
 
bool DoExpand (wxPGProperty *p)
 
void CalculateFontAndBitmapStuff (int vspacing)
 

Constructor & Destructor Documentation

wxPropertyGridPageState::wxPropertyGridPageState ( )

Default constructor.

virtual wxPropertyGridPageState::~wxPropertyGridPageState ( )
virtual

Destructor.

Member Function Documentation

wxPGProperty* wxPropertyGridPageState::BaseGetPropertyByName ( const wxString name) const

Returns property by its name.

void wxPropertyGridPageState::CalculateFontAndBitmapStuff ( int  vspacing)
void wxPropertyGridPageState::CheckColumnWidths ( int  widthChange = 0)

Makes sure all columns have minimum width.

wxPGProperty* wxPropertyGridPageState::DoAppend ( wxPGProperty property)

Base append.

void wxPropertyGridPageState::DoClear ( )

Called in, for example, wxPropertyGrid::Clear.

bool wxPropertyGridPageState::DoClearSelection ( )
bool wxPropertyGridPageState::DoCollapse ( wxPGProperty p)
virtual void wxPropertyGridPageState::DoDelete ( wxPGProperty item,
bool  doDelete = true 
)
virtual

Override this member function to add custom behaviour on property deletion.

bool wxPropertyGridPageState::DoExpand ( wxPGProperty p)
wxSize wxPropertyGridPageState::DoFitColumns ( bool  allowGridResize = false)
int wxPropertyGridPageState::DoGetColumnProportion ( unsigned int  column) const
wxPGProperty* wxPropertyGridPageState::DoGetItemAtY ( int  y) const
wxVariant wxPropertyGridPageState::DoGetPropertyValues ( const wxString listname,
wxPGProperty baseparent,
long  flags 
) const
wxPGProperty* wxPropertyGridPageState::DoGetRoot ( ) const
bool wxPropertyGridPageState::DoHideProperty ( wxPGProperty p,
bool  hide,
int  flags = wxPG_RECURSE 
)
virtual wxPGProperty* wxPropertyGridPageState::DoInsert ( wxPGProperty parent,
int  index,
wxPGProperty property 
)
virtual

Override this member function to add custom behaviour on property insertion.

bool wxPropertyGridPageState::DoIsPropertySelected ( wxPGProperty prop) const
void wxPropertyGridPageState::DoLimitPropertyEditing ( wxPGProperty p,
bool  limit = true 
)
void wxPropertyGridPageState::DoRemoveFromSelection ( wxPGProperty prop)
bool wxPropertyGridPageState::DoSelectProperty ( wxPGProperty p,
unsigned int  flags = 0 
)
void wxPropertyGridPageState::DoSetColumnProportion ( unsigned int  column,
int  proportion 
)
void wxPropertyGridPageState::DoSetPropertyName ( wxPGProperty p,
const wxString newName 
)
bool wxPropertyGridPageState::DoSetPropertyValue ( wxPGProperty p,
wxVariant value 
)
void wxPropertyGridPageState::DoSetPropertyValues ( const wxVariantList &  list,
wxPGProperty default_category 
)
bool wxPropertyGridPageState::DoSetPropertyValueString ( wxPGProperty p,
const wxString value 
)
bool wxPropertyGridPageState::DoSetPropertyValueWxObjectPtr ( wxPGProperty p,
wxObject value 
)
void wxPropertyGridPageState::DoSetSelection ( wxPGProperty prop)
virtual void wxPropertyGridPageState::DoSetSplitterPosition ( int  pos,
int  splitterColumn = 0,
int  flags = 0 
)
virtual

This needs to be overridden in grid used the manager so that splitter changes can be propagated to other pages.

void wxPropertyGridPageState::DoSort ( int  flags = 0)
void wxPropertyGridPageState::DoSortChildren ( wxPGProperty p,
int  flags = 0 
)
bool wxPropertyGridPageState::EnableCategories ( bool  enable)
void wxPropertyGridPageState::EnsureVirtualHeight ( )

Make sure virtual height is up-to-date.

unsigned int wxPropertyGridPageState::GetActualVirtualHeight ( ) const
inline

Returns actual height of contained visible properties.

Remarks
Mostly used for internal diagnostic purposes.
unsigned int wxPropertyGridPageState::GetColumnCount ( ) const
int wxPropertyGridPageState::GetColumnFitWidth ( wxClientDC dc,
wxPGProperty pwc,
unsigned int  col,
bool  subProps 
) const

Returns minimal width for given column so that all images and texts will fit entirely.

Used by SetSplitterLeft() and DoFitColumns().

int wxPropertyGridPageState::GetColumnFullWidth ( wxClientDC dc,
wxPGProperty p,
unsigned int  col 
)
int wxPropertyGridPageState::GetColumnMinWidth ( int  column) const
int wxPropertyGridPageState::GetColumnWidth ( unsigned int  column) const
wxPropertyGrid* wxPropertyGridPageState::GetGrid ( ) const
wxPGProperty* wxPropertyGridPageState::GetLastItem ( int  flags = wxPG_ITERATE_DEFAULT)

Returns last item which could be iterated using given flags.

Parameters
flagsList of iterator flags
const wxPGProperty* wxPropertyGridPageState::GetLastItem ( int  flags = wxPG_ITERATE_DEFAULT) const
wxPGProperty* wxPropertyGridPageState::GetPropertyByLabel ( const wxString name,
wxPGProperty parent = NULL 
) const
wxPropertyCategory* wxPropertyGridPageState::GetPropertyCategory ( const wxPGProperty p) const
wxPGProperty* wxPropertyGridPageState::GetSelection ( ) const

Returns currently selected property.

unsigned int wxPropertyGridPageState::GetVirtualHeight ( ) const

Returns (precalculated) height of contained visible properties.

unsigned int wxPropertyGridPageState::GetVirtualHeight ( )

Returns (precalculated) height of contained visible properties.

int wxPropertyGridPageState::GetVirtualWidth ( ) const
wxPropertyGridHitTestResult wxPropertyGridPageState::HitTest ( const wxPoint pt) const

Returns information about arbitrary position in the grid.

Parameters
ptLogical coordinates in the virtual grid space. Use wxScrolled<T>::CalcUnscrolledPosition() if you need to translate a scrolled position into a logical one.
bool wxPropertyGridPageState::IsDisplayed ( ) const
inline

Returns true if page is visibly displayed.

bool wxPropertyGridPageState::IsInNonCatMode ( ) const
void wxPropertyGridPageState::OnClientWidthChange ( int  newWidth,
int  widthChange,
bool  fromOnResize = false 
)

widthChange is non-client.

bool wxPropertyGridPageState::PrepareAfterItemsAdded ( )
void wxPropertyGridPageState::PropagateColSizeDec ( int  column,
int  decrease,
int  dir 
)
void wxPropertyGridPageState::RecalculateVirtualHeight ( )

Recalculates m_virtualHeight.

void wxPropertyGridPageState::ResetColumnSizes ( int  setSplitterFlags)
void wxPropertyGridPageState::SetColumnCount ( int  colCount)
void wxPropertyGridPageState::SetSplitterLeft ( bool  subProps = false)
void wxPropertyGridPageState::SetVirtualWidth ( int  width)

Set virtual width for this particular page.

void wxPropertyGridPageState::VirtualHeightChanged ( )

Called after virtual height needs to be recalculated.