Commit Graph

66222 Commits

Author SHA1 Message Date
Artur Wieczorek
b064608c2a Use const_cast to change the constness 2019-06-16 19:50:08 +02:00
Artur Wieczorek
2ebdfb7a40 Remove obsoleted comments 2019-06-16 19:49:01 +02:00
Artur Wieczorek
efefc97aac Use template instead of macro to generate wxPropertyGridIterator class 2019-06-16 19:47:33 +02:00
Artur Wieczorek
98c1b057e8 Use standard wxVariant instead of wxPropertyGrid-specific WXVARIANT
There is no need to use WXVARIANT for data types directly supported by wxVariant.
2019-06-16 19:46:44 +02:00
Artur Wieczorek
d404ff02a1 Support tooltips in wxPropertyGrid if support for tooltips enabled is globally 2019-06-16 19:45:40 +02:00
Artur Wieczorek
8c187ffc7a Get rid of commented out and unused macro definitions 2019-06-16 19:45:39 +02:00
Artur Wieczorek
6c437d12ab Get rid of iteration macros in wxPropertyGridPageState
Replace these macros with code they substituted for the sake of readability.
2019-06-16 19:45:39 +02:00
Artur Wieczorek
6abf507923 Get rid of unused variables 2019-06-16 19:45:12 +02:00
Artur Wieczorek
c5cf25e9df Fix resizing wxPropertyGrid columns when virtual width is enabled
Columns should be resized the same way whether virtual width is enabled or disabled.
2019-06-16 19:35:16 +02:00
Paul Cornett
f99153dbd1 Remove wxGLCanvas "size-allocate" signal handler
There is already a handler in wxWindow which will do the same thing.
2019-06-12 23:25:29 -07:00
Paul Cornett
2afb03a4bb Remove special wxGLCanvas paint event handling
Probably hasn't been needed in a very long time, if it ever was.
2019-06-12 23:23:12 -07:00
Paul Cornett
65ced79ed1 Remove wxGLCanvas "realize" signal handler, use GTKHandleRealized() instead 2019-06-12 22:30:41 -07:00
Paul Cornett
780b8720c0 Generate a size event for wxGLCanvas when it is realized
This ensures that a wxSizeEvent handler can set the initial viewport size correctly.
Fixes the initial display of the pyramid sample with GTK2.
2019-06-12 22:19:17 -07:00
Bartek Warzocha
7d5b467633 Fix sending events for non-first wxJoystick buttons under MSW
Fix bug introduced by the (relatively) recent wxJoystick rewrite: using
"!m_buttons" is wrong as it always returns 0 for any button(s) but the
first one, we need bit-wise "~m_buttons" here instead.

See https://github.com/wxWidgets/wxWidgets/pull/942

See #1142.
2019-06-12 13:50:10 +02:00
Vadim Zeitlin
4cb1c8cab6 Show different wxPen cap styles in the drawing sample
This is useful to see what calling SetCap() changes at a glance.
2019-06-11 14:51:50 +02:00
Jay Nabonne
655205af77 Centre wxMessageDialog in wxQt too
Do this for consistency with the other ports.

Closes https://github.com/wxWidgets/wxWidgets/pull/1347
2019-06-11 14:38:22 +02:00
Robin Dunn
8b489f53d6 MSWSetEmulationLevel and MSWSetModernEmulationLevel are static 2019-06-10 21:03:40 -07:00
Vadim Zeitlin
39bab48dee Fix dereferencing invalid iterator in wxMemoryFSHandlerBase
Don't assume that m_findIter is always valid initially, i.e. after
FindFirst() is called, as this is not the case if the memory FS is
empty, i.e. which no files had been added to it yet.

This also allows to simplify the iteration logic, as we don't need to
check m_findArgument (which, in turn, obviates the need to clear it when
we reach the end of the iteration) and can just use m_findIter directly.

Closes #18416.
2019-06-10 18:07:57 +02:00
Tomay
3ff6647886 Use tab active/hover colours under non-MSW platforms too
This should have been part of 1bb4404527
but was forgotten there.

See #18406.

Closes https://github.com/wxWidgets/wxWidgets/pull/1344
2019-06-10 17:45:17 +02:00
Ian McInerney
d255ac1fd3 Allow using doxytag2zealdb for docset generation
This allows to generate docsets on Linux too and not only macOS as
before, when it required Xcode.

