Make wxGenericListCtrl used under wxGTK and wxOSX behave the same as the
native wxMSW wxListCtrl and wxTreeCtrl under all platforms and only generate
ITEM_RIGHT_CLICK events when an item was actually clicked, i.e. don't generate
them for the clicks completely outside of the client area.
Closes#4711.
Use both the contents and the header width when wxLIST_AUTOSIZE_USEHEADER is
given instead of just the latter.
Also make both wxLIST_AUTOSIZE_USEHEADER and the previously implemented
wxLIST_AUTOSIZE work efficiently for the virtual list controls by reusing
wxMaxWidthCalculatorBase already used in the generic wxDataViewCtrl.
Closes#10326.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.
If nothing else, this will make an eventual transition to Git simpler.
Closes#14487.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Mostly copy wxGenericTreeCtrl incremental search implementation to
wxGenericListCtrl (unfortunately there is no simple way to reuse this code
currently), including the recently added EnableBellOnNoMatch() method.
Update the sample to test it, the key event handling in it had to be modified
to allow it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72639 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxHAS_XXX symbols need to be checked with #ifdef, not #if.
See #1614 (as this change was part of the patch submitted there, even if the
ticket itself is unrelated).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxListCtrl::EndEditLabel() isn't available in wxUniv, it's wxMSW-only.
This fixes the sample compilation in wxUniv/MSW build.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70849 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add a special symbol which is defined only if the icons and other images (e.g.
cursor) are in the separate resource files and don't need to be embedded as
XPMs in the main program.
This makes the checks more clear and more customizable as it's enough to
change wxHAS_IMAGES_IN_RESOURCES definition instead of changing many platform
checks.
Closes#14050.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The comment in the function implied that it exchanged the items but in fact it
did not and kept their existing order instead.
Do revert them now, at least like this something visibly happens in the sample
when the items are sorted.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67734 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
As the arguments to the sort function contain the client data associated with
the items, they may be pointers and hence of greater size than long in Win64
builds. Use wxIntPtr instead of long everywhere to fix this.
Notice that this doesn't break compatibility for 32 bit code where long can
still be used as it is the same as wxIntPtr there after the previous commit.
Closes#4309.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67733 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It is definitely not necessary to call SetTopWindow() when there is only a
single top level window and it is arguable whether it's useful to do it even
when there are many of them so don't encourage its use in the documentation
and also remove all its occurrences from the samples.
Closes#12816.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66528 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There are no real changes in this commit but it removes all trailing white
space from our source files. This avoids problems when applying patches and
making diffs and it would be nice to prevent it from reappearing.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65680 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Use "wxWindows licence" and not "wxWidgets licence" (the latter doesn't
exist) and consistently spell "licence" using British spelling.
See #12165.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Standardize on using sample.rc and sample icon in all the samples, it was
confusing that some of them used it and other didn't, without any apparent
logic.
Remove the now unnecessary icon files, including the dialogs sample icon which
seemed to be corrupted (this closes#11146).
Also replace multiple OS/2 resource files with a single one in the sample
directory. The OS/2 projects/makefiles would need to be updated to use them.
Remove dialogs sample icon.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We need to update the lfags first before deciding whether we should create or
destroy the header.
Also add a test for toggling the header to the listctrl sample.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63637 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Wrong width was returned for the icon or label rectangle when querying the
first column. Fix this and add a test to the sample allowing to check this.
GetSubItemRect() still returns wrong results for second and subsequent
columns, see #11355.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775