Commit Graph

6114 Commits

Author SHA1 Message Date
oneeyeman1
8748a476c3 Add flag for displaying hidden files in the file dialog
Add wxFD_SHOW_HIDDEN and implement support for it for all the major
ports.

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

Closes #9342.
2019-07-16 19:59:48 +02:00
Vadim Zeitlin
7e90def99a Merge branch 'gtk-text-changed-coalesce'
Harmonize wxEVT_TEXT events in wxGTK with other ports.

Also use IME for wxComboBox in wxGTK too.

See https://github.com/wxWidgets/wxWidgets/pull/1400
2019-07-16 19:41:32 +02:00
Artur Wieczorek
894c69c0cd Declare WXVARIANT template specialization to assign wxFontData to wxVariant 2019-07-14 21:35:31 +02:00
Artur Wieczorek
21f9329836 Used specialized template functions to assign wxColour and wxFont to wxVariant 2019-07-14 21:34:57 +02:00
Artur Wieczorek
0b27a66700 Get rid of wxT() macro from string literal in propgrid sample
Since wxDirsProperty derives from wxArrayStringProperty and new implementation of this class no longer passes this macro parameter to OnButtonClick() so wxChar* string is no longer required here.
2019-07-14 21:32:42 +02:00
Artur Wieczorek
ac9a74ad29 Make wxArrayDoubleProperty a parent of wxEditorDialogProperty
wxArrayDoubleProperty uses TextCtrlAndButton editor so it can be implemented as parent of wxEditorDialogProperty to re-use common functions and data.
2019-07-14 21:32:41 +02:00
Artur Wieczorek
30630d4ea5 Update wxFontDataProperty to conform to the current design of wxPG properties with editor dialog
Since wxFontDataProperty derives from wxFontProperty, it should re-implement DisplayEditorDialog() to work as expected.
2019-07-14 21:31:11 +02:00
Vadim Zeitlin
7d229dd695 Allow really using wxHeaderCtrl in the grid sample
The "Native" menu item actually only toggled drawing native-lookalike
labels, but didn't use wxHeaderCtrl as could be expected. Rename the
existing menu item to "Native-like" and add the new "Native" one which
really enables the use of wxHeaderCtrl.
2019-07-10 16:51:31 +02:00
Vadim Zeitlin
e8712b3c56 Make wxTreeCtrl::EnsureVisible() work while frozen in wxMSW
Scrolling the item into view to make it visible didn't work since the
changes of badf6bc300, which suppressed
scrolling completely while frozen, any longer.

Work around it by remembering the item to make visible and actually
doing it when the control is thawed.

Also add menu item to call Freeze()/Thaw() on wxTreeCtrl in the sample
to make testing this and similar problems easier.

Closes #18435.
2019-07-09 23:00:11 +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
Vadim Zeitlin
44634cbf90 Merge branch 'qt_tree_control' of https://github.com/GeoTeric/wxWidgets into qt-fixes
See https://github.com/wxWidgets/wxWidgets/pull/1225
2019-06-29 20:49:25 +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
Artur Wieczorek
69632371e3 Implement wxNumericProperty as a base class for all wxPG numeric properties
All numeric properties (wxIntProperty, wxUIntProperty, wxFloatProperty) share some features (like specific attributes, numeric validation, SpinCtrl editor support) so for the sake of clear design it would be good to derive them from the common base class (wxNumericProperty) in which all shared functions are implemented. This class is not intended to be instantiated so it's an abstract class.
2019-06-29 11:13:13 +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
Artur Wieczorek
2a24991110 Use wxVector<> instead of macro-based wxArray 2019-06-16 19:51:52 +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
Artur Wieczorek
50330b3a26 Use long int literals to represent long constants in propgrid sample 2019-05-26 18:52:43 +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
Igor Korot
f3e1f72f6d Test vetoing wxAuiNotebook page changing event in aui sample
Make it simpler to check whether vetoing the page changing event works
as it's supposed to.

See #4518.

Closes https://github.com/wxWidgets/wxWidgets/pull/1329
2019-05-26 16:47:23 +02:00
Paul Cornett
08572d6077 Remove use of wxTheColourDatabase in a sample
Just pass the color name to the wxColour ctor
2019-05-22 09:50:34 -07:00
PB
357108d3cd Remove the last remnants of Windows CE related code
Remove the last few bits of code supporting Windows CE.
2019-05-18 08:40:03 +02:00
Vadim Zeitlin
f60dc84534 Try to make wxClipboard::Flush() test in sample actually useful
Calling Flush() before putting anything on the clipboard didn't make
much sense.

See https://github.com/wxWidgets/wxWidgets/pull/1316
2019-05-10 01:53:52 +02:00
oneeyeman1
28a84486bd Implement wxClipboard::Flush() in wxGTK
Update the documentation and also add a call of Flush() to the sample.

Closes #10515.

Closes https://github.com/wxWidgets/wxWidgets/pull/1316
2019-05-10 01:46:54 +02:00
Vadim Zeitlin
02adddfa1a Merge branch 'wxlistctrl-virtual-checkboxes' of https://github.com/MaartenBent/wxWidgets
Add support for checkboxes to virtual wxListCtrl too.

