Commit Graph

159 Commits

Author SHA1 Message Date
Dimitrie O. Paun 9e99d2b763 - Make the ListView control Unicode ready.
- Support both ANSI & Unicode ListView notifications.
- Fixed a few bugs.
2002-01-18 19:05:35 +00:00
Gerard Patel a02f3de89e Rect returned by LISTVIEW_GetItemRect should be total size in report
mode.
2001-08-21 17:04:02 +00:00
Guy L. Albertelli b0327f2b40 Remember response from LVN_GETDISPINFO if user sets LVIF_DI_SETITEM. 2001-07-02 01:20:28 +00:00
Francois Gouget e76218dd61 Add '\n' at the end of traces. 2001-05-09 17:31:31 +00:00
James Hatheway f3c93b805b Eliminate unitialized garbage being returned from LISTVIEW_GetItemA. 2001-04-18 17:40:04 +00:00
Francois Gouget dd30c5c282 GetItemSpacing(true): Return the default item spacing if the view is
LVS_ICON, and the current 'item size' otherwise.
2001-04-16 19:04:12 +00:00
Rein Klazes 4d7e26f9a2 Fixed scrolling of listview with a mouse wheel. 2001-04-04 18:25:46 +00:00
Francois Gouget d6f5ed273d Update nSelectionMark and nFocusedItem when inserting/deleting/sorting
items.
SortItems: If sorting less than 2 items, do nothing.
2001-03-05 22:11:17 +00:00
Francois Gouget f45d56912a In LISTVIEW_AddGroupSelection and LISTVIEW_SetGroupSelection, if no
selection mark has been set, just select the current item.
In LISTVIEW_SetGroupSelection we must also set the selection mark in
that case (and only in that case).
Removed a naughty ';' (spotted by Eric Pouech).
2001-03-04 01:04:35 +00:00
Francois Gouget 282f7270c1 Small 'typos in comments' fixes. 2001-02-28 05:31:02 +00:00
James Hatheway 7fdceb2217 Update selection after sorting (in LISTVIEW_SortItems) by making sure
selection list matches states of individual items.
2001-02-16 19:39:14 +00:00
James Hatheway a2c2a83f8e Send LVN_DELETEITEM notification first, to avoid crashes if the app
requests LVIF_PARAM with LISTVIEW_GetItem() during its LVN_DELETEITEM
message handler.
2001-02-15 21:24:43 +00:00
François Gouget 4684ab1c12 ListView_GetItemRect already sets rc.left. 2001-02-14 21:42:24 +00:00
François Gouget 1afa24aeac Fix (rewrite), and add documentation to LISTVIEW_ProcessLetterKeys.
Lowered the key repetition delay (Aric).
2001-02-12 18:07:43 +00:00
Chris Morgan d62dd82efb Fix ListView_GetItemRect() macro.
Fix use of ListView_GetItemRect() macro in listview control.
Add some documentation to LISTVIEW_GetItemRect().
2001-02-12 03:46:00 +00:00
Gerard Patel c0ca077f0b Misc fixes in LISTVIEW_SetImageList, LISTVIEW_SetItemCount,
LISTVIEW_UpdateSize.
2001-01-22 19:27:43 +00:00
Ulrich Czekalla 0255c8f0df Only adjust item rect by horizontal scrollbar offset in report view. 2001-01-17 01:48:14 +00:00
François Gouget bde6ae0c19 Test for NULL and LPSTR_TEXTCALLBACK before using lpColumn->pszText. 2001-01-09 21:50:27 +00:00
Ulrich Czekalla e5786e3be6 Adjust item rects by horizontal scrollbar offset. 2001-01-09 20:49:38 +00:00
Aric Stewart 147bc6d21b Ownerdata listviews were not clearing previously selected items when a
new item is set as selected using SetItem and the listview has
LVIS_SINGLESEL.
2000-11-29 00:00:11 +00:00
Aric Stewart b1eb301477 Implemented VK_PRIOR and VK_NEXT processing (merged from Corel tree). 2000-11-08 04:30:16 +00:00
Aric Stewart d41c9a3da4 Implemented the RedrawItems message for a listview. 2000-11-07 20:28:11 +00:00
Alexandre Julliard 908464d448 Authors: Andreas Mohr <amohr@codeweavers.com>, Dimitrie O. Paun <dimi@cs.toronto.edu>, Patrik Stridvall <ps@leissner.se>
Various warning fixes.
2000-11-01 03:11:12 +00:00
Francois Gouget 7203ee6623 Use PS_ALTERNATE rather than PS_DOT.
Use Rectangle to draw focus rectangles.
2000-10-31 02:05:11 +00:00
Aric Stewart 4de47040fd Fixed cancels editing of a listview label if the listview is
scrolled.
2000-10-31 01:35:50 +00:00
Marcus Meissner 61ef06042e Do not set the iSubItem part of the struct for LVM_HITTEST,
applications only need to pass memory space up to iItem.
2000-10-22 23:47:49 +00:00
James Hatheway af7f901c9c Fix messages sent when right-clicking in a blank (non-item) area of a
listview.
2000-10-19 22:28:06 +00:00
Chris Morgan 89d4472d46 Recalculate nItemHeight when LVS_SETIMAGELIST is called. Fixes icons
being chopped off in the file dialog window.  Align items to top and
refresh after sorting, as windows does.
2000-10-19 20:22:09 +00:00
Chris Morgan da610897e4 Implement LVM_SETITEMPOSITION32. 2000-10-17 00:30:39 +00:00
Andreas Mohr 1563abe8ec - stupid spelling fixes
- some more loadorder array work
2000-10-13 20:26:52 +00:00
Stephane Lussier 907a1e615b Subitems of listviews were not painted with the right background when:
-LVS_EX_FULLROWSELECT style is defined
-item is selected
-Listview doesn't have the focus.
2000-10-13 17:05:17 +00:00
Stephane Lussier 163830c569 - Background should not be drawn if the background color is CLR_NONE.
- Don't change the size to 0 for the header control of listview with
  LVS_NOCOLUMNHEADER style. In fact just setting HDS_HIDDEN to the
  header control is enough.
