Commit Graph

636 Commits

Author SHA1 Message Date
PB
f57f214122 Remove BCC-specific hdrstop pragma from everywhere 2020-10-12 21:58:37 +02:00
Vadim Zeitlin
ae8820b2f6 Fix build error with clang in the widgets sample
Don't use overloaded function as event handler.
2020-10-10 22:22:48 +02:00
PB
fafc5613f4 Fix slider event counter in widgets sample
Commit 952e5f3 introduced logging wxEVT_SLIDER events in addition to
scrolling events but the event count was incorrect as the wxEVT_SLIDER
handler and scrolling events handler kept their own event count.

Fix this by using a static member variable shared by both event handlers.
2020-10-10 19:38:34 +02:00
PB
952e5f32cd Fix generation of extraneous wxEVT_SLIDER events in wxMSW
Don't send the event when it's redundant, i.e. doesn't really notify
about the change in the slider value.

Also add a test case for wxEVT_SLIDER and show these events in the
widgets sample.

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

Closes #18929.
2020-10-10 18:21:27 +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
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
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
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
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
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
Artur Sochirca
d1553c63ed Improve support for TABs in wxListBox under MSW
Always set the LB_USETABSTOPS style flag to achieve behaviour more
compatible with other platforms and expand TABs to align them at tab
stops positioned at every 8 characters.

Also add MSW-specific MSWSetTabStops() method allowing to customize tab
stops.

Update the documentation and the sample to demonstrate using TABs.

Closes https://github.com/wxWidgets/wxWidgets/pull/1789
2020-05-02 18:07:50 +02:00
Vadim Zeitlin
f5001e728c Rebake with bakefile 0.2.12
No real changes, just synchronize with the bakefile release used now.
2020-05-02 17:02:36 +02:00
Paul Cornett
8649f2548e Avoid some deprecation warnings from GTK2 headers 2020-04-19 11:09:09 -07:00
Vadim Zeitlin
47d881b683 Fix order of -L options in autoconf makefiles
Put linker flags determined by configure after -L$(LIBDIRNAME) option
pointing to the directory containing the libraries being built, to
ensure that we link with these libraries rather than any wx libraries
globally installed in the system, as could be the case since the changes
of ec091c9f2b (Don't override CFLAGS etc in configure-generated
makefile, 2020-02-02).

See #18729.
2020-04-15 02:33:53 +02:00
Artur Wieczorek
802ee492d6 Revert "Add option to present wxButton with wxNO_BORDER style in widgets sample"
This reverts commit 17b9c98121.

This option to select border style is already implemented in the widgets sample.
2020-04-10 20:48:21 +02:00
Artur Wieczorek
17b9c98121 Add option to present wxButton with wxNO_BORDER style in widgets sample 2020-04-09 22:49:14 +02:00
Maarten Bent
343bd89b63 Rebake after changes 2020-03-27 23:15:03 +01:00
Vadim Zeitlin
ec091c9f2b Don't override CFLAGS etc in configure-generated makefile
CPPFLAGS, CFLAGS, CXXFLAGS and LDFLAGS are supposed to be under
user-control and putting configure-determined options in them broke
something as simple as running "make CXXFLAGS=-Wno-some-extra-warning"
because this overrode the CXXFLAGS set by configure and required for
build.

Improve this by using WX_*FLAGS in the generated makefile and leaving
the user-controlled FLAGS alone. This is still not ideal as running
"configure CFLAGS=-DFOO" and then "make CFLAGS=-DBAR" will define both
FOO and BAR, as configure copies CFLAGS to WX_CFLAGS, and so setting it
on make command line won't override it, as it should, but this should be
a much more rare and also much less severe problem, so we should be able
to live with it for now.

Normally this commit shouldn't result in any user-visible changes, i.e.
it shouldn't break any previously working scenarios and only make some
previously broken ones work.
2020-02-11 23:19:31 +01:00
Maarten Bent
b3f259c99c Fix reverting to standard cursor in widgets sample
Don't set the cursor to wxSTANDARD_CURSOR, but set it to wxNullCursor so the
default system cursor is used.
2020-01-19 14:56:48 +01:00
Maarten Bent
a31cf55a8d Add more columns to Header control in widgets sample
Show column settings horizontally.
Fix binding to header control events after it is recreated.
2020-01-19 14:56:45 +01:00
ali kettab
c904e27376 Update widgets sample 2020-01-07 03:15:39 +01:00
Maarten Bent
083f4b3c32 Rename manifests to use underscores 2019-12-13 21:44:26 +01:00
Vadim Zeitlin
7b36d72b44 Merge branch 'vc-pmdpi' of https://github.com/MaartenBent/wxWidgets
Add DPI Awareness option to nmake makefiles and MSVC projects.

See https://github.com/wxWidgets/wxWidgets/pull/1664
2019-12-03 02:29:25 +01:00
Maarten Bent
bed8cd7b52 Rebake after adding DPI awareness option 2019-11-30 22:52:48 +01:00
Maarten Bent
3d1a8ef54e Fix 'switch label contains default but no case' warning 2019-11-27 21:25:13 +01:00
Maarten Bent
0e335b9dc1 Make button and searchctrl pages in widgets sample more DPI aware 2019-11-03 21:50:27 +01:00
Maarten Bent
8c0c3cc2b9 Use 'fit exactly' on button page in widgets sample to toggle wxBU_EXACTFIT 2019-11-03 21:50:27 +01:00
Vadim Zeitlin
349e73994b Merge branch 'dpi-awareness-option' of https://github.com/MaartenBent/wxWidgets
Add wxUSE_DPI_AWARE_MANIFEST option allowing to choose to use a manifest
specifying per-monitor DPI awareness.