See https://github.com/wxWidgets/wxWidgets/pull/1315
2019-05-10 01:39:33 +02:00
Vadim Zeitlin
998097b3a4 Merge branch 'col-dialog-current'
Add events for current colour change in wxColourDialog and
wxColourPickerCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/1301
2019-05-10 01:31:18 +02:00
Maarten Bent
dd23722432 Demonstrate checkboxes in virtual wxListCtrl 2019-05-05 14:26:39 +02:00
Vadim Zeitlin
542aafff39 Ensure that we accept WXK_XXX in RegisterHotKey() in wxMSW
RegisterHotKey() wrongly expected to be given VK_XXX MSW virtual key
code constant, which couldn't work in portable code, so fix it to accept
WXK_XXX constants, while preserving compatibility by still accepting
VK_XXX values not clashing with them.
2019-05-02 20:53:18 +02:00
Vadim Zeitlin
12385d3586 Show the current file dialog filter index in the sample
Update the dialogs sample to show GetCurrentlySelectedFilterIndex() in
action.

See https://github.com/wxWidgets/wxWidgets/pull/1310
2019-05-02 20:07:45 +02:00
Artur Wieczorek
57aeaa3823 Add some tests of wxPGAttributeStorage
Check obtaining list of wxPGProperty attributes as wxPGAttributeStorage and making a copy of this list.
2019-04-28 16:32:20 +02:00
Artur Wieczorek
3f1d4a7104 Add test of setting/getting wxPGProperty attributes through wxPropertyGridManager 2019-04-28 16:32:19 +02:00
Artur Wieczorek
fa35fdc600 Preserve header and label editing mode while recreating the grid
For some operations when grid needs to be recreated currently selected options to show the header and to enable label editing are being ignored and it can be seen a discrepancy between the options selected (and shown) in the menu and the mode of just created wxPropertyGrid. To avoid this inconsistency respective flags can be stored and used to enable/disable features in just created grid.
2019-04-27 22:10:47 +02:00
Artur Wieczorek
cbfff9c944 Set built-in attributes also for parent wxPGProperties
If given attribute is not a built-in attribute handled by the current property it should be passed to the parent property because it may be handled there.
2019-04-22 20:28:23 +02:00
Artur Wieczorek
0c144f6cda User proper value type of wxPG_ATTR_MULTICHOICE_USERSTRINGMODE attribute
This attribute is of int type.
2019-04-22 20:16:16 +02:00
Vadim Zeitlin
96422fde4d Also use wx-translators@wxwidgets.org instead of @wxwindows.org
As with the previous commit, the old email address is not available any
more since a long time, so replace all mentions of it.
2019-04-22 14:14:10 +02:00
Vadim Zeitlin
5488a1438f Globally replace vadim@wxwindows.org with vadim@wxwidgets.org
The old email address is invalid since many years and shouldn't be used
any longer.

No real changes.
2019-04-22 14:12:05 +02:00
Artur Wieczorek
d0a84a6266 Update some strings and labels to the more current values in propgrid sample 2019-04-21 23:39:36 +02:00
Artur Wieczorek
ac22b5924f Reduce the scope of local variables 2019-04-21 23:39:35 +02:00
Artur Wieczorek
fc7d8090cf Put header into separate line in wxPG dump in propgrid sample 2019-04-21 23:39:34 +02:00
Artur Wieczorek
ecb711d2b3 Remove obsolete code from propgrid sample
This is code for v3.x so it doesn't make sense to check version against v2.8.
2019-04-21 23:39:33 +02:00
Vadim Zeitlin
aeef082e47 Update year in various copyrights to 2019
This is the equivalent of c8b6ca308b for
2019, except that it was produced by running misc/scripts/inc_year and
not manually now.

See https://github.com/wxWidgets/wxWidgets/pull/1302
2019-04-21 20:39:28 +02:00
Vadim Zeitlin
9a9c845289 Add wxSystemAppearance to check for dark mode under macOS
Provide a way to retrieve the name of the current system appearance
(mostly for diagnostic purposes) and check if it uses predominantly dark
colours.

Currently this class has a non-trivial (but still very simple)
implementation under macOS only and simply checks whether the default
text colour is brighter than the default background colour under the
other platforms, but other platform-specific implementations could be
added later.

Also update the drawing sample "system colours" page to show the system
appearance as well.
2019-04-21 02:11:07 +02:00
Vadim Zeitlin
b6477e0b9c Merge branch 'stcpopup'
Many usability and appearance improvements for autocompletion popups and
call tips in wxSTC.

See https://github.com/wxWidgets/wxWidgets/pull/1267
2019-04-21 02:03:32 +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
Vadim Zeitlin
35c16935f1 Send wxEVT_COLOUR_CHANGED from wxColourDialog under MSW
Add support for a new event sent by wxColourDialog, currently only under
MSW, when the colour currently selected in it changes.

Based on work by Trylz, see https://github.com/wxWidgets/wxWidgets/pull/1219
2019-04-21 01:53:14 +02:00
VZ
a5a44e8bae
Apply suggestions from code review
Co-Authored-By: NewPagodi <NewPagodi@users.noreply.github.com>
2019-04-18 20:57:01 -05:00
Paul Cornett
fe1737d399 Reduce the scope of some local variables 2019-04-05 10:44:02 -07:00