Commit Graph

6264 Commits

Author SHA1 Message Date
Paul Cornett
8649f2548e Avoid some deprecation warnings from GTK2 headers 2020-04-19 11:09:09 -07:00
Artur Wieczorek
491b68f7be Get rid of unused member variable 2020-04-19 00:43:49 +02:00
Artur Wieczorek
8e2d1fb221 Change buttons layout in propgrid sample
To make the buttons more visible.
2020-04-19 00:41:19 +02:00
Artur Wieczorek
a39aff4018 Refactor setting main frame size in propgrid sample
Determine and set main frame size on creation.
2020-04-19 00:39:38 +02:00
Artur Wieczorek
d9f8eec602 Refactor propgrid sample
Simplify implementation by creating panel and sizer holding wxPG instance
only once in FormMain ctor.
2020-04-19 00:33:52 +02:00
Artur Wieczorek
81f8e8d742 Call static member function with scope resolution operator 2020-04-19 00:23:14 +02:00
Vadim Zeitlin
efa302c577 Improve wxMenu::Break() documentation and show it in the sample
Document that this method only actually does something in wxMSW.

Demonstrate the use of it in the menu sample.

See #18692.
2020-04-18 00:43:09 +02:00
Vadim Zeitlin
42a756d5fe Merge branches 'auidemo' and 'auibarmsw' of mimi89999/wxWidgets
Improve appearance of disabled AUI buttons

Use wxSYS_COLOUR_GRAYTEXT for the disabled buttons, it works better in
non-default themes.

Also show how a disabled button looks like in the aui sample.

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

See https://github.com/wxWidgets/wxWidgets/pull/1803
2020-04-17 23:56:54 +02:00
Vadim Zeitlin
f1714b3d69 Merge branches 'fix-autoconf-libdir-order' and 'autoconf-avoid-libinotify-freebsd'
Fix issues with FreeBSD build: use just built, instead of already
installed, libraries (this one is not really FreeBSD specific) and use
kqueue even if sys/inotify.h is available but inotify itself isn't (at
least without linking with an extra library).

Closes #18729.
2020-04-16 15:02:12 +02:00
Vadim Zeitlin
a5a7641616 Merge branch 'grid-selection-refactoring'
Completely overhauled selection handling in wxGrid.

Make various ways of extending selection (using Shift-arrow keys,
Ctrl-Shift-arrows, Shift-click etc) work as expected from the user point
of view instead of producing various bizarre results. Also improve
row/column header click selection as well as Ctrl/Shift-Space handling.

Internally, store selection as just a vector of blocks, independently of
the selection mode, and provide a simple API for iterating over it which
remains usable even with selections containing millions of cells (as
long as they're still composed of only a few blocks, which is the case
in practice).

Add more tests and add display of the current selection to the sample.

See https://github.com/wxWidgets/wxWidgets/pull/1772
2020-04-15 18:10:08 +02:00
mimi89999
87171a103a
Add disabled auibar item to auidemo 2020-04-15 14:33:09 +02:00
Vadim Zeitlin
47d881b683 Fix order of -L options in autoconf makefiles
Put linker flags determined by configure after -L$(LIBDIRNAME) option
pointing to the directory containing the libraries being built, to
ensure that we link with these libraries rather than any wx libraries
globally installed in the system, as could be the case since the changes
of ec091c9f2b (Don't override CFLAGS etc in configure-generated
makefile, 2020-02-02).

See #18729.
2020-04-15 02:33:53 +02:00
Artur Wieczorek
b039ff1822 Adjust bitmap size to the wxPropertyGrid cell size
Bitmap inserted into the wxPG cell should be automatically rescaled while
drawing to let us using bitmaps of any size.
2020-04-13 19:47:37 +02:00
Vadim Zeitlin
30eaa28de5 Rename wxGrid::GetSelectionRange() to GetSelectedBlocks()
This seems to be more consistent with the existing functions and doesn't
create ambiguity with a grid range.

Also rename wxGridSelectionRange to just wxGridBlocks as, in principle,
this class could be used for iterating over any blocks, not just the
selected ones.

No changes in functionality, this is just a renaming.
2020-04-12 02:38:37 +02:00
Vadim Zeitlin
b095e67ac3 Show more detailed information about selection in the grid sample
Show the selected cells/rows/columns/blocks instead of just showing
their number, as we now have an efficient (i.e. taking time proportional
to the number of selected blocks and not to the number of the individual
cells, rows or columns) way of doing this.

See #2576.
2020-04-12 02:38:37 +02:00
Maarten Bent
362fe04b0f Fix previous local declaration warning in wxRegKey sample 2020-04-10 00:51:17 +02:00
Artur Wieczorek
435764ee61 Display toolkit information in wxPG sample About box
This may help in diagnostics.
2020-04-07 17:20:03 +02:00
Vadim Zeitlin
706c8e8ad6 Merge branch 'disable-native-animation'
Allow the generic animation classes to be used on all platforms.

