Commit Graph

6070 Commits

Author SHA1 Message Date
Vadim Zeitlin
5f7a6bd15b Replace Connect() with Bind() in all samples and utils too
Still use Connect() in unit tests which were written explicitly for it
and in EventConnector, which can't use Bind() as it uses a variable for
the event type.

No real changes, just use the newer and more convenient function.
2018-05-31 16:19:23 +02:00
Vadim Zeitlin
c0b0562533 Avoid many -Wparentheses warnings from gtk/gtk.h with gcc8
Add wx/gtk/private/wrapgtk.h wrapping gtk/gtk.h in pragmas disabling
these warnings and include it everywhere instead of directly including
gtk/gtk.h.

Also include wx/gtk/private/gtk2-compat.h from this wrapper header as it
was included by 90% of the files including gtk/gtk.h itself and it seems
to be better and simpler to just always include it.
2018-05-21 12:34:04 +02:00
Maarten Bent
c97963fce0 Fix size glitch of WidgetsBookCtrl in widgets sample
The entire control is hidden until the dialog is resized.
This seems to be caused by (recent changes in) the wxPersistentManager.
This is fixed by populating the frame before restoring persistence.
(as is described in docs/doxygen/overviews/persistence.h.)
2018-05-17 20:20:05 +02:00
Maarten Bent
5758832a6e Fix invalid image size in wxBitmapComboBox widgets sample
When the wxBitmapComboBox is empty, GetBitmapSize() returns size -1,-1.
Images can not be scaled to this invalid size. Use the size of the imagelist
instead.
2018-05-17 20:20:05 +02:00
Maarten Bent
e581b72955 Look in multiple paths when searching for resource files of samples
When using an out of source build, the files are not in the default wxWidgets directories.
Also search in the current directory, parent directory and sample sub-directories.

Closes https://trac.wxwidgets.org/ticket/18118
2018-05-17 20:20:04 +02:00
Vadim Zeitlin
c756d18bc4 Allow using AUI-based MDI classes in the docview sample
For testing, allow using wxAuiMDI{Parent,Child}Frame in the sample.

This change also shows that the AUI classes are now sufficiently
compatible with the standard ones for switching to them to be almost
trivial.
2018-05-13 02:45:40 +02:00
Vadim Zeitlin
ff023ef6b3 Don't show docview sample --mdi option in help if it's not supported
No real changes, just avoid describing the "--mdi" option in the help
message if it's not really supported in this library build.
2018-05-13 02:41:59 +02:00
Vadim Zeitlin
ff06e12ceb Remove unused and outdates samples/Info.plist file
This file was added in 4d524cdd0e a long
time ago but doesn't seem to have been ever actually used for anything
and is outdated, e.g. contains LSRequiresCarbon=true, which shouldn't be
used any longer.

Remove the file itself and all references to it.
2018-05-02 16:01:02 +02:00
Tobias Taschner
183ba1cb4c Set NSPrincipalClass to wxNSApplcation for CMake builds too
This setting is important for some functionality provided by
wxNSApplcation and most importantly without the setting all samples
where only shown scaled on high DPI displays.

Notice that it was already present in src/osx/carbon/Info.plist.in which
is used for the samples in autoconf build.

Closes https://github.com/wxWidgets/wxWidgets/pull/743
2018-05-02 15:53:09 +02:00
Maarten Bent
58a7339cb9 Show the mouse wheel axis in the text sample
This helps debugging these events generation.

Closes https://github.com/wxWidgets/wxWidgets/pull/798
2018-05-02 15:38:23 +02:00
PB
f9aeb2669b Fix memory leak in taskbarbutton sample
wxTaskBarButton::RemoveThumbBarButton() removes the button but does not
delete it. In the sample removed buttons must be deleted manually
because they are also removed from m_thumbBarButtons which automatically
deletes the stored buttons in its destructor.

Closes https://github.com/wxWidgets/wxWidgets/pull/778
2018-04-09 12:41:03 +02:00
Vadim Zeitlin
457ba4ace5 Merge branch 'filters-in-archive-sample'
See https://github.com/wxWidgets/wxWidgets/pull/770
2018-04-05 18:21:43 +02:00
Vadim Zeitlin
96f9a12898 Stop resizing widgets sample pages when first showing them
The size of wxBookCtrl pages is determined by wxBookCtrl and can't be
changed, yet the sample tried to do it, making them larger than the
actually available space and cutting them off as the result.

Just stop doing this and simply layout the page using the available
space -- if there is not enough of it, that's too bad, but the user can
always resize the main window in this case.

See #4379.
2018-03-31 01:45:08 +02:00
Vadim Zeitlin
6da3c3c34d Add support for using filter streams in the archive sample
Allow using wxZlib{Input,Output}Stream too, meaning that the sample can
now also work with .gz files, handling them as a degenerate (because
containing only a single file) special case of archives.

The changes here -- which should be viewed ignoring whitespace to be
actually readable -- don't modify the existing code and just add the
possibility to use a wxFilterClassFactory if there is no
wxArchiveClassFactory corresponding to the specified file extension.
2018-03-31 01:35:55 +02:00
Vadim Zeitlin
8de66bc753 Add error checks when copying data in the archive sample
Errors when writing the output data in CopyStreamData() were not
detected.
2018-03-31 01:34:35 +02:00
Vadim Zeitlin
36fe1e0f66 Initialize ArchiveApp members in ctor in the sample
No real changes, but initialize members of ArchiveApp class in its ctor
to avoid leaving them uninitialized.
2018-03-30 22:53:07 +02:00
Vadim Zeitlin
b9c10f215d Use wxScopedPtr<> instead of wxSharedPtr<> in archive sample
There is no need to use wxSharedPtr<> when ownership is not shared, use
simpler and overhead-free wxScopedPtr<> instead.
2018-03-30 22:38:03 +02:00
Vadim Zeitlin
a0cc236678 Fix typo in a message in the archive sample
No real changes.
2018-03-30 22:37:23 +02:00
Vadim Zeitlin
bf30fa7490 Include required headers explicitly in the widgets sample
Don't rely on wx/treebook.h pulling in wx/treectrl.h and wx/textctrl.h,
forward declare or include the headers declaring the classes from these
headers explicitly where needed.
2018-03-24 19:14:52 +01:00
Max Maisel
2be4724d53 Updated ribbon example program
Added Ribbon SetButtonIcon(), SetButtonText(),
SetButtonMinSizeClass() and SetButtonMaxSizeClass() examples.
2018-03-17 18:46:21 +01:00
Vadim Zeitlin
7e8fb1e294 Use border style consistently in the widgets sample
Use GetAttrs().m_defaultFlags everywhere when creating the widgets, it
was done for some but not all of them before, without any apparent
reason.