See https://github.com/wxWidgets/wxWidgets/pull/1622
2019-10-30 21:25:45 +01:00
Maarten Bent
a72c9b6dbc Run autoconf and rebake after adding wxUSE_DPI_AWARE_MANIFEST 2019-10-30 00:02:08 +01:00
Vadim Zeitlin
0a02f4c190 Increment version number to 3.1.4
Done by running misc/scripts/inc_release, manually updating version.bkl,
rebaking and rerunning autoconf.

Also a header for the next version to the change log.
2019-10-28 14:11:00 +01:00
Artur Wieczorek
b97bf311e0 Log widget class name for focus events in widgets sample
This shows better what is going on with focus and makes troubleshooting easier.
2019-10-24 21:00:35 +02:00
Vadim Zeitlin
e34823a0c4 Stop using wx/ioswrap.h in the samples
This is not necessary any longer after wxUSE_IOSTREAMH removal and it
makes the sample code more clear.
2019-10-22 02:42:33 +02:00
Olly Betts
18e05aeeee Remove no-op uses of wxNO_FULL_REPAINT_ON_RESIZE
This behaviour has been the default and this constant 0 since
e441e1f4e8 which was over 16 years ago.

Closes https://github.com/wxWidgets/wxWidgets/pull/1601
2019-10-11 14:12:43 +02:00
Vadim Zeitlin
86fab39ac9 Regenerate MinGW makefiles using response files
This avoids errors due to overflowing MSW command line length when
linking monolithic library.

Closes #18135.
2019-10-06 23:04:21 +02:00
Artur Wieczorek
203e265d9b Fix re-creating wxComboBox in widgets sample
To preserve layout, old wxComboBox should be replaced with the new one in the same location in the sizer. So we need to create a new combo box first, put in the sizer and only after that the old combo box can be deleted.
2019-10-02 00:01:41 +02:00
Vadim Zeitlin
3d9656395a Fix unwanted message boxes in widgets sample once and for all
Add IsUsingLogWindow() that can be used to check if the log messages go
into the listbox instead of being shown in a message box, which was
annoying when starting or quitting the sample.

This is a bit more complicated than the hack previously used in
TextWidgetsPage::OnText(), but more general and can be easily reused for
the focus loss messages, for example.
2019-07-08 12:53:02 +02:00
Vadim Zeitlin
7206194d08 Show new wxTextCtrl value in the widgets sample
This is useful for quickly checking that we're getting expected events
when modifying the control and/or not getting any unexpected ones and
was already done on wxComboBox page, but not for wxTextCtrl.
2019-07-08 11:08:53 +02:00
Vadim Zeitlin
4a6f16cf15 Merge branch 'statictext-setlabel'
wxControl label-related fixes and improvements.

See https://github.com/wxWidgets/wxWidgets/pull/1364
2019-07-08 10:09:49 +02:00
Artur Wieczorek
a4ba437aeb Fix handling wxHeaderCtrlSimple events in widgets sample
Generic implementation of wxHeaderCtrlSimple processes EVT_HEADER_xxx internally so we cannot block processing these events in our handlers.
2019-06-29 11:16:31 +02:00
Vadim Zeitlin
8fcedbed7b Remove event table from static page in the widgets sample
The code was confusing as it used Bind() for some handlers, event table
for some others and, for the 3 buttons in the middle column, it actually
managed to use both.

Get rid of the event table completely to make this more clear.
2019-06-19 19:49:43 +02:00
Vadim Zeitlin
ee15a4c9e4 Avoid assertions when using wxGenericStaticText in widgets sample
Clicking on the "Generic wxStaticText" box resulted in several
assertions because the markup string contained both a single "&" and
a "&" used for the mnemonic. Double the former to avoid misinterpreting
it as a mnemonic character too.
2019-06-19 19:31:11 +02:00
Artur Wieczorek
c5d73f819a Keep track of wxHeaderCtrl events in widgets sample 2019-06-16 19:52:42 +02:00
Vadim Zeitlin
807d95e07d Add wxEVT_COLOURPICKER_CURRENT_CHANGED and DIALOG_CANCELLED events
Send events from generic wxColourPickerCtrl when the currently selected
colour in the dialog shown by it changes and when this dialog is
cancelled.

Notice that currently this only works on wxMSW as it relies on
wxEVT_COLOUR_CHANGED support in wxColourDialog which is only available
there.

Based on work of Trylz, see https://github.com/wxWidgets/wxWidgets/pull/1219
2019-04-21 01:53:14 +02:00
Paul Cornett
1e753f97ba Remove initializations which are the default value 2019-02-25 10:49:04 -08:00
Paul Cornett
b5028f267d Remove unused variables, unused assignments 2019-02-25 09:12:43 -08:00
Vadim Zeitlin
85666cd22f Demonstrate vetoing wxEVT_SPIN_XXX events in widgets sample
Show that these events can be vetoed, which prevents the control value
from changing, and also that veto doesn't apply if the event handler
skips the event.

See https://github.com/wxWidgets/wxWidgets/pull/1232
2019-02-21 15:10:27 +01:00