Make wxPGPropertyFlags a bitmask
To improve type safety of flags.
This commit is contained in:
parent
1b5a43599a
commit
c8552aec0c
19 changed files with 763 additions and 615 deletions
|
|
@ -188,31 +188,29 @@ wxDECLARE_EVENT(wxEVT_PG_COLS_RESIZED, wxPropertyGridEvent);
|
|||
// Flags used only internally
|
||||
|
||||
// wxBoolProperty, wxFlagsProperty specific flags
|
||||
constexpr wxPGPropertyFlags wxPG_PROP_USE_CHECKBOX = wxPG_PROP_RESERVED_1;
|
||||
constexpr wxPGPropertyFlags wxPGPropertyFlags_UseCheckBox = wxPGPropertyFlags::Reserved_1;
|
||||
// DCC = Double Click Cycles
|
||||
constexpr wxPGPropertyFlags wxPG_PROP_USE_DCC = wxPG_PROP_RESERVED_2;
|
||||
constexpr wxPGPropertyFlags wxPGPropertyFlags_UseDCC = wxPGPropertyFlags::Reserved_2;
|
||||
|
||||
// wxStringProperty flag
|
||||
constexpr wxPGPropertyFlags wxPG_PROP_PASSWORD = wxPG_PROP_RESERVED_2;
|
||||
constexpr wxPGPropertyFlags wxPGPropertyFlags_Password = wxPGPropertyFlags::Reserved_2;
|
||||
|
||||
#if !WXWIN_COMPATIBILITY_3_2
|
||||
// wxColourProperty flag - if set, then match from list is searched for a custom colour.
|
||||
constexpr wxPGPropertyFlags wxPG_PROP_TRANSLATE_CUSTOM = wxPG_PROP_RESERVED_1;
|
||||
constexpr wxPGPropertyFlags wxPGPropertyFlags_TranslateCustom = wxPGPropertyFlags::Reserved_1;
|
||||
|
||||
// wxCursorProperty, wxSystemColourProperty - If set, then selection of choices is static
|
||||
// and should not be changed (i.e. returns nullptr in GetPropertyChoices).
|
||||
constexpr wxPGPropertyFlags wxPG_PROP_STATIC_CHOICES = wxPG_PROP_RESERVED_1;
|
||||
constexpr wxPGPropertyFlags wxPGPropertyFlags_StaticChoices = wxPGPropertyFlags::Reserved_1;
|
||||
|
||||
// wxSystemColourProperty - wxEnumProperty based classes cannot use wxPG_PROP_RESERVED_1
|
||||
constexpr wxPGPropertyFlags wxPG_PROP_HIDE_CUSTOM_COLOUR = wxPG_PROP_RESERVED_2;
|
||||
constexpr wxPGPropertyFlags wxPG_PROP_COLOUR_HAS_ALPHA = wxPG_PROP_RESERVED_3;
|
||||
// wxSystemColourProperty - wxEnumProperty based classes cannot use wxPGPropertyFlags::Reserved_1
|
||||
constexpr wxPGPropertyFlags wxPGPropertyFlags_HideCustomColour = wxPGPropertyFlags::Reserved_2;
|
||||
constexpr wxPGPropertyFlags wxPGPropertyFlags_ColourHasAlpha = wxPGPropertyFlags::Reserved_3;
|
||||
|
||||
// wxFileProperty - if set, full path is shown in wxFileProperty.
|
||||
constexpr wxPGPropertyFlags wxPG_PROP_SHOW_FULL_FILENAME = wxPG_PROP_RESERVED_1;
|
||||
constexpr wxPGPropertyFlags wxPGPropertyFlags_ShowFullFileName = wxPGPropertyFlags::Reserved_1;
|
||||
|
||||
// wxLongStringProperty - flag used to mark that edit button
|
||||
// should be enabled even in the read-only mode.
|
||||
constexpr wxPGPropertyFlags wxPG_PROP_ACTIVE_BTN = wxPG_PROP_RESERVED_3;
|
||||
#endif // !WXWIN_COMPATIBILITY_3_2
|
||||
constexpr wxPGPropertyFlags wxPGPropertyFlags_ActiveButton = wxPGPropertyFlags::Reserved_3;
|
||||
|
||||
#endif // _WX_PROPGRID_PRIVATE_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue