Commit Graph

342 Commits

Author SHA1 Message Date
orbitcowboy
915dcce320 Fix typo in a comment in dataview sample
No real changes, just fix a typo in "invisible".

Closes https://github.com/wxWidgets/wxWidgets/pull/1899
2020-06-20 14:44:10 +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
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
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
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
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
Maarten Bent
343bd89b63 Rebake after changes 2020-03-27 23:15:03 +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
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
334ff40716 Show wxDataViewCheckIconTextRenderer in the sample
Instead of using separate check and icon+text columns in the list model
page, use the combined check+icon+text column to verify that it works
(which is not the case current in the native Mac version).
2019-12-15 19:27:58 +01:00
Vadim Zeitlin
2e71e14dc4 Fix format specifier in an error message in dataview sample
Use "%zu" for a size_t value to avoid assert failures under LP64 (i.e.
all 64-bit Unix) systems.
2019-12-15 19:26:18 +01:00
Maarten Bent
083f4b3c32 Rename manifests to use underscores 2019-12-13 21:44:26 +01:00
Maarten Bent
bed8cd7b52 Rebake after adding DPI awareness option 2019-11-30 22:52:48 +01:00
Vadim Zeitlin
349e73994b Merge branch 'dpi-awareness-option' of https://github.com/MaartenBent/wxWidgets
Add wxUSE_DPI_AWARE_MANIFEST option allowing to choose to use a manifest
specifying per-monitor DPI awareness.

See https://github.com/wxWidgets/wxWidgets/pull/1622
2019-10-30 21:25:45 +01:00
Maarten Bent
a72c9b6dbc Run autoconf and rebake after adding wxUSE_DPI_AWARE_MANIFEST 2019-10-30 00:02:08 +01:00
Vadim Zeitlin
0a02f4c190 Increment version number to 3.1.4
Done by running misc/scripts/inc_release, manually updating version.bkl,
rebaking and rerunning autoconf.

Also a header for the next version to the change log.
2019-10-28 14:11:00 +01:00
Vadim Zeitlin
86fab39ac9 Regenerate MinGW makefiles using response files
This avoids errors due to overflowing MSW command line length when
linking monolithic library.

Closes #18135.
2019-10-06 23:04:21 +02:00
Maarten Bent
370ae40b35 Use more FromDIP for hardcoded sizes 2019-09-28 23:47:04 +02:00
Vadim Zeitlin
063b6edf68 Add a check for resetting the associated model to the sample
Verify that resetting the model doesn't result in selection change
events.
2019-09-12 23:20:20 +02:00
Vadim Zeitlin
0d005bdf02 Add wxEVT_DATAVIEW_SELECTION_CHANGED test handler to the sample
Verify that the sample is not invoked unexpectedly.
2019-09-12 23:00:14 +02:00
Vadim Zeitlin
f99b80612a Add a simple test of wxDataViewIndexListModel to the sample
This is useful to investigate inconsistencies in its behaviour between
the generic and the native GTK versions that can't be easily checked in
the automatic unit tests.
2019-09-12 18:51:36 +02:00
Vadim Zeitlin
eca006da06 Indent "case Page_VarHeight" properly
No real changes, just reindent the code.
2019-09-12 18:31:42 +02:00
Vadim Zeitlin
c715bb750b Use symbolic page numbers in the dataview sample
Make the code a bit more readable.

No real changes.
2019-09-12 18:24:03 +02:00
Vadim Zeitlin
8fbca5cb70 Remove all trailing spaces
No real changes, just clean up sources by removing trailing spaces from
all the non-generated files.

This should hopefully avoid future commits mixing significant changes
with insignificant whitespace ones.
2019-01-30 17:35:54 +01:00
Vadim Zeitlin
288d26598c Merge branch 'dvc-var-height'
Optimize generic wxDataViewCtrl performance with variable line heights.

Closes https://github.com/wxWidgets/wxWidgets/pull/1053
2019-01-16 01:25:06 +01:00
jensgoe
14ca16ffaf example for DataView with wxDV_VARIABLE_LINE_HEIGHT flag 2019-01-08 00:12:47 +01:00
Vadim Zeitlin
2340a16d18 Allow increasing the size of the last column in wxDataViewCtrl
Previously, the last column couldn't be effectively resized at all, as
its size was always automatically set to the remaining width of the
window after subtracting the widths of all the previous columns. Now
this is only done if this remaining width is greater than the width
given to the column by the user or by the program.

