Use symbolic constants instead of numeric ones to represent masks filtering window style flags in wxPG.
This commit is contained in:
@@ -229,7 +229,14 @@ wxPG_DESCRIPTION = 0x00002000,
|
|||||||
/** wxPropertyGridManager only: don't show an internal border around the
|
/** wxPropertyGridManager only: don't show an internal border around the
|
||||||
property grid. Recommended if you use a header.
|
property grid. Recommended if you use a header.
|
||||||
*/
|
*/
|
||||||
wxPG_NO_INTERNAL_BORDER = 0x00004000
|
wxPG_NO_INTERNAL_BORDER = 0x00004000,
|
||||||
|
|
||||||
|
/** A mask which can be used to filter (out) all styles.
|
||||||
|
*/
|
||||||
|
wxPG_WINDOW_STYLE_MASK = wxPG_AUTO_SORT|wxPG_HIDE_CATEGORIES|wxPG_BOLD_MODIFIED|
|
||||||
|
wxPG_SPLITTER_AUTO_CENTER|wxPG_TOOLTIPS|wxPG_HIDE_MARGIN|
|
||||||
|
wxPG_STATIC_SPLITTER|wxPG_LIMITED_EDITING|wxPG_TOOLBAR|
|
||||||
|
wxPG_DESCRIPTION|wxPG_NO_INTERNAL_BORDER
|
||||||
};
|
};
|
||||||
|
|
||||||
#if wxPG_COMPATIBILITY_1_4
|
#if wxPG_COMPATIBILITY_1_4
|
||||||
@@ -344,7 +351,11 @@ wxPG_EX_ALWAYS_ALLOW_FOCUS = 0x00100000,
|
|||||||
|
|
||||||
/** A mask which can be used to filter (out) all extra styles.
|
/** A mask which can be used to filter (out) all extra styles.
|
||||||
*/
|
*/
|
||||||
wxPG_EX_WINDOW_STYLE_MASK = 0x1FFFF000
|
wxPG_EX_WINDOW_STYLE_MASK = wxPG_EX_INIT_NOCAT|wxPG_EX_NO_FLAT_TOOLBAR|wxPG_EX_MODE_BUTTONS|
|
||||||
|
wxPG_EX_HELP_AS_TOOLTIPS|wxPG_EX_NATIVE_DOUBLE_BUFFERING|wxPG_EX_AUTO_UNSPECIFIED_VALUES|
|
||||||
|
wxPG_EX_WRITEONLY_BUILTIN_ATTRIBUTES|wxPG_EX_HIDE_PAGE_BUTTONS|wxPG_EX_MULTIPLE_SELECTION|
|
||||||
|
wxPG_EX_ENABLE_TLP_TRACKING|wxPG_EX_NO_TOOLBAR_DIVIDER|wxPG_EX_TOOLBAR_SEPARATOR|
|
||||||
|
wxPG_EX_ALWAYS_ALLOW_FOCUS
|
||||||
};
|
};
|
||||||
|
|
||||||
#if wxPG_COMPATIBILITY_1_4
|
#if wxPG_COMPATIBILITY_1_4
|
||||||
|
@@ -457,7 +457,7 @@ bool wxPropertyGridManager::Create( wxWindow *parent,
|
|||||||
m_pPropGrid = CreatePropertyGrid();
|
m_pPropGrid = CreatePropertyGrid();
|
||||||
|
|
||||||
bool res = wxPanel::Create( parent, id, pos, size,
|
bool res = wxPanel::Create( parent, id, pos, size,
|
||||||
(style&0xFFFF0000)|wxWANTS_CHARS,
|
(style & wxWINDOW_STYLE_MASK)|wxWANTS_CHARS,
|
||||||
name );
|
name );
|
||||||
Init2(style);
|
Init2(style);
|
||||||
|
|
||||||
@@ -515,7 +515,7 @@ void wxPropertyGridManager::Init1()
|
|||||||
wxCLIP_CHILDREN)
|
wxCLIP_CHILDREN)
|
||||||
|
|
||||||
// Which flags can be passed to underlying wxPropertyGrid.
|
// Which flags can be passed to underlying wxPropertyGrid.
|
||||||
#define wxPG_MAN_PASS_FLAGS_MASK (0xFFF0|wxTAB_TRAVERSAL)
|
#define wxPG_MAN_PASS_FLAGS_MASK (wxPG_WINDOW_STYLE_MASK|wxTAB_TRAVERSAL)
|
||||||
|
|
||||||
//
|
//
|
||||||
// Initialize after parent etc. set
|
// Initialize after parent etc. set
|
||||||
@@ -526,7 +526,7 @@ void wxPropertyGridManager::Init2( int style )
|
|||||||
if ( m_iFlags & wxPG_FL_INITIALIZED )
|
if ( m_iFlags & wxPG_FL_INITIALIZED )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
m_windowStyle |= (style&0x0000FFFF);
|
m_windowStyle |= (style & wxPG_WINDOW_STYLE_MASK);
|
||||||
|
|
||||||
wxSize csz = GetClientSize();
|
wxSize csz = GetClientSize();
|
||||||
|
|
||||||
|
@@ -327,10 +327,12 @@ bool wxPropertyGrid::Create( wxWindow *parent,
|
|||||||
style |= wxWANTS_CHARS;
|
style |= wxWANTS_CHARS;
|
||||||
|
|
||||||
wxControl::Create(parent, id, pos, size,
|
wxControl::Create(parent, id, pos, size,
|
||||||
style | wxScrolledWindowStyle,
|
(style & wxWINDOW_STYLE_MASK) | wxScrolledWindowStyle,
|
||||||
wxDefaultValidator,
|
wxDefaultValidator,
|
||||||
name);
|
name);
|
||||||
|
|
||||||
|
m_windowStyle |= (style & wxPG_WINDOW_STYLE_MASK);
|
||||||
|
|
||||||
Init2();
|
Init2();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user