Commit Graph

5848 Commits

Author SHA1 Message Date
New Pagodi
962979ebf1 Add option to display custom context menu in stc sample
This option could be useful to demonstrate ability to replace (override) standard Scintilla context menu with custom one. Switching between standard and custom popup menu is done with "Extra -> Custom popup menu" menu option.
2017-03-16 23:31:18 +01:00
New Pagodi
f33da324c0 Don't use deprecated function in stc sample
Call to deprecated wxStyledTextCtrl::SetStyleBits() function can be omitted because underlying SCI_SETSTYLEBITS API is not operational anymore.

See #17671.
2017-03-07 19:07:38 +01:00
Artur Wieczorek
da66e81fb9 Update bounding box when drawing gradients in drawing sample
Advanced gradients are drawn using wxGraphicsContext and hence bounding box for underlying wxDC is not updated automatically. We need to update bounding box with extents of all used graphics paths.
2017-03-06 18:48:49 +01:00
Artur Wieczorek
92b64ff997 Set background colour of saved image in drawing sample
Initialize background colour prior to actual drawing to make it uniform for all kinds of drawing operations.
2017-03-06 18:47:02 +01:00
Artur Wieczorek
8950ac9a3f Change keyboard shortcut to show bounding box in drawing sample
Ctrl-B shortcut is already used to change background mode.
2017-03-03 21:08:53 +01:00
Artur Wieczorek
8aee0244b0 Add option to save as PostScript in drawing sample 2017-03-03 21:07:58 +01:00
Artur Wieczorek
3d4850bdf3 Use size of drawing area as a size of saved images in drawing sample
Determine actual size of drawing area and use it (instead of virtual size of the window) as a dimension of the images to be saved. Thanks to this clipping, produced images contain only results of drawing operations and not lot of empty background space.
2017-03-03 21:06:06 +01:00
Artur Wieczorek
c0b6540c6f Add option to show bounding box in drawing sample
Visualizing bounding box can be helpful in diagnosing problems with determining extents of drawing operations.
2017-03-02 20:57:30 +01:00
VZ
aaa31b121c Don't build samples not supported in current wxMSW build
Fix certain samples being compiled when they shouldn't because the
corresponding feature was disabled when building the library.
2017-02-27 23:17:37 +01:00
Lauri Nurmi
b8192cb8e1 Allow hiding command line arguments from Usage()
Add wxCMD_LINE_HIDDEN wxCmdLineParser flag allowing to hide options and/or
parameters.

A hidden/unlisted argument is processed as usual, but not shown in the output
given by Usage(). A use case for such could be diagnostics switches that
should exist but are not useful to the end user.

Closes https://github.com/wxWidgets/wxWidgets/pull/390
2017-02-20 17:53:04 +01:00
Vadim Zeitlin
d15bbcacd2 Merge branch 'rmv_symbols_3' of https://github.com/catalinr/wxWidgets
Remove obsolete mentions of Windows 9x, Windows CE and OS/2.
2017-02-20 17:46:45 +01:00
New Pagodi
bac4d24bf9 Don't handle deprecated event in stc sample
EVT_STC_KEY is not generated and there is no reason to handle it.

See #17688.
2017-02-16 18:19:16 +01:00
Raul Tambre
779276d854 Fix STC samples being compiled when USE_STC=0 2017-02-12 15:17:22 +02:00
Raul Tambre
801b0b1c30 Fix the richtext sample being compiled when USE_RICHTEXT=0 2017-02-12 15:17:22 +02:00
Raul Tambre
314d3adbee Fix ribbon samples being compiled when USE_RIBBON=0 2017-02-12 15:17:22 +02:00
Raul Tambre
cbd516c52f Fix the propgrid sample being compiled when USE_PROPGRID=0 2017-02-12 15:17:22 +02:00
Raul Tambre
3ad61b9005 Fix media samples being compiled when USE_MEDIA=0 2017-02-12 15:17:22 +02:00
Raul Tambre
5d3ef67019 Fix the except sample being compiled when USE_EXCEPTIONS=0 2017-02-12 15:17:22 +02:00
Raul Tambre
8d345a6201 Fix HTML-dependent samples being compiled when USE_HTML=0
Fixes #17780
2017-02-12 15:17:22 +02:00
Artur Wieczorek
506b51cae5 Add drawing a multi-line text to the printing sample
This can be helpful in testing API to draw multi-line texts.

See #17798.
2017-02-11 21:52:51 +01:00
Artur Wieczorek
7ebc60b1fe Show the version of Scintilla used in the about dialog of the stc sample
Call wxStyledTextCtrl::GetLibraryVersionInfo() to see what version of Scintilla is being used.
2017-02-09 22:27:47 +01:00
Tobias Taschner
3206df50c4 Add Microsoft Visual Studio 2017 solution file for building wxMSW
Allow building with VS15 out of the box.

