home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 October / Chip_1997-10_cd.bin / tema / sybase / powerj / hpp.z / WLISTVW.HPP < prev    next >
C/C++ Source or Header  |  1997-01-06  |  23KB  |  672 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.                              WBool useResizeToAvoidPaintingBug=FALSE );
  319.  
  320.         // VisibleCount -- Calculates the number of items that can fit
  321.         //                 vertically in the visible area of the control
  322.         //                 when in list or report/detail view.
  323.  
  324.         WULong GetVisibleCount( WBool includePartiallyVisible=FALSE ) const;
  325.  
  326.         /**********************************************************
  327.          * Methods
  328.          *********************************************************/
  329.  
  330.         // Add
  331.         //
  332.         //     Add a new item/row.  Items start at 0.  If you set
  333.         //     item to -1, it will add it at the end. The label can
  334.         //     be NULL.  The imageIndex refers to the index into the
  335.         //     imagelist, set it to -1 for no image.  The itemUserData
  336.         //     is per-item userdata.  You can optionally specify
  337.         //     any number of subitems, which are all strings.
  338.         //     Returns the new row index, or -1 if error.
  339.  
  340.         #define WLVTextCallback ((WChar *) -1)
  341.         WLong Add( const WChar *label, WLong imageIndex=-1,
  342.                    WShort stateImageIndex=0, WLong itemNumber=-1,
  343.                    void *itemUserData=NULL, WLong numSubItems=0, ... );
  344.  
  345.         // AddColumn
  346.         //
  347.         //     Add a new column.  Columns start at 0.  If you set
  348.         //     it to -1, the column will be added to the end.
  349.         //     Specify WCOLUMN_DEFAULT for the default column width,
  350.         //     or WCOLUMN_TITLELENGTH to size it according to the length
  351.         //     of the header title.  You can pass NULL for the title.
  352.         //     Returns the new column index, or -1 if error.
  353.  
  354.         #define WCOLUMN_DEFAULT     (-1)
  355.         #define WCOLUMN_TITLELENGTH (-2)
  356.  
  357.         WLong AddColumn( const WChar *title, WLong columnNumber=-1,
  358.                          WLong width=WCOLUMN_TITLELENGTH,
  359.                          WLVColumnAlignment align=WLVCALeft,
  360.                          WLong subItemNumber=-1 );
  361.  
  362.         // Arrange
  363.         //
  364.         //     Arranges the icons in the listview and optionally sorts
  365.         //     them by label.
  366.  
  367.         WBool Arrange( WLVAlignment align=WLVADefault );
  368.  
  369.         // CreateDragImage
  370.         //
  371.         //     Returns an imagelist that can be used for drawing purposes
  372.         //     during a drag operation.  Caller must delete the image
  373.         //     list when done.
  374.  
  375.         WImageList CreateDragImage( WULong itemNumber,
  376.                                      WPoint *initialPosition=NULL ) const;
  377.  
  378.         // DeleteAll
  379.         //
  380.         //     Clear all the items in the listview.
  381.  
  382.         WBool DeleteAll();
  383.  
  384.         // DeleteAllColumns
  385.  
  386.         WBool DeleteAllColumns();
  387.  
  388.         // DeleteColumn
  389.         //
  390.         //     Delete an individual column.
  391.  
  392.         WBool DeleteColumn( WULong columnNumber );
  393.  
  394.         // Delete
  395.         //
  396.         //     Delete an item or group of items (iff last > first).
  397.  
  398.         WBool Delete( WULong first, WULong last=0 );
  399.  
  400.         // EditLabel
  401.         //
  402.         //     Invoke label editing for an item.
  403.  
  404.         WWindowHandle EditLabel( WULong itemNumber );
  405.  
  406.         // EnsureIsVisible
  407.         //
  408.         //     Ensures that an item is fully/partially visible, scrolling
  409.         //     it into view if necessary.  Note that EnsureIsVisible
  410.         //     works in all modes.
  411.  
  412.         WBool EnsureIsVisible( WULong itemNumber, WBool fullyVisible=TRUE );
  413.  
  414.         // Enumerate
  415.         //
  416.         //     Invokes the callback on each item in the list view.
  417.  
  418.         WBool Enumerate( WObject * client, WListViewCallback callback,
  419.                          void * userData=NULL );
  420.  
  421.         // Retrieve
  422.         //
  423.         //     Retrieve the next/previous item by state or position.
  424.         //     If retrieving by state, the startAt value is where the
  425.         //     search should start (but excludes the item itself).
  426.         //     If retrieving by position, the point indicates the position
  427.         //     beneath which to look for the item.
  428.         //     Returns the index of the item, or -1 if no item is found/end
  429.         //     of search.
  430.  
  431.         WLong Retrieve( WLong startAt=-1, WULong flags=WLVNISelected ) const;
  432.         WLong Retrieve( const WPoint & pt );
  433.  
  434.         // RetrieveMultiple
  435.         //
  436.         //     Retrieve multiple next/previous items by state or position.
  437.         //     Returns the an array of indices of the items.
  438.  
  439.         WULongArray RetrieveMultiple( WULong flags=WLVNISelected ) const;
  440.  
  441.         // Redraw
  442.         //
  443.         //     Force the control to redraw a range of items.
  444.         //     The specified items are not actually redrawn until the
  445.         //     window receives a paint message.  To repaint immediately,
  446.         //     call the Update() function after calling this function.
  447.  
  448.         WBool Redraw( WULong from, WULong to, WBool force=FALSE );
  449.  
  450.         // Sort
  451.         //
  452.         //     Sort the items.
  453.  
  454.         WBool Sort( WListViewSortCallback sortFunction );
  455.         WBool Sort( WObject * object,
  456.                     WListViewSortMemberCallback sortFunction );
  457.  
  458.         /**********************************************************
  459.          * Item Properties
  460.          *********************************************************/
  461.  
  462.         // ColumnAlignment
  463.  
  464.         WLVColumnAlignment GetColumnAlignment( WLong columnNumber ) const;
  465.         WBool SetColumnAlignment( WLong columnNumber,
  466.                                   WLVColumnAlignment alignment );
  467.  
  468.         // ColumnText
  469.  
  470.         WString GetColumnText( WLong columnNumber ) const;
  471.         WBool SetColumnText( WLong columnNumber, const WString & text );
  472.  
  473.         // ColumnWidth
  474.         //
  475.         //     Get or set the width of the given column.  Note that in
  476.         //     report view, the columns go from 0 to n.  You can also use
  477.         //     this is list view to get/set the (only) column's width,
  478.         //     but you have to use a column number of -1.
  479.  
  480.         #define WCOLUMN_AUTOSIZE_USEITEMS (-1)
  481.         #define WCOLUMN_AUTOSIZE_USETITLE (-2)
  482.  
  483.         WLong GetColumnWidth( WLong columnNumber ) const;
  484.         WBool SetColumnWidth( WLong columnNumber, WLong width );
  485.  
  486.         // ImageIndex -- Sets/Gets the index of the icon in the icon and
  487.         //                  small icon image lists
  488.  
  489.         WBool SetImageIndex( WULong item, WLong index );
  490.         WLong GetImageIndex( WULong item ) const;
  491.  
  492.         // Position
  493.         //
  494.         //     Get/set the position of an item in icon or small icon view.
  495.  
  496.         WBool GetPosition( WLong itemNumber, WPoint & position ) const;
  497.         WBool GetPosition( WLong itemNumber, WLong & x, WLong & y ) const;
  498.         WBool SetPosition( WLong itemNumber, const WPoint & position );
  499.         WBool SetPosition( WLong itemNumber, WLong x, WLong y );
  500.  
  501.         // Rectangle
  502.         //
  503.         //     Get/set the rectangle where the control is placed
  504.         //     If an itemNumber is supplied, then the rectangle applies
  505.         //     to the position
  506.  
  507.         WRect GetRectangle( WLong itemNumber, WLVRectType type=WLVRText );
  508.  
  509.         // State
  510.         //
  511.         //     Get/set the state of an item.  A mask value is used to
  512.         //     determine which states to get/set, by default it's the
  513.         //     selected state (but you can get/set multiple states).
  514.  
  515.         WULong GetState( WLong itemNumber,
  516.                          WULong mask=WLVSelectedState ) const;
  517.         WBool SetState( WLong itemNumber, WULong state,
  518.                         WULong mask=WLVSelectedState );
  519.  
  520.         // StateImageIndex
  521.  
  522.         WBool SetStateImageIndex( WULong itemNumber, WShort index );
  523.         WShort GetStateImageIndex( WULong itemNumber ) const;
  524.  
  525.         // Text
  526.         //
  527.         //     Get or set the caption of an item/subitem.  If no parm
  528.         //     is given, defaults to column 0 which is the item label.
  529.         //
  530.  
  531.         WString GetText( WULong itemNumber, WULong subItemNumber=0 ) const;
  532.         WBool SetText( WULong itemNumber, const WString & text,
  533.                        WULong subItemNumber=0, WBool checkOldValue=TRUE );
  534.  
  535.         // UserData
  536.         //
  537.         //     Get or set the per-item data.
  538.  
  539.         WBool SetUserData( WULong itemNumber, void *itemUserData );
  540.         void *GetUserData( WULong itemNumber ) const;
  541.  
  542.         /**********************************************************
  543.          * Default Event Handlers
  544.          *********************************************************/
  545.  
  546.         WBool DragEnterHandler( WListView *, WDragEventData * );
  547.         WBool DragOverHandler( WListView *, WDragEventData * );
  548.         WBool DragLeaveHandler( WListView *, WDragEventData * );
  549.  
  550.         WBool DestroyEventHandler( WListView *, WEventData * );
  551.  
  552.         WBool ContextMenuEventHandler( WWindow *,
  553.                                        WContextMenuEventData * event );
  554.  
  555.         // Event handlers for the DataTarget
  556.  
  557.         WBool DataOpenHandler( WListView *, WDataOpenEventData *ev );
  558.         WBool DataCloseHandler( WListView *, WDataCloseEventData *ev );
  559.         WBool DataAvailableHandler( WListView *, WDataAvailableEventData *ev );
  560.         WBool DataRequestHandler( WListView *, WDataRequestEventData *ev );
  561.         WBool DataGuardRowHandler( WListView *, WDataGuardRowEventData * ev );
  562.  
  563.         /**********************************************************
  564.          * Overrides
  565.          *********************************************************/
  566.  
  567.         virtual WColor GetBackColor( WBool getResultingColor=TRUE ) const;
  568.  
  569.         virtual WBool SetParent( const WWindow * parent );
  570.  
  571.         virtual WBool WantsDragMessage( WULong whichButton ) const;
  572.         virtual WBool FillDragEventData( WDragEventData & event ) const;
  573.  
  574.         virtual WBool Destroy();
  575.  
  576.         virtual WBool ProcessMessage( const WMessage & msg,
  577.                                       WLong & returns );
  578.  
  579.         virtual WBool SetBackColor( const WColor & col );
  580.  
  581.         virtual WBool SetForeColor( const WColor & col );
  582.  
  583.         virtual WBool CloneWindow( WStyle newStyle, WStyle newExStyle,
  584.                                    void * data=NULL );
  585.  
  586.         virtual WRect GetRectangle( WBool absolute=FALSE ) const;
  587.     
  588.         virtual WBool SetText( const WString & str );
  589.  
  590.         virtual WString GetText() const;
  591.  
  592.         virtual WBool SetUserData( void * userData );
  593.  
  594.         virtual void * GetUserData() const;
  595.  
  596.     protected:
  597.         virtual WBool ProcessNotify( WUInt id, WNotify code, WNotifyInfo info,
  598.                                      WLong & returns );
  599.  
  600.     public:
  601.         virtual const WChar * InitializeClass();
  602.  
  603.         virtual WStyle GetDefaultStyle() const;
  604.  
  605.         /**********************************************************
  606.          * Internal
  607.          *********************************************************/
  608.  
  609.     protected:
  610.  
  611.         void  UpdateExtents( WLong count );
  612.  
  613.         WBool AddDataRow( WLong row, WLong itemNumber = -1 );
  614.  
  615.         WLong FindDataRow( WLong row, WLong itemCount = -1 );
  616.  
  617.         WBool AllocDTTable();
  618.  
  619.         WBool IndirectUserData( WBool indirect );
  620.  
  621.         void  RenumberDataRows();
  622.         WBool HandleRefreshRow( WLong reason, WLong row, WLong count );
  623.  
  624.         WBool SetRealUserData( WULong itemNumber, void *itemUserData );
  625.         void *GetRealUserData( WULong itemNumber ) const;
  626.  
  627.         void doDataTargetScroll();
  628.  
  629.         virtual void EventNotice( WEventID id, WEventNotice type );
  630.  
  631.         /**********************************************************
  632.          * Data Members
  633.          *********************************************************/
  634.  
  635.     private:
  636.         WImageList *        _normalImages;
  637.         WImageList *        _smallImages;
  638.         WImageList *        _stateImages;
  639.         WULong              _itemBufferLength;
  640.         WChar *             _itemBuffer;
  641.         WULong              _columnBufferLength;
  642.         WChar *             _columnBuffer;
  643.         WLong               _maxColumnNumber;
  644.         WBool               _indirectUserData;
  645.         WDataTargetTable *  _dataTarget;
  646.         WBool               _dataFilling;
  647.         WBool               _wasPainting;
  648.         WBool               _ignoreDataAvailableMove;
  649.         WBool               _ignoreItemChanged;
  650.         WLong               _dragSelected;
  651.         WLong               _addRow;
  652.         WBool               _labelBeingEditted;
  653.         WLong               _lastScrollPos;
  654.         WLong               _scrollUp;
  655.         WLong               _scrollDown;
  656.         WBool               _scrolling;
  657.         WDWord              _lvEventBits;
  658.         WBool               _autoHeaders;
  659.         WULong              _count;
  660. };
  661.  
  662. #ifndef _WTEMPLAT_HPP_INCLUDED
  663. #  include "wtemplat.hpp"
  664. #endif
  665.  
  666. #ifndef _WNO_PRAGMA_PUSH
  667. #pragma enum pop;
  668. #pragma pack(pop);
  669. #endif
  670.  
  671. #endif // _WLISTVW_HPP_INCLUDED
  672.