Commit Graph

5680 Commits

Author SHA1 Message Date
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
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