This should make setting various border styles work (for the widgets
supporting them).
2018-03-17 17:50:56 +01:00
Vadim Zeitlin
0acb119ccb Remove unnecessary empty dtors from the widgets sample
No real changes, just remove completely unnecessary lines and trailing
semicolons after them.
2018-03-17 17:24:07 +01:00
Maarten Bent
b3c25e57bc Fix warning for missing field initializers 2018-03-06 23:43:08 +01:00
Maarten Bent
3b9aeaeb2f More use of wxOVERRIDE 2018-03-06 23:31:01 +01:00
Vadim Zeitlin
2881d9875a Fix recently broken (re-)layout in the listctrl sample
This completes changes of 0873abb836 which
replaced manual layout code with sizers, but broke layout after
recreating the control in the process.

This change notably fixes the control becoming invisible, due to having
the default too small size, in non-report modes.
2018-03-04 22:42:18 +01:00
Tobias Taschner
f3f1819daf Add archive sample
This sample shows usage of wxArchiveStream and wxArchiveFactory.
It also allows for easy testing of wxArchiveStream implementations
outside of the unit tests.

See https://github.com/wxWidgets/wxWidgets/pull/730
2018-02-20 14:39:27 +01:00
Vadim Zeitlin
2ec2837f6d Update version to 3.1.2
Run misc/scripts/inc_release and rebake.
2018-02-20 00:08:01 +01:00
Vadim Zeitlin
1dc1d66fe1 Stop using Fn keys as accelerators in the widgets sample
This prevented them from being used for their usual purposes, e.g. F4
didn't open the combobox dropdown under MSW, which was annoying as it
made testing more difficult.

Just stop using the accelerators, especially as they could be only used
for less than half of pages anyhow.
2018-02-17 14:49:54 +01:00
Vadim Zeitlin
0972dece27 Catch EDITING_{STARTED,DONE} for all pages in dataview sample
This is useful to allow checking that the expected events are sent for
the custom editor in the second page of the sample too, in addition to
the standard ones used in the first page.
2018-02-04 23:43:47 +01:00
Vadim Zeitlin
1e3e5b7253 Send wxEVT_DATAVIEW_ITEM_EDITING_DONE after cancelling too
Previously this event was not sent at all if editing the item was
cancelled, e.g. by pressing Esc.

Do send it now from the generic implementation and update the sample to
show this event.

See #17835.
2018-02-04 22:58:03 +01:00
Vadim Zeitlin
48fb2b42b1 Send wxEVT_DATAVIEW_COLUMN_REORDERED in generic wxDataViewCtrl
Simply translate wxEVT_HEADER_END_REORDER into this event, which was
previously only sent by the macOS version.

GtkTreeView doesn't seem to support column drag-and-drop at all, so this
event is still never generated by wxGTK.

Closes #14297.
2018-02-04 15:45:23 +01:00
Vadim Zeitlin
2600bc34ff Put column images on the right side in generic wxDataViewCtrl
For consistency with wxListCtrl under MSW (which is the only platform
where this change has any effect, as wxHD_BITMAP_ON_RIGHT is only
supported there), put the column images on the right side in
wxDataViewCtrl too.

Closes #13350.
2018-02-04 00:14:31 +01:00
Vadim Zeitlin
0d14dd8fe0 Test disabling wxDataViewCtrl in the dataview sample
Just make it simple to verify whether disabling the control works as
expected.

See #14186.

See #17887.
2018-02-04 00:14:13 +01:00
Vadim Zeitlin
5f8f60107a Allow using wxRendererNative::DrawGauge() for vertical gauges too
It was unexpected that this method could only be used for horizontal
gauges, so make it work for the vertical ones if wxCONTROL_SPECIAL flag
is specified.

Update MSW and generic implementations and the render sample to show a
vertical gauge as well.
2018-02-03 18:46:17 +01:00
Vadim Zeitlin
3284420b09 Add a menu option to use generic renderer in the sample
This makes it easier to compare the native and generic implementations
of the functions shown.
2018-02-03 18:14:12 +01:00
Vadim Zeitlin
359eda1359 Make render sample window bigger initially
It wasn't big enough to show all of its contents.
2018-02-03 18:14:12 +01:00
Vadim Zeitlin
65589e8c68 Remove unneeded wxRendererNative::GetDefault() in render sample
This method is used to illustrate the difference between the default and
the overridden GetHeaderButton() implementations, but doesn't need to be
used for any other methods, that are not overridden in MyRenderer.

No real changes, but just make the code shorter and less confusing.
2018-02-03 18:14:12 +01:00
Vadim Zeitlin
94620f6c59 Use simple wxEVT_SEARCH[_CANCEL] names for wxSearchCtrl events
The old wxEVT_SEARCHCTRL_{SEARCH,CANCEL}_BTN event names were unwieldy
and misleading because both of these events can be generated without
using the buttons, but by pressing Enter or Esc (the latter currently
works under macOS only, but this could change in the future).
2018-01-30 02:03:48 +01:00
Vadim Zeitlin
e5a1931b64 Log wxEVT_TEXT events for wxSearchCtrl in widgets sample
This is useful to check that these events are generated under all
platforms.
2018-01-29 23:14:44 +01:00
Vadim Zeitlin
f079f11736 Log EVT_TEXT_ENTER events for wxSearchCtrl in the widgets sample
This is convenient for checking that the behaviour is consistent among
different platforms.

See #17911.
2018-01-29 19:40:03 +01:00
Vadim Zeitlin
21823bd37a Log focus messages for the search control in the widgets sample
This makes it easier to test various issues related to focus events for
composite controls, such as wxSearchCtrl.
2018-01-29 18:29:34 +01:00
Vadim Zeitlin
4fcc6e15b0 Use all available size for the video in mediaplayer sample
wxMediaCtrl doesn't compute its best size correctly until a video is
available and this resulted in using the best size of (0, 0) for it and
nothing being shown at all on the screen, even after starting to play a
video.

