Author: kmachalkova Date: Wed Nov 7 16:38:34 2007 New Revision: 41860 URL: http://svn.opensuse.org/viewcvs/yast?rev=41860&view=rev Log: Comments Modified: branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.cc branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.h Modified: branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.cc URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.cc?rev=41860&r1=41859&r2=41860&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.cc (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.cc Wed Nov 7 16:38:34 2007 @@ -51,16 +51,40 @@ WIDDBG << endl; } +/////////////////////////////////////////////////////////////////// +// +// +// METHOD NAME : NCMultiSelectionBox::preferredWidth +// METHOD TYPE : void +// +// DESCRIPTION : Set preferred width +// int NCMultiSelectionBox::preferredWidth() { return wGetDefsze().W; } +/////////////////////////////////////////////////////////////////// +// +// +// METHOD NAME : NCMultiSelectionBox::preferredHeight +// METHOD TYPE : void +// +// DESCRIPTION : Set preferred height +// int NCMultiSelectionBox::preferredHeight() { return wGetDefsze().H; } +/////////////////////////////////////////////////////////////////// +// +// +// METHOD NAME : NCMultiSelectionBox::setEnabled +// METHOD TYPE : void +// +// DESCRIPTION : Set widget state (enabled/disabled) +// void NCMultiSelectionBox::setEnabled( bool do_bv ) { NCWidget::setEnabled( do_bv ); @@ -73,7 +97,7 @@ // METHOD NAME : NCMultiSelectionBox::setSize // METHOD TYPE : void // -// DESCRIPTION : +// DESCRIPTION : nc // void NCMultiSelectionBox::setSize( int newwidth, int newheight ) { @@ -86,6 +110,7 @@ // METHOD NAME : NCMultiSelectionBox::currentItem // METHOD TYPE : YItem * // +// DESCRIPTION : Return pointer to current MsB item // YItem * NCMultiSelectionBox::currentItem() { @@ -103,7 +128,7 @@ // METHOD NAME : NCMultiSelectionBox::setCurrentItem // METHOD TYPE : void // -// DESCRIPTION : +// DESCRIPTION : Highlight current item // void NCMultiSelectionBox::setCurrentItem( YItem * item ) { @@ -131,7 +156,8 @@ // METHOD NAME : NCMultiSelectionBox::tagCell // METHOD TYPE : NCTableTag * // -// DESCRIPTION : +// DESCRIPTION : Return pointer to current line tag +// (holds state and yitem pointer) // NCTableTag * NCMultiSelectionBox::tagCell( int index ) { @@ -147,7 +173,7 @@ // METHOD NAME : NCMultiSelectionBox::tagCell // METHOD TYPE : const NCTableTag * // -// DESCRIPTION : +// DESCRIPTION : dtto // const NCTableTag * NCMultiSelectionBox::tagCell( int index ) const { @@ -163,7 +189,7 @@ // METHOD NAME : NCMultiSelectionBox::deleteAllItems // METHOD TYPE : void // -// DESCRIPTION : +// DESCRIPTION : Clear the MsB // void NCMultiSelectionBox::deleteAllItems() { @@ -178,7 +204,7 @@ // METHOD NAME : NCMultiSelectionBox::isItemSelected // METHOD TYPE : bool // -// DESCRIPTION : +// DESCRIPTION : Return item status (selected/deselected) // bool NCMultiSelectionBox::isItemSelected( YItem *item ) { @@ -189,15 +215,16 @@ /////////////////////////////////////////////////////////////////// // // -// METHOD NAME : NCMultiSelectionBox::setItemSelected +// METHOD NAME : NCMultiSelectionBox::selectItem // METHOD TYPE : bool // -// DESCRIPTION : +// DESCRIPTION : Mark item as selected // void NCMultiSelectionBox::selectItem( YItem *yitem, bool selected ) { YMultiSelectionBox::selectItem ( yitem, selected ); + //retrieve pointer to the line tag associated with this item NCTableTag * tag = (NCTableTag *)yitem->data(); YUI_CHECK_PTR( tag ); @@ -207,6 +234,14 @@ } +/////////////////////////////////////////////////////////////////// +// +// +// METHOD NAME : NCMultiSelectionBox::selectItem +// METHOD TYPE : bool +// +// DESCRIPTION : Mark all items as deselected +// void NCMultiSelectionBox::deselectAllItems() { YMultiSelectionBox::deselectAllItems(); @@ -225,7 +260,8 @@ // METHOD NAME : NCMultiSelectionBox::toggleCurrentItem // METHOD TYPE : void // -// DESCRIPTION : +// DESCRIPTION : Toggle item from selected -> deselected +// and vice versa // void NCMultiSelectionBox::toggleCurrentItem() { @@ -240,7 +276,7 @@ // METHOD NAME : NCMultiSelectionBox::setLabel // METHOD TYPE : void // -// DESCRIPTION : +// DESCRIPTION : nc // void NCMultiSelectionBox::setLabel( const string & nlabel ) { @@ -254,7 +290,7 @@ // METHOD NAME : NCMultiSelectionBox::CreatePad // METHOD TYPE : NCPad * // -// DESCRIPTION : +// DESCRIPTION : Create empty MsB pad // NCPad * NCMultiSelectionBox::CreatePad() { @@ -284,7 +320,8 @@ // METHOD NAME : NCMultiSelectionBox::wHandleInput // METHOD TYPE : NCursesEvent // -// DESCRIPTION : +// DESCRIPTION : Handle input :) +// (those keys that are not caught by NCPad) // NCursesEvent NCMultiSelectionBox::wHandleInput( wint_t key ) { Modified: branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.h URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.h?rev=41860&r1=41859&r2=41860&view=diff ============================================================================== --- branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.h (original) +++ branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.h Wed Nov 7 16:38:34 2007 @@ -50,6 +50,7 @@ , yitem (item) , selected( sel ) { + //store pointer to this tag in Yitem data yitem->setData( this ); } virtual ~NCTableTag() {} -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org