Closes https://github.com/wxWidgets/wxWidgets/pull/353
2017-01-16 17:02:10 +01:00
Artur Wieczorek
0649b0d028 Use wxGraphicsContext::CreateFromUnknownDC in the printing sample
Creating graphics context for the various flavors of wxDC can be simplified by using this newly introduced API.
2017-01-11 20:32:43 +01:00
Vadim Zeitlin
59bd1178f1 Fix build with RTTI turned off using MSVC makefiles
Rebake these makefiles using fixed version of bakefile (pre-0.3.0).

See https://github.com/vslavik/bakefile/pull/85

Closes #17767.
2017-01-04 12:01:14 +01:00
Vadim Zeitlin
395d453c94 Link with oleacc.lib when using MSW gcc makefiles
This library is now required when wxUSE_ACCESSIBILITY==1, but was only linked,
using a compiler-specific pragma, when using MSVC resulting in link errors
with gcc.

Fix this by adding the library to the bakefile for non-MSVC compilers and
rebaking.
2017-01-04 11:50:18 +01:00
Tobias Taschner
e0a2e09031 Update year in copyright notices to 2017
Use 2017 instead of 2016, mostly in version info files.

Closes https://github.com/wxWidgets/wxWidgets/pull/379
2017-01-04 11:25:00 +01:00
Tobias Taschner
4edafd8a8c
Added CMakeLists.txt for minimal sample for testing and demo 2017-01-03 20:56:50 +01:00
Cătălin Răceanu
fc2cc74530 Improve UI of the "Button" page of the widgets sample
Allow only permitted combinations of text, bitmap and command link.

Also avoid null pointer crash when combining "Bitmap only" with "Use command link button".
2016-12-07 01:32:10 +01:00
Paul Cornett
d20fb180b1 Display system colors in alphabetical order 2016-12-04 11:33:48 -08:00
Paul Cornett
cb19499c90 Fix layout of drawing sample System colours screen for colors with non-opaque alpha 2016-11-20 09:59:33 -08:00
Paul Cornett
d3497d32ec Size text sample to it's contents, rather than using fixed arbitrary size 2016-11-14 10:43:56 -08:00
Artur Wieczorek
bc8728b901 Implement MyCustomRenderer::GetAccessibleDescription() in dataview sample
If wxUSE_ACCESSIBILITY is set to 1, this method has to be overridden for all custom renderers.
2016-10-24 21:55:10 +02:00
Vadim Zeitlin
ca3e63656c Remove unwanted flag from sizer in the help sample
This resulted in an assert failure as wxALIGN_CENTER_VERTICAL has no chance of
working for an element of a vertical wxBoxSizer.
2016-10-15 13:41:31 +02:00
Scott Talbert
fae271c21c Fix assert in webview sample when using find functionality 2016-09-29 01:35:28 +02:00
Vadim Zeitlin
d0c57dbef0 Fix string iteration logic in wxFTP::Pwd()
wxString iterators can't be dereferenced once they reach the end of the
string, so compare them with end rather than checking if the value they point
to is non-NUL.

This makes wxFTP::Pwd() actually work, which was apparently broken since quite
some time (perhaps ever since c9f7896861 9+
years ago).

Closes #17679.
2016-09-25 01:20:41 +02:00
Artur Wieczorek
27627db87d Fix warning about signed/unsigned mismatch in the accessibility sample
Just to suppress harmless compiler warning.
2016-09-20 20:37:18 +02:00
Artur Wieczorek
6ae6a79c67 Fix MSVC14 warnings about a shadowed variable in the accessibility sample
Just to suppress some harmless warnings.
2016-09-20 20:37:17 +02:00
Artur Wieczorek
8197acfd4b Fix compilation error in accessibility sample
Since f3ddefc1ad wxSplitterWindow::SashHitTest() has only two parameters.
2016-09-20 20:37:17 +02:00
ARATA Mizuki
8cfc74491a Replace wxEXPLICIT with the 'explicit' keyword
See #17655.
2016-09-14 18:45:12 +09:00
ARATA Mizuki
1e6251d592 Replace wx_static_cast/wx_const_cast/wx_reinterpret_cast with the function-style casts
See #17655.
2016-09-14 18:45:12 +09:00
Vadim Zeitlin
9cb762dbd2 Rebake to get rid of whitespace-only changes in generated files
This just commits insignificant changes after rebaking everything to make sure
they don't get mixed up with significant ones at some later time.
2016-09-08 00:48:06 +02:00
Vadim Zeitlin
50c16da687 Remove invalid "option" elements from XRC sample file
<option> can't be used for wxFlexGridSizer items, remove all these tags to
allow the file to validate against the XRC schema.
2016-07-06 18:48:35 +02:00
Vadim Zeitlin
3dc54df247 Ignore hints on wxTE_PASSWORD controls when not supported natively
There is no way to show the hint without native support in a control with
wxTE_PASSWORD style, so simply ignore them completely in this case.

