Commit Graph

6321 Commits

Author SHA1 Message Date
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
b8c9e6754d Merge branch 'msvc-warns'
Fix an annoying MSVC warning in SDK headers.

Remove wxUSE_IOSTREAMH.

See https://github.com/wxWidgets/wxWidgets/pull/1614
2019-10-23 19:50:14 +02:00
Artur Wieczorek
a60c5b36fe Don't attempt to delete root wxPGProperty in propgrid sample
The root wxPGProperty is not designed to be deleted so we should look
for a property to delete in the collection of its child properties.

Closes #18539.
2019-10-23 18:02:35 +02:00
Paul Cornett
ffac936882 Fix crash in propgrid sample, see #18537 2019-10-22 19:51:50 -07:00
Vadim Zeitlin
8587a96d70 Remove unused member variable from listctrl sample
No real changes, just remove a stray declaration.
2019-10-22 18:49:32 +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
Vadim Zeitlin
fc711f869f Remove obsolete wxUSE_IOSTREAMH option
This is always 0 for any still supported compiler, so remove the option
and configure checks for it.

Still define it as 0 for compatibility, just in case it's used outside
of the library.
2019-10-21 20:46:21 +02:00
Vadim Zeitlin
b66a4b9948 Add a menu item to start editing the cell to grid sample
Show that this is done using EnableCellEditControl() and not
ShowCellEditControl(), as might have been expected.
2019-10-13 01:56:13 +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
Artur Wieczorek
4c6b12744c Demonstrate drawing cross hair in drawing sample
There is no such demonstration so far.
2019-10-10 19:37:52 +02:00
Vadim Zeitlin
2f6cb20d2c Stop intercepting Alt-Fn keys in the text sample
This was annoying, especially under MSW, as Alt-F4 couldn't be used to
close the application quickly.
2019-10-09 00:26:26 +02:00
Scott Talbert
b134589cbb Fix OpenGL samples when using HiDPI displays
OpenGL seems to operate using physical pixels, so we need to factor in the
scale factor when setting the GL viewport.

Closes #17391.

