Allow specifying recurse="1" to inherit the attribute, as this is much
nicer than having to specify it for all the children.
Also add support for this to wxPropertyGridPopulator, which is used by
the XRC handler.
Just rename wxPropertyGridState to wxPropertyGridPageState and add make
wxPropertyGridXmlHandler a friend of this class to allow it to use its
protected methods.
Also remove some preprocessor checks for non-existent symbols.
Don't define operators for wx types in global scope.
This results in much better error messages when the compiler gives an
error about failing to resolve a call to some operator in user code
because it doesn't list all the wx-defined operators as candidates. In
practice, this cuts down error messages from 500 (!) lines to 2 with
gcc.
See #24190.
Add new wxDECLARE_VARIANT_OBJECT_EXPORTED() macro defining these
operators as friend functions inside the class declaration and replace
all uses of DECLARE_VARIANT_OBJECT_EXPORTED() inside the core library
with the new macro to avoid defining any operator<<() overloads in the
global scope.
Also add wxIMPLEMENT_VARIANT_OBJECT() for consistency, even though it is
not really needed.
wxIntProperty::DoValidation() overloads for wxLongLong_t and wxULongLong_t
parameters are not supported because for these types there are no direct
conversions to wxVariant.
Arguments of such types will be handled by overloads for wxLongLong
and wxULongLong.
Replace user-specified empty constructors and destructors with the
compiler-generated versions, which has a number of advantages for code
generation, in addition to being more clear.
Closes#22965.
Closes#24058.
Having this line is not useful at all as it doesn't contain any
information and shouldn't be filled in the future as git-shortlog can
provide the information about people who changed the given file more
more reliably than consulting the comments in any case.
Keep the non-blank lines for historical purposes.
Store two possible action codes in std::pair instead of packing them
into one int value with bitmasks. This reduces level of indirection
in accessing keyboard actions and make the code more maintainable.
wxPG_PROP_ACTIVE_BTN used in wxStringProperty is misinterpreted
as wxPG_PROP_PASSWORD so these flags they can't share the same value
(wxPG_PROP_CLASS_SPECIFIC_2).
Closes#23856.
The old API allowed for users to directly test the variable and find if
it was null, so recreate that API with the new system to preserve
compatibility.
Closes#23445.
wxPG_PROP_ACTIVE_BTN and wxPG_PROP_SHOW_FULL_FILENAME can be used together
(like e.g. in wxFileProperty) so they can't share the same value
(wxPG_PROP_CLASS_SPECIFIC_1).
Closes#23565.
Move the check for WXBUILDING, needed to avoid the warnings in props.cpp
about the use of wxPG_DIR_DIALOG_MESSAGE and wxPG_FILE_DIALOG_TITLE when
WXWIN_COMPATIBILITY_3_0==1, inside wxPG_DEPRECATED_MACRO_VALUE itself
instead of doing it in both places where this macro was used.
This function was not called any longer after 35a8d0f908 (Fix building
wxPropertyGrid with v3.0 compatibility enabled, 2023-03-22), which
silently broke any applications resulting on this to happen, so call it
again, even if it's rather painful and ugly to do.
Also add wxDEPRECATED_BUT_USED_INTERNALLY_MSG() and use it instead of the
plain wxDEPRECATED_MSG() for the deprecated overload of this function to
avoid warnings when calling it from wxWidgets itself.
Finally, document the change to DrawCaptionSelectionRect() as this
wasn't done back in c63b1604b3 (Use native renderer to draw rectangle
indicating that wxPG category property is selected., 2015-08-30) when
its signature was changed.
g++ 4.8 doesn't support this and while we could make this constexpr
conditional on the compiler/language version, for now just don't make it
constexpr to fix the build quickly.
Stop using std::underlying_type_t<>, it's C++14 and not provided by g++
4.8 that is still supposed to be supported.
Just use int instead, it's not like we need all this heavy and verbose
stuff anyhow for an enum declared using int as the underlying type just
a few lines above.
Rename the new overload of DoSetSplitterPosition() to use a different
name: not only this avoids deprecation warnings that broke all the CI
builds, but it also makes things more clear and simpler to use as all
the derived classes don't need to override both the deprecated overload
and the new one to avoid warnings about hiding a base class virtual
function and can just override the new one.
Also remove the default value "Refresh" for the flags which seems to be
inconsistent with the default value "Null" used elsewhere and prefer to
specify it explicitly.
Add missing "return" to deprecated HideProperty() overload to fix the
build with WXWIN_COMPATIBILITY_3_2 on after the changes of f1273ce152
(Use class enums to implement bitmask types, 2023-02-19).
Empty wxPropertyGridPages should be skipped when iterator is incremented
from the last wxPGProperty on one page to the first property on the next
page.
Empty pages should be skipped also when ierator is initially set
to point the first property.
Closes#23273.
This is slightly more efficient as it avoids allocating an object which
is possibly not ever going to be used on startup of any application
linking with the propgrid library (at the price of slower access to this
object, but this should never be done in performance-critical parts of
the code, hopefully) and avoids a problem with losing the previously
registered editors when re-initializing wx modules, as wxPython does.
Closes#23165.
See #23187.