This is almost certainly a problem on its own, as there is some existing
code for updating the best size and redoing the layout of the parent
sizer when a new video is loaded, but for now just make the control
visible in the sample again by always expanding it to fill up all the
available size, as this is the smallest possible fix and this is how it
used to behave before, until 9aaa38c7c8,
which allowed to meaningfully use wxALIGN_CENTER_HORIZONTAL and wxEXPAND
together: until then, this didn't work at all, but the sample still used
wxALIGN_CENTER_HORIZONTAL by mistake, so just remove it now to restore
the original behaviour.

Closes #17917.
2018-01-28 16:35:10 +01:00
Vadim Zeitlin
f063dde4f5 Merge branch 'gtk-dyn-autocomplete'
Implement dynamic wxTextEntry autocompletion for wxGTK.

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

Closes #18061.
2018-01-27 19:28:09 +01:00
Vadim Zeitlin
a14a3de5ce Refactor min autocomplete length handling in widgets sample
Call DoUseCustomAutoComplete() function instead of using an artificial
event.

Also move the menu item in the radio group with the other
autocomplete-related commands as it's exclusive with them.
2018-01-27 01:35:47 +01:00
AliKet
18983cf538 Implement dynamic auto-completion for wxGTK
Make completion using custom wxTextCompleter work in wxGTK too.

Closes #18061.
2018-01-26 23:43:34 +01:00
Vadim Zeitlin
aaabe1cb17 Improve validate sample UI a bit
Provide an accelerator for the menu command which contains all of the
test functionality to make it simpler to test it.

Also use CreateButtonSizer() instead of creating wxStdDialogButtonSizer
manually to make the code shorter and to also ensure that the "OK"
button is correctly set up as the default one, allowing to press "Enter"
in this dialog to accept the entry on any control, which didn't work
before.
2018-01-26 14:39:57 +01:00
Vadim Zeitlin
b1e59a6d60 Add wxFloatingPointValidator::SetFactor()
This allows displaying values in percents (or also currency units and
subunits, for example) without changing the actually stored value.
2018-01-26 14:39:57 +01:00
Robin Dunn
3b22d9a56b Test wxTreeListCtrl::DeleteAllItems() in the sample
Add a menu command to invoke this method for testing.
2018-01-24 17:59:25 +01:00
Vadim Zeitlin
4a37f2dd15 Merge branch 'win_uxtheme_restructure' of https://github.com/TcT2k/wxWidgets
Don't load theme functions dynamically as it's not necessary any longer.

See https://github.com/wxWidgets/wxWidgets/pull/572
2018-01-24 00:24:38 +01:00
Vadim Zeitlin
0d77df8af1 Merge branch 'dvc-update-fix'
See https://github.com/wxWidgets/wxWidgets/pull/674
2018-01-23 15:51:08 +01:00
Vadim Zeitlin
ff1fe53d66 Merge branch 'statbox-any-label'
Add support for using any wxWindow (and not just the equivalent of
wxStaticText) as wxStaticBox label.

See https://github.com/wxWidgets/wxWidgets/pull/650
2018-01-23 15:45:46 +01:00
Vadim Zeitlin
3cbfe25fa6 Merge branch 'mfc'
A bunch of improvements for applications using both wxWidgets and MFC.
2018-01-23 15:39:00 +01:00
Tobias Taschner
ddceaab001
Remove MSW wxUxThemeEngine class
This undocumented "private" class was used for various windows UxTheme
functions which are available since WinXP. As wxWidgets 3.1 is XP+ it
does not make sense anymore to load the theme functions dynamically.
2018-01-22 00:51:11 +01:00
Tobias Taschner
d6b88ca399 Add footer text and icon to wxRichMessageDialog
The underlying Windows TaskDialog supports adding an additional footer
to the message dialog. This makes the native functionality available
and implements it in the generic version.

See https://github.com/wxWidgets/wxWidgets/pull/573
2018-01-20 16:53:13 +01:00
Vadim Zeitlin
0a966eb145 Merge branch 'xrc-text-escape'
Miscellaneous improvements for handling mnemonics in XRC.

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