Closes #17078.
2016-06-28 14:40:52 +02:00
Vadim Zeitlin
f792ba45f6 Merge branch 'dvc-markup'
Add support for using markup in wxDataViewCtrl items.
2016-06-16 17:49:54 +02:00
Vadim Zeitlin
74c0462c84 Add wxDataViewTextRenderer::EnableMarkup()
Implement the new method to all the implementations (generic, GTK, OS X), show
it in the sample and update the documentation.
2016-06-16 00:06:23 +02:00
Dimitri Schoolwerth
3c4e29e0da Fix accidental changes made to menu sample
Only German translations were supposed to be updated according to
8437c6a443 but it also made test changes
to samples/menu/menu.cpp, revert those.
2016-06-15 02:38:10 +02:00
Maarten Bent
c7e4b301d0 Add saving as SVG to drawing sample.
Changed the colour of the third star-polygon to test brush pattern with different colours.
Use the width and height of the scroll panel as image size.
2016-06-12 18:40:11 +02:00
Vadim Zeitlin
4dfde501df Add support for returning item location to wxGTK wxMimeTypesManager.
This is a squash merge of gtk_mimetype branch from
https://github.com/Hanmac/wxWidgets.git with some extra minor cleanup.

Closes https://github.com/wxWidgets/wxWidgets/pull/293
2016-06-07 14:29:52 +02:00
Vadim Zeitlin
a5ecde1314 Roughly show the current selection in the grid sample
Allow to quickly check that cell/block/row/column selection works as expected.

This could be made more detailed, e.g. by dumping all the selected cells/rows/
columns if there are not too many of them, but for now this will do.
2016-06-06 01:06:38 +02:00
Vadim Zeitlin
1a438e786c Add a trivial "About" dialog to the uiaction sample
This will be used later for testing opening (and closing) this dialog
programmatically.
2016-06-05 00:10:13 +02:00
Vadim Zeitlin
ed73e4f624 Merge branch 'uisim-xtest'
Make wxUIActionSimulator work with GTK+3, including when using DPI scaling.
2016-06-04 22:44:25 +02:00
Vadim Zeitlin
4154fbb8a3 Add conversions between wxSecretValue and wxString
This is less secure, but more convenient, than using raw pointers and in most
cases the password will already be stored in a wxString anyhow.
2016-06-04 19:19:15 +02:00
Vadim Zeitlin
675d9d779d Add wxSecretStore
Add a new class allowing to store passwords and other sensitive information
using the OS-provided facilities.

Add implementations for all the main platforms, documentation and a new sample
(which contains an ad hoc unit test as the real unit test for this class would
probably be a bad idea as it wouldn't run in non-interactive contexts and
could show OS level dialog boxes if it did).
2016-06-04 18:29:15 +02:00
Vadim Zeitlin
21d90d48ba Fix another typo in a comment in the drawing sample
This went unnoticed in 5e500de7e8.
2016-05-31 18:58:38 +02:00
Artur Wieczorek
5e500de7e8 Fixed minor typos in the drawing sample 2016-05-26 17:57:11 +02:00
Vadim Zeitlin
8e76aab544 Demonstrate simulating menu item selection in the uiaction sample
This just checks that pressing a key with "Alt" modifier can be used to open a
menu and that pressing the menu item letter then selects an item from it.
2016-05-23 03:00:49 +02:00
Vadim Zeitlin
a31a7522c4 Add accelerators for the menu items in wxUIActionSimulator sample
No real changes, just make it more convenient to test using this sample.
2016-05-23 02:02:20 +02:00
Vadim Zeitlin
42b53f156d Show the time taken by the simulation in the uiaction sample
If nothing else, it allows it to see when the simulation is done.
2016-05-23 02:01:11 +02:00
Vadim Zeitlin
5b597cd0e8 Fix widgets sample build with MinGW-w64 4.9.1
The headers for this compiler, at least in the version packaged under Debian,
define BCN_DROPDOWN but not the NMBCDROPDOWN struct we also need, so we have
no choice but to redeclare the struct ourselves to allow this code to compile.
2016-05-17 23:36:06 +02:00
Vadim Zeitlin
70b64b8c53 Merge branch 'rename-listctrl-checkbox-methods' of https://github.com/discnl/wxWidgets
Use consistent case for wxListCtrl::{Has,Enable}CheckBoxes() methods.

