Commit Graph

6341 Commits

Author SHA1 Message Date
Stefan Brüns
1171155fee Remove LIST_HITTEST_ONITEMRIGHT handling from listtest sample
The ONITEMRIGHT case is only meaningful for trees, and according to the
code comment, "not used".

Closes https://github.com/wxWidgets/wxWidgets/pull/2070
2020-10-03 13:31:00 +02:00
Artur Wieczorek
0c3494592a Fix calculating mouse position in drawing sample
Displayed logical mouse position was improper for rotated wxDC.
2020-10-01 17:47:12 +02:00
Vadim Zeitlin
be2a61519b Merge branch 'grid-selected'
Split the wxGrid RANGE_SELECT event into separate SELECTING and SELECTED
events.

See https://github.com/wxWidgets/wxWidgets/pull/2028
2020-08-31 14:55:56 +02:00
Vadim Zeitlin
3df9d772a4 Merge branch 'display-ppi-from-scaling-factor'
Determine display DPI from scaling factor instead of trying to compute
it from the physical display dimensions.

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

Closes #18855.
2020-08-24 00:14:27 +02:00
Vadim Zeitlin
767f19cf25 Add menu item to clear log in the grid window
Just make it more convenient to read the logs in it.
2020-08-21 11:49:34 +02:00
Vadim Zeitlin
65c27c6a6e Rename wxID_ABOUT menu handler in the grid sample
Use "On" prefix for it for consistency with all the other ones.

No real changes.
2020-08-20 17:08:40 +02:00
Vadim Zeitlin
eb60684ac7 Make log window in the grid sample expand too
It is too small to show more than a few lines of logs otherwise.
2020-08-20 17:06:09 +02:00
Vadim Zeitlin
4b918966f6 Refactor logging of wxGridRangeSelectEvent in the grid sample
Avoid duplicating the complicated logging code twice, when it's exactly
the same for both the SELECTED and SELECTING events. Just use a common
helper function instead.
2020-08-20 16:56:23 +02:00
Daniel Kulp
decc255846 Update grid sample to show selecting events 2020-08-20 16:56:03 +02:00
Maarten Bent
c661be4fc9 Make custom renderer in dataview sample DPI Aware 2020-08-19 21:35:49 +02:00
Vadim Zeitlin
c346fd0321 Show scale factor in the display sample too
Show it for consistency with all the other wxDisplay accessors and to
make it simpler to test its return value.
2020-08-15 00:28:32 +02:00
Hertatijanto Hartono
c695c419d1 Utilise GetZoomFactor() in webview sample
Show example of using GetZoomFactor().

Closes https://github.com/wxWidgets/wxWidgets/pull/1999
2020-08-03 23:58:19 +02:00
Maarten Bent
53a2c8c7fb Rebake after manifest changes 2020-07-31 01:53:43 +02:00
Vadim Zeitlin
d1aa3d5663 Update the version to 3.1.5
This was done by running misc/scripts/inc_release, bakefile_gen and
autoconf.
2020-07-23 16:25:39 +02:00
Vadim Zeitlin
2f450733d4 Merge branch 'dpi-scaling-factor'
Add DPI scaling factor and revert content scaling factor behaviour in
wxMSW and other ports not using logical pixels to be 3.0 compatible.

See https://github.com/wxWidgets/wxWidgets/pull/1985
2020-07-20 15:55:23 +02:00
Vadim Zeitlin
4dd009136c Merge branch 'aui-auto-uninit'
Call wxAuiManager::UnInit() automatically.

Closes #14145.
2020-07-20 15:49:05 +02:00
Vadim Zeitlin
4552009805 Merge branch 'pr1312-no-unsafe-wxstring-conv'
Add a way to optionally disallow all implicit conversions between
wxString and "const char*".

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

See #18113.
2020-07-20 15:47:17 +02:00
Stefan Csomor
c8ede8d430 Fix #include form for a wx header in the sample
Use quotes, not angle brackets, for #includes in wx source tree itself.

No real changes.
2020-07-19 00:15:33 +02:00
Vadim Zeitlin
379e718a33 Remove recently added GetOpenGLScaleFactor()
It has become unnecessary after the previous commit, as now the generic
GetContentScaleFactor() can be used instead of it on all platforms, so
revert the changes of f6cc8ff52c (Add GetOpenGLScaleFactor() to abstract
OpenGL coordinates scaling, 2020-07-10).

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