2000-10-12 23:07:41 +00:00
Aric Stewart e127a28166 Corrected some segvs that occur with ownerdata listviews. 2000-10-12 20:39:59 +00:00
Chris Morgan fca20f6553 Paint background before drawing item and subitems. Paint any area of
the control not occupied by items.  Early out of LISTVIEW_RefreshXXX
if no items exist. InvalidateRect() on LBUTTONDOWN only if the control
has items to draw.
2000-09-22 22:45:30 +00:00
Aric Stewart dc2ffbe0cd Correct some situations with listview selections. Specifically fixed
situations where in an OWNERDATA listview the selection ranges become
invalid if the number of items is changed. Additional fixes a few
problems resulting in loops in RemoveAllSelections.
2000-09-22 22:00:01 +00:00
Stephane Lussier c5e86a2c19 Notification NM_CLICK, NM_RCLICK and NM_DBLCLK sent by the listview
should set lParam to a NMLISTVIEW instead of a NMHDR. According to
MSDN doc, it is like that since version 4.71, Wine is returning 5.0 as
the DLL version.
2000-09-19 02:38:45 +00:00
Stephane Lussier 3872d0a218 Sorting items in a listview using LVW_SORTITEMS is only sorting the items
and not the subitems. This patch fix this issue. I've remove the temporary
Sortlist, it was not necessary to create another list, and it was buggy.
2000-09-18 01:39:27 +00:00
Stephane Lussier 88968b89cb Allow having a transparent background text color for the listview. 2000-09-16 20:45:09 +00:00
Chris Morgan 2a6c1e498c Hide the vertical scrollbar when listview style is LVS_LIST. 2000-09-12 23:37:19 +00:00
Aric Stewart eef99e0c93 Implemented both customdraw message sending and handling (based off
the treeview method) as well as LVS_OWNERDRAWFIXED.
2000-09-06 19:44:49 +00:00
Andreas Mohr 2b5d9c6e50 Always call LISTVIEW_SetSelection() for an item, even if that item
has been selected before, in order to let other items get erased.
2000-08-29 03:52:16 +00:00
Susan Farley 53d40899b1 Large caption icons should end in '...' when they are abbreviated. 2000-08-23 19:12:36 +00:00
Aric Stewart 59dae22a43 Beginning of some simple optimization of the listview
drawing. Specifically it reduces flicker when selection changes.
2000-08-21 20:16:53 +00:00
Niclas Karlsson MATE 0f9d56fde8 LPSTR_TEXTCALLBACK wouldn't work if the application supplied the item
text in its own buffer.
2000-08-14 17:17:57 +00:00
Aric Stewart 7db0384706 Fixed sending of LVN_ITEMCHANGING and LVN_ITEMCHANGED messages,
cleaned up some of the drawing, implemented the iIndent for LVS_REPORT
and fixed a problem where sub items where not being properly
associated with their item for virtual list views.
2000-08-11 21:14:23 +00:00
Alexandre Julliard 70c9e095ef Removed all non-standard common control headers from the include
directory.
2000-08-09 00:41:17 +00:00
Aric Stewart 773efce76b Reworked how selections are kept track of in the list view. Selections
are now listed as a sorted range of paired integers.
2000-08-08 20:46:07 +00:00
Patrik Stridvall b4c7499883 Fixed some warnings. 2000-08-04 21:08:01 +00:00
Aric Stewart 559692a5e5 - Fixed bug where InitSubItem was doing a ZeroMemory on the item.
- Cleaned up a sit of extra blue at the end of a FULLROWSELECT list view
  if there is only one column.
