Commit Graph
187 Commits
Author SHA1 Message Date
Blake-Madden 0026505c35 DPI fixes in samples and sizer overview
Remove redundant 5 arguments to wxSizerFlags::Border() and replace
Border(10) with DoubleBorder().

Add FromDIP in other places.

Closes #25148.
2025-02-12 18:09:41 +01:00
Vadim Zeitlin 7aa6da06d0 Remove wxUSE_LONGLONG and always use wxLongLong_t
All supported platforms provide 64-bit integer types since many years,
so remove the legacy wxLongLongWx implementation and rename
wxLongLongNative to just wxLongLong and always compile it in.

Note that wxLongLong itself must still be kept for compatibility as it
has member functions, such as GetValue() or ToString(), that can be used
in the existing code.
2024-10-18 19:26:15 +02:00
Lauri Nurmi ee978a1f6f Use unused variables like they were likely meant to be used
No actual changes to the test, a slight change of tone with one colour
scheme in the propgrid sample.
2024-10-10 20:20:02 +03:00
Vadim Zeitlin f6a1b1a18a Show loading wxPropertyGrid from XRC in the sample
Demonstrate defining wxPropertyGridManager in XRC.
2024-02-03 22:03:17 +01:00
Vadim Zeitlin a228377b7d Don't make propgrid sample so big on startup
This doesn't look great and also doesn't work correctly in high DPI.

Instead of trying to fix it, just hard code the size of the main frame
and also apply FromDIP() to the size of the child frame.
2024-01-30 01:55:14 +01:00
Vadim Zeitlin 3ca2594c3a Rename m_pSampleMultiButtonEditor in propgrid sample too
Similar to the previous commit, just rename a member variable to avoid
using "p" prefix for it which was inconsistent with the other variables
in the same class.
2024-01-30 01:55:14 +01:00
Vadim Zeitlin 5b064c0fde Avoid using Hungarian notation in propgrid sample
Rename m_pPropGridManager to just m_propGridManager for consistency with
the existing m_propGrid.
2024-01-30 01:55:14 +01:00
Vadim Zeitlin cb852632e2 Remove local copies of m_pPropGridManager in propgrid sample
This made the code more difficult to understand as some functions were
called on m_pPropGridManager and other on pgman which referred to the
same object.

