[yast-commit] r50237 - in /trunk/ncurses/src: NCMultiSelectionBox.h NCTablePad.h
Author: gs Date: Wed Aug 20 15:54:19 2008 New Revision: 50237 URL: http://svn.opensuse.org/viewcvs/yast?rev=50237&view=rev Log: move class NCTableTag to NCTablePad Modified: trunk/ncurses/src/NCMultiSelectionBox.h trunk/ncurses/src/NCTablePad.h Modified: trunk/ncurses/src/NCMultiSelectionBox.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCMultiSelectionBox.h?rev=50237&r1=50236&r2=50237&view=diff ============================================================================== --- trunk/ncurses/src/NCMultiSelectionBox.h (original) +++ trunk/ncurses/src/NCMultiSelectionBox.h Wed Aug 20 15:54:19 2008 @@ -26,48 +26,7 @@ #include "NCTablePad.h" -class NCTableTag : public NCTableCol -{ -private: - - YItem *yitem; - bool selected; - -public: - - NCTableTag( YItem *item, const bool sel = false ) - : NCTableCol( NCstring( "[ ]" ), SEPARATOR ) - , yitem( item ) - , selected( sel ) - { - //store pointer to this tag in Yitem data - yitem->setData( this ); - } - - virtual ~NCTableTag() {} - virtual void SetLabel( const NCstring & ) { /*NOOP*/; } - - virtual void DrawAt( NCursesWindow & w, const wrect at, - NCTableStyle & tableStyle, - NCTableLine::STATE linestate, - unsigned colidx ) const - { - NCTableCol::DrawAt( w, at, tableStyle, linestate, colidx ); - - if ( selected ) - { - setBkgd( w, tableStyle, linestate, DATA ); - w.addch( at.Pos.L, at.Pos.C + 1, 'x' ); - } - } - - void SetSelected( const bool sel ) { selected = sel; } - - bool Selected() const { return selected; } - - YItem *origItem() { return yitem; } -}; Modified: trunk/ncurses/src/NCTablePad.h URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCTablePad.h?rev=50237&r1=50236&r2=50237&view=diff ============================================================================== --- trunk/ncurses/src/NCTablePad.h (original) +++ trunk/ncurses/src/NCTablePad.h Wed Aug 20 15:54:19 2008 @@ -31,6 +31,48 @@ using std::vector; +class NCTableTag : public NCTableCol +{ +private: + + YItem *yitem; + bool selected; + +public: + + NCTableTag( YItem *item, const bool sel = false ) + : NCTableCol( NCstring( "[ ]" ), SEPARATOR ) + , yitem( item ) + , selected( sel ) + { + //store pointer to this tag in Yitem data + yitem->setData( this ); + } + + virtual ~NCTableTag() {} + + virtual void SetLabel( const NCstring & ) { /*NOOP*/; } + + virtual void DrawAt( NCursesWindow & w, const wrect at, + NCTableStyle & tableStyle, + NCTableLine::STATE linestate, + unsigned colidx ) const + { + NCTableCol::DrawAt( w, at, tableStyle, linestate, colidx ); + + if ( selected ) + { + setBkgd( w, tableStyle, linestate, DATA ); + w.addch( at.Pos.L, at.Pos.C + 1, 'x' ); + } + } + + void SetSelected( const bool sel ) { selected = sel; } + + bool Selected() const { return selected; } + + YItem *origItem() { return yitem; } +}; class NCTablePad : public NCPad { -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
gs@svn.opensuse.org