Commit Graph

128 Commits

Author SHA1 Message Date
Vadim Zeitlin
5f7a6bd15b Replace Connect() with Bind() in all samples and utils too
Still use Connect() in unit tests which were written explicitly for it
and in EventConnector, which can't use Bind() as it uses a variable for
the event type.

No real changes, just use the newer and more convenient function.
2018-05-31 16:19:23 +02:00
Maarten Bent
a96171def4 Fix unused variable and parameter warnings in samples
These variables are only used in debug builds, causing warnings in release builds.
2017-11-25 17:52:08 +01:00
Artur Wieczorek
2f3376c4c5 Allow changing wxPG_EX_ALWAYS_ALLOW_FOCUS in propgrid sample
Add wxPG_EX_ALWAYS_ALLOW_FOCUS to the list of flags which can be changed.
2017-10-18 22:57:39 +02:00
Artur Wieczorek
19dbdca53b Rely on native double buffering by default in propgrid sample
If the platform has native double-buffering, create wxPropertyGrid
relying on it by default.
2017-10-18 22:56:44 +02:00
Artur Wieczorek
afdb7eca87 Use quotes and not angle brackets around the includes of wxWidgets itself 2017-07-16 18:31:54 +02:00
Artur Wieczorek
51f7074caf Fix MSVC14 warnings about a shadowed variable in the propgrid sample.
Just to suppress some harmless warnings.
2016-02-18 18:46:45 +01:00
Vadim Zeitlin
d66289dc95 Don't use the standard OS X Cmd+Q accelerator in the samples
Or, more precisely, don't use for anything else than exiting the application.