No real changes.
2024-01-30 01:55:14 +01:00
Artur Wieczorek e2dcdb275b Use wxString() rather than wxEmptyString in propgrid sample 2024-01-06 22:43:01 +01:00
Artur Wieczorek efa2870cb4 Rename wxPGKeyboardActions type to wxPGKeyboardAction
For regular enumeration singular name is more appropriate.
2024-01-06 22:42:55 +01:00
Vadim Zeitlin e43f913313 Remove all blank "Modified by:" lines from top comment blocks
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.
2023-10-22 01:22:48 +02:00
Artur Wieczorek 3b7d81b7f2 Use C++11 standard library to generate pseudo-random numbers 2023-09-22 23:39:53 +02:00
Artur Wieczorek a3b7839c41 Add wxFlagsProperty demonstration to propgrid sample 2023-09-22 23:39:53 +02:00
Artur Wieczorek 5a87cbdf3d Use enum class to represent wxPGKeyboardActions 2023-09-22 23:39:53 +02:00
Vadim Zeitlin d65eed50fa Replace some occurrences of wxUSE_STL with wxUSE_STD_CONTAINERS
The latter option will remain, while the former one won't be used at all
any longer soon, so prefer using the latter whenever possible.
2023-04-15 15:14:41 +01:00
Artur Wieczorek f1273ce152 Use class enums to implement bitmask types
To improve type safety of flags.
2023-02-19 22:36:21 +01:00
Artur Wieczorek ad6bb3a10a Adjust propgrid sample to look better on HiDPI display 2023-02-05 19:05:44 +01:00
Artur Wieczorek ec25a5c83c Execute automated tests for wxPropertyGrid
Move existing manually executed tests in propgrid sample to the test
suite executed automatically.
2023-01-30 17:28:17 +01:00
Vadim Zeitlin 3d2754d04a Remove code not doing anything from propgrid sample
This code, added back in 1c4293cb91 (added wxPropertyGrid from Jaakko
Salli (#9934), 2008-09-12), resulted in warnings about an unused
variable from clang and was generally confusing, so just remove this
code entirely as it's not clear what was actually the intention here.
2023-01-06 00:58:05 +01:00
Vadim Zeitlin e89f05faba Remove memory debugging/tracing support and all related options
Drop disabled by default and pretty useless memory tracing code and all
the overlapping and poorly documented build options related to it.

Remove memory.cpp entirely and update all the make/project files, but
preserve the now completely trivial wx/memory.h for compatibility and
also keep including wx/string.h from wx/object.h as it seems like a lot
of existing code actually depends on this, even if it should not.

Replace the options in the propgrid sample with a couple of other
debug-related options that were not used before to avoid leaving the
"Debugging Section" completely empty.
2023-01-05 21:41:38 +01:00
Vadim Zeitlin d05a909c58 Merge branch 'msw-composited-parent'
Fixes for using WS_EX_COMPOSITED in wxMSW.

See #23002.
2022-12-04 01:04:27 +01:00
Artur Wieczorek 1d85e22543 Implement new wxPGProperty::HasAnyChild() method
There are many checks in the code whether wxPGProperty has any child.
Doing so by checking if GetChildCount() is greater than zero doesn't
seem to express intent simply and clearly. With dedicated method this
could be done simpler and hopefully in a more optimal way.
2022-12-03 17:15:28 +01:00
Artur Wieczorek 2cc7f7d8d7 Use default ctor's and dtor's instead of those with empty bodies 2022-12-03 17:15:28 +01:00
Vadim Zeitlin 20bbc43a20 Redefine wxTRANSPARENT_WINDOW as 0 and stop using it
This style never did anything useful in wxMSW and did nothing at all in
all the other ports, so always was rather useless, but became actively
harmful not that WS_EX_COMPOSITED is used in wxMSW because using it and
WS_EX_TRANSPARENT, enabled by wxTRANSPARENT_WINDOW, together doesn't
work and results in an endless stream of WM_PAINT messages being sent to
the _siblings_ of the window with wxTRANSPARENT_WINDOW style.
2022-11-28 19:04:56 +00:00
Vadim Zeitlin 4519d8e08a Remove wxUSE_UNICODE checks as they're always true now
Also remove all code guarded by "#if !wxUSE_UNICODE".
2022-10-27 19:43:30 +02:00
Vadim Zeitlin 4f4c5fcfdf Use nullptr instead of NULL in the code and documentation
This is a combination of running clang-tidy with modernize-use-nullptr
check for some ports (GTK, X11, OSX) and manual changes to the ports for
which it couldn't be used easily (MSW, DFB) and also manually updating
the docs.

Also replace NULL with null or nullptr in the comments as this is more
consistent with the use of nullptr in the code and makes it simpler to
grep for the remaining occurrences of NULL itself.

And also use null in the assert messages.

Only a few occurrences of "NULL" are still left in non-C files, mostly
corresponding to unclear comments or string output which it might not be
safe to change.
2022-10-18 01:25:25 +02:00
PB 88d526660f Replace wxOVERRIDE and wxNOEXCEPT with override and noexcept
Don't use deprecated macros in wxWidgets itself.
2022-10-15 18:10:45 +02:00
Artur Wieczorek 5e2da5a106 Get rid of v2.8 code 2022-08-02 08:26:29 +02:00
Artur Wieczorek b72a742b21 Decouple wxPropertyGridPageState from wxDC
Reimplement functions to calculate column widths to do that without
referring to wxClientDC.
2022-05-30 19:17:37 +02:00
Artur Wieczorek 87394856f5 Use wxBitmapBundle in wxPropertyGrid 2021-11-19 17:52:56 +01:00
Artur Wieczorek 6b7712bc14 Use empty wxBitmapBundle instead of wxNullBitmap as an argument
Pass explicitly wxBitmapBundle instead of wxBitmap to
wxPropertyGridManager::AddPage to avoid implicit conversion from wxBitmap
to wxBitmapBundle.
2021-11-17 22:54:54 +01:00
Blake Madden 1380b1914c Fix typos in sample comments
Closes https://github.com/wxWidgets/wxWidgets/pull/2513
2021-09-07 19:23:31 +02:00
Artur Wieczorek 02af9b0295 Add option to demonstrate disabled wxPropertyGrid in propgrid sample 2021-03-12 20:35:06 +01:00
PB f57f214122 Remove BCC-specific hdrstop pragma from everywhere 2020-10-12 21:58:37 +02:00
Artur Wieczorek 491b68f7be Get rid of unused member variable 2020-04-19 00:43:49 +02:00
Artur Wieczorek 8e2d1fb221 Change buttons layout in propgrid sample
To make the buttons more visible.
2020-04-19 00:41:19 +02:00
Artur Wieczorek a39aff4018 Refactor setting main frame size in propgrid sample
Determine and set main frame size on creation.
2020-04-19 00:39:38 +02:00
Artur Wieczorek d9f8eec602 Refactor propgrid sample
Simplify implementation by creating panel and sizer holding wxPG instance
only once in FormMain ctor.
2020-04-19 00:33:52 +02:00
Artur Wieczorek 81f8e8d742 Call static member function with scope resolution operator 2020-04-19 00:23:14 +02:00
Artur Wieczorek b039ff1822 Adjust bitmap size to the wxPropertyGrid cell size
Bitmap inserted into the wxPG cell should be automatically rescaled while
drawing to let us using bitmaps of any size.
2020-04-13 19:47:37 +02:00
Artur Wieczorek 435764ee61 Display toolkit information in wxPG sample About box
This may help in diagnostics.
2020-04-07 17:20:03 +02:00
Artur Wieczorek a60c5b36fe Don't attempt to delete root wxPGProperty in propgrid sample
The root wxPGProperty is not designed to be deleted so we should look
for a property to delete in the collection of its child properties.

Closes #18539.
2019-10-23 18:02:35 +02:00
Paul Cornett ffac936882 Fix crash in propgrid sample, see #18537 2019-10-22 19:51:50 -07:00
Olly Betts 18e05aeeee Remove no-op uses of wxNO_FULL_REPAINT_ON_RESIZE
This behaviour has been the default and this constant 0 since
e441e1f4e8 which was over 16 years ago.

Closes https://github.com/wxWidgets/wxWidgets/pull/1601
2019-10-11 14:12:43 +02:00
Artur Wieczorek 3bf082a8e5 Fix preparing a bitmap in propgrid sample
Set explicitly the background colour before clearing the bitmap.
2019-10-02 00:08:25 +02:00
Artur Wieczorek b06a9d227f Replace wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes with wxPG_DIALOG_TITLE
Current wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes can be used to customize editor dialog titles only for wxFileProperty and wxDirProperty, respectively. New wxPG_DIALOG_TITLE property is applicable to all properties derived from wxEditorDialogProperty so not only editor dialog titles for wxFileProperty and wxDirProperty can be set but also for wxFontProperty, wxLongStringProperty, etc.
wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes are marked obsolete.
2019-08-04 20:20:19 +02:00
Artur Wieczorek 69632371e3 Implement wxNumericProperty as a base class for all wxPG numeric properties
All numeric properties (wxIntProperty, wxUIntProperty, wxFloatProperty) share some features (like specific attributes, numeric validation, SpinCtrl editor support) so for the sake of clear design it would be good to derive them from the common base class (wxNumericProperty) in which all shared functions are implemented. This class is not intended to be instantiated so it's an abstract class.
2019-06-29 11:13:13 +02:00
Artur Wieczorek 50330b3a26 Use long int literals to represent long constants in propgrid sample 2019-05-26 18:52:43 +02:00
Artur Wieczorek fa35fdc600 Preserve header and label editing mode while recreating the grid
For some operations when grid needs to be recreated currently selected options to show the header and to enable label editing are being ignored and it can be seen a discrepancy between the options selected (and shown) in the menu and the mode of just created wxPropertyGrid. To avoid this inconsistency respective flags can be stored and used to enable/disable features in just created grid.
2019-04-27 22:10:47 +02:00
Artur Wieczorek 0c144f6cda User proper value type of wxPG_ATTR_MULTICHOICE_USERSTRINGMODE attribute
This attribute is of int type.
2019-04-22 20:16:16 +02:00