- Corrected a bug I introduced with an earlier patch which caused
  problems with multiple selections.
2000-08-03 00:24:09 +00:00
Matthew Lake efd796743d Fixed a segfault problem using the standard file open dialog box. 2000-08-01 23:30:25 +00:00
Aric Stewart 176cee7e1d Fixed a few bugs including one with setting extended styles and
editing labels.
Implemented the LVS_EX_FULLROWSELECT extended style.
Begin an implementation of virtual list views (LVS_OWNERDATA style
set).
2000-08-01 20:58:33 +00:00
Aric Stewart d778da2fbe Prevent the attempt to draw invalid image indexes.
Provide the two pixel buffer between the image and the label.
2000-07-25 12:26:59 +00:00
Aric Stewart 9024c107bf Handle the case where the function SetItem is called to select an item
or set its focus.
2000-07-23 14:19:42 +00:00
James Hatheway 1fb3298e7b Only use the column headers to calculate the width of a
LDS_REPORT-type listbox if it actually has column headers.
(ie. LVS_NOCOLUMNHEADER bit is not set.)
2000-07-08 12:45:21 +00:00
Chris Morgan 66331a73c0 Finished the implementation of LISTVIEW_SetColumnWidth. Tested
against windows thoroughly.  Fixed bug resulting in unsigned values
being passed into LISTVIEW_SetColumnWidth from the listview window
procedure.  Fixed LISTVIEW_GetItemHeight to disregard the height of
icons if no icons exist.
2000-06-04 01:35:16 +00:00
Jason Mawdsley 84c494bd34 Added support for typing the filename in the listview control and
having the control select it.
2000-06-03 21:04:33 +00:00
Martin Fuchs 0b5642160c Inserted a missing call to SetWindowPos(). With this change the header
control is visible again in list views with report style.
2000-05-24 03:33:05 +00:00
Aric Stewart 9a3dd5b249 If a listview is created with LVS_NOCOLUMNEHEADER then wine creates the
header like normal but just sets it not visible. This fix lays out
those supposedly nonexistent headers to size 0,0. So that even if they
become visible they are not drawn.
2000-05-23 01:24:24 +00:00
Chris Morgan 9a171b8e3e Update nItemWidth in LISTVIEW_SetItem() if LVS_LIST or LVS_SMALLICON
mode and item text is wider than the current nItemWidth.
2000-05-19 03:44:46 +00:00
Patrik Stridvall 5ca73ac93a Fixed issues found by winapi_check. 2000-05-11 21:46:51 +00:00
Gerard Patel a1b2fc2a80 Protect against use of comctl32 private control memory after it has
been freed.
2000-05-10 01:34:53 +00:00
Chris Morgan 53b152f73c Implemented ListView_SetHoverTime(), ListView_GetHoverTime(), initial
support for the LVS_EX_TRACKSELECT flag.  Added code to delete items
in LISTVIEW_SetItemCount().
2000-05-07 18:24:10 +00:00
Stephane Lussier 4bdf4af11e Implemented Mousewheel support. 2000-04-18 11:56:33 +00:00
Richard Cohen a4729b0b21 GetItem was returning the item instead of subitem info. 2000-04-09 18:38:23 +00:00
Pierre Mageau c8212371db Don't display the context menu on a double click.
Ulrich Czekalla <ulrichc@corel.ca>
Set the font on the edit label control to that used by the listview
control. It also uses text metrics to set a more reasonable initial
edit control size.