See https://github.com/wxWidgets/wxWidgets/pull/1768
2020-04-07 00:40:45 +02:00
Vadim Zeitlin
d9b1ca54ca Stop deriving native wxGTK wxAnimationCtrl from generic one
This is unnecessary and confusing.
2020-04-06 01:09:36 +02:00
Vadim Zeitlin
b08db49bf6 Make wxAnimationImpl private and get rid of wxAnimationImplType
Simplify and streamline animation classes relationship: wxAnimation is
the only public class representing an animation and it can be created by
both the native wxAnimationCtrl and wxGenericAnimationCtrl using the new
public CreateAnimation() method.

Replace wxAnimationImplType enum with more flexible type info based
check.
2020-04-06 01:00:15 +02:00
Vadim Zeitlin
fc3669b551 Add possibility to use generic version to the animation sample
Add menu item to switch to the generic version when using the sample on
a platform where a native version is available (i.e. wxGTK) in order to
allow testing it there easily.
2020-04-05 16:56:58 +02:00
Vadim Zeitlin
ddc87d66e8 Increase the size of the windows in the grid sample
Make larger part of the grid visible initially and also show more lines
in the log window.

No real changes, this is purely cosmetic.
2020-04-05 15:51:35 +02:00
Vadim Zeitlin
43b3a3fc5b Merge branch 'grid-hidpi'
wxGrid improvements for high DPI and DPI changes

See https://github.com/wxWidgets/wxWidgets/pull/1776
2020-04-04 18:46:54 +02:00
Vadim Zeitlin
393f5c8e2b Use less arbitrary column/row sizes in the grid sample
Base the sizes on the default column/row size instead of just hardcoding
pixel, or even DIP, values.
2020-03-31 19:38:18 +02:00
Vadim Zeitlin
f48c3f1e83 Sprinkle grid sample with FromDIP() to improve its appearance
Make frame sizes and column/row sizes more appropriate for high DPI
displays.
2020-03-31 19:38:18 +02:00
Vadim Zeitlin
104733550e Use wxGridCellAttrPtr typedef
No real changes, just make the code slightly shorter.
2020-03-31 19:37:39 +02:00
Vadim Zeitlin
ca30169767 Restore overflowing for cells with non-default vertical alignment
Since the changes in a40acbb28e (Add CanOverflow function to
wxGridCellAttr, 2020-02-06), cells with non-default vertical alignment
didn't overflow any more, even if their horizontal alignment was
unchanged and still defaulted to left-aligned.

This was due to assuming that if the alignment of wxGridCellAttr itself
was different from wxALIGN_LEFT, it meant that it wasn't left-aligned,
which seems logical but is in fact false, as the alignment can also be
wxALIGN_INVALID, in which case the real alignment is taken from the
default grid attribute.

Fix this by using GetNonDefaultAlignment() to get the alignment value
effectively used and add a unit test, as well as an example in the
sample, showing that this now works correctly.
2020-03-31 19:32:47 +02:00
Vadim Zeitlin
06af121e9c Add wxObjectDataPtr::release()
This makes it possible to use wxObjectDataPtr inside functions returning
raw pointers owned by the caller, such as custom GetAttr() in the grid
sample.
2020-03-31 02:57:01 +02:00
Vadim Zeitlin
15b5a1865c Add a simple wxGrid::AssignTable() wrapper for SetTable()
In many case SetTable() is called with its takeOwnership parameter set
to true, as shown by the grid sample in which all 3 of the calls to
SetTable() set it to true, but calling it in this case is awkward, as
bare "true" in the caller is unreadable and almost invariably requires
an explanatory comment.

Improve the API by adding AssignTable(), which is the same to SetTable()
as the existing AssignImageList() to SetImageLabel(), which always takes
ownership of the table pointer.
2020-03-31 02:43:08 +02:00
Vadim Zeitlin
c6a4cc80fe Merge branch 'pmdpi-build' of git://github.com/MaartenBent/wxWidgets
Improve DPI aware builds with .vc and .vcproj files.

See https://github.com/wxWidgets/wxWidgets/pull/1769
2020-03-28 14:10:17 +01:00
Maarten Bent
343bd89b63 Rebake after changes 2020-03-27 23:15:03 +01:00
Vadim Zeitlin
bb489418b0 Number renderers using consecutive digits in the sample
This has the disadvantage of not using the same accelerators in
different wxWidgets builds, but the advantage of appearing logical to a
casual user when running the sample, while having "0, 1, 3, 4" sequence
was surprising.

Alternatively, we could always add all menu items, but disable the ones
that are not available in the current build. It could be surprising to
see "GDI+" under non-MSW systems too though.
2020-03-27 11:51:56 +01:00
Vadim Zeitlin
e7c8039d13 Simplify renderer selection in the drawing sample
Make "Use default wxGraphicsContext" part of the renderer selection
radio group and put it in correct order, as having "1, 0, 3, 4"
accelerators order in the menu was really surprising.