Closes #18033.
2018-01-18 00:23:18 +01:00
Vadim Zeitlin
77c7c80696 Update modified items in generic wxDataViewCtrl immediately
Recent optimizations avoiding resort on item change (see
https://github.com/wxWidgets/wxWidgets/pull/642) have also optimized
away refreshing the modified item, which was done implicitly, as a side
effect of resorting, before, so the changes were not reflected on
display immediately any longer.

Fix this by simply refreshing the item explicitly and also add a way to
test for the correct behaviour in the sample.
2018-01-16 13:12:43 +01:00
John Roberts
52e71680ea Fix grid sample OnGridRender()
Destroy current "frameRender" when creating a new render.

Make bitmap and frame size equal.

Closes https://github.com/wxWidgets/wxWidgets/pull/673
2018-01-15 13:24:18 +01:00
Vadim Zeitlin
ae4dd59719 Merge branch 'cmake-fixes' of https://github.com/MaartenBent/wxWidgets
Miscellaneous improvements to CMake build system.

See https://github.com/wxWidgets/wxWidgets/pull/666
2018-01-14 03:10:13 +01:00
Maarten Bent
573e887a4c CMake: Fix building and running samples
Add missing header, source and resource files.
Add missing data files (font), remove deleted data files (help).
Fix specifying xrc sample data files.
Remove WXUSINGDLL check from dialogs sample, it is not defined in e.g. static gui build.
2018-01-11 22:09:37 +01:00
Vadim Zeitlin
bc2c9ce2a3 Fix misspelling of a label in XRC docs and example
It was spelt in 2 different ways, neither of which was actually correct.
2018-01-11 01:19:16 +01:00
Vadim Zeitlin
6bd8cb964b Really remove removed files from the help sample
This does what 1c2e58cd85 tried to do
manually correctly, by updating bakefile and rebaking, and so finally
completing the changes of 961a1c2b39.

See #17962.
2018-01-10 23:44:08 +01:00
Tobias Taschner
c8b6ca308b Update year in copyright notices to 2018
Use 2018 instead of 2017 (mostly in version info files).

See https://github.com/wxWidgets/wxWidgets/pull/661
2018-01-05 19:51:47 +01:00
Vadim Zeitlin
d332ccfd6f Add support for wxStaticBoxSizer "windowlabel" property to XRC
Allow specifying arbitrary windows as labels for the static boxes
created from XRC.

Note that wxStaticBox XRC handler itself wasn't updated to support this,
as this handler seems to be quite useless because it's impossible to
define any box children with it, so only wxStaticBoxSizer XRC handler
really matters, anyhow.
2018-01-04 22:58:50 +01:00
Vadim Zeitlin
f32edbe1fc Test wxTE_PROCESS_TAB support on text page of widgets sample too
Do it for completeness and symmetry with the already existing checkbox
enabling wxTE_PROCESS_ENTER.
2017-12-25 18:45:06 +01:00
New Pagodi
a636141b56 Use consistent letter case in log message strings 2017-12-24 18:25:26 -06:00
New Pagodi
0fa033df61 Remove newline characters from log message strings 2017-12-24 18:24:45 -06:00
New Pagodi
d3fd17db04 Use wxAutoBufferedPaintDC to reduce flicker with wxMSW 2017-12-24 18:24:05 -06:00
New Pagodi
ca1b76ba49 Set a minimum size for MyGestureFrame 2017-12-24 18:23:13 -06:00
Vadim Zeitlin
4a4d164319 Keep attributes after recreating static controls in widgets sample
Preserve the colours, font etc after recreating the widgets to
facilitate testing.
2017-12-24 22:38:10 +01:00
Vadim Zeitlin
67225fb07e Remove borders from wxStaticBoxSizer items in the widgets sample
This allows to see better whether the borders returned by
wxStaticBox::GetBordersForSizer() are correct.
2017-12-24 22:38:10 +01:00
Vadim Zeitlin
7c849276f8 Add support for using arbitrary windows as wxStaticBox labels
This commit implements the new feature in wxGTK and updates the sample
and the documentation.
2017-12-24 22:38:10 +01:00
Paul Cornett
49db2dc315 Add wxART_CLOSE to sample 2017-12-14 20:34:20 -08:00
Vadim Zeitlin
15d22aed82 Merge branch 'cmake'
Closes https://github.com/wxWidgets/wxWidgets/pull/330
2017-12-15 00:33:07 +01:00
Jouk
47c0aed322 Add samples/event/gestures.cpp for compilation on OpenVMS 2017-12-14 08:59:26 +01:00
Rafael Kitover
21776b16f5 regen bakefile/autoconf files based on 3559d83bc4
Run `bakefile_gen` and `sh autogen.sh` to regenerate all bakefile and
autoconf generated files with GTK+4 support from 3559d83bc4.
2017-12-12 08:48:36 -08:00
Vadim Zeitlin
acf53800fc Extract reusable part of the MFC sample in a header
Allow reusing this functionality from outside the library, it can he
useful if an MFC window needs to be embedded into a wx application (or
vice versa).

Also use a better wxEntryStart() overload as a side effect, this should,
in particular, fix the problem with command line arguments processing in
mixed MFC/wx applications pointed out in a comment in the sample
previously.
2017-12-11 21:03:17 +01:00
Vadim Zeitlin
c66c9c5ae6 Merge branch 'build_cmake' of https://github.com/TcT2k/wxWidgets
Add CMake-based build system.

Merge the original branch without any changes except for resolving the
conflict due to moving the contents of .travis.yml to a separate file by
propagating the changes done in this file since then to the new script
and rerunning ./build/update-setup-h and ./build/cmake/update_files.py
to update the file lists changed in the meanwhile.

Closes https://github.com/wxWidgets/wxWidgets/pull/330
2017-12-09 15:09:47 +01:00
Vadim Zeitlin
3e0adbf541 Merge branch 'gesture-events'
Integrate GSoC 2017 work by Prashant Kumar implementing support for
gesture events.

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

Closes https://github.com/wxWidgets/wxWidgets/pull/565
2017-12-02 18:46:53 +01:00
Vadim Zeitlin
9655ca9e68 Close the gestures frame too in the event sample
Make "Exit" menu item really exit the sample again instead of just
closing the main window, but possibly leaving the gestures testing
window still open and thus not really exiting the program.

Also avoid creating more than one gesture window, use the existing one
if we had already opened it.
2017-11-30 21:40:24 +01:00
Jouk
ba58172987 change max to max_ to avoid %CXX-E-AMBIGUOUSNAME, "max" is ambiguous on OpenVMS 2017-11-27 09:00:29 +01:00
Maarten Bent
a96171def4 Fix unused variable and parameter warnings in samples
These variables are only used in debug builds, causing warnings in release builds.
2017-11-25 17:52:08 +01:00
Maarten Bent
afc02a34ee More use of wxFALLTHROUGH in MSW code and samples 2017-11-25 17:52:08 +01:00
Maarten Bent
cbf13e68a2 Replace deprecated std::auto_ptr with wxScopedPtr 2017-11-25 17:00:18 +01:00
Vadim Zeitlin
778340a286 Merge branch 'private-fonts'
Add support for using application-private fonts.

Closes #13568.

Closes https://github.com/wxWidgets/wxWidgets/pull/591
2017-11-24 22:58:09 +01:00
Vadim Zeitlin
b040dab0ca Add wxUSE_PRIVATE_FONTS and drop wxHAS_PRIVATE_FONTS
Handle this feature as all the other ones and provide a configure switch
and a setup.h option to disable it if necessary, as it may be desirable
to do it, especially under Linux, to avoid extra dependency on pangoft2
if this functionality is unnecessary.
2017-11-24 22:56:17 +01:00
Vadim Zeitlin
5f5c5b8f29 Remove hard TAB from event sample bakefile
No real changes.
2017-11-22 03:05:03 +01:00
Vadim Zeitlin
7535854ec4 Embed the image into the event sample
Don't load it from the image sample directory, this doesn't necessarily
work under Unix if the image sample hadn't been built.

Just embed an XPM image directly into the sample, this is good enough
for demonstration purposes.
2017-11-22 03:05:03 +01:00
Vadim Zeitlin
842dd1cfd9 Add wxWindow::EnableTouchEvents()
Don't request touch event generation for all windows by default, this
has an inherent overhead and is not needed for 99% of the application
windows, so require calling EnableTouchEvents() explicitly to do it
instead.

Note that this requires properly initializing gesture recognizers in
wxOSX now that they're not always allocated, otherwise releasing them
when destroying the window would crash.
2017-11-22 02:24:24 +01:00
Vadim Zeitlin
bb2887930f Use wxPoint instead of (x,y) pair in wxPanGestureEvent
Using higher level objects makes the code generating and using this
event shorter and more clear.
2017-11-21 17:45:34 +01:00
prashantkn94
261b04b5a3 Merge multi-touch gestures event branch
This is a squashed commit of the SOC2017_GESTURES branch from
https://github.com/prashantkn94/wxWidgets.git

Closes https://github.com/wxWidgets/wxWidgets/pull/551
2017-11-17 18:06:06 +01:00
Vadim Zeitlin
317470a39a Use "max" instead of 100 in the progress dialog sample code
No real changes, just don't hardcode 100 as we have a symbolic constant
for it here already.
2017-11-16 01:35:52 +01:00
Vadim Zeitlin
814a674531 Speed up the sample progress dialogs in the sample
Just make them finish faster, it's too boring to wait for them to do it
when testing when they take so long.
2017-11-16 01:35:50 +01:00
Vadim Zeitlin
3b4a71c4dc Allow testing wxGenericProgressDialog in the dialogs sample too
Add the possibility to test the generic implementation of the class when
we use the native one by default, this is useful to allow comparing the
behaviour of the two classes.
2017-11-16 01:35:49 +01:00
Vadim Zeitlin
0473d14ef1 Make wxProgressDialog::Fit() work in native MSW version
This method is supposed to adjust the dialog size to its contents and
while the dialog increases automatically when using native
implementation under MSW, it doesn't shrink back on its own and so it's
still useful to allow Fit() to do it.

Update the sample to test Fit() too.
2017-11-16 01:35:49 +01:00
Vadim Zeitlin
0736bdfb28 Prevent constant size changes in native MSW wxProgressDialog
MSW implementation of wxProgressDialog adjusted the dialog size to the
size of the message shown in it on each update, resulting in visually
unpleasant constant jumping around (this is the same problem that we
used to have in wxGenericProgressDialog long time ago, see #10624).

Minimize this by using TDM_UPDATE_ELEMENT_TEXT instead of
TDM_SET_ELEMENT_TEXT for changing the element text. This still increases
the dialog size if the new element text is longer than the old value,
but at least doesn't shrink it back if it is shorter, which is already
quite an improvement.

Notice that this change requires using TDF_EXPAND_FOOTER_AREA style, as
otherwise the expanded information can't be updated without a re-layout.
But this doesn't seem to be a big loss and it's not really clear why did
we explicitly clear this flag before anyhow.

Update the dialogs sample to make it easy to test for this behaviour and
the documentation to mention MSW version peculiarities.
2017-11-16 01:35:48 +01:00
Paul Cornett
21620da3e5 Move GTK3 wxNO_BORDER handling to wxControl
So wxNO_BORDER works with other controls, such as wxBitmapButton.
Also use GTK prefix on ApplyCssStyle(), and add an overload that
creates the GtkCssProvider.
2017-11-15 10:51:38 -08:00
Vadim Zeitlin
d3b033f432 Allow webview sample to build without wxSTC
There doesn't seem to be any special reason to use wxStyledTextControl
in this sample and doing it unconditionally breaks the build with
--disable-stc, so use wxTextCtrl instead in this case.

Closes #17998.
2017-11-14 00:09:08 +01:00
Vadim Zeitlin
283f5a4d56 Remove useless wxFont::ActivatePrivateFonts()
Just "activate" the font immediately when adding it using
AddPrivateFont(), nothing seems to be gained from having two functions
and it just makes things more complicated both when implementing and
when using the API.
2017-11-13 22:29:30 +01:00
Vadim Zeitlin
5d134711a1 Add BUNDLE_FONT_RESOURCES and use it in font sample
Allow copying font files to the Fonts subdirectory of the app bundle,
private fonts can only be loaded from there under macOS currently.
2017-11-13 22:29:29 +01:00
Vadim Zeitlin
4145a30e06 Report errors if using private font fails in the font sample
Give more information instead of just silently not showing the
corresponding menu item.
2017-11-13 22:29:28 +01:00
Arthur Norman
547e40b114 Add support for loading fonts from files.
wxFont::AddPrivateFont() can now be used to load a font from a file for the
applications private use. Update the font sample to show this.

Closes #13568.
2017-11-13 22:29:28 +01:00
Vadim Zeitlin
b130595975 Remove accidental global variable from the font sample
This variable was never used and appears to have been created
accidentally, so just remove it and avoid variable shadowing warnings
from MSVS 2015 when building the sample.
2017-11-07 18:28:54 +01:00
Tim S
1c2e58cd85 Remove cp commands copying removed files from help sample
Just remove the commands copying files that were removed in
961a1c2b39 themselves too.

See #17962.
2017-11-05 16:47:25 +01:00
Vadim Zeitlin
7e0b6d4d81 Merge branch 'webview-js-retval'
Integrate GSoC 2017 work by Jose Lorenzo on allowing returning values
from JavaScript code via wxWebView::RunScript().
2017-11-04 16:07:51 +01:00
Vadim Zeitlin
e70fc11ef1 Replace CppUnit with Catch for unit tests
Drop the legacy CppUnit testing framework used for the unit tests.
Replacing it with Catch has the advantage of not requiring CppUnit
libraries to be installed on the system in order to be able to run
tests (Catch is header-only and a copy of it is now included in the
main repository itself) and, in the future, of being able to write
the tests in a much more natural way.

For now, however, avoid changing the existing tests code as much as
[reasonably] possible to avoid introducing bugs in them and provide
the CppUnit compatibility macros in the new wx/catch_cppunit.h header
which allow to preserve the 99% of the existing code unchanged. Some
of the required changes are:

 - Decompose asserts using "a && b" conditions into multiple asserts
   checking "a" and "b" independently. This would have been better
   even with CppUnit (to know which part of condition exactly failed)
   and is required with Catch.

 - Use extra parentheses around such conditions when they can't be
   easily decomposed in the arrays test, due to the use of macros.
   This is not ideal from the point of view of messages given when
   the tests fail but will do for now.

 - Rewrite asserts using "a || b" as a combination of condition
   checks and assert macros. Again, this is better anyhow, and is
   required with Catch. Incidentally, this allowed to fix a bug in
   the "exec" unit test which didn't leave enough time for the new
   process to be launched before trying to kill it.

 - Remove multiple CPPUNIT_TEST_SUITE_NAMED_REGISTRATION() macros,
   our emulation of this macro can be used only once.

 - Provide string conversions using Catch-specific StringMaker for
   a couple of types.

 - Replace custom wxImage comparison with a Catch-specific matcher
   class.

 - Remove most of test running logic from test.cpp, in particular don't
   parse command line ourselves any longer but use Catch built-in
   command line parser. This is a source of a minor regression:
   previously, both "Foo" and "FooTestCase" could be used as the name of
   the test to run, but now only the latter is accepted.
2017-11-02 01:53:16 +01:00
Vadim Zeitlin
46fa106b10 Demonstrate using wxWebView::SetPage() in the sample
This allows to verify, at least interactively, that the expected events
are generated when using SetPage() too, and not only LoadPage().
2017-10-22 23:38:12 +02:00
Vadim Zeitlin
49401c960c Use HTTPS by default in the webview sample
This allows the sample to load the initial page when built using macOS
10.11 or later SDK which enables "app transport security" (ATS), which
prevents HTTP connections by default.
2017-10-22 23:38:10 +02:00
Vadim Zeitlin
732cb97af3 Don't prompt before running canned JavaScript in the sample
This is more annoying than helpful, just run the script without
prompting and do remember the last snippet we ran to show it in the
interactive "Run Script" dialog later if necessary.
2017-10-22 23:37:38 +02:00
Vadim Zeitlin
b0d2375941 Revert "Changed url on webview sample"
This reverts commit 92ae25ec3c240217f5584372abadaabedd3952df.

There doesn't seem to be any good reason to use wiki.wxwidgets.org
instead of the main site.
2017-10-22 23:37:34 +02:00
Vadim Zeitlin
b66632fc6d Simplify RunScript()-related code in webview sample
There is no need to pass "result" to this function when it's never used
outside of it.

And it can use the correct message depending on the value of its input
instead of having to provide it in the caller.
2017-10-22 23:37:20 +02:00
Vadim Zeitlin
ce0de68f13 Fix recurring "messege" typo in webview sample 2017-10-22 23:37:16 +02:00
Jose Lorenzo
af8f7f33c3 Merge wxWebView JavaScript improvements branch
This is a squashed commit of the SOC2017_WEBVIEW_JS branch from
https://github.com/joseeloren/wxWidgets.git

Closes https://github.com/wxWidgets/wxWidgets/pull/538
2017-10-21 22:42:30 +02:00
Vadim Zeitlin
d5e1851a40 Merge branch 'remove-mac-res'
Remove all Mac resources and related stuff, see
https://github.com/wxWidgets/wxWidgets/pull/567
2017-10-21 22:11:42 +02:00
Vadim Zeitlin
e98d7181b5 Use wxDataViewCtrl::GetTopItem() and GetCountPerPage() in the sample
Demonstrate the use of these methods and also allow testing them easily.

See #17498.
2017-10-21 22:10:35 +02:00
Vadim Zeitlin
352a06ad22 Remove old Carbon Mac resource files themselves
They are not used any longer.
2017-10-21 17:49:34 +02:00
Vadim Zeitlin
0d394eec9c Update to bakefile 0.2.11 and rebake everything
The main/only change in this version is the removal of automatic rules
using old Carbon Rez/DeRez/SetFile tools.
2017-10-21 17:42:30 +02:00
Artur Wieczorek
2f3376c4c5 Allow changing wxPG_EX_ALWAYS_ALLOW_FOCUS in propgrid sample
Add wxPG_EX_ALWAYS_ALLOW_FOCUS to the list of flags which can be changed.
2017-10-18 22:57:39 +02:00
Artur Wieczorek
19dbdca53b Rely on native double buffering by default in propgrid sample
If the platform has native double-buffering, create wxPropertyGrid
relying on it by default.
2017-10-18 22:56:44 +02:00
Paul Cornett
ed8a541463 Use wxFALLTHROUGH 2017-10-17 09:21:45 -07:00
Vadim Zeitlin
961a1c2b39 Remove unused Java class files without sources from help sample
These files didn't have any sources, don't work in any modern browser
and seem to have been completely unused anyhow, so just drop them.

Closes #17962.
2017-10-04 19:15:44 +02:00
Paul Cornett
8c353236ac Fix ifdef for TGA 2017-10-01 09:38:47 -07:00
Paul Cornett
db29d5efba Fix incorrect pointer indirection in sort callback function 2017-10-01 09:11:45 -07:00
Artur Wieczorek
53718ac4af Change alignment style dynamically for wxTextCtrl in widgets sample also under wxOSX 2017-09-25 15:51:43 +02:00
Vadim Zeitlin
f19012c62c Merge branch 'firstweekday' of https://github.com/lanurmi/wxWidgets
Add API for determining the first day of the week and use it in
wxCalendarCtrl.

Closes https://github.com/wxWidgets/wxWidgets/pull/522
2017-09-10 21:41:36 +02:00
Lauri Nurmi
e6a7a09d9d Use automatically selected first weekday by default in calendar sample
Also create a wxLocale object with wxLANGUAGE_DEFAULT so that automatic
selection has a better chance of doing the right thing across different
platforms.
2017-09-02 17:24:10 +03:00
Vadim Zeitlin
de9b6fdc9e Show the exact wxTextCtrlHitTestResult in the text sample too
In addition to showing the position returned by HitTest(), also show its
return value which is not necessarily wxTE_HT_ON_TEXT if it is not
wxTE_HT_UNKNOWN under MSW.
2017-08-25 01:03:36 +02:00
Vadim Zeitlin
0873abb836 Replace wxEVT_SIZE handler with sizers in the listctrl sample
Just simplify the code, no real changes.
2017-08-24 22:11:53 +02:00
Vadim Zeitlin
741dd542f2 Fix assert in the text sample when logging char events
Passing long argument to "%c" printf format specifier was correctly
flagged as invalid in 64 bit Unix builds where long != int.

Fix this by just making the "keycode" variable int in the first place,
there doesn't seem to be any reason whatsoever for it to be long and
this allows us to get rid of a couple of existing casts instead of
adding yet another one.
2017-08-24 14:17:33 +02:00
VZ
c93b88af39 Build samples in parallel with "make -jN"
Building samples one by one has become a significant pessimization
nowadays, when multicore machines are much more common than single core
ones, so get rid of the shell loop which built the samples one by one
and use make targets to let make build as many targets at once as
desired.

Closes https://github.com/wxWidgets/wxWidgets/pull/536
2017-08-15 19:16:27 +02:00
Vadim Zeitlin
3654a12d6a Fix xrc sample build with wxUSE_GIF==0
Also check for wxUSE_XPM for consistency.
2017-08-14 01:23:08 +02:00
Vadim Zeitlin
7e80ff4ed8 Merge branch 'i18n-context'
Closes https://github.com/wxWidgets/wxWidgets/pull/530
2017-08-09 20:47:41 +02:00
Vadim Zeitlin
91385acd5d Rename context-specific translation macros and document them
Try to use more clear names for the macros and also try to make the
sample more self-explanatory.
2017-08-09 14:21:47 +02:00
Artur Wieczorek
111ff4e618 Add presentation of text alignment in wxTextCtrl to widgets sample
Added an option to choose text alignment styles for wxTextCtrl presented
in the sample.
2017-08-03 21:09:40 +02:00
Artur Wieczorek
e426411e34 Allow setting wrap styles only for multi-line wxTextCtrl (widgets sample)
Wrap styles are not applicable to the single-line control and radio box
to select these styles should be disabled when single-line control is
active.
It looks that it was intended to implement this feature with
TextPage_WrapLines constant and OnUpdateUIWrapLinesCheckbox handler so we
can reuse these elements.
2017-08-02 23:41:40 +02:00
Artur Wieczorek
794e1b275b Add presentation of wxTextCtrl's wxTE_NO_VSCROLL style in widgets sample
Added an option to set/unset wxTE_NO_VSCROLL style for wxTextCtrl presented
in the sample.
2017-08-02 23:06:25 +02:00
RickS
205841d6c4 Test sample for context-sensitive translations 2017-07-27 13:23:19 +02:00
Cătălin Răceanu
305ff51314 Add check for wxUSE_EXTENDED_RTTI to the xti sample header
The sample requires wxUSE_EXTENDED_RTTI to be enabled, and that is correctly signalled
in the source files. Just avoid the header flooding the output with errors.

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

* Removed BOM.
2017-07-20 00:20:25 +02:00
Vadim Zeitlin
ca96abd119 Remove more hard-coded wxSpinCtrl sizes from the aui sample
This should have been part of 672cf7d199
and is done for the same reason: hard-coding control width to 50
truncates it under wxGTK3 as it's much wider than this there.

Closes #17919.
2017-07-19 21:04:20 +02:00
Vadim Zeitlin
2fffbde096 Change wxSecretStore API to allow retrieving the username
The old API didn't make any sense for the most common case when both the
user name and password need to be stored, as it required providing the
user name as input, which couldn't work (but somehow this went
unnoticed for more than a year...).

Fix this by returning the username, and not only the password, from
Load() instead of taking it as parameter and removing this parameter
from Delete() as well.

Also improve the documentation, notably include a simple example of
using this class.

Notice that this is a backwards-incompatible change, but the old API was
really badly broken and didn't appear in 3.1.0 yet, so the breakage is
both unavoidable and, hopefully, shouldn't affect much code.
Nevertheless, a special wxHAS_SECRETSTORE_LOAD_USERNAME symbol is added
to allow testing for it if necessary.
2017-07-17 18:26:20 +02:00
Artur Wieczorek
afdb7eca87 Use quotes and not angle brackets around the includes of wxWidgets itself 2017-07-16 18:31:54 +02:00
Vadim Zeitlin
101509eb4b Simplify platform differences handling in the preferences sample
Use an alternative and arguably simpler (at least with real-life
applications, where settings are somewhat more complex) way of handling
the differences between platforms in the preferences sample: instead of
executing completely different code under different platforms, always
update the local copy of the settings immediately and just propagate, or
not, it to the application-level settings depending on the current
platform.

This costs an extra copy of the settings object on each change, but this
shouldn't be a problem in practice, and OTOH results in using mostly the
same code under all platforms, reducing the probability of
platform-specific bugs and avoiding any code duplication between the
event handlers and TransferDataFromWindow().
2017-07-11 23:46:27 +02:00
Vadim Zeitlin
552c942a76 Actually show settings changing in the preferences sample
Make the sample slightly more realistic by adding a MySettings struct whose
fields are updated the dialog and also make it more visual by showing the
current values of (some) settings on the screen.
2017-07-11 23:23:32 +02:00
Vadim Zeitlin
6de9a284a7 Use Bind() instead of Connect() in preferences sample
This makes the code shorter and more clear.
2017-07-11 23:23:32 +02:00
Vadim Zeitlin
18f3992801 Just fix a typo in the preferences sample
"Use" and not "User".
2017-07-11 23:23:32 +02:00
Stefan Csomor
a6ba2245ef Redo Use implicit wxColour to wxBrush conversion 2017-06-28 07:22:54 +02:00
Stefan Csomor
526889dc57 Properly initialize newly created wxGraphicsContext with window background color 2017-06-26 08:40:09 +02:00
Dimitri Schoolwerth
07c8f15e43 Fix 'destionation' typos
Rename relatively new enum value wxTASKBAR_JUMP_LIST_DESTIONATION to
wxTASKBAR_JUMP_LIST_DESTINATION as well as a private function containing
the same typo.
2017-06-21 22:51:57 +04:00
Artur Wieczorek
528c559953 Fix pagination in stc sample
1. Fix setting page size if printing is done in the landscape mode.
2. Store ranges of printed characters for all pages (not only recent page)
while doing pagination (in GetPageInfo) to allow printing pages (with
OnPrintPage) in any order (not only sequentially).

Closes #17107.
2017-05-26 00:29:05 +02:00
Artur Wieczorek
8f8534361c Set default print data in stc sample
Basic paper parameters should be initialized with default values to allow
paginating a document even if paper settings are not yet explicitly set by
invoking "Print Setup" dialog.

See #17107.
2017-05-26 00:28:33 +02:00
VZ
d2c2274baa Merge pull request #478 from stahta01/staging
Fix wxGTK/Win32 build with "--disable-wxdib".
2017-05-22 00:25:03 +02:00
Prashantkn
bf5a564c9a Remove unused variables in svgtest.cpp Sample 2017-05-09 21:41:57 +02:00
Tim S
2d0ac3d027 Added wxUSE_WXDIB guard to Toolbar sample. 2017-05-08 09:49:01 -04:00
Artur Wieczorek
88b1699b69 Add demonstration of wxRearrangeList to widgets sample
Add wxRearrangeList as another option on wxListBox page.
2017-04-28 21:05:46 +02:00
Scott Talbert
cbe0a1f049 Add support for WebKit2GTK+ in wxWebView 2017-04-22 20:00:48 +01:00
Václav Slavík
60bd6842e4 Fix handling of ampersands in wxDataViewCtrl markup
Handle "&amp;" in exactly the same way as "&" in wxMarkupParser, i.e. do not
map the former to "&&" to prevent it from being interpreted as a mnemonic as
this is incompatible with using markup for anything but the control labels,
e.g. for wxDataViewCtrl items text, in which mnemonics are not recognized.
And even when using markup for control labels, it was a questionable decision
as it's really not clear at all why should the XML entity and the raw
character itself be handled differently.

Also split wxMarkupText into two classes, wxMarkupText that handles
mnemonics in the markup (which is typically a label) and a very
similar, but not derived, wxItemMarkupText that handles mnemonics-less
markup for list etc. items, uses DrawItemText() and supports
ellipsizing.

Illustrate the use of ampersands in the dataview sample.
2017-04-07 18:45:39 +02:00
Vadim Zeitlin
a05b1f39f5 Merge branch 'svg-sample'
Improve the UI and code of this sample.

Closes #14663.
2017-04-01 18:28:10 +02:00
Vadim Zeitlin
4325472e97 Use symbolic constants instead of hardcoded numbers in svn sample
It would arguably be even better to use different derived classes for
different operations instead of doing everything inside a single class with a
big "switch", but this would require more time, so for now at least make the
code slightly more understandable and maintainable.

This also results in using useful names for the files being saved by default
instead of just "SVG Test #" used before.
2017-04-01 18:26:16 +02:00
Vadim Zeitlin
5fb77c4c78 Credit Prashant Kumar Nirmal as svg sample author 2017-04-01 18:26:06 +02:00
Vadim Zeitlin
672cf7d199 Don't hardcode wxSpinCtrl size in the aui sample
This makes it too small when using GTK+ 3.22, resulting in GTK+ debug messages
about not having enough space for it -- and is, of course, wrong anyhow, as we
should always let controls determine their own best size.
2017-04-01 15:48:53 +02:00
Vadim Zeitlin
b7822ff511 Get rid of unnecessary helper function in the svg sample
No real changes, just remove the trivial CreateNewPage() function which made
the code less clear without any real gain.
2017-03-31 17:15:03 +02:00
Vadim Zeitlin
3745f2c771 Remove unnecessary check for null notebook page
A non-empty notebook always has a non-null current page.
2017-03-31 17:13:44 +02:00
Vadim Zeitlin
9eb62000f9 Simplify layout of the svg sample
Get rid of the panel and the sizer, neither of them are necessary when we have
a single control (wxNotebook in this case) taking up the entire frame client
area.
2017-03-31 17:12:39 +02:00
Vadim Zeitlin
fe562d8bcd Avoid ugly cast in the svg sample
Just use wxLogStatus() instead of manually setting the status text, as this
also allows to get rid of wxUSE_STATUSBAR checks (wxLogStatus() is always
declared and just does nothing in this case).
2017-03-31 17:11:27 +02:00
Vadim Zeitlin
367cf2da5c Fix a few whitespace problems in the svg sample
No real changes, just consistently use spaces after "//" and on both sides of
the assignment operator.
2017-03-31 17:07:12 +02:00
Vadim Zeitlin
70e01a6849 Use quotes, not angle brackets, for wx header in svg sample
Samples are part of wxWidgets and use quotes for including wx headers to
indicate that they're part of the same tree and not global headers, so just
follow the same convention here.
2017-03-31 17:04:56 +02:00
Vadim Zeitlin
331ba71d4e Remove unnecessary wx/vector.h inclusion from the svg sample
Nothing uses wxVector<> here.
2017-03-31 17:03:33 +02:00
Vadim Zeitlin
4b7d3561d9 Use standard menu IDs in the "svg" sample
Don't define our own ID_XXX when the standard ones will do.

Use wxID_SAVE instead of wxID_SAVEAS just because the former has a standard
accelerator (Ctrl-S) while the latter does not, at least under MSW, and it's
convenient to have one.
2017-03-31 17:01:10 +02:00
Vadim Zeitlin
4aa2a84ac5 Remove the now unused icons from the svg sample
Since these bitmaps are not used in the sample toolbar any more, they're not
needed at all now.
2017-03-31 16:58:19 +02:00
Prashant Kumar Nirmal
e2fbfb693f Improve "svg" sample UI to make using it less troublesome
The sample forced the user to use the menu "Open" command several (up to 8!)
times to get to a particular page which was inconvenient and confusing,
especially because more than 8 windows could be opened.

Fix both problems by just creating a notebook with 8 pages, each corresponding
to a particular test.
2017-03-31 16:55:23 +02:00
Artur Wieczorek
716f42b416 Fix drawing sample compilation when wxUSE_GRAPHICS_CONTEXT==0
'File_ShowGraphics' constant is not defined in this case so it cannot be referred to.
2017-03-25 21:00:51 +01:00
Artur Wieczorek
4aed8cd0be Fix harmless warnings in samples (wxGTK)
Under wxGTK, wxAboutBox with no parent raises a warning "GtkDialog mapped without a transient parent".
2017-03-20 23:32:52 +01:00
Kelvin Lee
c4f6cf21dc Use canonical format for MSVS project/solution files
Use the same format as is used by MSVS itself to avoid spurious changes when
modifying the files. Notably:

- Use DOS end of line format (0D 0A).
- Add UTF-8 BOM (EF BB BF) to the beginning of the files.
- Do not put CR LF at the end of the last line in the file.

Closes https://github.com/wxWidgets/wxWidgets/pull/440
2017-03-18 15:14:26 +01:00
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