Pierre Mageau <pierre@macadamian.com>
Handle M_SETREDRAW in ListView.
Fix to EnsureVisible to handle small and large icon correctly.
Add edit label functionnality to the listview and the file open dialog.

Ulrich Czekalla <ulrichc@corel.ca>
RelaseDC in CreateEditLabel.

Pierre Mageau <pierre@macadamian.com>
Add functionnality to create new folder in the open dialog.
Add support for right click menu in common file dialog.
LISTVIEW_EndEditlabel is now handling NONLPSTR_TEXTCALLBACK listview items.

Serge Ivanov <sergei@corel.ca>
LISTVIEW_GetColumnA fix (do not copy string, pass pointers).

Luc Tourangeau <luc@macadamian.com>
Preventing a divide by zero when handling LVW_ENSUREVISIBLE message.

Don Kelly
-Implemented the sorting on insert of items into a ListView control
 with either LVS_SORTASCENDING or LVS_SORTDESCENDING set.
-(helping evil applications): sometimes not so well structured apps
 (PFPI90, in this case) will not fully initialize structs.  In the case
 of the LVM_GETITEM message the app may have only initialized the mask
 and iItem members of the struct.  Added processing of the LVIF_PARAM
 mask in the case that iSubItem was set but is invalid/uninitialized.

Pierre Mageau <pierre@macadamian.com>
Fix for handling correctly the cancelling mode of the Edit label.
Fix width calculation of the edit label.

Pascal Lessard <pascal@macadamian.com>
Implemented the behavior of sending WM_CONTEXTMENU when receiving a
WM_RBUTTONUP.

Ulrich Czekalla <ulrichc@corel.ca>
Fixed a painting problem with listview when the view changes and an
edit label is active.

Ulrich Czekalla <ulrichc@corel.ca>
Fixed a notification problem with listview. On creation if the user
specifies an item with focus and/or selection we should send the
proper notification. Insert was preventing LISTVIEW_SetItem from
seeing the changes and sending the notification.

Make the draw item rectangle consistent with the selection
rectangle. This allows us to click on the folders and icons in the
file open dialog box and the item actually gets selected.
2000-02-27 14:03:06 +00:00
Alexandre Julliard d711ad9e0a Removed superfluous GlobalFindAtom calls. 2000-02-13 15:10:16 +00:00
Francois Gouget 7e5f828b12 Better support very long strings by avoiding to copy them in a fixed
size buffer (one exception partly remains: callback strings).
Raise the buffer size to 512 characters.
Merge the handling of item 0 and other items together in GetItemA to
reduce code duplication.
1999-12-25 22:57:17 +00:00
Francois Gouget 42d4f30156 Whenever we do an strncpy we should make sure we put a '\0' at the end
of the buffer.
1999-12-05 23:11:47 +00:00
Eric Kohl 2b51c94674 - implemented simple column order array functionality
- implemented some virtual listview notifications
1999-11-23 23:32:03 +00:00
Pierre Mageau 710541fa08 - Fixed an error for scrolling in Listview (sometimes a column would
not be visible) due to my last checkin.
- Fixed an error for the header control when the Listview is resized with WM_SIZE
- Fixed the scrolling for small and large icon (this broke because of
  the use of SB_PAGE in scrollInfo)
- Added a patch made by Noomen Hamza to update the item width when
  adding a new item
