Commit Graph

90 Commits

Author SHA1 Message Date
Vadim Zeitlin
5ae2a8ebb8 Simplify API for extending wxListCtrl background display
Replace SetListRulesAlternateColourOnBlank() taking 2 arguments, with
the second of them being used only when the first one is true, with a
simpler but still sufficient ExtendRulesAndAlternateColour(bool).

Make the new method virtual and define it as doing nothing in
wxListCtrlBase class, so that it's still available, even if currently
not implemented, in wxMSW.

Also simplify the implementation, fix style problems and other minor
improvements.
2020-11-09 00:37:55 +01:00
Marcos
584d1ae47d Allow showing rules and background on entire wxListCtrl window
Previously they were both limited to the part occupied by the items
only, add a new method allowing to extend them to the whole client
window area.

See https://github.com/wxWidgets/wxWidgets/pull/2106
2020-11-09 00:07:53 +01:00
Tobias Taschner
1666f58bc6
Change documentation references from OS X to macOS (#1927)
Since OS X 10.12 it has been named macOS so it makes sense
to reference it in documentation as such, even when it
sometimes refers to older versions which were called (Mac) OS X.
2020-07-04 22:08:24 +02:00
Hertatijanto Hartono
8ff434c2a5 Fix typo in settings.h and wxListCtrl Class Reference
Consistently use "colour" spelling.

Closes https://github.com/wxWidgets/wxWidgets/pull/1903
2020-06-23 01:35:54 +02:00
Lauri Nurmi
96b83a1523 Make virtual lists send DESELECTED events consistently on both implementations
In the case when a listctrl is clicked outside of any item, the item is
visually deselected, and it is logical that a DESELECTED is sent.

For non-virtual lists this would happen, but for virtual lists it would
either happen or not happen depending on implementation (MSW/generic)
and mode (single/multi). From now on the DESELECTED event is always sent.
2020-05-28 10:51:58 +03:00
Vadim Zeitlin
db5cf010d7 Improve wxLIST_STATE_DONTCARE documentation
Don't say that it's MSW-specific because it's just a symbolic name for
0, and is used under all platforms if no other flags are set.
2020-01-09 16:28:00 +01:00
Artur Wieczorek
5925893eed Fix various doxygen issues in the documentation 2019-10-20 11:53:49 +02:00
Vadim Zeitlin
654bfaea31 Add wxListCtrl::IsEmpty()
Add a simple accessor for consistency with the other controls.
2019-10-08 01:20:44 +02:00
Vadim Zeitlin
66526adf7a Document issues with event handlers called when mouse is captured
Notably mention that showing modal dialogs won't work in this case.

Also link to this explanation from wxListCtrl documentation as
wxEVT_LIST_ITEM_SELECTED is one of the perhaps less expected cases in
which this problem arises.

See #9973.
2019-09-29 14:57:59 +02:00
Vadim Zeitlin
0bf223be44 Return empty rect for wxLIST_RECT_ICON for subitems without icons
It doesn't make sense to return anything else than an empty rectangle
when querying the icon rectangle of the sub-items that can't show any
icon.

Also document this behaviour, just in case it's not obvious.
2019-08-27 16:42:39 +02:00
oneeyeman1
43c519e04f Add wxListCtrl::IsVisible()
Allow checking if the given item is (at least partially) visible on
screen.

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

Closes #9949.
2019-08-05 13:46:15 +02:00
Maarten Bent
353b0aabba Add virtual function to provide virtual wxListCtrl checkbox state 2019-05-05 14:24:30 +02:00
PB
198a1efee5 Correct wxListCtrl::InsertColumn() documentation
In InsertColumn(long, const wxListItem&) a line was split inside a
referred overloaded method signature which prevented doxygen to
recognize and link the referred method.

In InsertColumn(long, const wxString&, int, int) non-existing
Insert(long, const wxListItem&) overload was referenced instead of
InsertColumn(long, const wxListItem&).

Clsoes https://github.com/wxWidgets/wxWidgets/pull/1279
2019-03-29 21:32:49 +01: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
Scott Talbert
c68e5d0617 Fix some spelling/grammar errors in documentation
Mostly replace ungrammatical "allows to do" with correct "allows doing".

Closes https://github.com/wxWidgets/wxWidgets/pull/1183
2019-01-26 03:50:47 +01:00
Vadim Zeitlin
a824ee092d Change the return type of wxListCtrl::SetItem() overload to bool
For some reason lost in the depths of time (but probably just a typo)
(but probably just a typo) (but probably just a typo) (but probably just
a typo), SetItem() overload taking the column index returned "long" and
not "bool", even though the actual return value was always "true" or
"false" (or even just always "true" in the case of the generic version).

Change it to return "bool" for consistency with the other overload and
because this just makes more sense and shouldn't break any existing code
due to the implicit conversions between bool and long.

Also document the return value meaning.

Closes #18153.
2018-06-28 00:39:31 +02:00
Vadim Zeitlin
678d1142b4 Fix typo in EVT_LIST_BEGIN_LABEL_EDIT in the documentation
"LIST" part was somehow forgotten.

Closes #18051.
2018-01-21 16:23:15 +01:00
Robin Dunn
ce8d795013 Add missing DeleteAllColumns 2017-08-29 18:15:17 -07:00
Catalin
6c9b3a8254 Improved wxListCtrl::HitTest() docs
Changes were based on the docs of LVHITTESTINFO structure
<https://msdn.microsoft.com/en-us/library/windows/desktop/bb774754(v=vs.85).aspx>
2017-05-14 22:34:31 +02:00
Robin Dunn
2fab4c4fc1 Add setter methods to wxListEvent 2016-10-21 16:54:34 -07:00
Vadim Zeitlin
70b64b8c53 Merge branch 'rename-listctrl-checkbox-methods' of https://github.com/discnl/wxWidgets
Use consistent case for wxListCtrl::{Has,Enable}CheckBoxes() methods.

Closes https://github.com/wxWidgets/wxWidgets/pull/275
2016-04-23 18:53:41 +02:00
Dimitri Schoolwerth
602111f2b3 Rename wxListCtrl::HasCheckboxes() and EnableCheckboxes()
Rename them to HasCheckBoxes and EnableCheckBoxes for consistency with
wxCheckBox naming.

See also PR https://github.com/wxWidgets/wxWidgets/pull/153
2016-04-21 15:25:10 +00:00
Vadim Zeitlin
5388c7a72e Add wxListCtrl::SetHeaderAttr()
This method can be used to change the list view header appearance.

Add the method declaration, documentation, show it in the sample and implement
it for wxMSW (only, for now).
2016-04-17 18:26:13 +02:00
Vadim Zeitlin
246ae58c19 Replace wxTreeItemAttr and wxListItemAttr with wxItemAttr
The two existing structs were completely identical, just replace them with a
single wxItemAttr.

Notice that wxDataViewItemAttr is not quite the same, although pretty similar,
so it remains separate for now. It would be nice to combine it with this one
too in the future, e.g. to make it simpler to make items bold in a wxListCtrl.
2016-04-16 19:04:52 +02:00
Vadim Zeitlin
5b2724c900 Fix return type of wxListCtrl::EnableCheckboxes() in the documentation
It returns bool, not void.
2016-02-26 20:08:20 +01:00
Tobias Taschner
baa47dc435 Drop Mac prefix on remaining instances of OS X in docs.
This should have been part of df33c0c491 but somehow where missed.
2016-02-23 13:05:44 +01:00
Tobias Taschner
d065aa85ad Update wxListCtrl::EnableCheckboxes documentation.
Method is no longer MSW only.
2016-02-23 12:57:17 +01:00
Vadim Zeitlin
3631a2d142 Merge branch listctrl-with-checkboxes
Add support for native checkboxes to wxMSW wxListCtrl.

Closes https://github.com/wxWidgets/wxWidgets/pull/153
2016-02-06 01:20:01 +01:00
Maarten Bent
9166500f30 Documentation for wxListCtrl checkboxes. 2016-01-15 20:55:32 +01:00
Troels Knakkergaard
2460410278 Add wxListCtrl::GetAlternateRowColour()
Simple accessor matching the existing setter.

Closes #17250.
2015-11-16 03:10:16 +01:00
Vadim Zeitlin
91e5a8de86 Document that wxListCtrl::SetItemState() sends events
This is an exception to the usual rule, so should be documented, do it for
both this method itself and wxListView::Select() using it.
2015-10-24 23:50:47 +02:00
Tobias Taschner
2fff3cd29f Add wxSystemThemedControl and use it in wxMSW
wxSystemThemedControl allows to use the "system theme" (i.e. the theme used by
the system applications such as file manager and which can, surprisingly, be
different from the default one). Currently it is only implemented for wxMSW
and does nothing under the other platforms.

Use wxSystemThemedControl for wxDataViewCtrl, wxListCtrl and, optionally, if
wxTR_TWIST_BUTTONS style is specified, wxTreeCtrl to give them more native
appearance under MSW.

Closes #16414.
2015-09-17 14:49:13 +02:00
Cătălin Răceanu
f3da2e27e9 Correct document of wxListView constructor.
The documented default values of constructor arguments didn't correspond to
the reality.

Closes https://github.com/wxWidgets/wxWidgets/pull/74
2015-08-18 20:03:00 +02:00
Tim Kosse
6fb1a552b8 Fix typo in documentation.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76854 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-07-06 10:05:12 +00:00
Vadim Zeitlin
01f9accd19 Remove wxPM, wxWidgets port to OS/2.
This port is not used and is not being worked on, so remove it to reduce the
amount of the code which needs to be updated for every global change.

Also remove tests for VisualAge compiler which isn't used since ages.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76533 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-05-15 23:56:58 +00:00
Vadim Zeitlin
1e0a6af966 Make "NOT the index" in wxListCtrl::SortItems() stand out even more.
Any reasonable person expects the sort callback to receive the indices of the
items, but it doesn't: it's passed the client data associated with them
instead. Make it even more noticeable in the documentation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-27 22:10:38 +00:00
Robin Dunn
d8ba2748b6 Document ctors and dtor for wxListView
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-12-29 03:22:33 +00:00
Vadim Zeitlin
9b31387508 Merge the changes from 3.0 branch.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75178 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-11-12 18:06:37 +00:00
Paul Cornett
2014950b1c spelling fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75072 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-26 18:51:16 +00:00
Vadim Zeitlin
38e392a8d6 Use wxListCtrl screenshots for wxListView as well.
wxListView appears identically to wxListCtrl in report mode and the existing
wxListCtrl screenshots show it exactly in this mode, so it doesn't make much
sense to duplicate them.

This also avoids Doxygen warnings about missing wxListView screenshots for
MSW and OSX.

See #15346.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74893 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-01 13:03:20 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
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
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
0280c08726 Use wxListColumnFormat for wxListCtrl::AppendColumn() format argument.
This is safer than using just an untyped int.

Closes #15265.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-06-29 12:52:11 +00:00
Vadim Zeitlin
ce7fe42e84 Provide shorter synonyms for wxEVT_XXX constants.
Use the same short names as are used by the event table macros for the event
type constants themselves. This makes them much more comfortable to use, e.g.
Bind(wxEVT_BUTTON) compared to Bind(wxEVT_COMMAND_BUTTON_CLICKED).

The old long names are still kept for backwards compatibility and shouldn't be
removed as it doesn't really cost anything to continue providing them, but all
new event types should only use the short versions.

Closes #10661.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-04-25 10:11:03 +00:00
Vadim Zeitlin
0ee169da2b Add wxListCtrl::EnableAlternateRowColours() and SetAlternateRowColour().
Add methods to simply enable alternative row background colours in wxListCtrl.

Closes #14618.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73239 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-22 02:33:23 +00:00
Bryan Petty
ce15461608 Fixed appearance images to use Doxygen @image command (Doxygen will now copy files automatically), and cleaned up some more overviews.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-11-03 18:32:50 +00:00
Vadim Zeitlin
f00f01b3bf Correctly document the library the classes belong to.
Many classes were documented as being in a wrong library, mostly a lot of
wxbase vs wxcore confusion but we even managed to document wxAuiManager as
being in wxbase. Correct all this.

Closes #14745, #14747.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72686 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-15 01:17:21 +00:00
Vadim Zeitlin
d01c174676 Document default argument value of wxListCtrl::EnableBellOnNoMatch().
In addition to forgetting to specify the default value in wxGenericListCtrl,
it was also not documented, do it now to complete the fix of r72654.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-11 22:29:35 +00:00
Vadim Zeitlin
d34d31f6d6 Implement incremental search in wxGenericListCtrl.
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
2012-10-07 22:42:27 +00:00
Robin Dunn
0ffc170455 Add missing interface items for listctrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-27 17:28:56 +00:00
Vadim Zeitlin
f9c2e12fff Improve wxListCtrl::SetItemState() documentation.
Better explain the meaning of its parameters.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-15 23:24:41 +00:00