Commit Graph

6278 Commits

Author SHA1 Message Date
Vadim Zeitlin
90783fec05 Merge branch 'generic-dvc-improve-dnd'
Improve drag-and-drop in generic wxDataViewCtrl.

See https://github.com/wxWidgets/wxWidgets/pull/1836
2020-06-07 17:22:05 +02:00
Konstantin S. Matveyev
1795ecdb78 Show the proposed drop index in the dataview sample
This allows to check interactively that the proposed index is set
correctly depending on the drop position.
2020-06-07 17:21:35 +02:00
Vadim Zeitlin
f6727a17a2 Add wxAuiManager::AlwaysUsesLiveResize()
This allows to check if it's worth specifying wxAUI_MGR_LIVE_RESIZE or
not and allows to get rid of the corresponding menu item in the sample
if it doesn't do anything anyhow.
2020-05-25 18:01:09 +02:00
Stefan Csomor
609f77ff55 revert change of minimal project file in ced68e3efa 2020-05-19 16:08:57 +02:00
Stefan Csomor
ced68e3efa switching implementation because of problems under 10.15 2020-05-19 14:15:35 +02:00
Vadim Zeitlin
7158c9b5be Use Destroy() rather than delete for dialogs in the sample
Even though it doesn't make any real difference for these dialogs, we
still shouldn't delete top level windows directly and should rather call
Destroy() on them to let them be cleaned up during the next idle time
processing.

See #18747.
2020-05-03 20:21:23 +02:00
Vadim Zeitlin
fd2aea0352 Log wxEVT_DATAVIEW_ITEM_BEGIN_DRAG in the sample
Show when an attempt to start dragging an item is made, to be able to
compare the behaviour under different platforms easily.
2020-05-02 20:06:48 +02:00
Vadim Zeitlin
e6ab2391c4 Merge branch 'dvc-virtual-has-value'
Allow overriding wxDataViewModel::HasValue() to specify which cells
should, and should not, show anything.

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

Closes #18724.
2020-05-02 18:22:27 +02:00
Artur Sochirca
d1553c63ed Improve support for TABs in wxListBox under MSW
Always set the LB_USETABSTOPS style flag to achieve behaviour more
compatible with other platforms and expand TABs to align them at tab
stops positioned at every 8 characters.

Also add MSW-specific MSWSetTabStops() method allowing to customize tab
stops.

Update the documentation and the sample to demonstrate using TABs.

Closes https://github.com/wxWidgets/wxWidgets/pull/1789
2020-05-02 18:07:50 +02:00
Vadim Zeitlin
f5001e728c Rebake with bakefile 0.2.12
No real changes, just synchronize with the bakefile release used now.
2020-05-02 17:02:36 +02:00
Stefan Csomor
dc93ff1967 correcting include style 2020-04-26 15:55:51 +02:00
Paul Cornett
c5faf9cfac Avoid passing float argument for "%f" printf specifier
"%f" takes a double. Eliminates some -Wdouble-promotion warnings.
2020-04-21 11:59:36 -07:00
Jorge Moraleda
e25d869168 Added dedicated command binding of HasPage tab of DVC sample so that the radio button column has always exactly one cell checked. Before this fix this tab was incorrectly bound to the same function that controlled the ListCtrl in the third tab. 2020-04-20 17:14:13 -07:00
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
Jorge Moraleda
8b9cf87653 Added an example of overriding method HasValue in wxDataView to show how some items may not have values for some columns. 2020-04-14 17:48:47 -07: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