Commit Graph

256 Commits

Author SHA1 Message Date
Artur Wieczorek
79b71cf4ff Scale bitmap to wxPropertyGrid's row height
By design only bitmaps lower than row height are displayed within the cells.
Because on every platform default row height can vary so bitmap has to be explicitly scaled to the row height to ensure that it will be initially displayed on every platform.

Closes #18310.
2018-12-24 00:00:14 +01:00
Artur Wieczorek
8432726ba8 Make string literal wxChar* string
This macro parameter is passed to wxArrayStringProperty::OnButtonClick() parameter of wxChar* type. char* string interpreted in this function as a wxChar* string results in obtaining invalid Unicode characters.
This fixes a regression introduced in b70ed2d8c8.

Closes #18307.
2018-12-23 11:00:35 +01:00
Vadim Zeitlin
e1185d8bf0 Increment version number to 3.1.3
Done by running misc/scripts/inc_release, manually updating version.bkl,
rebaking and rerunning autoconf.
2018-12-10 19:06:18 +01:00
Blake Eryx
65827a0572 Remove unnecessary c_str() calls from the samples
Pass wxStrings directly to wxString::Format("%s") and similar
pseudo-vararg functions, there is no need for c_str() there since
wxWidgets 2.9.

Closes https://github.com/wxWidgets/wxWidgets/pull/1009
2018-11-03 22:52:57 +01:00
Artur Wieczorek
028cfb1ba4 Refresh wxPropertGrid after resetting the status
This is to visualize the effect of the modification.
2018-10-13 23:33:27 +02:00
Artur Wieczorek
a33b364d84 Add tests of retrieving main parent of wxPGProperty
This is to test wxPGProperty::GetMainParent() function.
2018-10-13 23:33:25 +02:00
Blake Eryx
4fb39beae1 Remove all wxS() macros from samples
The use of wxS() is an optimization which can be used to avoid an
implicit conversion from narrow to wide strings, but such optimizations
are not really needed in the samples and just make their code less
readable, so remove them.

Closes https://github.com/wxWidgets/wxWidgets/pull/956
2018-10-01 13:55:42 +02:00
Blake Eryx
b70ed2d8c8 Remove more wxT() macros from samples
Also use wxString instead of wxChar* strings.

Closes https://github.com/wxWidgets/wxWidgets/pull/950
2018-09-29 17:16:12 +02:00
Vadim Zeitlin
f69dbaa1ae Introduce MSW ARM64 support
This is a preliminary ARM64 platform support for wxWidgets at "it
compiles" stage. This will allow building and testing wxWidgets based
apps for oncoming Windows 10 ARM64.

Requirements:
- Visual Studio 2017 Update 4 or later with Visual C++ compilers and
  libraries for ARM64 component installed

Building:
1. Open command prompt.
2. Change directory to build\msw subfolder.
3. Run "C:\Program Files (x86)\Microsoft Visual
   Studio\2017\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" once.
4. Use `nmake TARGET_CPU=ARM64 ...` to build required flavor of wxWidget
   libraries.