Closes https://github.com/wxWidgets/wxWidgets/pull/1470
2019-10-08 02:14:21 +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
3bf082a8e5 Fix preparing a bitmap in propgrid sample
Set explicitly the background colour before clearing the bitmap.
2019-10-02 00:08:25 +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
Maarten Bent
2b41ba2702 Apply review comments 2019-09-29 19:30:39 +02:00
Maarten Bent
370ae40b35 Use more FromDIP for hardcoded sizes 2019-09-28 23:47:04 +02:00
Ilya Sinitsin
ce01d8286b Xcode iphone (#1565)
* Adapt xcodeproj for iPhone to generic imaglist.cpp

* Fix the installation error in the iPhone minimal sample

Fix "Failed to install the requested application" error.
2019-09-28 17:16:35 +02:00
Vadim Zeitlin
1dfdd93a2a Merge branch 'qt-listctrl'
New version of wxListCtrl for wxQt, supporting virtual list controls,
checkboxes, sorting and with other fixes.

See https://github.com/wxWidgets/wxWidgets/pull/1551
2019-09-27 19:16:56 +02:00
Ilya Sinitsyn
7f91481294 Add XRC handler for wxInfoBar
Update the schema and the sample to show it in action.

Closes https://github.com/wxWidgets/wxWidgets/pull/1564
2019-09-27 12:57:01 +02:00
Vadim Zeitlin
cfbe47560e Merge branch 'qt_list_ctrl_hit_test_offset' of https://github.com/GeoTeric/wxWidgets into qt-listctrl
Fix wxListCtrl::HitTest() which was off roughly by 1 due to not taking
into account the header height.

Closes https://github.com/wxWidgets/wxWidgets/pull/1350
2019-09-22 01:20:42 +02:00
Vadim Zeitlin
daa64f2ee4 Merge branch 'dvc-inconsist-fixes'
Fix several inconsistencies in wxDVC between wxGTK and the other
implementations.

See https://github.com/wxWidgets/wxWidgets/pull/1547
2019-09-18 14:33:34 +02:00
Vadim Zeitlin
7a0f57ea29 Fix assert in the generic file dialog in the dialogs sample
Cast the dialog pointer to wxFileDialogBase to avoid failures when using
wxGenericFileDialog, which inherits from wxFileDialogBase, but not from
wxFileDialog itself.

Closes #18506.
2019-09-18 02:05:07 +02:00
Ilya Sinitsyn
e26d90028b Allow disabling hiding columns when using wxHeaderCtrl in wxGrid
Add wxGrid::DisableHidingColumns() method which can be used to prevent
wxHeaderCtrl from allowing the user to hide columns interactively, which
is something it allows to do by default, unlike the "built-in" wxGrid
header.

Also add EnableHidingColumns() and CanHideColumns() for consistency with
the other similar methods.

Closes https://github.com/wxWidgets/wxWidgets/pull/1554
2019-09-16 23:32:59 +02:00
Paul Kulchenko
9d704706cb Respect AUI toolbar buttons sticky state in native MSW theme
Indicate that the items are sticky by always drawing them in a
hover-like state, as otherwise stickiness wasn't visible at all.

Closes #18496.
2019-09-14 20:20:05 +02:00
Vadim Zeitlin
063b6edf68 Add a check for resetting the associated model to the sample
Verify that resetting the model doesn't result in selection change
events.
2019-09-12 23:20:20 +02:00
Vadim Zeitlin
0d005bdf02 Add wxEVT_DATAVIEW_SELECTION_CHANGED test handler to the sample
Verify that the sample is not invoked unexpectedly.
2019-09-12 23:00:14 +02:00
Vadim Zeitlin
f99b80612a Add a simple test of wxDataViewIndexListModel to the sample
This is useful to investigate inconsistencies in its behaviour between
the generic and the native GTK versions that can't be easily checked in
the automatic unit tests.
2019-09-12 18:51:36 +02:00
Vadim Zeitlin
eca006da06 Indent "case Page_VarHeight" properly
No real changes, just reindent the code.
2019-09-12 18:31:42 +02:00
Vadim Zeitlin
c715bb750b Use symbolic page numbers in the dataview sample
Make the code a bit more readable.

No real changes.
2019-09-12 18:24:03 +02:00
Robin Dunn
41b444e011
Merge pull request #1455 from wxWidgets/gradient-pen
Add support for gradients in wxGraphicsPen
2019-09-11 20:17:34 -07:00
Vadim Zeitlin
fbdc55ee0a Test multiline text control in the "Enter" testing dialogs
Add another test control to the dialogs sample.
2019-09-10 18:48:20 +02:00
Vadim Zeitlin
ba2ea837de Actually make wxTE_PROCESS_ENTER example in dialogs sample work
This didn't work any more since the changes done in the branch merged by
fb2c17c193 as using wxTE_PROCESS_ENTER
without actually handling the resulting event doesn't prevent Enter from
activating the default button any longer.
2019-09-10 18:48:20 +02:00
Vadim Zeitlin
5f635db3bf Minor cleanup of a dialog in the dialogs sample
Use wxSizerFlags()-based API for clarity high DPI-friendliness, i.e.
don't hard code 5px as border/margin sizes.

No real changes.
2019-09-08 22:18:19 +02:00
Robin Dunn
df31204f98 Add example of using a gradient pen to the drawing sample 2019-09-04 14:21:30 -07:00
Paul Cornett
df450566dd Avoid including X11 headers from <wx/glcanvas.h>
It's generally wxWidgets policy not to include platform-specific headers from our own
to avoid namespace pollution issues, in this case with names like "None" and "Window".
2019-08-28 09:37:49 -07:00
Ian McInerney
d846b24450 Update menu event documentation and sample
Update the documentation to reflect change to the GetMenu event
working for all 3 menu events. Also update the sample to give the
menu for the highlight event.
2019-08-25 16:25:55 +02:00
Vadim Zeitlin
ffd424debb Merge branch 'mswdc-draw-point-checkbox' of https://github.com/MaartenBent/wxWidgets
Draw the same shape in wxDC::DrawCheckMark() under all platforms and
provide wxRenderer::DrawCheckMark() for drawing the platform-specific
shape.

Also fix wxGCDC::DrawPoint() to use the default one point wide pen.

See https://github.com/wxWidgets/wxWidgets/pull/1471
2019-08-20 13:25:28 +02:00
Maarten Bent
2874dab7f0 Add DrawCheckMark and GetCheckMarkSize to wxRendererNative
Show its use in the render sample. Also use the recently added GetExpanderSize
for the size of DrawTreeItemButton.
2019-08-10 13:42:04 +02:00
Maarten Bent
97320c312e Add option to drawing sample to toggle anti-aliasing of graphics renderer 2019-08-10 13:42:04 +02:00
Maarten Bent
698a20e625 Use numbers for accelerator keys to select renderer in drawing sample
Determine if renderer is selected by comparing the renderer itself, not by name.
2019-08-10 13:42:04 +02:00
Vadim Zeitlin
75134c752e Prettify the changes of the previous commit
Use switch over enum value instead of consecutive ifs.

Don't duplicate wxGetListCtrlSubItemRect() code, just call it instead.

See https://github.com/wxWidgets/wxWidgets/pull/1461
2019-08-06 00:05:06 +02:00
oneeyeman1
da524ebacb Fix retrieving the size of item label in native MSW wxListCtrl
Closes https://github.com/wxWidgets/wxWidgets/pull/1461

Closes #11355.
2019-08-06 00:01:07 +02:00
Igor Korot
32d8b5954a Wrap label if necessary in wxInfoBar in wxGTK
Also update the sample to test showing an overlong message in wxInfoBar.

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

See #14121.
2019-08-05 13:50:11 +02:00
oneeyeman1
43c519e04f Add wxListCtrl::IsVisible()
Allow checking if the given item is (at least partially) visible on
screen.

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

Closes #9949.
2019-08-05 13:46:15 +02:00
Artur Wieczorek
b06a9d227f Replace wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes with wxPG_DIALOG_TITLE
Current wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes can be used to customize editor dialog titles only for wxFileProperty and wxDirProperty, respectively. New wxPG_DIALOG_TITLE property is applicable to all properties derived from wxEditorDialogProperty so not only editor dialog titles for wxFileProperty and wxDirProperty can be set but also for wxFontProperty, wxLongStringProperty, etc.
wxPG_FILE_DIALOG_TITLE and wxPG_DIR_DIALOG_MESSAGE attributes are marked obsolete.
2019-08-04 20:20:19 +02:00
ousnius
2a2fa8c5af Allow expanding environment variables in XRC file paths
Add a new flag wxXRC_USE_ENVVARS for wxXmlResourceFlags that triggers a
call to wxExpandEnvVars() for bitmap, icon and animation paths.

This flag is not set by default to avoid silently changing the behaviour
of existing applications.

Closes https://github.com/wxWidgets/wxWidgets/pull/1445
2019-07-31 23:57:40 +02:00
Vadim Zeitlin
8ea46e70c5 Merge branch 'clang-link-error-and-semicolon-warnings' of https://github.com/MaartenBent/wxWidgets
Fix clang warnings about extra semicolons and a link error.

See https://github.com/wxWidgets/wxWidgets/pull/1434
2019-07-26 17:58:27 +02:00
Vadim Zeitlin
d97c2ed9e3 Merge branch 'grid-frozen'
Add support for freezing wxGrid columns and/or rows.

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

See https://github.com/wxWidgets/wxWidgets/pull/952
2019-07-26 17:57:23 +02:00
Maarten Bent
2815870507 Resolve some extra semicolon warnings 2019-07-21 17:15:02 +02:00
Vadim Zeitlin
3d970a9c08 Merge branch 'underline-improvements' of https://github.com/MaartenBent/wxWidgets
Add support for different underline types and colour to wxTextCtrl.

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

Closes #17124.
2019-07-19 23:45:38 +02:00
Maarten Bent
cd7e21ad2b Apply wxTextCtrl underline review suggestions 2019-07-19 21:06:10 +02:00
Olly Betts
b3ef78124c Remove the flash sample
Adobe have announced the official EOL for flash is 2020 so we're
now at the point where support for flash just isn't interesting
any more.

It doesn't make sense to support it for the upcoming 3.2.x release
series, and the sample .swf files are lacking source code.

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

Closes #15886.
2019-07-18 17:48:23 +02:00
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
lucian-rotariu
04f7f1fd32 Add support for freezing columns and/or rows of wxGrid
Add wxGrid::FreezeTo() method which allows to freeze the given number of
columns and/or rows at the beginning of the grid, i.e. keep them pinned
in place while the rest of the grid is scrolled.

The main wxGridWindow (m_gridWin) now corresponds to the non-frozen part
of the grid, with up to 3 new similar windows for the frozen
rows/columns and the frozen corner cells (which only exist if both rows
and columns are frozen) being additionally used.

Doing this involved adding "wxGridWindow*" parameter to many functions
that previously only worked with m_gridWin itself and addressing
additional complications, such as mouse events that can now cross
different windows.

See https://github.com/wxWidgets/wxWidgets/pull/952 for the original
version of the changes.
2019-07-16 18:01:36 +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
Maarten Bent
4afea28aab Improve underline changes of wxTextCtrl
Get rid of m_fontUnderlined, use m_fontUnderlineType instead.
Bugfixes in wxMSW, wxGTK and wxOSX code.
Show more underline usage in the text sample.
2019-07-11 00:34:27 +02:00
Igor Korot
f99ae84d7c Implement different underline styles for wxTextCtrl 2019-07-11 00:23:18 +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 "&amp;" 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
Matthew Griffin
f3ccc74a56 Ensure that wxListCtrl::HitTest finds correct index under qt 2019-06-12 12:45:08 +01: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
Paul Cornett
7cbe23830f Avoid truncation of expression assigned to larger type 2019-04-05 09:55:49 -07:00
Paul Cornett
67773f58f1 Avoid immediate destruction of temporary wxBusyInfo object 2019-04-05 09:23:40 -07:00
Paul Cornett
210e162302 Use newer wxDECLARE_* macros 2019-04-05 09:21:29 -07:00
Paul Cornett
365759753a Pass parameters by const reference rather than by value 2019-04-05 09:18:07 -07:00
Paul Cornett
90ce6a4334 Remove unused variables 2019-04-04 10:40:45 -07:00
Vadim Zeitlin
1f64877ca4 Merge branch 'msw-display-refresh'
Fixes for display information refreshing under MSW.

See https://github.com/wxWidgets/wxWidgets/pull/1282
2019-04-02 17:19:01 +02:00
Vadim Zeitlin
b0ad9ccffd Use control current, not best, size in wxMSW wxToolBar layout code
Avoid allocating too much space to the control in the toolbar, it may
have been made smaller than its best size on purpose and, in any case,
we don't resize the control, so it's useless to allocate more space to
it than it's going to use.

See #18294.
2019-03-31 13:39:57 +02:00
Vadim Zeitlin
8927d7b092 Update displays sample correctly when displays change
wxEVT_DISPLAY_CHANGED notifies not only about the change of resolution
of a display, but also about removal or addition of a new display, so we
need to completely repopulate the notebook showing the displays on
receiving it.
2019-03-31 13:04:43 +02:00
Vadim Zeitlin
9cbc1a5fbf Merge branch 'msw-tbar-resize'
Many fixes for wxToolBar (re)sizing in wxMSW, partially addressing
toolbar size changes since the previous wxWidgets versions.

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

Closes #18294.
2019-03-29 19:16:40 +01:00
Vadim Zeitlin
9926619adf Don't use hard-coded size for wxSpinCtrl in the dialogs sample
This truncates the control with GTK+ 3 where 40 or 60 pixels is never
enough for its width (even without speaking about high DPI displays) and
results in tons of GTK+ warnings.
2019-03-26 13:57:21 +01:00
New Pagodi
79e16c78bc Demonstrate call tip clicks in the stc sample
This adds a demonstration of handling call tip clicks to the stc sample.
Instead of showing a single call tip, 3 different call tips can be
shown. The sample demonstrates how to move between the call tips
depending on if the up or down button was clicked in the call tip
window.
2019-03-18 22:24:43 -05:00
New Pagodi
518cdc5790 Demonstrate autocompletion in the stc sample
This adds a demonstration of autocompletion for C preprocessor
directives to the stc sample. It also shows how to register and use
small images with the autocompletion popup.
2019-03-18 22:24:34 -05:00
Stefan Csomor
f163578c94 macOS expose scroll invertion in event
applied patch from #18358, thanks for the patch Andy
2019-03-12 12:22:41 +01:00
Vadim Zeitlin
d841f7b34e Merge branch 'wxQt-memory-leaks' of https://github.com/catalinr/wxWidgets
Fix many memory leaks in wxQt port.

See https://github.com/wxWidgets/wxWidgets/pull/1243
2019-03-05 23:36:41 +01:00
Cătălin Răceanu
b91d2a93ee Set sizer to the main frame and avoid leaking it 2019-02-26 23:21:13 +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
23dee36ec3 Add accelerators for toolbar positioning menu items in the sample
This makes it much more convenient to quickly test different toolbar
orientations.
2019-02-24 22:33:33 +01:00
Vadim Zeitlin
62b4974bf0 Indentation fix in the toolbar sample
No real changes.
2019-02-24 22:33:33 +01: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
Cătălin Răceanu
d9c8932188 Ensure a valid page is initially selected in the widgets sample
Select first page if an invalid one was restored which may happen if the
build of the library has changed (e.g. some previously disabled
wxUSE_XXX became enabled etc).

Closes https://github.com/wxWidgets/wxWidgets/pull/1235
2019-02-21 04:49:12 +01:00
PB
f8090263de Fix recently introduced mojibake in text sample
During the samples-wide removal of obsolete wxT macros in
f58ea62596, the macros were
accidentally removed also from the place where they were required
(string literal casted to void* and then retrieved as wxChar*). This led
to names for m_tab and m_enter controls displayed wrong when logging
text events.

Fix this by restoring wxS() in this particular place.

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

Closes https://github.com/wxWidgets/wxWidgets/pull/1226
2019-02-21 04:26:46 +01:00
Paul Cornett
7c75f46098 wxOVERRIDE 2019-02-17 22:42:26 -08:00
Jay Nabonne
e8d39f3b5c No buttons image list support for Qt as for MSW. 2019-02-07 08:58:38 +00:00
Vadim Zeitlin
21a7ff2aa3 Use wxScopedPtr instead of explicit delete in printing sample
No real changes, just make the code a bit safer.
2019-02-03 22:45:46 +01:00
Vadim Zeitlin
7a05aa6dc0 Don't pass unused arguments to GetTextExtent() in printing sample
No real changes, just remove the completely unused local variables and
parameters to wxGraphicsContext::GetTextExtent() call.
2019-02-03 22:42:55 +01:00
Maarten Bent
4aeb941c4c Demonstrate wxSlider::SetSelection() in widgets sample 2019-01-31 21:16:07 +01:00
Maarten Bent
53af5cb251 Some fixes for wxSlider in widgets sample
Correctly save the slider value before recreating the slider.
Layout the entire page instead of only the slider sizer.
Update the text controls after recreating the slider.
Always enable 'both sides' checkbox. It has additional effects in wxMSW.
2019-01-31 21:16:07 +01:00
Maarten Bent
56c7eadc0a Use wxSizerFlags for slider page in widgets sample
Don't set minimum size of right panel.
2019-01-31 21:16:06 +01:00
Maarten Bent
bf0a8ffd74 Improve guards in button pages of widgets sample
Add guards for wxCommandLinkButton.
Move CheckBoxes outside wxHAS_BITMAPTOGGLEBUTTON guard.
Remove wxHAS_ANY_BUTTON check, this is always defined with wxUSE_TOGGLEBTN.
2019-01-31 21:16:06 +01:00
Maarten Bent
8f3b87dce7 Fix wxSlider::SetThumbLength() on wxMSW
It requires TBS_FIXEDLENGTH style.
Call InvalidateBestSize because the size of the control might change.
Call Layout in the widgets sample to adjust to the changed size.
Use GetThumbLength() instead of the arbitrary defined THUMB size.
2019-01-31 21:16:06 +01:00
Vadim Zeitlin
8fbca5cb70 Remove all trailing spaces
No real changes, just clean up sources by removing trailing spaces from
all the non-generated files.

This should hopefully avoid future commits mixing significant changes
with insignificant whitespace ones.
2019-01-30 17:35:54 +01:00
Graham Dawes
6b11c372a1 Fix recently introduced build error in widgets sample
Make it compile again when wxHAS_BITMAPTOGGLEBUTTON is not defined,
which is notably the case in wxQt.

Closes https://github.com/wxWidgets/wxWidgets/pull/1189
2019-01-28 12:41:31 +01:00
Vadim Zeitlin
2c7489fffe Merge branch 'widgets-sample-buttons' of https://github.com/MaartenBent/wxWidgets
Several improvements to the buttons pages of the widgets sample:

- Use a valid font when creating the bitmap.
- Create the bitmap with an DPI independent size.
- Use different images for different button states, as described by the
  checkbox options.
- Add a checkbox to disable the bitmap.
- Recreate the button when changing label, so the bitmap is updated.
- Implement the 'fit exactly' option on ToggleButton page.
- Use more wxSizerFlags in widgets sample.

See https://github.com/wxWidgets/wxWidgets/pull/1188
2019-01-28 01:19:31 +01:00
Maarten Bent
ee752e2439 Use more wxSizerFlags in widgets sample 2019-01-27 17:04:08 +01:00
Maarten Bent
a6fbfacc62 Improve wxButton and wxToggleButton with bitmap in widgets sample
Use a valid font when creating the bitmap.
Create the bitmap with a DPI independent size.
Use different images for different button states, as described by the checkbox
options.
Add a checkbox to disable the bitmap.
Recreate the button when changing label, so the bitmap is updated.
Implement the 'fit exactly' option on ToggleButton page.
2019-01-27 17:04:07 +01:00
Maarten Bent
0d5ed276a4 Update radio page in widgets sample
Make the reset button work by binding to OnUpdateUIReset.
Use wxSizerFlags based API.
Remove minimum size of right panel so the minimum size of wxRadioBox can be
verified.
Use wxArrayString instead of manually creating and deleting an array of
wxString pointers.
Reapply disabling and hiding the test button, and check if test button is
available.
Layout the entire page instead of only the sizer, see #18100.
2019-01-27 15:26:17 +01:00
Maarten Bent
a377f0e5f0 Get rid of wxRA_LEFTTORIGHT and wxRA_TOPTOBOTTOM styles
This was only used in wxUniv, wxRA_SPECIFY_[COLS/ROWS] can be used instead.
Do not remove them from the definitions, to not break user code.

Closes #18100.
2019-01-27 15:26:16 +01:00
Dummy
b0660cc87c Pass argument of proper type to wxPropertyGridInterface::SetPropertyBackgroundColour
The last argument passed to this function should be an int flag not a Boolean value.
Boolean value 'true' passed here is converted to int 1 so wxPG_RECURSE flag is never set and the background colour is never changed for sub-properties.

Closes #18333.
2019-01-23 20:08:57 +01:00
Artur Wieczorek
5261605a61 Use wxSizerFlags-based API in widgets sample
Make the code more clear by using wxSizerFlags.
2019-01-20 13:23:11 +01:00
Vadim Zeitlin
2a452c0b60 Fix widgets sample build when using precompiled headers
wx/artprov.h is not included from wx/wx.h, so it needs to be always
included from this header and not only when !WX_PRECOMP.
2019-01-19 23:02:09 +01:00
Artur Wieczorek
4fabf5238f Fix harmless signed/unsigned comparison warning in widgets sample
Cast WXSIZEOF to int before comparing it with int variables.
2019-01-19 22:51:44 +01:00
Artur Wieczorek
7a6200631a Extend wxHeaderCtrl demonstration in widgets sample
Added ability to show header columns with various style flags.
2019-01-19 22:09:11 +01:00
Artur Wieczorek
defae61c13 Extend wxHeaderCtrl demonstration in widgets sample
Added ability to show wxHeaderCtrl with various styles.
2019-01-17 21:51:56 +01:00
Vadim Zeitlin
288d26598c Merge branch 'dvc-var-height'
Optimize generic wxDataViewCtrl performance with variable line heights.

Closes https://github.com/wxWidgets/wxWidgets/pull/1053
2019-01-16 01:25:06 +01:00
jensgoe
14ca16ffaf example for DataView with wxDV_VARIABLE_LINE_HEIGHT flag 2019-01-08 00:12:47 +01:00
ali kettab
36f6f8ad49 wxTextValidator improvements
Improve char inclusion/exclusion support; update the sample to show more
features of this class and add a unit test for it.

Closes https://github.com/wxWidgets/wxWidgets/pull/1093
2019-01-05 23:33:35 +01:00
Pavel Kalugin
659ab78c6d Add support for editing dates (without time) to wxGrid
Add wxGridCellDateRenderer and wxGridCellDateRenderer which can be used
for the grid cells containing only dates, without times.

Also add wxGrid::SetColFormatDate() convenience function.

Refactor wxGridCellDateTimeRenderer slightly to reuse its code.

Closes https://github.com/wxWidgets/wxWidgets/pull/1101
2019-01-04 14:14:01 +01:00
Vadim Zeitlin
ee352d79c8 Merge branch 'ipc-dde-fixes'
wxIPC fixes when using DDE

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

Closes #17900.
2019-01-04 14:12:53 +01:00
Stefan Csomor
142234d009 macOS fix
otherwise CreateNewDocument is called twice
2019-01-03 17:04:13 +01:00
Artur Wieczorek
8dbe6ec69d Add to propgrid sample an option to change virtual width of the grid 2018-12-27 13:16:41 +01:00
Vadim Zeitlin
20cb47c1c4 Send Unicode data as UTF-8 text when using DDE-based IPC
This is a more hackish but more compatible solution to the problem of
data sent using wxIPC_UTF8TEXT format being simply lost when using DDE
for IPC classes. We must use CF_TEXT for the DDE to pass our data, but
we can try to decode it as UTF-8 in the client and assume it was sent in
this format if it worked. This obviously suffers from false positives as
any ASCII string will still be assumed to be UTF-8, but there shouldn't
be any real harm coming from this.

This change also makes sending data in wxIPC_UTF{16,32}TEXT formats work
as well by converting it to UTF-8.

Update the sample to call Advise() with both wxIPC_UTF{8,16}TEXT formats
and remove the now unnecessary wxDDEConnection::m_dataType member.

Closes #17900.
2018-12-27 00:26:29 +01:00
Vadim Zeitlin
09bf235a59 Revert "Fix passing Unicode strings via wxIPC when using DDE"
This reverts commit c657fd3d61 because
changing the format of DDE advise requests/replies is not a good idea:
other applications (those using previous versions of wxWidgets or even
not using wxWidgets at all) may rely on getting data in real CF_TEXT
format rather than in one of text formats preceded by the extra byte
containing the actual format and the previous commit would have silently
broken this.

Another fix for #17900 will be implemented instead.
2018-12-26 23:20:52 +01:00
Vadim Zeitlin
c657fd3d61 Fix passing Unicode strings via wxIPC when using DDE
wxIPC API doesn't map well onto DDE, as we don't have wxIPCFormat
parameter in StartAdvise() but do allow specifying the format when
calling Advise() itself, whereas DDE requires specifying the format when
establishing the advise loop and the data always must use this format
later.

Because of this, we have to pass the actual format with the data itself
instead of relying on DDE formats support. This has the advantage of
allowing wxIPC_UTF8TEXT to work, while previously it didn't and
couldn't, as DDE only supports the standard (or custom, but registered)
clipboard formats and it wasn't one of them. Of course, this also has a
disadvantage of having to make another copy of the data, but this seems
unavoidable.

This change allow Advise() overload taking wxString to work, including
for non-ASCII strings, as shown by the update to the IPC sample. It also
makes wxDDEConnection::m_dataType unnecessary, as we must always use the
format passed to DDE callback anyhow when handling XTYP_ADVREQ.

Closes #17900.
2018-12-24 01:42:12 +01:00
Artur Wieczorek
79b71cf4ff Scale bitmap to wxPropertyGrid's row height
By design only bitmaps lower than row height are displayed within the cells.
Because on every platform default row height can vary so bitmap has to be explicitly scaled to the row height to ensure that it will be initially displayed on every platform.

Closes #18310.
2018-12-24 00:00:14 +01:00
Vadim Zeitlin
b891fe1974 Remove misleading warning from the ipc sample
DDE code translates wxIPC_PRIVATE to wxIPC_TEXT internally since a
change done in 9d86099269, but same commit
also added a warning to the ipc sample stating that wxIPC_PRIVATE
doesn't work, which isn't really the case.

Remove the warning to avoid the confusion.

See #7470.
2018-12-23 22:01:50 +01:00
Artur Wieczorek
8432726ba8 Make string literal wxChar* string
This macro parameter is passed to wxArrayStringProperty::OnButtonClick() parameter of wxChar* type. char* string interpreted in this function as a wxChar* string results in obtaining invalid Unicode characters.
This fixes a regression introduced in b70ed2d8c8.

Closes #18307.
2018-12-23 11:00:35 +01:00
Vadim Zeitlin
2340a16d18 Allow increasing the size of the last column in wxDataViewCtrl
Previously, the last column couldn't be effectively resized at all, as
its size was always automatically set to the remaining width of the
window after subtracting the widths of all the previous columns. Now
this is only done if this remaining width is greater than the width
given to the column by the user or by the program.

Effectively, this means that the user can now drag-resize the column to
increase its size (at the price of showing the horizontal scrollbar).

See #18295.
2018-12-15 14:27:52 +01:00
Vadim Zeitlin
e1185d8bf0 Increment version number to 3.1.3
Done by running misc/scripts/inc_release, manually updating version.bkl,
rebaking and rerunning autoconf.
2018-12-10 19:06:18 +01:00
Maarten Bent
3bab07edcf Fix some build warnings
private field 'm_dwCookie' is not used
'return' will never be executed
result of comparison of unsigned enum expression < 0 is always false
'FlushDC' overrides a member function but is not marked 'override'
potentially uninitialized local variable 'bound' used
2018-11-25 21:29:38 +01:00
Maarten Bent
bcf53d6b96 Fix extra semicolon warnings 2018-11-25 21:29:37 +01:00
Maarten Bent
eb23d4735c Fix unannotated fall-through warnings 2018-11-25 21:29:37 +01:00
Maarten Bent
39ff5b90e5 Replace wxDeprecatedGUIConstants enum values 2018-11-25 21:29:32 +01:00
Artur Wieczorek
f71e8d077f Show read-only and not read-only wxODComboBox and wxComboBox in the sample
Extend the sample to compare disabled read-only and disabled not read-only combo boxes.

See #3383.
2018-11-20 21:11:57 +01:00
Vadim Zeitlin
303fa4b3ef Minor cleanup in the "artprov" sample after the previous commit
Use the standard wxWidgets camelCase naming convention instead of
snake_case and fix some style inconsistencies.

No real changes.
2018-11-18 20:55:09 +01:00
Markus Juergens
cb8b6009d5 Add a size selection choice to the "artprov" sample
This will allow to test support for larger icons when it is added in the
upcoming commits.
2018-11-18 20:49:34 +01:00
Vadim Zeitlin
8fb1152eee Fix error about duplicate PNG image handler in the drawing sample
Add the handler earlier, as creating the handler main frame uses
wxArtProvider::GetBitmap() which can add the PNG handler on some
platforms (e.g. macOS, when using wxTangoArtProvider), so calling
wxImage::AddHandler() again after creating the frame could result in a
debug error message about adding the same handler twice.
2018-11-13 16:11:24 +01:00
Vadim Zeitlin
463deb03c9 Merge branch 'gtk-dpi'
A bunch of improvements for per-monitor DPI support in wxGTK and
wxGraphicsContext more generally.

Closes https://github.com/wxWidgets/wxWidgets/pull/995
2018-11-10 12:15:27 +01:00
Mick Phillips
291a880d0c Synchronize joystick events between all ports
Generate wxJoystickEvent with the same fields under all platforms by
making the Linux and macOS versions follow MSW convention of using
"1 << N" for the changed button.

Add GetButtonOrdinal() accessor which can be used to retrieve just N.

Closes #18233.
2018-11-05 19:27:36 +01:00
Blake Eryx
65827a0572 Remove unnecessary c_str() calls from the samples
Pass wxStrings directly to wxString::Format("%s") and similar
pseudo-vararg functions, there is no need for c_str() there since
wxWidgets 2.9.

Closes https://github.com/wxWidgets/wxWidgets/pull/1009
2018-11-03 22:52:57 +01:00
Blake Eryx
c1a2d2c967 Show using dynamic splash screen contents in the sample
Demonstrate how dynamic information can be shown in the splash screen
overlaying the static bitmap.

Closes https://github.com/wxWidgets/wxWidgets/pull/958
2018-10-31 23:23:31 +01:00
Vadim Zeitlin
43d2b1db0e Simplify and fix layout of the display sample
Get rid of an unnecessary wxPanel and just create wxBookCtrl containing
pages showing information about the displays directly as a child of
wxFrame.
2018-10-29 17:40:14 +01:00
Vadim Zeitlin
5d5654742f Merge branch 'msw-popup'
Reimplement wxPopupWindow using WS_POPUP instead of WS_CHILD window in
wxMSW as the new approach allows using the controls inside the popup
normally, unlike the old one.

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

Closes #18243.
2018-10-27 15:08:22 +02:00
Vadim Zeitlin
67e51e7b6d Show the reason transparent windows can't be used in shaped sample
IsTransparentBackgroundSupported() may return more information about why
exactly are transparent windows not supported, show it if available.
2018-10-24 01:37:44 +02:00
Vadim Zeitlin
56c4191168 Reimplement wxPopupWindow as a WS_POPUP window under MSW
Don't use the child window of the desktop window for popup windows under
MSW, while this worked in simplest cases, it didn't allow having
functional controls inside a wxPopupWindow as e.g. wxTextCtrl didn't
accept input it at all if created as a child of such window.

Instead, switch to using a top-level window, with WS_POPUP style, and
fix the problem with the loss of activation by explicitly pretending to
still be active in the owner window when losing activation to our own
popup (thanks to Barmak Shemirani for providing this solution).

Also use an MSW-specific and much simpler implementation of detecting
when the popup should be dismissed in wxPopupTransientWindow: instead of
capturing mouse or tracking focus, just react to activation loss
directly.

Add a wxTextCtrl to the popup in samples/popup to show that editing it
works now.
2018-10-20 22:50:46 +02:00
Artur Wieczorek
028cfb1ba4 Refresh wxPropertGrid after resetting the status
This is to visualize the effect of the modification.
2018-10-13 23:33:27 +02:00
Artur Wieczorek
a33b364d84 Add tests of retrieving main parent of wxPGProperty
This is to test wxPGProperty::GetMainParent() function.
2018-10-13 23:33:25 +02:00
Vadim Zeitlin
54ef52fbd9 Merge branch 'display-funcs'
Implement all global functions in terms of wxDisplay and add
wxDisplay::GetPPI().

See https://github.com/wxWidgets/wxWidgets/pull/963
2018-10-09 16:31:54 +02:00
Vadim Zeitlin
aafb87b40d Set the column for wxEVT_DATAVIEW_ITEM_ACTIVATED in wxGTK
The column is available in the GTK+ callback, so just pass it along to
avoid gratuitous inconsistency with the generic version.

Also update the sample to show the column value for these events.
2018-10-09 15:21:08 +02:00
Vadim Zeitlin
ded2894b78 Add wxDisplay::GetPPI() to use instead of wxGetDisplayPPI()
While this is not done for all the ports yet, the new API allows
returning different PPI values for different monitors, unlike the old
(and still existing, but implemented in terms of the new one) global
function.
2018-10-08 13:04:38 +02:00
Vadim Zeitlin
24b5e256df Add wxDisplay::GetDepth() and use it for wxDisplayDepth()
Allow getting the depth of any display, not just the primary one, even
though this is not implemented for Unix ports currently.

Mostly do this for consistency with the other display-related functions.
2018-10-07 00:30:12 +02:00
Blake Eryx
4fb39beae1 Remove all wxS() macros from samples
The use of wxS() is an optimization which can be used to avoid an
implicit conversion from narrow to wide strings, but such optimizations
are not really needed in the samples and just make their code less
readable, so remove them.

Closes https://github.com/wxWidgets/wxWidgets/pull/956
2018-10-01 13:55:42 +02:00
Vadim Zeitlin
761f9f74fc Merge branch 'simplify-display'
Centralize all display-related code in wxDisplay class and avoid
duplicating or reimplementing it in wxDisplaySize() and
wxClientDisplayRect() functions.

See https://github.com/wxWidgets/wxWidgets/pull/955
2018-10-01 13:52:07 +02:00
Maarten Bent
7f0d7ef520 Fix several build errors in WXQT
Move declaration of wxOwnerDrawnBase::ms_defaultMargin to correct file.
Do not include headers when wxUSE_UIACTIONSIMULATOR is disabled.
Add guards for wxUSE_DRAG_AND_DROP.
Use a different wxFont constructor in printing sample, which is also available in WXQT.
2018-09-30 17:23:58 +02:00
Maarten Bent
40d57a33de Remove remnants of OS/2 from build system 2018-09-30 17:23:57 +02:00
Vadim Zeitlin
6883cd4b96 Fix harmless variable shadowing warning in the display sample
Use different names to avoid warning C4456 given by MSVC 14.
2018-09-30 15:37:46 +02:00
Vadim Zeitlin
58a1ee1633 Show the result of wxDisplay::IsPrimary() in the sample too
Just add a quick test of this function.
2018-09-30 15:36:40 +02:00
Vadim Zeitlin
1d40b629a2 Remove the unused msw.display.directdraw system option
This should have been part of 16e4586527
which removed the code this option pertained to.

See #12387.
2018-09-30 15:30:53 +02:00
Blake Eryx
b70ed2d8c8 Remove more wxT() macros from samples
Also use wxString instead of wxChar* strings.

Closes https://github.com/wxWidgets/wxWidgets/pull/950
2018-09-29 17:16:12 +02:00
Blake-Eryx
f58ea62596 Remove (most) occurrences of wxT() macro from the samples
Also replace wxChar* with wxString.

Closes https://github.com/wxWidgets/wxWidgets/pull/945
2018-09-23 01:15:08 +02:00
Stefan Csomor
e768046774 fixing iOS builds with new SKDs 2018-09-22 17:30:37 +02:00
Maarten Bent
7c1ab06ea5 Add more wxOVERRIDE 2018-09-22 14:44:07 +02:00
Vadim Zeitlin
455a45f5a8 Always create wxStaticBitmap in the widgets sample
Not creating it when the default image wasn't found resulted in a crash,
so always create wxStaticBitmap using a fallback bitmap if necessary.

Also add a wxCHECK_RET to prevent the crash from happening in a similar
situation in the future.
2018-09-22 14:33:29 +02:00