Commit Graph

288 Commits

Author SHA1 Message Date
Robin Dunn
8c5d4072b1 Allow derived classes to prevent default focus handling (by not
calling Skip)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23866 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-23 23:48:17 +00:00
Vadim Zeitlin
1c4a0ca4c1 backport: adjust m_current when inserting items in the control (patch 799937)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-09-14 23:01:58 +00:00
Robert Roebling
90dab4e65a OK, wxMSW doesn't seem to send the end label edit event
for wxListCtrls if the label editing was cancelled.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@21699 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-06 11:49:43 +00:00
Robert Roebling
3a547e0e37 Update to ending a label edit action in both tree control
and list controls. This includes the patch for tree
   control to correct the focus behavour when cancelling
   a label change action. It also adds an end_label_edit
   event to wxListCtrl when cancelling (this was not done
   before).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@21698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-07-06 11:41:16 +00:00
Vadim Zeitlin
060f9ce148 generate wxEVT_COMMAND_LIST_INSERT_ITEM (patch 747070)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-06-03 10:46:08 +00:00
Robin Dunn
c71bb017ee Fix GetItemRect to offset by the header window, if present.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20546 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-08 02:17:52 +00:00
Vadim Zeitlin
8497a90d5c set the index for BEGIN_DRAG events (patch 726308)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20418 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-05-01 19:38:42 +00:00
Vadim Zeitlin
ae8b9dcc4a allow vetoing wxEVT_COMMAND_LIST_COL_BEGIN_DRAG (backported from HEAD)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-11 19:08:41 +00:00
Robin Dunn
b28d567bb0 Turn off all border styles for the inner window
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-04-08 22:24:14 +00:00
Robin Dunn
08056b1a7e Check the image height when calulating the line height. This allows
larger than normal images to be used.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2003-02-06 02:18:51 +00:00
Vadim Zeitlin
b905c12598 attemps to fix compilation after applying the last patch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17722 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-11-05 00:57:38 +00:00
Vadim Zeitlin
964a710a54 fixed headers included for wxUniv (patch 630713)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-11-04 22:41:56 +00:00
Robert Roebling
54b25889d2 Replaced lots of ANSI/ASCII strings with their
Unicode equivalents, i.e. I put wxT() arounf
    them in lots of places.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-10-29 21:48:06 +00:00
Vadim Zeitlin
0ab495989d no changes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17656 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-10-29 20:42:34 +00:00
Julian Smart
8eca8095e4 Applied patch [ 617262 ] ListCtrl ResetVisibleLinesRange missing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-10-02 14:03:43 +00:00
Julian Smart
f93107bcae Applied patch [ 615769 ] generic wxListCtrl enhancements
implemented a couple of things missing from the generic
wxListCtrl class which make it more similar to the
Windows port

1) implemented wxLIST_FORMAT_RIGHT and wxLIST_FORMAT_CENTER

2) added an ellipsis (...) to the end of the string and
shortened the string to fit inside the allowed width

3) left a margin of 8 pixels between columns so that
the text is not shoved right together

Note this is my first patch to wxWindows. I did read
the patch howto and I think I got it right but please
feel free to bother me about any discrepancies. In
addition, I am not sure if the way I implemented the
new routine to handle the formatting is adequate
performance wise but it doesn't seem to slow things
down too badly on my machine... :-) In addition, if
this routine is accepted, it could also be used for the
header data as well -- thoughts?

Anthony Tuininga


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17437 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-10-02 13:54:09 +00:00
Robert Roebling
7fc06f31e1 Removed hack from wxListCtrl that was required
as long as wxGTK sent an incorrect sequence
   of mouse events for dclicks.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-30 13:20:25 +00:00
Robert Roebling
5ec87fd62f Use renderer for wxListCtrl's header in wxUniversal.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17281 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-19 20:21:33 +00:00
Robin Dunn
965079dde9 Provide implementation for GetTopItem
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17221 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-17 01:05:56 +00:00
Robin Dunn
e7d073c376 Fixed some off-by-one and other issues with drawing the HRULE/VRULE
lines.  Made the VRULEs line up with the column header splitter
lines.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17136 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-09-11 18:36:55 +00:00
Julian Smart
80020b62f9 Using wxImageListType instead of wxGenericImageList
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16842 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-28 09:31:29 +00:00
Julian Smart
f9ceab7ce6 Ditribution script mods;
Use wxImageList instead of wxGenericImageList where possible
in wxListCtrl


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16841 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-28 08:54:00 +00:00
Julian Smart
c29582d0b0 Applied patch [ 590247 ] Fix bad calculation of listctrl update.
In wxGenericListCtrl when removing single items a call to
RefreshAfter would cause bad things to happen in GTK/X11.
It would under certain circumstances put Xlib into an
exponential memory and cpu usage mode. Causing
eventual core dump but not before using all memory and
swap.

The problem is that RefreshAfter is passing a negative
height rectangle refresh to GTK/X11. This stems from a mixture
of using scrolled and unscrolled values to calculate the
update region.

