Commit Graph

71 Commits

Author SHA1 Message Date
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
f95ce8d9d5 Add wxListCtrlBase::GetItemCount() pure virtual
No real changes, just ensure that all derived classes implement this
method (which already was the case).
2019-10-08 01:16:50 +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
Maarten Bent
ceaf2aa803 Move virtual stub functions to wxListCtrlBase 2019-05-05 14:23:44 +02:00
Vadim Zeitlin
a2af796156 Remove outdated comment about wxListCtrl checkboxes support
They're implemented in the generic version too, so don't say that they're
MSW-only.

No real changes.
2017-06-20 15:25:28 +02: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
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
418a96d44c Support native MSW check-boxes in wxListCtrl. 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
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
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
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
Paul Cornett
8b4ae731d3 use wxOVERRIDE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76220 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-03-30 00:02:23 +00:00
Vadim Zeitlin
6e6e6d179f Fix pointer truncation in wxListEvent::GetData() in LLP64 builds.
We must use wxUIntPtr and not long here to avoid truncating the upper half of
the pointer when sizeof(void*)>sizeof(long).

Closes #15578.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:08:40 +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
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
Vadim Zeitlin
0dc45ad6b5 Compilation fix for PCH-less build after wxListCtrlBase changes.
Include the base class declaration from wx/listbase.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70286 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 16:11:10 +00:00
Vadim Zeitlin
0fb731b8bf Add support for wxLIST_AUTOSIZE_USEHEADER to InsertColumn().
Use the fixed default width in InsertColumn() by default for compatibility but
allow more useful behaviour in it by supporting wxLIST_AUTOSIZE_USEHEADER as
well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:51 +00:00
Vadim Zeitlin
c23edb1b71 Add convenient wxListCtrl::AppendColumn() wrapper.
In the vast majority of cases, columns are just appended to the end and not
inserted at arbitrary positions in wxListCtrl so provide a convenient wrapper
to do this, especially as it's really trivial to do it now when it can be done
only once at wxListCtrlBase level.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70283 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:47 +00:00
Vadim Zeitlin
94248d2ed1 Implement best size calculation for report mode wxListCtrl.
Use the column labels to determine the minimal width required by the control
to show them all in full.

Also declare all image list and column-related wxListCtrl methods in
wxListCtrlBase now as we need some of them in DoGetBestClientSize()
implementation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:43 +00:00
Vadim Zeitlin
a9bd911fde Replace 3 copies of wxListCtrl mode tests with a single one in wxListCtrlBase.
Move InReportView() and IsVirtual() into the base class as they were the same
in all the implementations.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:37 +00:00
Vadim Zeitlin
26df5dd39a Add wxListCtrlBase common base class for port-specific wxListCtrl.
This base class is currently trivial, more methods will be moved to it from
the derived classes later.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-07 15:09:34 +00:00
Vadim Zeitlin
1e40bd4c74 Initialize wxListItem::m_itemId to -1, not 0.
Currently we have two redundant pieces of data in wxListEvent: m_itemIndex and
m_item.m_itemId. The former is initialized to -1 by default which makes sense
as it means "no item". But the latter was 0 by default which not only didn't
make sense but also made it inconsistent with m_itemIndex for the events which
really didn't have any associated item.

Fix this by initializing m_itemId to -1 as well.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70270 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-05 12:51:37 +00:00
Vadim Zeitlin
d3ca848751 Make wxListCtrl sort function take wxIntPtr, not long, arguments.
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
2011-05-13 13:30:03 +00:00
Dimitri Schoolwerth
a1b806b982 Replaced Ok() occurrences with IsOk() throughout trunk.
Additionally renamed wxOSX' private wxNativePrinterDC::Ok() function to IsOk().

Didn't deprecate the various Ok() functions: given the amount of changes already introduced in 3.0 a trivial one like this seems more suitable for after 3.0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-05-03 16:29:04 +00:00
Vadim Zeitlin
fb4079af5b fill in the fields of wxListItem in a wxListEvent before handling the event (closes #10820)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60732 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-05-24 18:04:37 +00:00
Vadim Zeitlin
b18e2046af pass wxIntPtr, not wxUIntPtr, to wxListCtrl::SortItems() callback as it's more compatible with the existing code assuming that this parameter is signed (as our own wxFileCtrl did)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60198 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-16 13:00:40 +00:00
Vadim Zeitlin
6e2f308461 use wxUIntPtr instead of long for 3rd parameter of wxListCtrl::SortItems() to allow passing pointers to it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60182 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-04-15 21:23:50 +00:00
Vadim Zeitlin
9b11752c4f require semicolon after wxDECLARE/DEFINE_EVENT() (closes #10456)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58718 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-07 18:59:25 +00:00
Vadim Zeitlin
3c77890141 add more flexible and safer template Connect() overloads (#10000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58039 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-12 14:26:13 +00:00
Vadim Zeitlin
17520c84b3 added self-assignment check to wxListItem::operator=()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56745 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-12 14:36:21 +00:00
Vadim Zeitlin
5c33522fca replace wx_{const,static,reinterpret}_cast with their standard C++ equivalents
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56644 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-02 02:39:52 +00:00
Francesco Montorsi
53a2db124c substitute WXDLLEXPORT with WXDLLIMPEXP_CORE and WXDLLEXPORT_DATA with WXDLLIMPEXP_DATA_CORE
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52834 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-26 15:06:00 +00:00
Vadim Zeitlin
b2c31e32de implement wxListItem::operator=()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-03-25 13:45:40 +00:00
Vadim Zeitlin
c058cafa56 don't use DECLARE_EVENT_TYPE() to avoid confusing people about its unused value parameter, declare the event type constants directly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51405 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-27 13:21:39 +00:00
Vadim Zeitlin
8f35356e49 initialize wxListItem::m_image to -1 (which means no image), not 0 (bug 1727909)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-06-03 22:35:40 +00:00
Vadim Zeitlin
c1dc9f8394 removed WXWIN_COMPATIBILITY_2_4 from common and wxMSW files (patch 1675546)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-03-07 11:35:04 +00:00
Paul Cornett
e409b62aaf listctrl header cleanup
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41568 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-02 17:38:30 +00:00
Vadim Zeitlin
164a797204 added wxListCtrl::GetSubItemRect() and subitem hit testing (patch 1476971)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-05-28 18:10:10 +00:00
Vadim Zeitlin
bdcb882076 added wxListAttr::AssignFrom()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36523 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-12-22 03:10:35 +00:00
Mattia Barbon
dee1a63ff5 Removed WXWIN_COMPATIBILITY_2_2 together with code guarded by it.
Changed default for WXWIN_COMPATIBILITY_2_4 to 0.
  Added WXWIN_COMPATIBILITY_2_6 (defaults to 1).
  Ran build/update-setup-h.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35858 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-09 15:48:42 +00:00