Closes https://github.com/wxWidgets/wxWidgets/pull/275
2016-04-23 18:53:41 +02:00
Vadim Zeitlin
bed710d9a7 Add wxDataViewCtrl::GenericGetHeader() accessor
And show how to use it to increase the header size in the sample.
2016-04-22 01:12:21 +02:00
Vadim Zeitlin
bed7d9fe74 Add wxDataViewCtrl::SetHeaderAttr() too
This is currently only implemented in the generic version but could be
implemented at least for GTK+ native one as well in the future.
2016-04-22 00:58:38 +02:00
Dimitri Schoolwerth
3689f0119b Rename methods in listctrl sample to use CheckBox instead of Checkbox 2016-04-21 17:58:01 +00:00
Dimitri Schoolwerth
602111f2b3 Rename wxListCtrl::HasCheckboxes() and EnableCheckboxes()
Rename them to HasCheckBoxes and EnableCheckBoxes for consistency with
wxCheckBox naming.

See also PR https://github.com/wxWidgets/wxWidgets/pull/153
2016-04-21 15:25:10 +00:00
Vadim Zeitlin
5388c7a72e Add wxListCtrl::SetHeaderAttr()
This method can be used to change the list view header appearance.

Add the method declaration, documentation, show it in the sample and implement
it for wxMSW (only, for now).
2016-04-17 18:26:13 +02:00
Vadim Zeitlin
64196306bc Add a very simple page showing wxHeaderCtrl in the widgets sample
This is mostly in order to test that changing font and colours works for this
control (or, rather, that currently it doesn't in wxMSW).
2016-04-17 16:03:28 +02:00
Vadim Zeitlin
246ae58c19 Replace wxTreeItemAttr and wxListItemAttr with wxItemAttr
The two existing structs were completely identical, just replace them with a
single wxItemAttr.

Notice that wxDataViewItemAttr is not quite the same, although pretty similar,
so it remains separate for now. It would be nice to combine it with this one
too in the future, e.g. to make it simpler to make items bold in a wxListCtrl.
2016-04-16 19:04:52 +02:00
Dimitri Schoolwerth
3486c5707b Fix macro redefinition warning
APIENTRY is unconditionally defined through windows.h while it already has
been defined previously in oglpfuncs.h, resulting in a macro redefinition
warning. In this case fix the warning by undefining the macro prior to
including windows.h.
2016-04-15 02:35:40 +00:00
Artur Wieczorek
79b60780fe Fix MSVC14 warnings about a shadowed variable in the printing sample.
Just to suppress some harmless warnings.
2016-04-08 18:46:02 +02:00
Artur Wieczorek
c991c659c4 Fixed print preview in printing sample (wxGTK).
Under wxGTK print preview is created on wxMemoryDC and hence wxGraphicsContext should be created also for this kind of wxDC in MyApp::Draw.

Closes #17489.
2016-04-08 18:44:21 +02:00
Cătălin Răceanu
a00e4e65c9 Delete sample_os2.ico
only used for OS2
2016-04-05 10:48:37 +03:00
Cătălin Răceanu
56b6c74755 Delete sample.rcO
only used for OS2
2016-04-05 10:47:48 +03:00
Cătălin Răceanu
84e415f320 Delete sample.rc4
only used for OS2
2016-04-05 10:47:08 +03:00
Vadim Zeitlin
8baaa652ef Merge branch 'dvc': miscellaneous wxDataViewCtrl-related fixes 2016-04-02 01:09:06 +02:00
Artur Wieczorek
16f111d007 Modified drawing sample to use wxGraphicsContext::GetTextExtent function.
Use GetTextExtent function to centrally align a bitmap to the text label (on Graphics screen).
2016-03-25 23:14:17 +01:00
Artur Wieczorek
f38485afa5 Modified drawing sample to demonstrate drawing graphics bitmaps.
Draw graphics bitmap and sub-bitmap (on Graphics screen) to present wxGraphicsBitmap support.
2016-03-25 23:12:40 +01:00
Artur Wieczorek
cce6f4edaa Fixed minor typo in the drawing sample. 2016-03-24 22:24:58 +01:00
Vadim Zeitlin
1bbc44daff Support background colour in wxDataViewItemAttr in wxGTK
The code handling background colour was commented out for some reason, simply
enable it as it seems to be working just fine -- and update the sample to show
that it does.
2016-03-22 17:49:49 +01:00
Artur Wieczorek
494c2e3a6a Display graphics renderer info in the drawing sample.
Display on the status bar a description (name and version) of currently used graphics renderer.
2016-03-16 21:43:09 +01:00
Vadim Zeitlin
e7c8349d9b Avoid MSVC 14 warning about variable hiding in dataview sample
The warning is harmless but it was indeed confusing to call "parent" both a
local variable and a function parameter, so don't do it.
2016-03-14 00:13:46 +01:00
Andrea Zanellato
cf5fa7d5f1 Add support for wxAuiManager and wxAuiPaneInfo to XRC
Add XRC handler for wxAuiManager and include the existing wxAuiNotebook
handler into it (but notice that wxAuiToolBar handler added by a later #15686
in f269f868d7 remains separate).

Also update the AUI dialog in the sample and stop hardcoding its size in
pixels.

See #13520.
2016-03-09 01:11:16 +01:00
Vadim Zeitlin
08f060ebd2 Fix harmless unused variable warning in the help sample
wxHtmlModalHelp class can be used as a function, there is no need to name the
variable.
2016-03-06 22:12:30 +01:00
Vadim Zeitlin
8e05886313 Allow MFC have idle events too in the MFC sample
Call MFC base class method from our overridden one.

Closes #15252.
2016-03-06 19:38:05 +01:00
Troels Knakkergaard
cda7209101 Add wxFileType::GetExpandedCommand()
This new method allows to get the command expanded with the given file name
for commands other than "Open" and "Print".

Closes #17367.
2016-03-05 03:09:59 +01:00
Vadim Zeitlin
7eee3576cf Update version to 3.1.1
Update misc/scripts/inc_release script: remove non-existent any more files and
update the version in the MSVS 200x project files not generated by bakefile
any more and MSVS 201x project files which were not previously taken into
account.

Run it and rebake.
2016-03-03 23:23:06 +01:00
Manuel Martin
bff80808b7 Avoid double-to-float warnings in OpenGL pyramid sample
See #16910.
2016-02-28 20:41:22 +01:00
Vadim Zeitlin
fd738c5fdb Merge miscellaneous wxDataViewCtrl-related bug fixes
Make it possible to define custom renderers using text controls reacting to
error presses in at least wxMSW and wxGTK.

Closes https://github.com/wxWidgets/wxWidgets/pull/221
2016-02-27 18:08:12 +01:00
Paul Cornett
1e7121c776 Fix option to load image as HiDPI for GTK3
With GTK3, GetContentScaleFactor() does not return correct result until
TLW is realized, so use wxUpdateUIEvent to enable it later
2016-02-25 08:24:44 -08:00
Vadim Zeitlin
1c9a4694ff Merge OpenGL API changes and better modern OpenGL support
Closes https://github.com/wxWidgets/wxWidgets/pull/227
2016-02-24 20:15:35 +01:00
Igor Korot
a216806c99 Allow modifying wxComboBox from its CLOSEUP handler with wxGTK2
Doing this resulted in GTK errors about invalid iterators, so postpone the
generation of the CLOSEUP event for slightly later to allow changing the
combobox contents from it with GTK+ 2 (this is not necessary with GTK+ 3).

Also add a demon of a dynamic combobox, creating and destroying its items on
the fly, to the widgets sample.

Closes #17223.
2016-02-24 20:07:34 +01:00
Paul Cornett
11395c2e26 Add option to load image as HiDPI 2016-02-23 21:50:41 -08:00
Manuel Martin
d6fb44e158 Add a new OpenGL pyramid sample
This sample shows the use of modern OpenGL (3.2).

Closes #16910.
2016-02-23 01:04:25 +01:00
Vadim Zeitlin
f037e1206d Merge wxiOS fixes
Make it build again and add instructions about how to build and use it.

Closes https://github.com/wxWidgets/wxWidgets/pull/213
2016-02-22 23:53:30 +01:00
Vadim Zeitlin
7e37c6763f Test custom editor in the dataview sample
Show how to create and use a custom editor in the custom renderer.
2016-02-20 17:07:04 +01:00
Vadim Zeitlin
4edae7238a Fix skipping the event in wxEVT_TEXT_ENTER handler in wxMSW
Skipping the event is supposed to have the same effect as not handling the
event at all, but in wxMSW wxTE_PROCESS_ENTER style must be specified for a
wxEVT_TEXT_ENTER handler to be executed at all and if this style is used, then
the default handling in MSWProcessMessage() which normally happens before
calling the handler doesn't take place at all.

Work around this by explicitly performing the default "Enter" key action if
the event generated by it wasn't handled to make wxMSW behaviour more
intuitive.
2016-02-20 17:07:04 +01:00
Vadim Zeitlin
80d4993119 Merge wxNotificationMessage for OS X and MSW 8+
Closes https://github.com/wxWidgets/wxWidgets/pull/92
2016-02-18 23:09:05 +01:00
Artur Wieczorek
f6268599f1 Use "MultiProcessorCompilation" parameter instead of explicit /MP in the minimal sample project.
Use the user-visible option instead of the command line option which is hidden in the IDE.
2016-02-18 22:52:17 +01:00
Artur Wieczorek
27ea6aea5c Fix MSVC14 warnings about a shadowed variable in the widgets sample.
Just to suppress some harmless warnings.
2016-02-18 22:43:48 +01:00
Artur Wieczorek
51f7074caf Fix MSVC14 warnings about a shadowed variable in the propgrid sample.
Just to suppress some harmless warnings.
2016-02-18 18:46:45 +01:00
Artur Wieczorek
0a555f3c83 Fix ToolsVersion value in minimal sample project file (VS 2010+).
Since minimal.vcxproj file is shared by VS 2010-15 solution files, ToolsVersion value should be set to the value supported by all VS versions since 2010 to avoid warning messages like "Project file contains ToolsVersion="14.0", which is not supported by this version of MSBuild.".
2016-02-12 20:08:09 +01:00
Vadim Zeitlin
4a78ed8bb7 Use fixed width font for the RGB values in the drawing sample
This makes them more readable and aligns all colours vertically.
2016-02-12 03:18:30 +01:00
Vadim Zeitlin
6680dbf906 Fix MSVC14 warning about a shadowed variable in the drawing sample
The warning is harmless but avoid it nevertheless.
2016-02-12 03:18:18 +01:00
Vadim Zeitlin
8c7ada391a Reformat the system colour names in the drawing sample
No real changes, just prettify the code a little.
2016-02-12 03:17:46 +01:00
Tobias Taschner
61f136700c Add an about button to the minimal sample for systems without menus.
On minimal ports like wxIOS no menus are available. Providing an about button allows at least a minimal user interaction in that case.
2016-02-11 11:32:57 +01:00
Tobias Taschner
9345482fbf Add Win8+ toast notification to wxNotificationMessage.
Since Windows 8 there are native toast notifications available via WinRT defined in windows.ui.notifications.h. This adds support for these notifications via wxNotificationMessage. These notifications have to be explicitly enabled via wxNotificationMessage::MSWEnableToasts() because they require a start menu shortcut to the application.
2016-02-10 20:38:12 +01:00
Tobias Taschner
bf5e403a68 Restructure wxNotificationMessage.
wxNotificationMessage has been refactored to always use wxNotificationMessageImpl (this was previously already done in the MSW implementation)

This adds various features and fixes to wxNotificationMessage:
- OS X Notification Center implementation
- Generic "toast" notifications
- SetIcon() to specify a custom icon
- AddAction() to add actions to notifications
- Events to get notify of notification clicks, dismiss or actions
2016-02-10 20:38:10 +01:00
Vadim Zeitlin
730c1ee79b Merge https://github.com/wxWidgets/wxWidgets/pull/208
See #17218.
2016-02-10 16:17:23 +01:00
Vadim Zeitlin
d50abc2d3e Make wxWS_EX_VALIDATE_RECURSIVELY default (and only) behaviour
In practice, almost everybody using validators also seems to use this style,
so make it the default (this hadn't been done when it was originally
introduced because of compatibility concerns, but now, 15+ years later, it's
probably safe enough to change this).
2016-02-09 23:38:23 +01:00
Tobias Taschner
d811906b79 Add System Colour screen to drawing sample.
This adds an additional screen to the drawing sample showing all available wxSystemColour values. It makes sense for testing these values but also provides a convenient overview of available colours for the library user.
2016-02-08 14:34:37 +01:00
Vadim Zeitlin
1ba4d1847b Show wxCollapsibleHeaderCtrl in the collpane sample
If nothing else, this at least verifies that this control can be used in all
ports.

See #17309.
2016-02-08 02:28:00 +01:00
Andreas Falkenhahn
6a01623a80 Add wxListBox::GetTopItem() and GetCountPerPage()
Implement these methods for all the major ports, add them to the widgets
sample and documentation.

Closes #17189.
2016-02-06 19:13:35 +01:00
Vadim Zeitlin
256f644861 Use a separate variable for each loop in the widgets sample
This avoids VC14 variable shadowing warning and is also just better practice.
2016-02-06 18:29:27 +01:00
Vadim Zeitlin
3631a2d142 Merge branch listctrl-with-checkboxes
Add support for native checkboxes to wxMSW wxListCtrl.

Closes https://github.com/wxWidgets/wxWidgets/pull/153
2016-02-06 01:20:01 +01:00
Vadim Zeitlin
fd137b1876 Get rid of an unused member field in the XRC sample
This fixes MSVC 14 warning about a local variable shadowing a class member and
makes the code less confusing.
2016-02-05 22:43:23 +01:00
Vadim Zeitlin
43340b3526 Also add MSVS 201[0235] projects for the minimal sample
It's impractical to have manual projects for all the samples, but do it at
least for this one to serve as a starting point for people using these IDEs.
2016-02-05 22:43:23 +01:00
Vadim Zeitlin
4379f599e8 Implement wxDataViewCtrl::SetIndent() for wxGTK
Use gtk_tree_view_set_level_indentation().
2016-02-05 17:00:57 +01:00
Artur Wieczorek
2f4d6f434a Sort reference data used in tests in widgets sample in dictionary order.
Contents of controls (like ListBox, Choice, ComboBox) created with wxXX_SORT flag is sorted in dictionary order and therefore reference data items used in tests in widgets sample need to be sorted in this order too.

See #15896.
2016-02-04 21:37:43 +01:00
Vadim Zeitlin
cb26668204 Don't destroy the native window in wxNativeWindow itself by default
Leave ownership of the native window to the user code as it may want to reuse
it for some other purpose and provide an explicit Disown() function that can
be called if the user really wants wxWidgets to take ownership of the native
window.

In particular, this avoids problems when using ARC under OS X which resulted
in a double "release" before.
2016-02-04 18:46:47 +01:00
VZ
1a9237a049 Merge pull request #194 from vadz/remove-osx-carbon
Remove wxOSX/Carbon port
2016-02-03 22:26:02 +01:00
Vadim Zeitlin
d66289dc95 Don't use the standard OS X Cmd+Q accelerator in the samples
Or, more precisely, don't use for anything else than exiting the application.

Closes #4326.
2016-02-01 16:03:31 +01:00
Tobias Taschner
5ba67c67e4 Remove wxOSX/Carbon support.
Cocoa has been the default toolkit in wxWidgets for a long time. There is really no good reason to use Carbon in 2016 and this removes a lot of unused and unmaintained code.
2016-02-01 13:48:48 +01:00
Vadim Zeitlin
ddae98fc35 Really add wxGA_PROGRESS support to wxGauge in wxOSX
Finish the work started in 11a5b83e2c by moving
more wxAppProgressIndicator-related parts of wxMSW wxGauge implementation into
the base class and reusing them from the wxOSX version.

Also remove MSW-specific test for wxUSE_TASKBARBUTTON from the widgets sample
which prevented this style from being taken into account at all under Mac.

See #16638.
2016-02-01 03:03:53 +01:00
Artur Wieczorek
3e24453be4 Check wxBK_HITTEST_ONITEM state in hit test in notebook sample
Closes https://github.com/wxWidgets/wxWidgets/pull/159
2016-01-31 03:07:05 +01:00
Vadim Zeitlin
5066bff04e Fix harmless warning about shadowed variable in image sample
Don't redeclare a previously declared variable, just reuse the same one.
2016-01-31 01:53:01 +01:00
Vadim Zeitlin
c618c0b620 Fix wxEVT_UPDATE_UI propagation for popup menus in MDI windows too
This is similar to f74379c751 but specific to
wxMSW MDI code: also call wxMenu::UpdateUI() without any parameters from it
instead of overriding its logic for determining where to send the events.

Add code to the mdi sample demonstrating that the event handlers in the window
itself and its MDI frame parent get the events they're supposed to get.

See #17352.
2016-01-30 21:33:38 +01:00
Vadim Zeitlin
e89fc9c152 Avoid annoying prompt when closing MDI sample with one window
Ask the user when closing the window with several MDI frames opened, if only
to demonstrate how to do it, but not if there is only one window as this is
just too annoying when using the sample for testing.
2016-01-30 21:30:43 +01:00
Igor Korot
aa4aa74154 Don't generate wxEVT_LIST_ITEM_RIGHT_CLICK outside of item area
Make wxGenericListCtrl used under wxGTK and wxOSX behave the same as the
native wxMSW wxListCtrl and wxTreeCtrl under all platforms and only generate
ITEM_RIGHT_CLICK events when an item was actually clicked, i.e. don't generate
them for the clicks completely outside of the client area.

Closes #4711.
2016-01-30 18:54:09 +01:00
Vadim Zeitlin
0ddf12104a Remove the ancient controls sample
It's time to embrace the 21st century.

Closes #15895.
2016-01-30 05:09:32 +01:00
Maarten Bent
3b98570f57 Miscellaneous improvements to the multimedia keys support
Simplified mapping keys on Windows.

Handle multimedia keys in the keyboard, text and treetest samples.

Ignore multimedia keys in wxRichTextCtrl.
2016-01-20 18:56:03 +01:00
Tobias Taschner
58c7e6d54f Add wxStaticBitmap::SetScaleMode() to control bitmap display size
This allows a bitmap to scale with the size of the wxStaticBitmap control.
Scaling can be controlled to fill the control with or without changing the
bitmaps aspect ratio.
2016-01-20 18:55:14 +01:00
Tobias Taschner
1f0a82b6a7 Update outdated year references to 2016.
Use 2016 instead of 2015, mostly in version info files.
2016-01-18 14:30:54 +01:00
Maarten Bent
5326132c21 Updated wxListCtrl sample with check-boxes functionality. 2016-01-15 20:55:32 +01:00
Artur Wieczorek
46953a1426 Enable "Alpha screen" in drawing sample also if wxDC supports alpha transparency.
For some systems (like OS X, GTK+ 3) drawing with transparency is supporting by native wxDC and in this case "Alpha screen" sample can be shown even if wxGraphicsContext is not used/enabled. For such wxDC's all drawing operations can be done directly without using wxGraphicsContext.
2016-01-14 23:07:45 +01:00
Artur Wieczorek
9aa5a4de0c Modify drawing on "Alpha Screen" in drawing sample to make transparency effect more visible.
Use transparent colours in drawing operations to show more clearly transparency effects.
2016-01-07 21:32:22 +01:00
Artur Wieczorek
537fcac633 Disable "Use wxDC" menu item if displayed screen requires wxGraphicContext (drawing sample).
To display "show alpha" and "show graphics" screens there is necessary to use wxGraphicContext and switching to wxDC should blocked in this case.
2015-12-26 17:44:28 +01:00
Artur Wieczorek
3fb70061ae Synchronize menu state in drawing sample with actually selected graphics renderer.
Because graphics renderer is not only selected via menu but also directly in the application (in MyFrame::OnShow) there is necessary to update menu items responsible for selecting graphics context to represent current state of the application.
This is done in EVT_UPDATE_UI handlers where there is checked what graphics renderer is currently in use and state of the menu items is updated accordingly.

Closes #16971.
2015-12-26 17:43:50 +01:00
Artur Wieczorek
dd29ecf840 Implemented features to modify tool spacing in the toolbar sample.
There were added two menu items (under 'Tools' menu) to modify current tool spacing.
This way is possible to test SetToolPacking/GetToolPacking methods.
2015-12-14 22:13:04 +01:00
Artur Wieczorek
57793cb6f1 Reset opacity check box value when control settings are reset in ColourPicker demo.
All settings should be reset to default values when 'Reset' operation is invoked.
2015-12-13 19:18:57 +01:00
Vadim Zeitlin
69b66e9e2e Add wxTextEntry::ForceUpper()
Allow automatically converting lower-case letters entered into wxTextCtrl to
upper-case equivalents. Provide generic fallback and implement the method
natively for all the major platforms.

Also update the text sample to show it in action.
2015-12-08 03:02:46 +01:00
Catalin
f61627fc7e Remove obsolete symbols from the samples
Mostly don't mention OS/2 in the comments about the icons.

Also replace a couple of occurrences of "wxWindows" with "wxWidgets".

Closes https://github.com/wxWidgets/wxWidgets/pull/138
2015-12-03 22:11:04 +01:00
Cătălin Răceanu
c43fa10c74 Fix drop down combobox flags in the widgets sample
Combine, not replace, combobox option flags when creating a drop down one,
otherwise all the others flags were simply ignored.

Closes https://github.com/wxWidgets/wxWidgets/pull/136
2015-12-03 21:30:04 +01:00
Artur Wieczorekl
b81e842689 Modify widgets sample to demonstrate colour picker with alpha support. 2015-11-15 16:39:00 +01:00
Artur Wieczorek
63d6db3131 Modify dialogs sample to present also colour dialog with alpha support. 2015-11-15 16:38:49 +01:00
Artur Wieczorek
b6e13a52a9 Disable generic dialogs in dialogs sample on GTK.
Generic dialogs are not included in GTK build.
2015-11-15 16:38:36 +01:00
Vadim Zeitlin
ac0505e7d8 Merge branch 'colour_dialogs_alpha_generic' of https://github.com/a-wi/wxWidgets into wip
Add support for alpha channel to wxGenericColourDialog.

See #14127.
2015-11-15 00:56:13 +01:00
Vadim Zeitlin
351103cc45 Use proper format specifier for size_t value in ipc sample
"%d" can't be used for size_t which may be of greater size than int, so use
"%lu" with a cast to unsigned long, as is done elsewhere because "%z" is
unfortunately not portable.

Closes #17255.
2015-11-15 00:56:10 +01:00
Vadim Zeitlin
fbf59742a4 Don't always turn on wxTE_PROCESS_ENTER in wxOSX
This style was unconditionally used for all multiline controls for some
reason, meaning that wxEVT_TEXT_ENTER could be received even for the controls
not using wxTE_PROCESS_ENTER explicitly, which was unexpected.

Don't do this any more to conform to the expected behaviour.

Also do use wxTE_PROCESS_ENTER for the text control supposed to allow handling
"Enter" in the text sample: surprisingly, it didn't have this style before,
although it was clearly supposed to.

Closes #1913.
2015-11-09 03:51:18 +01:00
Vadim Zeitlin
aef9eff1be Make the middle control in the text sample bigger under OS X
This might indicate a bug with the default size being too small for wxTextCtrl
in wxOSX, but without this change the control was barely big enough to show
one line of text under OS X 10.8, so make it bigger to have a more reasonable
initial appearance.
2015-11-09 02:56:59 +01:00
Artur Wieczorek
02c03096b6 Fix initialization of custom colours for generic colour dialogs in dialogs sample.
Use number of custom colours taken from wxColourData instead of using explicit numeric value.
2015-11-02 23:19:30 +01:00
Artur Wieczorek
8fee6a9a2b Modify dialogs sample to present also generic colour dialog with alpha support.
Added separate submenu and menu items to show generic colour dialogs with opacity control enabled/disabled.
2015-11-02 23:19:26 +01:00