Commit Graph

316 Commits

Author SHA1 Message Date
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
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
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
Václav Slavík
60bd6842e4 Fix handling of ampersands in wxDataViewCtrl markup
Handle "&" 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
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
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
Artur Wieczorek
bc8728b901 Implement MyCustomRenderer::GetAccessibleDescription() in dataview sample
If wxUSE_ACCESSIBILITY is set to 1, this method has to be overridden for all custom renderers.
2016-10-24 21:55:10 +02:00
Vadim Zeitlin
74c0462c84 Add wxDataViewTextRenderer::EnableMarkup()
Implement the new method to all the implementations (generic, GTK, OS X), show
it in the sample and update the documentation.
2016-06-16 00:06:23 +02:00
Vadim Zeitlin
bed710d9a7 Add wxDataViewCtrl::GenericGetHeader() accessor
And show how to use it to increase the header size in the sample.
2016-04-22 01:12:21 +02:00
Vadim Zeitlin
bed7d9fe74 Add wxDataViewCtrl::SetHeaderAttr() too
This is currently only implemented in the generic version but could be
implemented at least for GTK+ native one as well in the future.
2016-04-22 00:58:38 +02:00
Vadim Zeitlin
1bbc44daff Support background colour in wxDataViewItemAttr in wxGTK
The code handling background colour was commented out for some reason, simply
enable it as it seems to be working just fine -- and update the sample to show
that it does.
2016-03-22 17:49:49 +01:00
Vadim Zeitlin
e7c8349d9b Avoid MSVC 14 warning about variable hiding in dataview sample
The warning is harmless but it was indeed confusing to call "parent" both a
local variable and a function parameter, so don't do it.
2016-03-14 00:13:46 +01:00
Vadim Zeitlin
7eee3576cf Update version to 3.1.1
Update misc/scripts/inc_release script: remove non-existent any more files and
update the version in the MSVS 200x project files not generated by bakefile
any more and MSVS 201x project files which were not previously taken into
account.

Run it and rebake.
2016-03-03 23:23:06 +01:00
Vadim Zeitlin
7e37c6763f Test custom editor in the dataview sample
Show how to create and use a custom editor in the custom renderer.
2016-02-20 17:07:04 +01:00
Vadim Zeitlin
4379f599e8 Implement wxDataViewCtrl::SetIndent() for wxGTK
Use gtk_tree_view_set_level_indentation().
2016-02-05 17:00:57 +01:00
Vadim Zeitlin
5cce48186c Link with shlwapi.lib and version.lib under MSW
These libraries are required now that we don't load the functions from them
dynamically (see e78be14ac1)

Closes #17180
2015-10-07 18:56:33 +02:00
Hartwig Wiesmann
7feaa794bc Use available space better in wxDataViewCtrl date renderer in wxOSX.
Try to show as much useful information as possible for the available width,
notably show the time fully, including seconds, which was never done before.

Also add a date column to the dataview sample to allow seeing how this works
in practice.

See #16640.
2015-07-18 02:29:17 +02:00
Dimitri Schoolwerth
8f8d58d193 Use wx-prefixed macros throughout the repository.
Change {DECLARE,IMPLEMENT}_*CLASS and {DECLARE,BEGIN,END}_EVENT_TABLE
occurrences to use the wx-prefixed version of the macros.
2015-04-23 22:00:35 +04:00
Vadim Zeitlin
3ee12b2ca9 Convert all XPM files to Unix EOLs.
Just as the normal sources (*.h, *.cpp), these files should be using LF and
not CR LF.
2015-03-19 21:46:05 +01:00
Vadim Zeitlin
4c72988c82 Convert really all CRLF files to use LF in the git repository.
This completes the changes of c3e5751c36.
2015-03-19 21:09:08 +01:00
Vadim Zeitlin
4d9afe351a Undo the change of the number of items in dataview sample.
Increasing it to 10000000 in r77905 brought both the native GTK (see #16741)
and OSX (see #16740) wxDataViewCtrl implementation to their knees, so don't do
this.

This is, of course, just hiding the real bug, but still better than not
allowing people to run the sample at all.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78287 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-20 21:51:47 +00:00
Vadim Zeitlin
2de13dd12e No real changes, just fix some typos in comments in the samples.
Closes #16734.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78273 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-12-16 13:51:09 +00:00
Paul Cornett
1a4e398732 fix assert in dataview sample, closes #16679
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78169 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-11-21 17:20:04 +00:00
Vadim Zeitlin
2f51147732 Fix resource compiler include path for Borland.
Explicitly include $(BCCDIR)/include/windows/sdk directory in the resource
compiler options, as it needs it to find windows.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77993 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-10-11 16:30:00 +00:00
Vadim Zeitlin
b28b9d44c4 Centre columns contents vertically in dataview sample.
If we specify the horizontal alignment, we also need to specify the vertical
alignment as otherwise the right-aligned columns would be also top-aligned,
looking out of kilter with the other columns which are centered by default.

Closes #16559.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-09-27 20:46:28 +00:00