Closes https://github.com/wxWidgets/wxWidgets/pull/1343
2019-06-10 17:42:15 +02:00
Vadim Zeitlin
04435144ac Give warnings for using "x = y" as condition inside wxASSERT
Using "!(cond)" inside wxASSERT macro expansion prevented both gcc and
clang (although not MSVC) from giving -Wparentheses warnings if the
assignment operator was accidentally used instead of the equality
comparison operator.

Change the macro definition to use the condition directly, without
negating it, to let gcc/clang give the warning if appropriate.
2019-06-10 13:57:45 +02:00
Vadim Zeitlin
9f5684d171 Fix a typo in the previous commit
Use wxCLEAR instead of wxNO_OP twice.
2019-06-07 19:44:24 +02:00
Vadim Zeitlin
4184fc286f Document wxGCDC limitations in wxDC API implementation
See https://github.com/wxWidgets/wxWidgets/pull/1339
2019-06-07 17:32:53 +02:00
Maarten Bent
9732a2d99f CMake: Allow to toggle between static and dynamic MSVC runtime
After enabling wxBUILD_USE_STATIC_RUNTIME it cannot be disabled again
(except by manually modifying CMAKE_C*_FLAGS_*). Improve this by setting
the build flags to their default value when wxBUILD_USE_STATIC_RUNTIME
is disabled.

Closes https://github.com/wxWidgets/wxWidgets/pull/1338
2019-06-07 16:39:16 +02:00
Vadim Zeitlin
dab230a3be Fix more wxHtmlHelpWindow-related German translations
See #18409.
2019-06-06 17:10:24 +02:00
Dummy
4ea7e2ecdd Fix wrong German translation of "Next page"
Closes #18409.
2019-06-06 13:46:02 +02:00
Tomay
1bb4404527 Make ribbon tab active/hover label colour customizable
Allow changing the colour of the label in the active and hover states to
make it possible to improve its contrast with the tab background in
these states.

Closes #18406.
2019-06-04 23:23:04 +02:00
PB
4ad780d6d3 Add missing semicolon to examples using wxDECLARE_XXX() macros
Such macros must be followed by semicolons but a couple of examples were
missing them.

Closes https://github.com/wxWidgets/wxWidgets/pull/1337

Closes #18408.
2019-06-04 23:11:02 +02:00
Vadim Zeitlin
b58c5aea83 Try to accept 8-bit data in wxProtocol::ReadLine() too
Even though the data is supposed to be 7-bit here, we can make an effort
to decode 8-bit data if we get any as it can't be worse than just
throwing it away.

Closes https://github.com/wxWidgets/wxWidgets/pull/1336

Closes #2793.
2019-06-03 22:35:56 +02:00
Jan Knepper
a4f2303361 Use closesocket() for closing sockets under MSW
If accepting a socket connection failed, wxSocketImpl::Accept() used
close() to close the socket even under MSW, but it can be only used for
the file descriptors there and closesocket() must be used instead for
the sockets.

Add new (private) wxCloseSocket define and use it both here, to fix the
bug, and elsewhere to make the code more clear.

Closes #18407.
2019-06-03 22:31:37 +02:00
Artur Wieczorek
b309868930 Fix implementation of wxScrolled<wxControl>
wxControl::Create() has a different signature than wxWindow::Create()
(its 6-th parameter is of const wxValidator& type instead of
const wxString&) so it cannot be invoked from the the general template of
wxScrolled<T>::Create() method. We need to move a call to T::Create()
function to a dedicated template function wxCreateScrolled() responsible
for actual creation of the scrolled window and overload it for custom
classes if necessary.
This has to be done for wxControl and from this overloaded function
wxControl::Create() can be called with rearranged parameters.
2019-06-02 22:34:01 +02:00
Vadim Zeitlin
8caa379490 Merge branch 'sys-theme-fixes'
Fix disabling system theme for wxMSW wxListCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/1332
2019-05-28 17:17:49 +02:00
Vadim Zeitlin
65fdda7a35 Document that wxDC::GetPixel() doesn't work under Mac
See #4473.

Closes https://github.com/wxWidgets/wxWidgets/pull/1333
2019-05-28 00:38:17 +02:00
Vadim Zeitlin
b04f199cd0 Correct wrong XDG note in wxStandardPaths::GetUserDir() docs
Unlike the older functions, this one doesn't care about backwards
compatibility and so always uses XDG specification.