1999-11-07 05:25:58 +00:00
Ulrich Czekalla d11d6e2085 Set proper item focus on DeleteItem.
Clean up edit label implementation.
1999-11-04 01:42:36 +00:00
Pierre Mageau 382060dcb2 In report view mode of the listview control, implemented the
horizontal scrollbar functionality.
1999-10-31 17:35:47 +00:00
Pierre Mageau 9f295f127e Added the functionality of the thumb track. 1999-10-24 17:24:27 +00:00
Pierre Mageau 50f8e4b171 Update the item width upon a new column in the header control. 1999-10-23 23:57:42 +00:00
Ulrich Czekalla c2983025d5 Implementation of edit labels. 1999-10-23 18:53:25 +00:00
Ulrich Czekalla 690a6d4b72 Properly copy text into user supplied buffer. 1999-10-23 16:54:48 +00:00
Noomen Hamza f4ca35f61c Listview items will be drawn with the right item dimensions. 1999-10-23 14:08:00 +00:00
Juergen Schmied e340c707ba - implemented sorting the listview by clicking on the column header
- implemented the context menu entrys for sorting
- some more functions to gather data form pidls
1999-10-13 15:53:05 +00:00
Luc Tourangeau 89e6840b43 Fixed LISTVIEW_GetItemRect: the calculations were off for LVIR_BOUNDS,
LVIR_SELCTBOUNDS, LVIR_LABEL when the item width is greater than the
column width.
Fixed WM_GETDLGCODE by removing the DLGC_WANTRTAB and adding DLGC_WANTCHARS.
1999-09-10 13:56:00 +00:00
Marcus Meissner 06c4d0e3bb Implemented LVM_INSERTCOLUMNW and LVM_INSERTITEMW by using the ascii
equivalents. (WinWord 97, File Open dialog)
1999-09-03 12:29:57 +00:00
Patrik Stridvall 26ffb3cd76 Fixed/added missing/wrong function prototypes and made internal
functions static.
1999-07-31 14:41:43 +00:00
Eric Kohl f9b580701f Some more messages. 1999-07-31 13:09:40 +00:00
Patrik Stridvall 1ed4ecffa8 ANSI C fixes.
Removed warnings.
Made the include files self-sufficient.
Some Solaris fixes.
1999-06-26 14:58:24 +00:00
Alexandre Julliard b73d53c0d4 Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbeyj@wpi.edu>
Fixed problems with disappearing text.
1999-06-26 10:26:46 +00:00
Eric Pouech 13a30bace7 Thou shalt not use C++ comments. 1999-06-22 19:09:55 +00:00
Alexandre Julliard 75b217712f Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbeyj@wpi.edu>
Implemented LISTVIEW_SortItems() and LISTVIEW_CallBackCompare()
1999-06-13 08:49:47 +00:00
Alexandre Julliard a099a555c3 Converted to the new debug interface, using script written by Patrik
Stridvall.
1999-06-12 15:45:58 +00:00
Luc Tourangeau a6d833a552 - Reimplemented the scrolling using SetScrollInfo and GetScrollInfo.
- Implemented LVM_FINDITEM message.
- Added some new window styles.
- Fixed some bugs and extended a number of existing functions.
- Modified selection functions to support area selection (for group
  selection in LVS_ICON and LVS_SMALLICON).
1999-05-29 11:07:11 +00:00
Alexandre Julliard 37c07bc74c Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbeyj@wpi.edu>
Cleaned up LISTVIEW_KeyDown by using LISTVIEW_GetNextItem.  Removed unused
variable in LISTVIEW_GetNextItem.
1999-05-24 08:06:39 +00:00
Alexandre Julliard dead0e1da0 Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbeyj@wpi.edu>
LISTVIEW_KeyDown: Invalidate the listview window only when the
selected item changes.
1999-05-23 09:24:13 +00:00
Alexandre Julliard 05237ebfd6 Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbeyj@wpi.edu>
Implemented GetNextItem for the Listview control.
1999-05-22 15:57:16 +00:00
Patrik Stridvall 896889f317 ANSI C fixes. 1999-05-08 12:50:36 +00:00
Alexandre Julliard eab73f89ec Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbeyj@wpi.edu>
Fixed LISTVIEW_GetItemChanges() to perform a more complete comparison
between lpItem and lpLVItem.  Now compares the pszText string of the
lpItem and lpLVItem structs.  Fixes a bug where the old and new item
have the same attributes but their text differs and GetItemChanges()
compares them as equal.
1999-05-01 10:29:37 +00:00
Alexandre Julliard bce73ad5b2 Authors: Chris Morgan <cmorgan@wpi.edu>, James Abbatiello <abbeyj@wpi.edu>
Implemented SetColumnWidth for ListView control.
1999-04-25 10:56:10 +00:00
Patrik Stridvall b4b9fae671 New debug scheme with explicit debug channels declaration. 1999-04-19 14:56:29 +00:00
Luc Tourangeau 3025dc181b Added support for icon and smallicon views. 1999-04-01 11:55:44 +00:00
Marcus Meissner 3480e4a596 Removed no longer necessary win.h include, added now necessary other
includes (win.h used only by UPDOWN now).
1999-03-16 10:53:11 +00:00
Alexandre Julliard 114d9d18fb Fixed make depend 1999-03-13 08:54:39 +00:00
Luc Tourangeau 4d6df2cb91 Changed the listview control to add the report view and fix some bugs
for the list view.
1999-03-12 17:31:08 +00:00
Alexandre Julliard a396029270 Large-scale renaming of all Win32 functions and types to use the
standard Windows names.
1999-02-26 11:11:13 +00:00