Make wxPGPropertyFlags a bitmask

To improve type safety of flags.
This commit is contained in:
Artur Wieczorek 2023-12-23 18:45:57 +01:00
parent 1b5a43599a
commit c8552aec0c
19 changed files with 763 additions and 615 deletions

View file

@ -335,8 +335,8 @@ public:
#if WXWIN_COMPATIBILITY_3_2
// If set, then selection of choices is static and should not be
// changed (i.e. returns nullptr in GetPropertyChoices).
wxDEPRECATED_BUT_USED_INTERNALLY_MSG("wxPG_PROP_STATIC_CHOICES is intended for internal use.")
constexpr wxPGPropertyFlags wxPG_PROP_STATIC_CHOICES = wxPG_PROP_RESERVED_1;
wxDEPRECATED_MSG("wxPG_PROP_STATIC_CHOICES is intended for internal use.")
constexpr wxPGPropertyFlags wxPG_PROP_STATIC_CHOICES = wxPGPropertyFlags::Reserved_1;
#endif // WXWIN_COMPATIBILITY_3_2
// Represents a single selection from a list of choices
@ -581,8 +581,8 @@ protected:
#if WXWIN_COMPATIBILITY_3_2
// Indicates first bit usable by derived properties.
wxDEPRECATED_BUT_USED_INTERNALLY_MSG("wxPG_PROP_SHOW_FULL_FILENAME is intended for internal use.")
constexpr wxPGPropertyFlags wxPG_PROP_SHOW_FULL_FILENAME = wxPG_PROP_RESERVED_1;
wxDEPRECATED_MSG("wxPG_PROP_SHOW_FULL_FILENAME is intended for internal use.")
constexpr wxPGPropertyFlags wxPG_PROP_SHOW_FULL_FILENAME = wxPGPropertyFlags::Reserved_1;
#endif // WXWIN_COMPATIBILITY_3_2
// Like wxLongStringProperty, but the button triggers file selector instead.
@ -623,8 +623,8 @@ protected:
#if WXWIN_COMPATIBILITY_3_2
// Flag used in wxLongStringProperty to mark that edit button
// should be enabled even in the read-only mode.
wxDEPRECATED_BUT_USED_INTERNALLY_MSG("wxPG_PROP_ACTIVE_BTN is intended for internal use.")
constexpr wxPGPropertyFlags wxPG_PROP_ACTIVE_BTN = wxPG_PROP_RESERVED_3;
wxDEPRECATED_MSG("wxPG_PROP_ACTIVE_BTN is intended for internal use.")
constexpr wxPGPropertyFlags wxPG_PROP_ACTIVE_BTN = wxPGPropertyFlags::Reserved_3;
#endif // WXWIN_COMPATIBILITY_3_2
// Like wxStringProperty, but has a button that triggers a small text