Remove wxEVT_UPDATE_UI handlers as they complicated things in the sample
code (which is supposed to be simple, after all) without much benefit
and arguably even added to the confusion during run-time as menu items
could both be manually selected and checked automatically.
2020-03-27 11:43:19 +01:00
Vadim Zeitlin
62bb47cfdb Use white background for drawing lines in the drawing sample
This makes the display more readable, black on red was really not ideal.

No real changes.
2020-03-27 11:39:03 +01:00
Vadim Zeitlin
99f79b4495 Revert "Run bakefile"
This reverts commit fea3d52505.
2020-03-25 02:59:07 +01:00
Robin Dunn
fea3d52505 Run bakefile 2020-03-24 14:51:51 -07:00
Vadim Zeitlin
c09fd8b59d Update copyright years to 2020
Just run misc/scripts/inc_year and commit the results.

Closes #18690.
2020-03-06 00:51:39 +01:00
Vadim Zeitlin
ec091c9f2b Don't override CFLAGS etc in configure-generated makefile
CPPFLAGS, CFLAGS, CXXFLAGS and LDFLAGS are supposed to be under
user-control and putting configure-determined options in them broke
something as simple as running "make CXXFLAGS=-Wno-some-extra-warning"
because this overrode the CXXFLAGS set by configure and required for
build.

Improve this by using WX_*FLAGS in the generated makefile and leaving
the user-controlled FLAGS alone. This is still not ideal as running
"configure CFLAGS=-DFOO" and then "make CFLAGS=-DBAR" will define both
FOO and BAR, as configure copies CFLAGS to WX_CFLAGS, and so setting it
on make command line won't override it, as it should, but this should be
a much more rare and also much less severe problem, so we should be able
to live with it for now.

Normally this commit shouldn't result in any user-visible changes, i.e.
it shouldn't break any previously working scenarios and only make some
previously broken ones work.
2020-02-11 23:19:31 +01:00
Vadim Zeitlin
5a454d373b Optionally return error message from wxSecretStore::IsOk()
This allows to give at least some explanation about why the secrets
can't be stored to the user, e.g. they could search for a message such
as

The name org.freedesktop.secrets was not provided by any .service files

to find out that gnome-keyring package needs to be installed on their
system.

Note that this change means that under Unix an attempt to connect to the
secret service is now made when wxSecretStore is constructed and not
just when it's used for the first time, as before.
2020-02-10 18:23:59 +01:00
Paul Cornett
6e52a70582 Build fix after 948ddc6e0f 2020-02-03 09:34:01 -08:00
Paul Cornett
948ddc6e0f Eliminate -Wcast-qual warnings with GCC and Clang
Use const_cast, mutable, and various other changes to avoid -Wcast-qual
2020-02-02 22:50:32 -08:00
Vadim Zeitlin
767c07c040 Merge branch 'webview-edge'
Add support for (optionally) using Edge-based wxWebView.

See https://github.com/wxWidgets/wxWidgets/pull/1700
2020-01-22 03:38:00 +01:00
Vadim Zeitlin
5d9e1ceb80 Show whether Edge backend is used in the webview sample
Allow to see at a glance whether Edge is being used or not.
2020-01-22 03:37:12 +01:00
Vadim Zeitlin
f6b79fdf8f Rebake gcc makefiles accidentally modified in this branch
Undo the changes due to the use of different version of bakefile 0.x.
2020-01-22 03:24:57 +01:00
Vadim Zeitlin
b9038a1e8c Merge branch 'msw-headerctrl' of https://github.com/MaartenBent/wxWidgets
Fix applying style of MSW wxHeaderCtrl and add tests for doing it to the
widgets sample.

See https://github.com/wxWidgets/wxWidgets/pull/1710
2020-01-19 17:49:40 +01:00
Maarten Bent
b3f259c99c Fix reverting to standard cursor in widgets sample
Don't set the cursor to wxSTANDARD_CURSOR, but set it to wxNullCursor so the
default system cursor is used.
2020-01-19 14:56:48 +01:00
Maarten Bent
a31cf55a8d Add more columns to Header control in widgets sample
Show column settings horizontally.
Fix binding to header control events after it is recreated.
2020-01-19 14:56:45 +01:00
Tobias Taschner
4ebde54d41
Only show IE specific menus in webview sample when using IE 2020-01-16 10:46:19 +01:00
Tobias Taschner
9f11abd8fc
Rename wxWebView::EnableDevTools() to EnableAccessToDevTools() 2020-01-16 09:38:35 +01:00
Tobias Taschner
bce0e65a80
Rename wxWebView::IsDevToolsEnabled() to IsAccessToDevToolsEnabled() 2020-01-15 16:22:43 +01:00