Notes:
1. Building of *.sln/*.vcxproj files does not support ARM64 yet. This
   requires to hardcode Windows SDK to 10.0.15063.0 or later in
   *.vcxproj files, which would render them non-compilable in older
   Visual Studio versions. Microsoft is aware of this issue and is
   planning a fix in the next version of Visual Studio.
2. wxmsw31ud_gl.dll does not build yet. Awaiting Microsoft to deliver
   missing opengl32.lib for ARM64. Please, specify USE_OPENGL=0.

Closes https://github.com/wxWidgets/wxWidgets/pull/923
2018-09-17 22:34:32 +02:00
Vadim Zeitlin
3ffa651a34 Move wxAdv library contents into wxCore
This basically removes the "adv" library, even though it's still
preserved for compatibility with user make/project files referring to
it.

It is done because the distinction between "adv" and "core" was never
really clear (e.g. why wxTreeCtrl was in core but wxTreeListCtrl in
adv?) and it prevented some core classes from using adv ones.
2018-08-27 21:13:04 +02:00
Artur Wieczorek
54c5584c65 Don't set column title if wxPG header is going to be hidden
wxPropertyGridManager::SetColumnTitle() shouldn't be called when we going
to hide the header because it makes the header visible.
2018-07-07 20:29:37 +02:00
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
Vadim Zeitlin
2ec2837f6d Update version to 3.1.2
Run misc/scripts/inc_release and rebake.
2018-02-20 00:08:01 +01:00
Tobias Taschner
ddceaab001
Remove MSW wxUxThemeEngine class
This undocumented "private" class was used for various windows UxTheme
functions which are available since WinXP. As wxWidgets 3.1 is XP+ it
does not make sense anymore to load the theme functions dynamically.
2018-01-22 00:51:11 +01: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
Vadim Zeitlin
0d394eec9c Update to bakefile 0.2.11 and rebake everything
The main/only change in this version is the removal of automatic rules
using old Carbon Rez/DeRez/SetFile tools.
2017-10-21 17:42:30 +02: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
Paul Cornett
db29d5efba Fix incorrect pointer indirection in sort callback function 2017-10-01 09:11:45 -07:00
Artur Wieczorek
afdb7eca87 Use quotes and not angle brackets around the includes of wxWidgets itself 2017-07-16 18:31:54 +02:00
Vadim Zeitlin
59bd1178f1 Fix build with RTTI turned off using MSVC makefiles
Rebake these makefiles using fixed version of bakefile (pre-0.3.0).

See https://github.com/vslavik/bakefile/pull/85

Closes #17767.
2017-01-04 12:01:14 +01:00
Vadim Zeitlin
395d453c94 Link with oleacc.lib when using MSW gcc makefiles
This library is now required when wxUSE_ACCESSIBILITY==1, but was only linked,
using a compiler-specific pragma, when using MSVC resulting in link errors
with gcc.

Fix this by adding the library to the bakefile for non-MSVC compilers and
rebaking.
2017-01-04 11:50:18 +01:00
Vadim Zeitlin
7eee3576cf Update version to 3.1.1
Update misc/scripts/inc_release script: remove non-existent any more files and
update the version in the MSVS 200x project files not generated by bakefile
any more and MSVS 201x project files which were not previously taken into
account.

Run it and rebake.
2016-03-03 23:23:06 +01: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
Vadim Zeitlin
5cce48186c Link with shlwapi.lib and version.lib under MSW
These libraries are required now that we don't load the functions from them
dynamically (see e78be14ac1)

Closes #17180
2015-10-07 18:56:33 +02: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
0ef325bfdc Use HasFlag() instead of GetWindowStyleFlag() to check flags in propgrid sample.
Dedicated method to check flags is more readable.
2015-06-26 18:40:52 +02:00
Artur Wieczorek
ab32194e91 Initialize pseudo-random number generator only once when starting the tests (in propgrid sample). 2015-06-26 18:28:05 +02:00
Artur Wieczorek
03dfb1cd10 Check if grid is empty when properties are deleted in the reverse order (propgrid sample).
This is to check if all properties are really deleted.
2015-06-26 18:19:49 +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
2ade160882 Refactor using RT_FAILURE_MSG macro in propgrid sample.
If we assume that RT_FAILURE_MSG macro parameter is of wxString& type then there is possible to simplify statements using this macro.
2015-06-25 19:29:54 +02:00
Artur Wieczorek
ac0f3c6d5d Fix logging errors in propgrid sample.
Use dedicated RT_FAILURE_MSG macro to log error messages while running the tests.
2015-06-25 19:27:08 +02:00
Artur Wieczorek
6f4a83a202 Fix wxTextCtrl style in propgrid sample.
These controls are used only to present the text and therefore they should be read-only.
2015-06-25 19:25:00 +02:00
Artur Wieczorek
147ae70623 Extend 'SetSplitterPosition' unit test in propgrid sample.
Added check if splitter position is retained when property grid is resized.
2015-06-14 17:13:21 +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
2bc4357088 Added unit test of wxPGProperty::SetFlagsAsString/GetFlagsAsString methods in propgrid sample.
This unit test will be executed for fast and full test. For each property there are generated random flags which are set with wxPGProperty::SetFlagsAsString(). Verification whether flags were set properly is done using wxPGProperty::GetFlagsAsString() and wxPGProperty::HasFlag() methods.
2015-06-14 16:56:06 +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
dc3f451acb Use empty() member function to determine if arrays are empty in propgrid sample.
Use this dedicated function instead of checking if size()/GetCount() functions return zero/non-zero value.
2015-06-13 22:30:13 +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