Closes #4326.
2016-02-01 16:03:31 +01:00
Artur Wieczorek
d0eea355fa Fixed turning on/off 'Category Specific Colours' in propgrid sample.
When specific colours are turned on then custom colours are assigned to both category properties and their sub-properties. But when specific colours are turned off then only category properties are reverted to default colours what is misleading.
Now, all properties are reverted to default colours.
2015-08-27 19:16:29 +02:00
Artur Wieczorek
503c6a48c7 Use argument of proper type when calling SetPropertyTextColour in propgrid sample.
wxPropertyGridInterface::SetPropertyTextColour expects int value for flags parameter, not Boolean.
2015-08-27 19:06:46 +02:00
Artur Wieczorek
0870f213df Do not attempt to change colours of properties which are not present on the current page (in propgrid sample).
Test executed from 'Category Specific Colours' menu is designed to work only for specific category properties which are present only on 'Standard Items' page.
Display a message if current page is not this one and therefore test cannot be executed properly. Also make menu item non-checkable if it is accessed from improper page.
2015-08-27 19:05:15 +02:00
Artur Wieczorek
e90feaadf3 Added ability to disable label editing mode in propgrid sample.
Currently, once label editing is enabled it cannot be disabled. By replacing ordinary menu item with check item and modifying the handler respectively, label editing mode can be switched on and off.
2015-08-19 19:42:44 +02:00
Artur Wieczorek
c5d6f9d103 Improved retrieving bitmaps from wxArtProvider in propgrid sample.
Retrieve from wxArtProvider bitmaps of required size instead of rescaling them in the application.
2015-08-08 22:27:23 +02:00
Vadim Zeitlin
e70d597c2e Fix propgrid sample compilation.
Resolve ambiguity in assignment of wxImage to wxBitmap in wxMSW which also has
wxBitmap::operator=(wxCursor). This should allow the sample to compile under
MSW after the changes of 1fce152d3c.
2015-07-02 17:07:32 +02:00
Artur Wieczorek
22cc1736ab Add the demonstration of wxEnumProperty with value bitmap to propgrid sample. 2015-06-29 00:04:47 +02:00
Artur Wieczorek
1fce152d3c Use wxArtProvider bitmaps to demonstrate wxEnumProperty with bitmaps in propgrid sample.
Use predefined bitmaps instead of drawing custom ones.
2015-06-28 19:31:45 +02:00
Artur Wieczorek
eaad15eb45 Use no-empty bitmaps to demonstrate wxEnumProperty with variable height bitmaps in propgrid sample.
Default blank black bitmaps look as damaged and this can be confusing.
2015-06-26 19:05:50 +02:00
Artur Wieczorek
4228e3210f Use pre-increment/decrement operators to move iterator in the loop (propgrid sample).
When the return value is ignored, the ++it/--it is never less efficient than the it++/it--.
2015-06-26 18:15:45 +02:00
Artur Wieczorek
a1c888437d Use dedicated IncBy method to increase wxSize value in propgrid sample.
Use this method instead of modifying directly wxSize data members.
2015-06-14 17:10:28 +02:00
Artur Wieczorek
6d29584b48 Use wxLogDebug instead of wxLogMessage to log column resizing with splitter in propgrid sample.
wxLogMessage displays message in pop-up window what prevents dragging the splitter and hence resizing cannot be in practice done. wxLogDebug is sufficient for the logging purposes in this place.
2015-06-13 22:39:16 +02:00
Artur Wieczorek
5d763571b0 Use pre-increment operator to increment iterator in the loop (propgrid sample).
When the return value is ignored, the ++it is never less efficient than the it++.
2015-06-13 22:32:14 +02:00
Artur Wieczorek
8ff74b727a Fixed minor typos in comments and strings in propgrid sample. 2015-06-13 22:28:28 +02:00
Artur Wieczorek
e4023cccc1 Removed unused identifier from propgrid sample. 2015-06-13 22:25:48 +02:00
Artur Wieczorek
8d9a9e286b Replaces references to wxT("") with wxEmptyString in propgrid sample. 2015-06-04 22:53:30 +02:00
Artur Wieczorek
9c9f80223b Exclude header demonstration in propgrid sample when wxUSE_HEADERCTRL == 0.
Code responsible for header demonstration should be excluded in this case because header management functions in wxPropertyGridManager depend on wxHeaderCtrl (via wxPGHeaderCtrl) and if it is not present then respective methods in wxPG are not exposed.
2015-05-31 19:20:17 +02:00
Artur Wieczorek
6299874971 Use wxSizerFlags when constructing sizers in propgrid sample.
Use it instead of multiple argument wxSizer::Add() overload.
2015-05-30 18:33:25 +02:00
Artur Wieczorek
a0157b37f2 Use wxVariant::IsType() function to check the type of variant values in propgrid sample.
Use this dedicated function to check the type of variant value instead of calling wxVariant::GetType() function and performing explicit comparisons of returned string.
2015-05-10 20:22:40 +02:00
Artur Wieczorek
cc799c10ac Use wxT macro with string literals in propgrid sample.
This fix is to unify string literals in the sample.
2015-05-10 20:21:37 +02:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Roberto Perpuly
69005ef145 Add to propgrid sample the option to select the way Boolean values are rendered.
This option is useful to demonstrate how to globally change the way Boolean values are rendered (either as check boxes or selection lists).

