Refactor internal flags in wxPropertyGrid
Move wxPropertyGrid and wxPropertyGridManager internal flags from global namespace to the corresponding classes.
This commit is contained in:
parent
d0ed852bae
commit
e7b405ec08
5 changed files with 77 additions and 93 deletions
|
|
@ -529,57 +529,6 @@ enum wxPG_SET_SPLITTER_POSITION_SPLITTER_FLAGS
|
|||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
// Internal flags
|
||||
enum wxPG_INTERNAL_FLAGS
|
||||
{
|
||||
wxPG_FL_INITIALIZED = 0x0001,
|
||||
// Set when creating editor controls if it was clicked on.
|
||||
wxPG_FL_ACTIVATION_BY_CLICK = 0x0002,
|
||||
wxPG_FL_DONT_CENTER_SPLITTER = 0x0004,
|
||||
wxPG_FL_FOCUSED = 0x0008,
|
||||
wxPG_FL_MOUSE_CAPTURED = 0x0010,
|
||||
wxPG_FL_MOUSE_INSIDE = 0x0020,
|
||||
wxPG_FL_VALUE_MODIFIED = 0x0040,
|
||||
// don't clear background of m_wndEditor
|
||||
wxPG_FL_PRIMARY_FILLS_ENTIRE = 0x0080,
|
||||
// currently active editor uses custom image
|
||||
wxPG_FL_CUR_USES_CUSTOM_IMAGE = 0x0100,
|
||||
// cell colours override selection colours for selected cell
|
||||
wxPG_FL_CELL_OVERRIDES_SEL = 0x0200,
|
||||
wxPG_FL_SCROLLED = 0x0400,
|
||||
// set when all added/inserted properties get hideable flag
|
||||
wxPG_FL_ADDING_HIDEABLES = 0x0800,
|
||||
// Disables showing help strings on statusbar.
|
||||
wxPG_FL_NOSTATUSBARHELP = 0x1000,
|
||||
// Marks that we created the state, so we have to destroy it too.
|
||||
wxPG_FL_CREATEDSTATE = 0x2000,
|
||||
// Set if wxPGMan requires redrawing of description text box.
|
||||
wxPG_FL_DESC_REFRESH_REQUIRED = 0x8000,
|
||||
// Set if contained in wxPropertyGridManager
|
||||
wxPG_FL_IN_MANAGER = 0x00020000,
|
||||
// Set after wxPropertyGrid is shown in its initial good size
|
||||
wxPG_FL_GOOD_SIZE_SET = 0x00040000,
|
||||
// Set when in SelectProperty.
|
||||
wxPG_FL_IN_SELECT_PROPERTY = 0x00100000,
|
||||
// Set when help string is shown in status bar
|
||||
wxPG_FL_STRING_IN_STATUSBAR = 0x00200000,
|
||||
// Auto sort is enabled (for categorized mode)
|
||||
wxPG_FL_CATMODE_AUTO_SORT = 0x01000000,
|
||||
// Set after page has been inserted to manager
|
||||
wxPG_MAN_FL_PAGE_INSERTED = 0x02000000,
|
||||
// Active editor control is abnormally large
|
||||
wxPG_FL_ABNORMAL_EDITOR = 0x04000000,
|
||||
// Recursion guard for HandleCustomEditorEvent
|
||||
wxPG_FL_IN_HANDLECUSTOMEDITOREVENT = 0x08000000,
|
||||
wxPG_FL_VALUE_CHANGE_IN_EVENT = 0x10000000,
|
||||
// Editor control width should not change on resize
|
||||
wxPG_FL_FIXED_WIDTH_EDITOR = 0x20000000,
|
||||
// Width of panel can be different from width of grid
|
||||
wxPG_FL_HAS_VIRTUAL_WIDTH = 0x40000000,
|
||||
// Prevents RecalculateVirtualSize re-entrancy
|
||||
wxPG_FL_RECALCULATING_VIRTUAL_SIZE = 0x80000000
|
||||
};
|
||||
|
||||
#if !defined(__wxPG_SOURCE_FILE__)
|
||||
// Reduce compile time, but still include in user app
|
||||
#include "wx/propgrid/props.h"
|
||||
|
|
@ -1260,6 +1209,52 @@ public:
|
|||
// Mostly useful for page switching.
|
||||
void SwitchState( wxPropertyGridPageState* pNewState );
|
||||
|
||||
// Internal flags
|
||||
enum wxPG_INTERNAL_FLAGS : long
|
||||
{
|
||||
wxPG_FL_INITIALIZED = 0x0001,
|
||||
// Set when creating editor controls if it was clicked on.
|
||||
wxPG_FL_ACTIVATION_BY_CLICK = 0x0002,
|
||||
wxPG_FL_FOCUSED = 0x0004,
|
||||
wxPG_FL_MOUSE_CAPTURED = 0x0008,
|
||||
wxPG_FL_MOUSE_INSIDE = 0x0010,
|
||||
wxPG_FL_VALUE_MODIFIED = 0x0020,
|
||||
// don't clear background of m_wndEditor
|
||||
wxPG_FL_PRIMARY_FILLS_ENTIRE = 0x0040,
|
||||
// currently active editor uses custom image
|
||||
wxPG_FL_CUR_USES_CUSTOM_IMAGE = 0x0080,
|
||||
// cell colours override selection colours for selected cell
|
||||
wxPG_FL_CELL_OVERRIDES_SEL = 0x0100,
|
||||
wxPG_FL_SCROLLED = 0x0200,
|
||||
// set when all added/inserted properties get hideable flag
|
||||
wxPG_FL_ADDING_HIDEABLES = 0x0400,
|
||||
// Disables showing help strings on statusbar.
|
||||
wxPG_FL_NOSTATUSBARHELP = 0x0800,
|
||||
// Marks that we created the state, so we have to destroy it too.
|
||||
wxPG_FL_CREATEDSTATE = 0x1000,
|
||||
// Set if contained in wxPropertyGridManager
|
||||
wxPG_FL_IN_MANAGER = 0x2000,
|
||||
// Set after wxPropertyGrid is shown in its initial good size
|
||||
wxPG_FL_GOOD_SIZE_SET = 0x4000,
|
||||
// Set when in SelectProperty.
|
||||
wxPG_FL_IN_SELECT_PROPERTY = 0x8000,
|
||||
// Set when help string is shown in status bar
|
||||
wxPG_FL_STRING_IN_STATUSBAR = 0x00010000,
|
||||
// Auto sort is enabled (for categorized mode)
|
||||
wxPG_FL_CATMODE_AUTO_SORT = 0x00020000,
|
||||
// Active editor control is abnormally large
|
||||
wxPG_FL_ABNORMAL_EDITOR = 0x00040000,
|
||||
// Recursion guard for HandleCustomEditorEvent
|
||||
wxPG_FL_IN_HANDLECUSTOMEDITOREVENT = 0x00080000,
|
||||
wxPG_FL_VALUE_CHANGE_IN_EVENT = 0x00100000,
|
||||
// Editor control width should not change on resize
|
||||
wxPG_FL_FIXED_WIDTH_EDITOR = 0x00200000,
|
||||
// Width of panel can be different from width of grid
|
||||
wxPG_FL_HAS_VIRTUAL_WIDTH = 0x00400000,
|
||||
// Prevents RecalculateVirtualSize re-entrancy
|
||||
wxPG_FL_RECALCULATING_VIRTUAL_SIZE = 0x00800000
|
||||
};
|
||||
|
||||
long GetInternalFlags() const { return m_iFlags; }
|
||||
bool HasInternalFlag( long flag ) const
|
||||
{ return (m_iFlags & flag) != 0; }
|
||||
|
|
@ -2224,28 +2219,6 @@ protected:
|
|||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
//
|
||||
// Undefine macros that are not needed outside propertygrid sources
|
||||
//
|
||||
#ifndef __wxPG_SOURCE_FILE__
|
||||
#undef wxPG_FL_DESC_REFRESH_REQUIRED
|
||||
#undef wxPG_FL_CREATEDSTATE
|
||||
#undef wxPG_FL_NOSTATUSBARHELP
|
||||
#undef wxPG_FL_SCROLLED
|
||||
#undef wxPG_FL_CUR_USES_CUSTOM_IMAGE
|
||||
#undef wxPG_FL_PRIMARY_FILLS_ENTIRE
|
||||
#undef wxPG_FL_VALUE_MODIFIED
|
||||
#undef wxPG_FL_MOUSE_INSIDE
|
||||
#undef wxPG_FL_FOCUSED
|
||||
#undef wxPG_FL_MOUSE_CAPTURED
|
||||
#undef wxPG_FL_INITIALIZED
|
||||
#undef wxPG_FL_ACTIVATION_BY_CLICK
|
||||
#undef wxPG_ICON_WIDTH
|
||||
#undef wxPG_USE_RENDERER_NATIVE
|
||||
#endif
|
||||
|
||||
// -----------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
|
||||
#endif // _WX_PROPGRID_PROPGRID_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue