CVS: tvision/include/tv fontcoll.h,1.7,1.8 lstviewr.h,1.1,1.2 listbox.h,1.3,1.4 sortlibo.h,1.3,1.4
Brought to you by:
set
From: Salvador E. T. <se...@us...> - 2003-12-09 16:04:41
|
Update of /cvsroot/tvision/tvision/include/tv In directory sc8-pr-cvs1:/tmp/cvs-serv22171/include/tv Modified Files: fontcoll.h lstviewr.h listbox.h sortlibo.h Log Message: * Added: A new argument to the optional TListBox constructor and a new member to TListView. They allow to create TListBox-es that centers the focused item when setData is used. Suggested by gradha. Index: fontcoll.h =================================================================== RCS file: /cvsroot/tvision/tvision/include/tv/fontcoll.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** fontcoll.h 10 Sep 2002 20:14:21 -0000 1.7 --- fontcoll.h 9 Dec 2003 16:04:38 -0000 1.8 *************** *** 41,46 **** public: TVBitmapFontDescLBox(const TRect& bounds, ushort aNumCols, ! TScrollBar *aHScrollBar, TScrollBar *aVScrollBar) : ! TSortedListBox(bounds,aNumCols,aHScrollBar,aVScrollBar) {} virtual void getText(char *dest, ccIndex item, short maxChars); }; --- 41,47 ---- public: TVBitmapFontDescLBox(const TRect& bounds, ushort aNumCols, ! TScrollBar *aHScrollBar, TScrollBar *aVScrollBar, ! Boolean aCenterOps=False) : ! TSortedListBox(bounds,aNumCols,aHScrollBar,aVScrollBar,aCenterOps) {} virtual void getText(char *dest, ccIndex item, short maxChars); }; *************** *** 62,67 **** public: TVBitmapFontSizeLBox(const TRect& bounds, ushort aNumCols, ! TScrollBar *aHScrollBar, TScrollBar *aVScrollBar) : ! TSortedListBox(bounds,aNumCols,aHScrollBar,aVScrollBar) {} virtual void getText(char *dest, ccIndex item, short maxChars); }; --- 63,69 ---- public: TVBitmapFontSizeLBox(const TRect& bounds, ushort aNumCols, ! TScrollBar *aHScrollBar, TScrollBar *aVScrollBar, ! Boolean aCenterOps=False) : ! TSortedListBox(bounds,aNumCols,aHScrollBar,aVScrollBar,aCenterOps) {} virtual void getText(char *dest, ccIndex item, short maxChars); }; Index: lstviewr.h =================================================================== RCS file: /cvsroot/tvision/tvision/include/tv/lstviewr.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** lstviewr.h 1 Feb 2000 01:52:19 -0000 1.1 --- lstviewr.h 9 Dec 2003 16:04:38 -0000 1.2 *************** *** 33,36 **** --- 33,37 ---- virtual void draw(); virtual void focusItem( ccIndex item ); + virtual void focusItemCentered( ccIndex item ); virtual TPalette& getPalette() const; virtual void getText( char *dest, ccIndex item, short maxLen ); *************** *** 64,67 **** --- 65,70 ---- // SET: neede to change the scroll bars too. void setNumCols(int aNumCols); + // SET: Used to center the focused item. + Boolean center; #if !defined( NO_STREAM ) Index: listbox.h =================================================================== RCS file: /cvsroot/tvision/tvision/include/tv/listbox.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** listbox.h 22 Jul 2002 19:34:17 -0000 1.3 --- listbox.h 9 Dec 2003 16:04:38 -0000 1.4 *************** *** 33,37 **** TListBox( const TRect& bounds, ushort aNumCols, TScrollBar *aScrollBar ); TListBox( const TRect& bounds, ushort aNumCols, TScrollBar *aHScrollBar, ! TScrollBar *aVScrollBar ); ~TListBox(); --- 33,37 ---- TListBox( const TRect& bounds, ushort aNumCols, TScrollBar *aScrollBar ); TListBox( const TRect& bounds, ushort aNumCols, TScrollBar *aHScrollBar, ! TScrollBar *aVScrollBar, Boolean aCenterOps = False ); ~TListBox(); *************** *** 44,47 **** --- 44,50 ---- virtual void newList( TCollection *aList, Boolean destroyItems ); virtual void setData( void *rec, Boolean destroyItems ); + + // SET: Center the list in setData + Boolean center; TCollection *list(); Index: sortlibo.h =================================================================== RCS file: /cvsroot/tvision/tvision/include/tv/sortlibo.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sortlibo.h 22 Jul 2002 19:33:25 -0000 1.3 --- sortlibo.h 9 Dec 2003 16:04:38 -0000 1.4 *************** *** 30,34 **** ); TSortedListBox( const TRect& bounds, ushort aNumCols, ! TScrollBar *aHScrollBar, TScrollBar *aVScrollBar ); virtual void handleEvent( TEvent& event ); --- 30,35 ---- ); TSortedListBox( const TRect& bounds, ushort aNumCols, ! TScrollBar *aHScrollBar, TScrollBar *aVScrollBar, ! Boolean aCenterOps = False); virtual void handleEvent( TEvent& event ); |