See #16922.
2015-04-04 10:19:31 +02:00
Artur Wieczorek
1638644ea6 Relocate "Run test" menu items in the menu of propgrid sample.
Move "Run test" menu items from "Try These!" menu to "File" menu in propgrid sample. It seems to be more adequate location for such action items.
2015-04-04 00:42:31 +02:00
Artur Wieczorek
726a5e1155 Prepare propgrid sample to build successfully when wxUSE_LONGLONG is disabled.
Make the code ready to build even when wxLongLong type is not available.
2015-04-03 21:14:06 +02:00
Artur Wieczorek
3e62d33935 Update composite wxStringProperty labels and values in propgrid sample.
Set some strings and labels to the more current values.
2015-03-31 19:14:36 +02:00
Artur Wieczorek
e4ea660dfd Fix minor typo in string macro in propgrid sample. 2015-03-29 21:37:33 +02:00
Artur Wieczorek
eb7979d25e Prevent assertion warnings in propgrid sample when "Test ReplaceProperty" is invoked more then once.
New property replacing the old one should have unique name to prevent assertion warning in wxPropertyGridInterfcae::ReplaceProperty when there is checked if property of a given name already exists.
2015-03-28 21:27:06 +01:00
Artur Wieczorek
7b8da40c8e Display additional information for EVT_PG_SELECTED event in propgrid sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78504 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-15 23:26:42 +00:00
Artur Wieczorek
a5718923ad Use bool constants instead of BOOL ones in propgrid sample.
s/FALSE/false/ and s/TRUE/true for the sake of consistency.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-08 12:48:43 +00:00
Artur Wieczorek
c1b777cd16 Use wxPG_IMPLEMENT_PROPERTY_CLASS macro in the propgrid sample.
Replace old WX_PG_IMPLEMENT_PROPERTY_CLASS macro with new and simplified wxPG_IMPLEMENT_PROPERTY_CLASS macro.

See #15541

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78445 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-02-04 16:53:46 +00:00
Artur Wieczorek
9977d7daa9 Refactor propgrid sample (rounding numbers).
Use wxRound function to round floating point numbers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-21 17:14:22 +00:00
Artur Wieczorek
c529c68c7a Refactor propgrid sample (attribute constants).
Use attribute constants instead of strings when calling wxPGProperty::SetProperty and wxPGProperty::GetProperty in propgrid samples.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78401 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2015-01-21 17:11:36 +00:00
Vadim Zeitlin
c2ecbadd3b Fix some typos in the comments and messages in the samples.
Closes #16738.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-24 13:57:19 +00:00
Artur Wieczorek
cebc3503d2 Create wxPropertyGridManager with default size in the propgrid sample
Since r78150 wxPropertyGridManager can be created with default size with no issues.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78267 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-12 22:40:00 +00:00
Vadim Zeitlin
0d4ad161d5 Remove support for Win9x from wxMSW.
Most importantly, this allows us to remove all MSLU-related stuff.

Some functions which were previously loaded dynamically can now be just used
directly, too.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-16 02:33:40 +00:00
Vadim Zeitlin
f4b80e5337 Remove MSVC6 support.
Don't support this compiler any more, this allows to get rid of tons of
MSVC6-specific workarounds, in particular we can now use Bind() and natural
template functions calls in the library code.

Also remove MSVC6 project and solution files and don't generate them when
bakefile_gen is ran any more (removing the remaining occurrences of msvc6prj
from the bakefiles results in weird bake-time errors, so it's simpler to just
leave them there).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 22:32:17 +00:00
Paul Cornett
5b4a70247c use "new" wx-prefixed macros in samples
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76222 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 07:07:55 +00:00
Paul Cornett
8b4ae731d3 use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 00:02:23 +00:00
Paul Cornett
967a94c91a remove WXWIN_COMPATIBILITY_2_6, add WXWIN_COMPATIBILITY_3_0
closes #15792

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-04 20:07:33 +00:00
Paul Cornett
f363cee882 fix building with WXWIN_COMPATIBILITY_2_8 == 0
wxPG_EX_DISABLE_TLP_TRACKING does nothing since r61779


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74840 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-19 06:16:34 +00:00
Vadim Zeitlin
2d3ae5c537 Compilation fix to propgrid sample after r74628.
Use wxMax() and wxMin() instead of std::max() and min().

Also work around wrong for loop scoping for VC6.

See #15368.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74642 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-07 12:08:10 +00:00
Vadim Zeitlin
33d953e748 Add wxPropertyGridPageState::GetColumnFullWidth().
This method allows to get the full width needed by wxPropertyGrid and is
useful for determining the space to allocate for it, e.g. when creating a
popup showing the property grid, as shown by the changes to the sample.

Closes #15368.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74628 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-06 13:05:42 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00