Effectively, this means that the user can now drag-resize the column to
increase its size (at the price of showing the horizontal scrollbar).

See #18295.
2018-12-15 14:27:52 +01:00
Vadim Zeitlin
e1185d8bf0 Increment version number to 3.1.3
Done by running misc/scripts/inc_release, manually updating version.bkl,
rebaking and rerunning autoconf.
2018-12-10 19:06:18 +01:00
Maarten Bent
eb23d4735c Fix unannotated fall-through warnings 2018-11-25 21:29:37 +01:00
Vadim Zeitlin
aafb87b40d Set the column for wxEVT_DATAVIEW_ITEM_ACTIVATED in wxGTK
The column is available in the GTK+ callback, so just pass it along to
avoid gratuitous inconsistency with the generic version.

Also update the sample to show the column value for these events.
2018-10-09 15:21:08 +02:00
Blake Eryx
b70ed2d8c8 Remove more wxT() macros from samples
Also use wxString instead of wxChar* strings.

Closes https://github.com/wxWidgets/wxWidgets/pull/950
2018-09-29 17:16:12 +02:00
Blake-Eryx
f58ea62596 Remove (most) occurrences of wxT() macro from the samples
Also replace wxChar* with wxString.

Closes https://github.com/wxWidgets/wxWidgets/pull/945
2018-09-23 01:15:08 +02:00
Vadim Zeitlin
f69dbaa1ae Introduce MSW ARM64 support
This is a preliminary ARM64 platform support for wxWidgets at "it
compiles" stage. This will allow building and testing wxWidgets based
apps for oncoming Windows 10 ARM64.

Requirements:
- Visual Studio 2017 Update 4 or later with Visual C++ compilers and
  libraries for ARM64 component installed

Building:
1. Open command prompt.
2. Change directory to build\msw subfolder.
3. Run "C:\Program Files (x86)\Microsoft Visual
   Studio\2017\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" once.
4. Use `nmake TARGET_CPU=ARM64 ...` to build required flavor of wxWidget
   libraries.

Notes:
1. Building of *.sln/*.vcxproj files does not support ARM64 yet. This
   requires to hardcode Windows SDK to 10.0.15063.0 or later in
   *.vcxproj files, which would render them non-compilable in older
   Visual Studio versions. Microsoft is aware of this issue and is
   planning a fix in the next version of Visual Studio.
2. wxmsw31ud_gl.dll does not build yet. Awaiting Microsoft to deliver
   missing opengl32.lib for ARM64. Please, specify USE_OPENGL=0.

Closes https://github.com/wxWidgets/wxWidgets/pull/923
2018-09-17 22:34:32 +02:00
Vadim Zeitlin
3ffa651a34 Move wxAdv library contents into wxCore
This basically removes the "adv" library, even though it's still
preserved for compatibility with user make/project files referring to
it.

It is done because the distinction between "adv" and "core" was never
really clear (e.g. why wxTreeCtrl was in core but wxTreeListCtrl in
adv?) and it prevented some core classes from using adv ones.
2018-08-27 21:13:04 +02:00
approach
09124932eb Add strike-through support to wxDataViewItem attributes
Implement support for this attribute only in the generic version so far,
it will hopefully be implemented for the natives ones in the future.

Also add a new toggle column to the dataview sample to check how it
works: checking the items in this column enables using this attribute
for some other ones.

Closes #18180.
2018-08-14 18:04:31 +02:00
Vadim Zeitlin
a3f6456f55 Test wxDataViewColumn::UnsetAsSortKey() in dataview sample
Add a checkbox to test the behaviour of SetSortOrder() and
UnsetAsSortKey() methods in the sample.
2018-07-28 02:17:15 +02:00
Vadim Zeitlin
03a13591b9 Add wxDataViewToggleRenderer::ShowAsRadio()
This allows showing radio buttons in wxDataViewCtrl easily and natively.

Notice that this approach, adding an extra function to the existing
renderer class instead of creating some new wxDataViewRadioRenderer (see
https://github.com/wxWidgets/wxWidgets/pull/809), was finally chosen
because it is simpler to implement and, more importantly, because it
will be more natural to generalize if/when we also add a 3-state
check/radio renderer.

Closes https://github.com/wxWidgets/wxWidgets/pull/853
2018-07-11 23:48:14 +02:00
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
2ec2837f6d Update version to 3.1.2
Run misc/scripts/inc_release and rebake.
2018-02-20 00:08:01 +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
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
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
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