See #17391.
2020-07-18 23:51:05 +02:00
Vadim Zeitlin
ceb21d5e86 Also call wxAuiManager::UnInit() when manager itself is destroyed
This completes the changes of the previous commit and should ensure that
UnInit() is always called, whoever is destroyed first -- the managed
window or the manager itself.

Also update the documentation to mention that calling UnInit()
explicitly is not necessary any longer.
2020-07-18 17:51:41 +02:00
Arrigo Marchiori
c86bcf962d Use wxASCII_STR() on string literals
Fix the build with wxNO_IMPLICIT_WXSTRING_ENCODING.
2020-07-17 17:52:16 +02:00
Kasper
69da383e96 Make a dialog with a notebook in the dialog sample resizeable
It helps demonstrating how the layout works and is consistent with the
other windows in the sample (which are frames and so are resizeable by
default).

Closes #18830.
2020-07-15 16:25:52 +02:00
Vadim Zeitlin
c325087bce Use a more clear name for a dialog in the layout sample
No real changes, just rename the over generic MySizerDialog to a more
specific MyNotebookWithSizerDialog, as the goal of this dialog seems to
be to demonstrate using wxNotebook and sizers together.
2020-07-15 16:22:30 +02:00
Vadim Zeitlin
c14053c211 Merge branch 'osx-11'
Adaptations for macOS 11.0.

See https://github.com/wxWidgets/wxWidgets/pull/1940
2020-07-15 14:26:05 +02:00
Stefan Csomor
be9216b6b1 Show all other supported window modal dialogs in the sample too 2020-07-14 20:10:46 +02:00
Stefan Csomor
f585878136 Show using window-modal file open dialog in the sample 2020-07-14 20:10:04 +02:00
Stefan Csomor
7812657cbf Implement minimal wxMenu support for iOS
A separate change later will add features using iOS 14 specific API and
iOS 13 (and earlier) fallback for them.
2020-07-14 18:16:59 +02:00
Stefan Csomor
49f6370890 shared schemes, distinct naming, removing old source files 2020-07-14 17:41:16 +02:00
Vadim Zeitlin
69e27acf0d Merge branch 'im/clipboard' of https://github.com/imciner2/wxWidgets
Ensure the clipboard contents are stored properly on GTK.

See https://github.com/wxWidgets/wxWidgets/pull/1953
2020-07-13 15:33:58 +02:00
tm
f6cc8ff52c Add GetOpenGLScaleFactor() to abstract OpenGL coordinates scaling
The fix for OpenGL coordinates when using high DPI in b134589cbb (Fix
OpenGL samples when using HiDPI displays, 2019-08-06) did fix it for GTK
3 and macOS, but broke it for MSW and other platforms not using pixel
scaling, as window coordinates are the same as OpenGL ones there, while
GetContentScaleFactor() can still return values > 1 even on these
platforms.

Provide new GetOpenGLScaleFactor() function abstracting this platform
difference and use it in all OpenGL samples to make them work correctly
in high DPI under all platforms.

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

Closes #17391.
2020-07-12 22:28:29 +02:00
Ian McInerney
04ff2254a0 Ensure the clipboard contents are stored properly on GTK
GTK needs to be told the data on the clipboard can be stored
before the store is attempted.

Also, document that the clipboard behavior on GTK is very
dependent on the configuration of the user's machine.

Closes #10515
2020-07-12 00:39:33 +01:00
Vadim Zeitlin
b7057c336f Merge branch 'msw-dismiss-unfocused-popup'
Allow wxPopupTransientWindow to work without wxPU_CONTAINS_CONTROLS too
in wxMSW and don't use wxPU_CONTAINS_CONTROLS by default, notably
allowing wxTipWindow to be shown without stealing focus.

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

Closes #18636.
2020-07-11 19:56:32 +02:00
Ian McInerney
79d73d4eb3 Add show hidden folders flag to wxDirDialog
Add wxDD_SHOW_HIDDEN similar to the existing wxFD_SHOW_HIDDEN.
2020-07-10 03:29:16 +02:00
Ian McInerney
b43f9b0ea4 Update sample to use multiple selection in wxDirDialog 2020-07-10 03:25:51 +02:00
Vadim Zeitlin
fa6680be4d Merge branch 'widgets-sample' of https://github.com/PBfordev/wxWidgets
Improve behaviour of wx{File,Dir}Ctrl in the widgets sample.