Closes #18403.
2019-05-27 17:27:55 +02:00
Vadim Zeitlin
551dfea59a Fix wrong appearance of selected unfocused items in wxListCtrl
Items using wxSYS_COLOUR_BTNFACE (light grey in the default theme) for
their background are, for some reason, drawn using the colour of active
selection (blue) even when the control doesn't have focus.

This is wrong, but there just doesn't seem to be any way to prevent this
from happening when using the native drawing logic other than not using
wxSYS_COLOUR_BTNFACE for the background (modifying any colour channel by
1 is enough to work around the issue). So to draw the item ourselves in
this case and hope that it remains indistinguishable from the native
appearance when not using the system theme.

Closes #17988.
2019-05-26 23:20:21 +02:00
Vadim Zeitlin
d9684e1ceb Allow calling EnableSystemTheme(false) before creating the window
This is important as enabling the system theme results in changes to the
native ListView control appearance that are not undone later even if the
system theme is disabled. Notably, the item rectangle width is reduced
by 2 pixels when system theme is enabled and it's not increased to its
original value even when it's disabled later, resulting in gaps between
items through which the control background shows, for example. This also
makes items drawn using our own HandleItemPaint() slightly, but
noticeably, larger than the items using standard appearance, which looks
bad.

All these problems can be avoided if we skip enabling the system theme
in the first place if EnableSystemTheme(false) had been called before
creating the control, so support doing it like this and document that
this is the preferred way of disabling the system theme use.

Closes #17404, #18296.
2019-05-26 23:20:21 +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
a93713f7f8 Use long int literals to represent long constants 2019-05-26 18:51:37 +02:00
Artur Wieczorek
1943a9f38d Update wxPG documentation to get rid of doxygen warnings 2019-05-26 18:22:49 +02:00
Artur Wieczorek
58fdf77c9b Add descriptions of enum values in documentation 2019-05-26 18:22:14 +02:00
Artur Wieczorek
1a5526e0ad Remove unused type definition from documentation
It's not used since 3.1.
2019-05-26 18:20:38 +02:00
Artur Wieczorek
b55ff7c3b5 Fix typo in documentation
To generate the link to wxPG_FILE_DIALOG_TITLE.
2019-05-26 18:19:13 +02:00
Artur Wieczorek
d225d2c099 Remove unnecessary section from wxPG documentation
Documentation of macros looks better without using the section.
2019-05-26 18:17:42 +02:00
Artur Wieczorek
908342e3ad Code cleanup: Define wxPGProperty and wxPropertyGridPageState functions in their own class files
Having definitions of several wxPGProperty and wxPropertyGridPageState functions in wxPropertyGrid header is misleading so they should be moved to the files with their own classes definitions for the sake of clarity.
2019-05-26 18:12:31 +02:00
Artur Wieczorek
d8f04a7bb1 Add test of setting and getting maximum text length of wxPG properties 2019-05-26 18:10:34 +02:00
Artur Wieczorek
0bdc9bedbe Enable setting maximum length of the entered text in wxLongStringProperty editor
Editor used by wxLongStringProperty is wxTextCtrl-based and it should be possible to set the limit of the length of the entered text just like it's done for such editors in another properties like wxStringProperty.
2019-05-26 18:06:54 +02:00
Artur Wieczorek
7a29f5dd2c Don't set maximum text length for non-text wxPG properties
Setting the limit for the length of the text the user can enter in the text editor makes sense only for properties having text editors so in wxPGProperty::SetMaxLength() should be done a check whether to actually set a limit or not depending on the kind of editor used.
wxPropertyGridInterface::SetPropertyMaxLength() should be implemented on top of wxPGProperty::SetMaxLength() to proceed only if maximum length was actually set.
2019-05-26 18:06:53 +02:00
Artur Wieczorek
e45c6b0dd1 Use separate event handlers to handle individual wxPGHeaderCtrl events
The code to handle events split into separate functions dedicated to handle the events of specific type is more readable than the code concentrated in one function handling all kinds of events.
2019-05-26 18:06:52 +02:00
Artur Wieczorek
5fc0af423e Check wxPropertyGrid column widths against virtual size
In virtual width mode total width of columns cannot be lesser than virtual width.
2019-05-26 17:59:21 +02:00
Artur Wieczorek
a07c14a31d Fix calculation of column width after changing number of wxPropertyGrid columns
Because changing the number of columns may change their total width from value greater than current client size to the value less than this size or vice versa we need to know this total width prior to determining wxProperyGrid scrolled view in order to account this actual width in the calculations.
2019-05-26 17:59:20 +02:00