Commit Graph

6321 Commits

Author SHA1 Message Date
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
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
Vadim Zeitlin
a204981d74 Add a test of wxSpinCtrl-based editor to the grid sample
Just show an example of wxGridCellNumberEditor with range limits in
action to make testing it simpler.
2020-06-26 22:19:49 +02:00
Stefan Csomor
5e687861c1 make app schemes shared 2020-06-25 09:46:18 +02:00
Stefan Csomor
90c4a9ea0e changing Xcode target names
otherwise ‚dynamic‘ and ‚static‘ were existing both in the app and in the library project, leading to problems with newer Xcode versions
2020-06-25 09:08:15 +02:00
orbitcowboy
915dcce320 Fix typo in a comment in dataview sample
No real changes, just fix a typo in "invisible".

Closes https://github.com/wxWidgets/wxWidgets/pull/1899
2020-06-20 14:44:10 +02:00
Hertatijanto Hartono
895424ecc0 Add wxWebView::SetZoomFactor(float) and GetZoomFactor()
The new method allows to set the zoom level more precisely than the
existing SetZoom(wxWebViewZoom).

Also improve the webview sample by using radio menu items instead of
check items and manually resetting them.

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

Closes #18769.
2020-06-18 03:13:00 +02:00
Vadim Zeitlin
0ca6be3cf4 Link samples using STC with imm32.lib
This completes the changes of f730da3c14 (Add imm32.lib to
wxStyledTextCtrl, 2020-05-10) that didn't take care of MSW makefiles,
that need to contain the new required library as well.

Closes #18788.
2020-06-10 19:30:48 +02:00
Vadim Zeitlin
13477ee164 Merge branch 'xrc-generic-animation-ctrl'
Extend wxAnimationCtrl XRC handler to cover wxGenericAnimationCtrl too.

Also fix a bug with wxGenericAnimationCtrl inactive bitmap background.

See https://github.com/wxWidgets/wxWidgets/pull/1889
2020-06-10 00:02:59 +02:00
Vadim Zeitlin
f72f2bec3a Merge branch 'dpi-stc' of https://github.com/MaartenBent/wxWidgets
Fix and improve DPI handling in wxStyledTextCtrl.

Fix cursor size after DPI change.

Enable handling DPI events in wxSTCPopupWindow and other popup windows
(that do not inherit from wxTopLevelWindow).

Some cleanup of STC example, and add option to select drawing
technology.

See https://github.com/wxWidgets/wxWidgets/pull/1885
2020-06-09 23:56:37 +02:00
Ilya Sinitsyn
2cdcd84928 Support wxGenericAnimationCtrl by the animation control XRC handler 2020-06-09 18:07:10 +02:00
Vadim Zeitlin
90783fec05 Merge branch 'generic-dvc-improve-dnd'
Improve drag-and-drop in generic wxDataViewCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/1836
2020-06-07 17:22:05 +02:00
Konstantin S. Matveyev
1795ecdb78 Show the proposed drop index in the dataview sample
This allows to check interactively that the proposed index is set
correctly depending on the drop position.
2020-06-07 17:21:35 +02:00
Maarten Bent
a29aae25fc Use a different font for the MinimalEditor in the STC example
wxSYS_ANSI_FIXED_FONT uses 'Courier' font, which is rendered small on high DPI displays.
Use wxFONTFAMILY_TELETYPE instead, which will use font 'Courier New'.
2020-06-01 16:47:50 +02:00
Maarten Bent
a500c60feb Add option to STC example to select drawing technology 2020-06-01 16:47:50 +02:00
Maarten Bent
0195d82832 Remove unimplemented functions and code from STC example 2020-06-01 16:47:50 +02:00
Maarten Bent
6eb357f038 Improve DPI handling in wxSTC
Adjusting the zoom level does not work correctly. It could lead to ever
increasing zoom.
Instead, set the correct DPI of the underlying device context.
2020-06-01 16:45:21 +02:00
Vadim Zeitlin
f6727a17a2 Add wxAuiManager::AlwaysUsesLiveResize()
This allows to check if it's worth specifying wxAUI_MGR_LIVE_RESIZE or
not and allows to get rid of the corresponding menu item in the sample
if it doesn't do anything anyhow.
2020-05-25 18:01:09 +02:00
Stefan Csomor
609f77ff55 revert change of minimal project file in ced68e3efa 2020-05-19 16:08:57 +02:00
Stefan Csomor
ced68e3efa switching implementation because of problems under 10.15 2020-05-19 14:15:35 +02:00
Vadim Zeitlin
7158c9b5be Use Destroy() rather than delete for dialogs in the sample
Even though it doesn't make any real difference for these dialogs, we
still shouldn't delete top level windows directly and should rather call
Destroy() on them to let them be cleaned up during the next idle time
processing.

See #18747.
2020-05-03 20:21:23 +02:00
Vadim Zeitlin
fd2aea0352 Log wxEVT_DATAVIEW_ITEM_BEGIN_DRAG in the sample
Show when an attempt to start dragging an item is made, to be able to
compare the behaviour under different platforms easily.
2020-05-02 20:06:48 +02:00