diff --git a/include/wx/propgrid/advprops.h b/include/wx/propgrid/advprops.h index 342b165ced..4cead89490 100644 --- a/include/wx/propgrid/advprops.h +++ b/include/wx/propgrid/advprops.h @@ -149,10 +149,11 @@ protected: // ----------------------------------------------------------------------- - +#if WXWIN_COMPATIBILITY_3_2 // If set, then match from list is searched for a custom colour. -constexpr wxPGPropertyFlags wxPG_PROP_TRANSLATE_CUSTOM = wxPG_PROP_CLASS_SPECIFIC_1; - +wxDEPRECATED_BUT_USED_INTERNALLY_MSG("wxPG_PROP_TRANSLATE_CUSTOM is intended for internal use.") +constexpr wxPGPropertyFlags wxPG_PROP_TRANSLATE_CUSTOM = wxPG_PROP_RESERVED_1; +#endif // WXWIN_COMPATIBILITY_3_2 // Has dropdown list of wxWidgets system colours. Value used is // of wxColourPropertyValue type. diff --git a/include/wx/propgrid/private.h b/include/wx/propgrid/private.h index 8416e2d9da..67f17edbd5 100644 --- a/include/wx/propgrid/private.h +++ b/include/wx/propgrid/private.h @@ -188,11 +188,31 @@ wxDECLARE_EVENT(wxEVT_PG_COLS_RESIZED, wxPropertyGridEvent); // Flags used only internally // wxBoolProperty, wxFlagsProperty specific flags -constexpr wxPGPropertyFlags wxPG_PROP_USE_CHECKBOX = wxPG_PROP_CLASS_SPECIFIC_1; +constexpr wxPGPropertyFlags wxPG_PROP_USE_CHECKBOX = wxPG_PROP_RESERVED_1; // DCC = Double Click Cycles -constexpr wxPGPropertyFlags wxPG_PROP_USE_DCC = wxPG_PROP_CLASS_SPECIFIC_2; +constexpr wxPGPropertyFlags wxPG_PROP_USE_DCC = wxPG_PROP_RESERVED_2; // wxStringProperty flag -constexpr wxPGPropertyFlags wxPG_PROP_PASSWORD = wxPG_PROP_CLASS_SPECIFIC_2; +constexpr wxPGPropertyFlags wxPG_PROP_PASSWORD = wxPG_PROP_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; + +// 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; + +// 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; + +// wxFileProperty - if set, full path is shown in wxFileProperty. +constexpr wxPGPropertyFlags wxPG_PROP_SHOW_FULL_FILENAME = wxPG_PROP_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 #endif // _WX_PROPGRID_PRIVATE_H_ diff --git a/include/wx/propgrid/property.h b/include/wx/propgrid/property.h index 128a8091cb..9b330597fd 100644 --- a/include/wx/propgrid/property.h +++ b/include/wx/propgrid/property.h @@ -390,20 +390,29 @@ wxPG_PROP_USES_COMMON_VALUE = 0x00020000, // See wxPGProperty::SetAutoUnspecified(). wxPG_PROP_AUTO_UNSPECIFIED = 0x00040000, -// Indicates the bit usable by derived properties. -wxPG_PROP_CLASS_SPECIFIC_1 = 0x00080000, +// For internal use only. +wxPG_PROP_RESERVED_1 = 0x00080000, -// Indicates the bit usable by derived properties. -wxPG_PROP_CLASS_SPECIFIC_2 = 0x00100000, +// For internal use only. +wxPG_PROP_RESERVED_2 = 0x00100000, // Indicates that the property is being deleted and should be ignored. wxPG_PROP_BEING_DELETED = 0x00200000, -// Indicates the bit usable by derived properties. -wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000 - +// For internal use only. +wxPG_PROP_RESERVED_3 = 0x00400000 }; +#if WXWIN_COMPATIBILITY_3_2 +// Indicates bits usable by derived properties. +wxDEPRECATED_BUT_USED_INTERNALLY_MSG("wxPG_PROP_CLASS_SPECIFIC_1 in intended for internal use only.") +constexpr wxPGPropertyFlags wxPG_PROP_CLASS_SPECIFIC_1 = wxPG_PROP_RESERVED_1; +wxDEPRECATED_BUT_USED_INTERNALLY_MSG("wxPG_PROP_CLASS_SPECIFIC_2 in intended for internal use only.") +constexpr wxPGPropertyFlags wxPG_PROP_CLASS_SPECIFIC_2 = wxPG_PROP_RESERVED_2; +wxDEPRECATED_BUT_USED_INTERNALLY_MSG("wxPG_PROP_CLASS_SPECIFIC_3 in intended for internal use only.") +constexpr wxPGPropertyFlags wxPG_PROP_CLASS_SPECIFIC_3 = wxPG_PROP_RESERVED_3; +#endif // WXWIN_COMPATIBILITY_3_2 + // Topmost flag. constexpr wxPGPropertyFlags wxPG_PROP_MAX = wxPG_PROP_AUTO_UNSPECIFIED; diff --git a/include/wx/propgrid/props.h b/include/wx/propgrid/props.h index 8791c0b430..1706ea6828 100644 --- a/include/wx/propgrid/props.h +++ b/include/wx/propgrid/props.h @@ -347,9 +347,12 @@ 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). -constexpr wxPGPropertyFlags wxPG_PROP_STATIC_CHOICES = wxPG_PROP_CLASS_SPECIFIC_1; +wxDEPRECATED_BUT_USED_INTERNALLY_MSG("wxPG_PROP_STATIC_CHOICES is intended for internal use.") +constexpr wxPGPropertyFlags wxPG_PROP_STATIC_CHOICES = wxPG_PROP_RESERVED_1; +#endif // WXWIN_COMPATIBILITY_3_2 // Represents a single selection from a list of choices // You can derive custom properties with choices from this class. @@ -591,8 +594,11 @@ protected: // ----------------------------------------------------------------------- +#if WXWIN_COMPATIBILITY_3_2 // Indicates first bit usable by derived properties. -constexpr wxPGPropertyFlags wxPG_PROP_SHOW_FULL_FILENAME = wxPG_PROP_CLASS_SPECIFIC_1; +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; +#endif // WXWIN_COMPATIBILITY_3_2 // Like wxLongStringProperty, but the button triggers file selector instead. class WXDLLIMPEXP_PROPGRID wxFileProperty : public wxEditorDialogProperty @@ -629,9 +635,12 @@ protected: // ----------------------------------------------------------------------- +#if WXWIN_COMPATIBILITY_3_2 // Flag used in wxLongStringProperty to mark that edit button // should be enabled even in the read-only mode. -constexpr wxPGPropertyFlags wxPG_PROP_ACTIVE_BTN = wxPG_PROP_CLASS_SPECIFIC_3; +wxDEPRECATED_BUT_USED_INTERNALLY_MSG("wxPG_PROP_ACTIVE_BTN is intended for internal use.") +constexpr wxPGPropertyFlags wxPG_PROP_ACTIVE_BTN = wxPG_PROP_RESERVED_3; +#endif // WXWIN_COMPATIBILITY_3_2 // Like wxStringProperty, but has a button that triggers a small text // editor dialog. diff --git a/interface/wx/propgrid/advprops.h b/interface/wx/propgrid/advprops.h index 2561448b2a..15f3791282 100644 --- a/interface/wx/propgrid/advprops.h +++ b/interface/wx/propgrid/advprops.h @@ -88,14 +88,6 @@ protected: }; - - -/** If set, then match from list is searched for a custom colour in wxColourProperty. - @hideinitializer -*/ -constexpr wxPGPropertyFlags wxPG_PROP_TRANSLATE_CUSTOM = wxPG_PROP_CLASS_SPECIFIC_1; - - /** @class wxSystemColourProperty @ingroup classes Has dropdown list of wxWidgets system colours. Value used is diff --git a/interface/wx/propgrid/property.h b/interface/wx/propgrid/property.h index 95232fe838..5dcaf12201 100644 --- a/interface/wx/propgrid/property.h +++ b/interface/wx/propgrid/property.h @@ -361,26 +361,10 @@ wxPG_PROP_USES_COMMON_VALUE = 0x00020000, */ wxPG_PROP_AUTO_UNSPECIFIED = 0x00040000, -/** Indicates the bit usable by derived properties. - @hideinitializer -*/ -wxPG_PROP_CLASS_SPECIFIC_1 = 0x00080000, - -/** Indicates the bit usable by derived properties. - @hideinitializer -*/ -wxPG_PROP_CLASS_SPECIFIC_2 = 0x00100000, - /** Indicates that the property is being deleted and should be ignored. @hideinitializer */ wxPG_PROP_BEING_DELETED = 0x00200000 - -/** Indicates the bit usable by derived properties. - @hideinitializer -*/ -wxPG_PROP_CLASS_SPECIFIC_3 = 0x00400000 - }; /** Topmost flag. diff --git a/interface/wx/propgrid/props.h b/interface/wx/propgrid/props.h index c0cd04b220..7f65e06fd0 100644 --- a/interface/wx/propgrid/props.h +++ b/interface/wx/propgrid/props.h @@ -28,11 +28,6 @@ public: // Property classes // ----------------------------------------------------------------------- -/** If set, enables ::wxTE_PASSWORD on wxStringProperty editor. - @hideinitializer -*/ -constexpr wxPGPropertyFlags wxPG_PROP_PASSWORD = wxPG_PROP_CLASS_SPECIFIC_2; - /** @class wxStringProperty @ingroup classes Basic property with string value. @@ -350,14 +345,6 @@ public: }; - -/** If set, then selection of choices is static and should not be - changed (i.e. returns @NULL in GetPropertyChoices). - Used by wxSystemColourProperty, wxCursorProperty. - @hideinitializer -*/ -constexpr wxPGPropertyFlags wxPG_PROP_STATIC_CHOICES = wxPG_PROP_CLASS_SPECIFIC_1; - /** @class wxEnumProperty @ingroup classes You can derive custom properties with choices from this class. See @@ -589,12 +576,6 @@ protected: }; -/** - If set, full path is shownin wxFileProperty. - @hideinitializer -*/ -constexpr wxPGPropertyFlags wxPG_PROP_SHOW_FULL_FILENAME = wxPG_PROP_CLASS_SPECIFIC_1; - /** @class wxFileProperty @ingroup classes Like wxLongStringProperty, but the button triggers file selector instead. @@ -645,12 +626,6 @@ protected: }; -/** Flag used in wxLongStringProperty to mark that edit button - should be enabled even in the read-only mode. - @hideinitializer -*/ -constexpr wxPGPropertyFlags wxPG_PROP_ACTIVE_BTN = wxPG_PROP_CLASS_SPECIFIC_1; - /** @class wxLongStringProperty @ingroup classes Like wxStringProperty, but has a button that triggers a small text @@ -704,18 +679,6 @@ protected: }; -/** wxBoolProperty, wxFlagsProperty specific flag. - @hideinitializer -*/ -constexpr wxPGPropertyFlags wxPG_PROP_USE_CHECKBOX = wxPG_PROP_CLASS_SPECIFIC_1; -/** wxBoolProperty, wxFlagsProperty specific flag. - DCC = Double Click Cycles - @hideinitializer -*/ -constexpr wxPGPropertyFlags wxPG_PROP_USE_DCC = wxPG_PROP_CLASS_SPECIFIC_2; - - - /** @class wxArrayStringProperty @ingroup classes Property that manages a list of strings. diff --git a/src/propgrid/advprops.cpp b/src/propgrid/advprops.cpp index a0c35bcb1e..0c99b2ea6b 100644 --- a/src/propgrid/advprops.cpp +++ b/src/propgrid/advprops.cpp @@ -26,6 +26,7 @@ #if wxPG_INCLUDE_ADVPROPS #include "wx/propgrid/advprops.h" +#include "wx/propgrid/private.h" #include "wx/odcombo.h" #include "wx/uilocale.h" @@ -758,9 +759,13 @@ void wxFontProperty::OnCustomPaint(wxDC& dc, // wxSystemColourProperty // ----------------------------------------------------------------------- -// wxEnumProperty based classes cannot use wxPG_PROP_CLASS_SPECIFIC_1 -#define wxPG_PROP_HIDE_CUSTOM_COLOUR wxPG_PROP_CLASS_SPECIFIC_2 -#define wxPG_PROP_COLOUR_HAS_ALPHA wxPG_PROP_CLASS_SPECIFIC_3 +#if WXWIN_COMPATIBILITY_3_2 +// wxEnumProperty based classes cannot use wxPG_PROP_RESERVED_1 +wxDEPRECATED_BUT_USED_INTERNALLY_MSG("wxPG_PROP_HIDE_CUSTOM_COLOUR is intended for internal use.") +constexpr wxPGPropertyFlags wxPG_PROP_HIDE_CUSTOM_COLOUR = wxPG_PROP_RESERVED_2; +wxDEPRECATED_BUT_USED_INTERNALLY_MSG("wxPG_PROP_COLOUR_HAS_ALPHA is intended for internal use.") +constexpr wxPGPropertyFlags wxPG_PROP_COLOUR_HAS_ALPHA = wxPG_PROP_RESERVED_3; +#endif // if WXWIN_COMPATIBILITY_3_2 #include "wx/colordlg.h"