This patch fixes the problem... by transforming to scrolled
values earlier. And also adds one optimization to not
update when the item is below the visible area.

Tested on GTK.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16402 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-08 09:15:03 +00:00
David Webster
cf4d0c5b0b FALSE, not false
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-08-05 15:50:05 +00:00
Julian Smart
e81a301cbd Added wx/listbase.h with wxListCtrl types, so we can
have wxGenericListCtrl available on all platforms


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-07-30 19:04:18 +00:00
Julian Smart
93e8d870e8 Must include wx/listctrl.h unfortunately, for now
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-07-30 16:14:12 +00:00
Julian Smart
9cb0795323 More tweaks so wxGenericListCtrl only uses generic
components


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16328 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-07-30 16:01:35 +00:00
Vadim Zeitlin
229653c99e fixed bug due to which all items in a virtual control stayed sometimes selected even after Clear()ing it
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-07-29 18:29:44 +00:00
Mattia Barbon
b5a7cdc076 Rename wxGenericImageList to wxImageList in generic wxListCtrl, too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-07-27 20:12:21 +00:00
Julian Smart
b31989e208 Added wxListCtrl to derive from wxGenericListCtrl,
ditto for wxImageList


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-07-22 23:03:03 +00:00
Julian Smart
3cd94a0d11 Applied patch [ 583922 ] Make generic/wxListCtrl avail. in WIN32
Generic wxListCtrl renamed to wxGenericListCtrl, wxImageList
renamed to wxGenericImageList, so they can be used on wxMSW
(Rene Rivera).


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16250 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-07-22 08:51:49 +00:00
Vadim Zeitlin
904ccf5237 attempt to fix a rare crash which happens when changing the number of columns in a virtual list control
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-07-12 16:05:46 +00:00
Vadim Zeitlin
58c1c0965e fixed handling of Ctrl-arrows movement which was unselecting the previously selected items incorrectly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16086 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-07-08 17:57:48 +00:00
Vadim Zeitlin
62d89eb4c9 applied the same fix for crashing if the END_EDIT event handler vetoes the event as for wxTreeCtrl; also added a few consts here and there
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16085 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-07-08 17:48:41 +00:00
Vadim Zeitlin
c020c47e00 fixed off-by-few-pixels error in horz scrollbar calculations (patch 575412)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16017 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-07-03 15:05:43 +00:00
Vadim Zeitlin
40c0880859 relayout the window after adding/removing the columns (fixes a SF bug I closed a long time ago -- but forgot to commit the fix)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15877 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-06-18 15:23:54 +00:00
Vadim Zeitlin
c2569f41b1 fixed icon drawing when they have different sizes (patch 554973)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-05-28 16:44:33 +00:00
Vadim Zeitlin
943f6ad3d6 unselected the current item when unfocusing it in a single selection list control (patch 540818)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15697 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-05-28 16:30:24 +00:00
Vadim Zeitlin
050e7ed73b added missing wxListItem copy ctor to wxMSW, moved wxListItem to the header
to avoid duplicating it in wxMSW and the generic versions


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15446 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-05-08 22:29:57 +00:00
Gilles Depeyrot
3475a005d6 implemented missing copy constructor (needed for non trivial member)
corrected warnings when compiling with -Wall -W


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15429 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-05-08 13:55:36 +00:00
Ron Lee
5b98eb2fa6 Added {S,G}etItem{Text,Background}Colour methods.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15257 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-04-24 20:31:46 +00:00
Robin Dunn
a77ec46ddc Added sending of column dragging events to the generic wxListCtrl.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14932 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-04-03 20:26:29 +00:00
Václav Slavík
d027179b48 use Calc(Un)ScrolledPosition instead of wxClientDC
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14658 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-03-17 14:13:35 +00:00
Václav Slavík
acf4d8587a make it possible to have empty lines in wxListCtrl
in report mode (mandatory for wxEditableListBox)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-03-16 19:34:15 +00:00
Vadim Zeitlin
ae409cb80e update focus rectangle width when the columns are being added/removed on the fly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14577 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-03-13 15:41:41 +00:00
Vadim Zeitlin
62313c2788 right clicking outside any column sets the column in the list event to -1, not the last column
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14554 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-03-11 12:32:56 +00:00
Gilles Depeyrot
5a1cad6ea4 wxArray<T> macros have been changed to fix runtime problems under 64 bit
architectures. The base class is now implemented once for each needed
primitive type in order to avoid invalid reference casts. Macros are
provided to implement new arrays using these primitive base arrays.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14458 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-03-06 06:31:34 +00:00
Václav Slavík
ddba340ddf made generic wxListCtrl work with well-behaved ports (wxGTK hack still in place)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14380 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-02-24 00:14:18 +00:00
Robert Roebling
afbe906abd Some work on GTK focus handling and events.
Removed some code #ifdeffed for GTK from
    wxListCtrl.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14363 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-02-23 18:59:46 +00:00
Vadim Zeitlin
072da98f10 don't crash in SetFocus()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14304 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2002-02-19 14:21:49 +00:00