See https://github.com/wxWidgets/wxWidgets/pull/1934
2020-07-10 02:07:44 +02:00
Vadim Zeitlin
41410610ef Don't force wxPU_CONTAINS_CONTROLS on wxPopupTransientWindow
Popups not using this style work too now (since the parent commit), so
this style should be used only if the popup actually requires focus and
not always, unconditionally.

Turn on this style explicitly in the sample which shows a popup window
with wxTextCtrl inside it (which requires focus to work).
2020-07-10 00:02:48 +02:00
Vadim Zeitlin
fd29d86da1 Demonstrate the use of wxTipWindow in the dialogs sample
As we show wxRichToolTip in this sample, it's only logical to show the
simple wxTipWindow in it too.
2020-07-09 14:52:14 +02:00
Vadim Zeitlin
8f4ebb4bdc Show wxEVT_TOGGLEBUTTON from toggle button in the widgets sample
Allow checking that the events are received as expected.
2020-07-09 00:09:43 +02:00
PB
fec7abd54e Reset displayed wxDirCtrl in Widgets sample after pressing Reset button 2020-07-06 20:28:15 +02:00
PB
0f22f25d37 Preserve the path when changing flags for wxDirCtrl in Widgets sample
Do not reset the path in wxDirCtrl when changing its flags.

Resetting the path to the default view where no files are shown may make
showing off some flags more difficult.
2020-07-06 13:13:00 +02:00
PB
7b2061eaef Disallow invalid flag combination for wxFileCtrl in Widgets sample
wxFC_SAVE cannot be used with wxFC_MULTIPLE so prevent the user
from setting this flag combination.

Also rename the event handler for switching between Open and Save
modes to indicate what it does.
2020-07-06 12:57:57 +02:00
Vadim Zeitlin
1b9f57621d Add a forgotten wxOVERRIDE in the grid sample
Fix -Winconsistent-missing-override when building this sample.
2020-07-06 12:34:42 +02:00
catalinr
de56f99c5a Bind user options to recreate static page in widgets sample
Make the various options on this page actually work.

Closes https://github.com/wxWidgets/wxWidgets/pull/1930
2020-07-06 00:11:33 +02:00
Vadim Zeitlin
5a0723223d Merge branch 'grid-activatable-editors'
Add support for activatable editors in wxGrid and make
wxGridCellBoolEditor activatable.

Also a couple of editor-related bug fixes.

See https://github.com/wxWidgets/wxWidgets/pull/1917
2020-07-01 14:37:44 +02:00
Artur Wieczorek
ff87733cd8 Refresh window layout after changing wxSpinCtrl base in widgets sample
Changing the base of the number changes the size of wxSpinCtrl
so the layout needs to be reset to account this new size.
2020-06-30 19:35:15 +02:00
Vadim Zeitlin
ca84560350 Add wxGridCellActivatableEditor and show it in the grid sample
Add a helper class making it easier to define activation-only editors
and use it to implement MyGridStarEditor in the sample, showing a
typical example of using such editor.
2020-06-30 02:30:36 +02:00
Vadim Zeitlin
73532c4d95 Fix "wider column" width in the grid sample
The changes of the commit 393f5c8e2b (Use less arbitrary column/row
sizes in the grid sample, 2020-03-31) accidentally made this column
narrower than default instead of making it wider due to a typo in the
name of wxGrid method: it should be the default column size, not the
default column label size.
2020-06-30 01:39:50 +02:00
Artur Wieczorek
a2823983a3 Automatically adjust wxSpinCtrl size in widgets sample
wxSpinCtrl/wxSpinCtrlDouble best size is adjusted automatically
while changing the value range so there is no need to resize
the controls manually.
2020-06-29 23:23:27 +02:00
Vadim Zeitlin
1905f60b2d Merge branch 'grid-enhance'
Many enhancement to wxGrid UI: fix redraw and (some) flicker bugs; fix
bugs with mouse handling; improve editors positioning etc.

See https://github.com/wxWidgets/wxWidgets/pull/1902
2020-06-26 22:20:41 +02:00
Vadim Zeitlin
4b9161f546 Make header cells of numeric columns read only in the sample
This avoid asserts when trying to edit them, as the corresponding
editors expect the cell to have a numeric value.
2020-06-26 22:19:49 +02:00