home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1997 May / Pcwk0597.iso / sybase / starbuck / hpp.z / WLISTVW.HPP < prev    next >
C/C++ Source or Header  |  1996-12-03  |  23KB  |  671 lines

  1. /* %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2.    %     Copyright (C) 1995, by WATCOM International Inc.  All rights    %
  3.    %     reserved.  No part of this software may be reproduced or        %
  4.    %     used in any form or by any means - graphic, electronic or       %
  5.    %     mechanical, including photocopying, recording, taping or        %
  6.    %     information storage and retrieval systems - except with the     %
  7.    %     written permission of WATCOM International Inc.                 %
  8.    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  9. */
  10.  
  11. /*************************************************************************
  12.  *
  13.  * WListView -- Wrapper for the Windows 95 ListView control.
  14.  *
  15.  *   Note that currently columnNumber is equivalent to subItemNumber,
  16.  *   but the Windows 95 docs seem to imply otherwise so at some point
  17.  *   they may in fact refer to different things.
  18.  *
  19.  *
  20.  *   Events:
  21.  *
  22.  *       BeginLabelEdit -- When direct editing of a label begins.
  23.  *
  24.  *       BeginOwnerDraw -- Occurs before the 1 or more DrawItem events.
  25.  *
  26.  *       Change -- Occurs whenever an item changes state (i.e., is
  27.  *                 selected/deselected).
  28.  *
  29.  *       Click -- When an item is clicked.
  30.  *
  31.  *       ColumnClick -- When a column header is clicked.
  32.  *
  33.  *       DataAvailable --
  34.  *
  35.  *       DataClose --
  36.  *
  37.  *       DataOpen --
  38.  *
  39.  *       DataRequest --
  40.  *
  41.  *       DoubleClick -- When an item is double-clicked.
  42.  *
  43.  *       DrawItem -- When WLVSOwnerDraw style used and in report mode.
  44.  *
  45.  *       EndLabelEdit -- When direct editing of a label ends.
  46.  *
  47.  *       EndOwnerDraw -- Occurs after the DrawItem events.
  48.  *
  49.  *       InsertItem -- Called immediately after an item is added.
  50.  *
  51.  *       NeedItemText --
  52.  *
  53.  *************************************************************************/
  54.  
  55. #ifndef _WLISTVW_HPP_INCLUDED
  56. #define _WLISTVW_HPP_INCLUDED
  57.  
  58. #ifndef _WNO_PRAGMA_PUSH
  59. #pragma pack(push,8);
  60. #pragma enum int;
  61. #endif
  62.  
  63. #ifndef _WCONTROL_HPP_INCLUDED
  64. #  include "wcontrol.hpp"
  65. #endif
  66. #ifndef _WDRAWITM_HPP_INCLUDED
  67. #  include "wdrawitm.hpp"
  68. #endif
  69. #ifndef _WIMGLIST_HPP_INCLUDED
  70. #  include "wimglist.hpp"
  71. #endif
  72. #ifndef _WARRAY_HPP_INCLUDED
  73. #  include "warray.hpp"
  74. #endif
  75. #ifndef _WDATATRG_HPP_INCLUDED
  76. #  include "wdatatrg.hpp"
  77. #endif
  78.  
  79. class WListView;
  80.  
  81. enum WLVColumnFormat {
  82.     WLVCLeft,
  83.     WLVCCenter,
  84.     WLVCRight,
  85. };
  86.  
  87. #define WLVMaskText   0x0001
  88. #define WLVMaskImage  0x0002
  89. #define WLVMaskParam  0x0004
  90. #define WLVMaskState  0x0008
  91.  
  92. struct WListViewEventData : public WEventData {
  93.     WLong               itemNumber;
  94.     WLong               subItemNumber;
  95.     WULong              newState;
  96.     WULong              oldState;
  97.     WULong              changedMask;
  98.     WPoint              dragPosition;
  99.     const WChar *       itemText;
  100. };
  101.  
  102. struct WListViewDispEventData : public WEventData {
  103.     WUInt               mask; 
  104.     WInt                itemNumber;
  105.     WInt                subItemNumber;
  106.     WUInt               state; 
  107.     WUInt               stateMask; 
  108.     const WChar *       itemText;
  109.     WInt                textMax;
  110.     WInt                imageIndex;
  111.     void *              userData;
  112. };    
  113.  
  114. typedef int WCMDEF (*WListViewSortCallback)( void * item1userData, void * item2userData, WListView * listView );
  115. typedef int WCMDEF (WObject::*WListViewSortMemberCallback)( void * item1userData, void * item2userData, WListView * listView );
  116.  
  117. typedef WArray< WULong >        WULongArray;
  118.  
  119. //
  120. // ListView styles
  121. //
  122.  
  123. #define WLVSDefault              ((WStyle)0x50000100L) // WS_VISIBLE|LVS_ICON|LVS_ALIGNTOP|LVS_AUTOARRANGE|WS_CHILD
  124. #define WLVSAlignTop             ((WStyle)0x00000000L) // LVS_ALIGNTOP
  125. #define WLVSIcon                 ((WStyle)0x00000000L) // LVS_ICON
  126. #define WLVSReport               ((WStyle)0x00000001L) // LVS_REPORT
  127. #define WLVSSmallIcon            ((WStyle)0x00000002L) // LVS_SMALLICON
  128. #define WLVSList                 ((WStyle)0x00000003L) // LVS_LIST
  129. #define WLVSSingleSelection      ((WStyle)0x00000004L) // LVS_SINGLESEL
  130. #define WLVSShowSelAlways        ((WStyle)0x00000008L) // LVS_SHOWSELALWAYS
  131. #define WLVSAlwaysShowSelection  ((WStyle)0x00000008L) // LVS_SHOWSELALWAYS
  132. #define WLVSSortAscending        ((WStyle)0x00000010L) // LVS_SORTASCENDING
  133. #define WLVSSortDescending       ((WStyle)0x00000020L) // LVS_SORTDESCENDING
  134. #define WLVSShareImageLists      ((WStyle)0x00000040L) // LVS_SHAREIMAGELISTS
  135. #define WLVSNoLabelWrap          ((WStyle)0x00000080L) // LVS_NOLABELWRAP
  136. #define WLVSAutoArrange          ((WStyle)0x00000100L) // LVS_AUTOARRANGE
  137. #define WLVSEditLabels           ((WStyle)0x00000200L) // LVS_EDITLABELS
  138. #define WLVSOwnerDraw            ((WStyle)0x00000400L) // LVS_OWNERDRAWFIXED
  139. #define WLVSAlignLeft            ((WStyle)0x00000800L) // LVS_ALIGNLEFT
  140. #define WLVSNoScroll             ((WStyle)0x00002000L) // LVS_NOSCROLL
  141. #define WLVSNoColumnHeaders      ((WStyle)0x00004000L) // LVS_NOCOLUMNHEADER
  142. #define WLVSNoSortHeader         ((WStyle)0x00008000L) // LVS_NOSORTHEADER
  143.  
  144. #define WLVSOwnerDrawFixed       WLVSOwnerDraw
  145. #define WLVSSingleSel            WLVSSingleSelection
  146. #define WLVSAlwaysShowSel        WLVSAlwaysShowSelection
  147. #define WLVSNoColumnHeader       WLVSNoColumnHeaders
  148.  
  149. enum WLVViewType {
  150.     WLVTIcon,
  151.     WLVTReport,        WLVTDetail = WLVTReport,
  152.     WLVTSmallIcon,
  153.     WLVTList,
  154. };
  155.  
  156. enum WLVRectType {
  157.     WLVRText,
  158.     WLVRIcon,
  159.     WLVRSelectBounds,
  160.     WLVRBounds
  161. };
  162.  
  163. enum WLVAlignment {
  164.     WLVADefault         = 0,
  165.     WLVALeft            = 1,
  166.     WLVATop             = 2,
  167.     WLVASnapToGrid      = 5
  168. };
  169.  
  170. enum WLVSort {
  171.     WLVSNone            = 0x0000,
  172.     WLVSAscending       = 0x0100,
  173.     WLVSDescending      = 0x0200,
  174. };
  175.  
  176. enum WLVImageListType {
  177.     WLVINormal,    WLVILarge=WLVINormal,
  178.     WLVISmall,
  179.     WLVIState
  180. };
  181.  
  182. enum WLVColumnAlignment {
  183.     WLVCALeft,
  184.     WLVCARight,
  185.     WLVCACenter,
  186. };
  187.  
  188. #define WLVNIAll          0x0000
  189. #define WLVNIFocused      0x0001
  190. #define WLVNISelected     0x0002
  191. #define WLVNICut          0x0004
  192. #define WLVNIDropHilited  0x0008
  193. #define WLVNIAbove        0x0100
  194. #define WLVNIBelow        0x0200
  195. #define WLVNIToLeft       0x0400
  196. #define WLVNIToRight      0x0800
  197.  
  198. #define WLVFocusedState      0x0001
  199. #define WLVSelectedState     0x0002
  200. #define WLVCutState          0x0004
  201. #define WLVDropHilitedState  0x0008
  202.  
  203. class WListView;
  204.  
  205. typedef WBool WCMDEF (WObject::*WListViewCallback)( WListView * listView, WULong itemNumber, void * userData );
  206.  
  207. class WCMCLASS WListView : public WControl {
  208.     WDeclareSubclass( WListView, WControl );
  209.  
  210.     public:
  211.  
  212.         /**********************************************************
  213.          * Constructors and Destructors
  214.          *********************************************************/
  215.  
  216.         WListView();
  217.  
  218.         ~WListView();
  219.  
  220.         /**********************************************************
  221.          * Properties
  222.          *********************************************************/
  223.  
  224.         // ColumnCount
  225.         //
  226.         //     Returns the number of columns in report mode.
  227.  
  228.         WInt GetColumnCount() const;
  229.  
  230.         // Count
  231.         //
  232.         //     Sets/gets the number of items in the listview.  You
  233.         //     can set the count to a predetermined value for
  234.         //     efficiency.
  235.  
  236.         WBool  SetCount( WULong count );
  237.         WULong GetCount( WBool forceCount=FALSE ) const;
  238.  
  239.         // DataAutoHeaders
  240.         //
  241.         //     If TRUE, existing header columns are deleted and
  242.         //     new columns are added whenever a query is opened.
  243.         //     Otherwise columns are left unchanged.  Defaults to TRUE.
  244.  
  245.         WBool GetDataAutoHeaders() const;
  246.         WBool SetDataAutoHeaders( WBool set );
  247.  
  248.         // DataColumns
  249.         //
  250.         //     DataTarget property
  251.  
  252.         WString GetDataColumns() const;
  253.         WBool   SetDataColumns( const WString & cols );
  254.  
  255.         // DataGuardRows
  256.  
  257.         WLong GetDataGuardRows() const;
  258.         WBool SetDataGuardRows( WLong guardRows );
  259.  
  260.         // DataKeptRows
  261.  
  262.         WLong GetDataKeptRows() const;
  263.         WBool SetDataKeptRows( WLong keptRows );
  264.  
  265.         // DataSource
  266.         //
  267.         //     DataTarget property
  268.  
  269.         WDataSource *GetDataSource() const;
  270.         WBool        SetDataSource( WDataSource *source );
  271.  
  272.         // DataTrackRow
  273.         //
  274.         //     DataTarget method
  275.  
  276.         WBool GetDataTrackRow() const;
  277.         WBool SetDataTrackRow( WBool trackRow );
  278.  
  279.         // IconAlignment -- Sets/gets the icon alignment in icon or small
  280.         //                  icon views.  Note that WLVADefault and
  281.         //                  WLVASnapToGrid are ignored (use the Arrange
  282.         //                  method instead).
  283.  
  284.         WLVAlignment GetIconAlignment() const;
  285.         WBool        SetIconAlignment( WLVAlignment align );
  286.  
  287.         // ImageList
  288.         //
  289.         //     Get or set one of the imagelists used by the listview.
  290.         //     All imagelists are shared, so it is up to the user
  291.         //     to destroy the imagelist after destroying the listview.
  292.  
  293.         WImageList * GetImageList( WLVImageListType type=WLVINormal ) const;
  294.         WBool        SetImageList( WImageList * imageList,
  295.                                    WLVImageListType type=WLVINormal );
  296.  
  297.         // SelectedCount
  298.         //
  299.         //     Returns the number of items currently selected
  300.  
  301.         WUInt GetSelectedCount() const;
  302.  
  303.         // ShowHeaders -- If true, headers are shown in report view.
  304.  
  305.         WBool GetShowHeaders() const;
  306.         WBool SetShowHeaders( WBool show );
  307.  
  308.         // TopIndex -- Return the index of the topmost item in list or
  309.         //             report view.
  310.  
  311.         WULong GetTopIndex() const;
  312.  
  313.         // View -- Sets/gets the current view.  Defaults to WLVTIcon.
  314.         //
  315.  
  316.         WLVViewType GetView() const;
  317.         WBool       SetView( WLVViewType view );
  318.  
  319.         // VisibleCount -- Calculates the number of items that can fit
  320.         //                 vertically in the visible area of the control
  321.         //                 when in list or report/detail view.
  322.  
  323.         WULong GetVisibleCount() const;
  324.  
  325.         /**********************************************************
  326.          * Methods
  327.          *********************************************************/
  328.  
  329.         // Add
  330.         //
  331.         //     Add a new item/row.  Items start at 0.  If you set
  332.         //     item to -1, it will add it at the end. The label can
  333.         //     be NULL.  The imageIndex refers to the index into the
  334.         //     imagelist, set it to -1 for no image.  The itemUserData
  335.         //     is per-item userdata.  You can optionally specify
  336.         //     any number of subitems, which are all strings.
  337.         //     Returns the new row index, or -1 if error.
  338.  
  339.         #define WLVTextCallback ((WChar *) -1)
  340.         WLong Add( const WChar *label, WLong imageIndex=-1,
  341.                    WShort stateImageIndex=0, WLong itemNumber=-1,
  342.                    void *itemUserData=NULL, WLong numSubItems=0, ... );
  343.  
  344.         // AddColumn
  345.         //
  346.         //     Add a new column.  Columns start at 0.  If you set
  347.         //     it to -1, the column will be added to the end.
  348.         //     Specify WCOLUMN_DEFAULT for the default column width,
  349.         //     or WCOLUMN_TITLELENGTH to size it according to the length
  350.         //     of the header title.  You can pass NULL for the title.
  351.         //     Returns the new column index, or -1 if error.
  352.  
  353.         #define WCOLUMN_DEFAULT     (-1)
  354.         #define WCOLUMN_TITLELENGTH (-2)
  355.  
  356.         WLong AddColumn( const WChar *title, WLong columnNumber=-1,
  357.                          WLong width=WCOLUMN_TITLELENGTH,
  358.                          WLVColumnAlignment align=WLVCALeft,
  359.                          WLong subItemNumber=-1 );
  360.  
  361.         // Arrange
  362.         //
  363.         //     Arranges the icons in the listview and optionally sorts
  364.         //     them by label.
  365.  
  366.         WBool Arrange( WLVAlignment align=WLVADefault );
  367.  
  368.         // CreateDragImage
  369.         //
  370.         //     Returns an imagelist that can be used for drawing purposes
  371.         //     during a drag operation.  Caller must delete the image
  372.         //     list when done.
  373.  
  374.         WImageList CreateDragImage( WULong itemNumber,
  375.                                      WPoint *initialPosition=NULL ) const;
  376.  
  377.         // DeleteAll
  378.         //
  379.         //     Clear all the items in the listview.
  380.  
  381.         WBool DeleteAll();
  382.  
  383.         // DeleteAllColumns
  384.  
  385.         WBool DeleteAllColumns();
  386.  
  387.         // DeleteColumn
  388.         //
  389.         //     Delete an individual column.
  390.  
  391.         WBool DeleteColumn( WULong columnNumber );
  392.  
  393.         // Delete
  394.         //
  395.         //     Delete an item or group of items (iff last > first).
  396.  
  397.         WBool Delete( WULong first, WULong last=0 );
  398.  
  399.         // EditLabel
  400.         //
  401.         //     Invoke label editing for an item.
  402.  
  403.         WWindowHandle EditLabel( WULong itemNumber );
  404.  
  405.         // EnsureIsVisible
  406.         //
  407.         //     Ensures that an item is fully/partially visible, scrolling
  408.         //     it into view if necessary.  Note that EnsureIsVisible
  409.         //     works in all modes.
  410.  
  411.         WBool EnsureIsVisible( WULong itemNumber, WBool fullyVisible=TRUE );
  412.  
  413.         // Enumerate
  414.         //
  415.         //     Invokes the callback on each item in the list view.
  416.  
  417.         WBool Enumerate( WObject * client, WListViewCallback callback,
  418.                          void * userData=NULL );
  419.  
  420.         // Retrieve
  421.         //
  422.         //     Retrieve the next/previous item by state or position.
  423.         //     If retrieving by state, the startAt value is where the
  424.         //     search should start (but excludes the item itself).
  425.         //     If retrieving by position, the point indicates the position
  426.         //     beneath which to look for the item.
  427.         //     Returns the index of the item, or -1 if no item is found/end
  428.         //     of search.
  429.  
  430.         WLong Retrieve( WLong startAt=-1, WULong flags=WLVNISelected ) const;
  431.         WLong Retrieve( const WPoint & pt );
  432.  
  433.         // RetrieveMultiple
  434.         //
  435.         //     Retrieve multiple next/previous items by state or position.
  436.         //     Returns the an array of indices of the items.
  437.  
  438.         WULongArray RetrieveMultiple( WULong flags=WLVNISelected ) const;
  439.  
  440.         // Redraw
  441.         //
  442.         //     Force the control to redraw a range of items.
  443.         //     The specified items are not actually redrawn until the
  444.         //     window receives a paint message.  To repaint immediately,
  445.         //     call the Update() function after calling this function.
  446.  
  447.         WBool Redraw( WULong from, WULong to, WBool force=FALSE );
  448.  
  449.         // Sort
  450.         //
  451.         //     Sort the items.
  452.  
  453.         WBool Sort( WListViewSortCallback sortFunction );
  454.         WBool Sort( WObject * object,
  455.                     WListViewSortMemberCallback sortFunction );
  456.  
  457.         /**********************************************************
  458.          * Item Properties
  459.          *********************************************************/
  460.  
  461.         // ColumnAlignment
  462.  
  463.         WLVColumnAlignment GetColumnAlignment( WLong columnNumber ) const;
  464.         WBool SetColumnAlignment( WLong columnNumber,
  465.                                   WLVColumnAlignment alignment );
  466.  
  467.         // ColumnText
  468.  
  469.         WString GetColumnText( WLong columnNumber ) const;
  470.         WBool SetColumnText( WLong columnNumber, const WString & text );
  471.  
  472.         // ColumnWidth
  473.         //
  474.         //     Get or set the width of the given column.  Note that in
  475.         //     report view, the columns go from 0 to n.  You can also use
  476.         //     this is list view to get/set the (only) column's width,
  477.         //     but you have to use a column number of -1.
  478.  
  479.         #define WCOLUMN_AUTOSIZE_USEITEMS (-1)
  480.         #define WCOLUMN_AUTOSIZE_USETITLE (-2)
  481.  
  482.         WLong GetColumnWidth( WLong columnNumber ) const;
  483.         WBool SetColumnWidth( WLong columnNumber, WLong width );
  484.  
  485.         // ImageIndex -- Sets/Gets the index of the icon in the icon and
  486.         //                  small icon image lists
  487.  
  488.         WBool SetImageIndex( WULong item, WLong index );
  489.         WLong GetImageIndex( WULong item ) const;
  490.  
  491.         // Position
  492.         //
  493.         //     Get/set the position of an item in icon or small icon view.
  494.  
  495.         WBool GetPosition( WLong itemNumber, WPoint & position ) const;
  496.         WBool GetPosition( WLong itemNumber, WLong & x, WLong & y ) const;
  497.         WBool SetPosition( WLong itemNumber, const WPoint & position );
  498.         WBool SetPosition( WLong itemNumber, WLong x, WLong y );
  499.  
  500.         // Rectangle
  501.         //
  502.         //     Get/set the rectangle where the control is placed
  503.         //     If an itemNumber is supplied, then the rectangle applies
  504.         //     to the position
  505.  
  506.         WRect GetRectangle( WLong itemNumber, WLVRectType type=WLVRText );
  507.  
  508.         // State
  509.         //
  510.         //     Get/set the state of an item.  A mask value is used to
  511.         //     determine which states to get/set, by default it's the
  512.         //     selected state (but you can get/set multiple states).
  513.  
  514.         WULong GetState( WLong itemNumber,
  515.                          WULong mask=WLVSelectedState ) const;
  516.         WBool SetState( WLong itemNumber, WULong state,
  517.                         WULong mask=WLVSelectedState );
  518.  
  519.         // StateImageIndex
  520.  
  521.         WBool SetStateImageIndex( WULong itemNumber, WShort index );
  522.         WShort GetStateImageIndex( WULong itemNumber ) const;
  523.  
  524.         // Text
  525.         //
  526.         //     Get or set the caption of an item/subitem.  If no parm
  527.         //     is given, defaults to column 0 which is the item label.
  528.         //
  529.  
  530.         WString GetText( WULong itemNumber, WULong subItemNumber=0 ) const;
  531.         WBool SetText( WULong itemNumber, const WString & text,
  532.                        WULong subItemNumber=0, WBool checkOldValue=TRUE );
  533.  
  534.         // UserData
  535.         //
  536.         //     Get or set the per-item data.
  537.  
  538.         WBool SetUserData( WULong itemNumber, void *itemUserData );
  539.         void *GetUserData( WULong itemNumber ) const;
  540.  
  541.         /**********************************************************
  542.          * Default Event Handlers
  543.          *********************************************************/
  544.  
  545.         WBool DragEnterHandler( WListView *, WDragEventData * );
  546.         WBool DragOverHandler( WListView *, WDragEventData * );
  547.         WBool DragLeaveHandler( WListView *, WDragEventData * );
  548.  
  549.         WBool DestroyEventHandler( WListView *, WEventData * );
  550.  
  551.         WBool ContextMenuEventHandler( WWindow *,
  552.                                        WContextMenuEventData * event );
  553.  
  554.         // Event handlers for the DataTarget
  555.  
  556.         WBool DataOpenHandler( WListView *, WDataOpenEventData *ev );
  557.         WBool DataCloseHandler( WListView *, WDataCloseEventData *ev );
  558.         WBool DataAvailableHandler( WListView *, WDataAvailableEventData *ev );
  559.         WBool DataRequestHandler( WListView *, WDataRequestEventData *ev );
  560.         WBool DataGuardRowHandler( WListView *, WDataGuardRowEventData * ev );
  561.  
  562.         /**********************************************************
  563.          * Overrides
  564.          *********************************************************/
  565.  
  566.         virtual WColor GetBackColor( WBool getResultingColor=TRUE ) const;
  567.  
  568.         virtual WBool SetParent( const WWindow * parent );
  569.  
  570.         virtual WBool WantsDragMessage( WULong whichButton ) const;
  571.         virtual WBool FillDragEventData( WDragEventData & event ) const;
  572.  
  573.         virtual WBool Destroy();
  574.  
  575.         virtual WBool ProcessMessage( const WMessage & msg,
  576.                                       WLong & returns );
  577.  
  578.         virtual WBool SetBackColor( const WColor & col );
  579.  
  580.         virtual WBool SetForeColor( const WColor & col );
  581.  
  582.         virtual WBool CloneWindow( WStyle newStyle, WStyle newExStyle,
  583.                                    void * data=NULL );
  584.  
  585.         virtual WRect GetRectangle( WBool absolute=FALSE ) const;
  586.     
  587.         virtual WBool SetText( const WString & str );
  588.  
  589.         virtual WString GetText() const;
  590.  
  591.         virtual WBool SetUserData( void * userData );
  592.  
  593.         virtual void * GetUserData() const;
  594.  
  595.     protected:
  596.         virtual WBool ProcessNotify( WUInt id, WNotify code, WNotifyInfo info,
  597.                                      WLong & returns );
  598.  
  599.     public:
  600.         virtual const WChar * InitializeClass();
  601.  
  602.         virtual WStyle GetDefaultStyle() const;
  603.  
  604.         /**********************************************************
  605.          * Internal
  606.          *********************************************************/
  607.  
  608.     protected:
  609.  
  610.         void  UpdateExtents( WLong count );
  611.  
  612.         WBool AddDataRow( WLong row, WLong itemNumber = -1 );
  613.  
  614.         WLong FindDataRow( WLong row, WLong itemCount = -1 );
  615.  
  616.         WBool AllocDTTable();
  617.  
  618.         WBool IndirectUserData( WBool indirect );
  619.  
  620.         void  RenumberDataRows();
  621.         WBool HandleRefreshRow( WLong reason, WLong row, WLong count );
  622.  
  623.         WBool SetRealUserData( WULong itemNumber, void *itemUserData );
  624.         void *GetRealUserData( WULong itemNumber ) const;
  625.  
  626.         void doDataTargetScroll();
  627.  
  628.         virtual void EventNotice( WEventID id, WEventNotice type );
  629.  
  630.         /**********************************************************
  631.          * Data Members
  632.          *********************************************************/
  633.  
  634.     private:
  635.         WImageList *        _normalImages;
  636.         WImageList *        _smallImages;
  637.         WImageList *        _stateImages;
  638.         WULong              _itemBufferLength;
  639.         WChar *             _itemBuffer;
  640.         WULong              _columnBufferLength;
  641.         WChar *             _columnBuffer;
  642.         WLong               _maxColumnNumber;
  643.         WBool               _indirectUserData;
  644.         WDataTargetTable *  _dataTarget;
  645.         WBool               _dataFilling;
  646.         WBool               _wasPainting;
  647.         WBool               _ignoreDataAvailableMove;
  648.         WBool               _ignoreItemChanged;
  649.         WLong               _dragSelected;
  650.         WLong               _addRow;
  651.         WBool               _labelBeingEditted;
  652.         WLong               _lastScrollPos;
  653.         WLong               _scrollUp;
  654.         WLong               _scrollDown;
  655.         WBool               _scrolling;
  656.         WDWord              _lvEventBits;
  657.         WBool               _autoHeaders;
  658.         WULong              _count;
  659. };
  660.  
  661. #ifndef _WTEMPLAT_HPP_INCLUDED
  662. #  include "wtemplat.hpp"
  663. #endif
  664.  
  665. #ifndef _WNO_PRAGMA_PUSH
  666. #pragma enum pop;
  667. #pragma pack(pop);
  668. #endif
  669.  
  670. #endif // _WLISTVW_HPP_INCLUDED
  671.