Author: sh-sh-sh
Date: Wed Jul 16 12:31:16 2008
New Revision: 49145
URL: http://svn.opensuse.org/viewcvs/yast?rev=49145&view=rev
Log:
Added API for fate #303492: Multi selection for table widget
(just API, not really supporting multi selection yet)
Modified:
trunk/ncurses/VERSION
trunk/ncurses/package/yast2-ncurses.changes
trunk/ncurses/src/NCTable.cc
trunk/ncurses/src/NCTable.h
trunk/ncurses/src/NCWidgetFactory.cc
trunk/ncurses/src/NCWidgetFactory.h
Modified: trunk/ncurses/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/VERSION?rev=49145&r1=49144&r2=49145&view=diff
==============================================================================
--- trunk/ncurses/VERSION (original)
+++ trunk/ncurses/VERSION Wed Jul 16 12:31:16 2008
@@ -1 +1 @@
-2.17.2
+2.17.3
Modified: trunk/ncurses/package/yast2-ncurses.changes
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/package/yast2-ncurses.changes?rev=49145&r1=49144&r2=49145&view=diff
==============================================================================
--- trunk/ncurses/package/yast2-ncurses.changes (original)
+++ trunk/ncurses/package/yast2-ncurses.changes Wed Jul 16 12:31:16 2008
@@ -1,4 +1,11 @@
-------------------------------------------------------------------
+Wed Jul 16 12:25:11 CEST 2008 - sh@suse.de
+
+- Added API for fate #303492: Multi selection for table widget
+ (just API, not really supporting multi selection yet)
+- V 2.17.3
+
+-------------------------------------------------------------------
Thu Jun 26 10:47:43 CEST 2008 - gs@suse.de
- Improved NCDumbTab widget
Modified: trunk/ncurses/src/NCTable.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCTable.cc?rev=49145&r1=49144&r2=49145&view=diff
==============================================================================
--- trunk/ncurses/src/NCTable.cc (original)
+++ trunk/ncurses/src/NCTable.cc Wed Jul 16 12:31:16 2008
@@ -24,10 +24,12 @@
#include "YTypes.h"
-NCTable::NCTable( YWidget * parent, YTableHeader *tableHeader )
- : YTable( parent, tableHeader )
- , NCPadWidget( parent )
- , biglist( false )
+NCTable::NCTable( YWidget * parent, YTableHeader *tableHeader, bool multiSelection )
+// FIXME : YTable( parent, tableHeader, multiSelection )
+ : YTable( parent, tableHeader,
+ false ) // multiSelection - not supported yet
+ , NCPadWidget( parent )
+ , biglist( false )
{
yuiDebug() << endl;
@@ -47,6 +49,8 @@
}
hasHeadline = myPad()->SetHeadline( _header );
+
+#warning FIXME: Handle multi selection
}
@@ -100,7 +104,7 @@
-// Set table header all at once
+// Set all table headers all at once
void NCTable::setHeader( vector<string> head )
{
Modified: trunk/ncurses/src/NCTable.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCTable.h?rev=49145&r1=49144&r2=49145&view=diff
==============================================================================
--- trunk/ncurses/src/NCTable.h (original)
+++ trunk/ncurses/src/NCTable.h Wed Jul 16 12:31:16 2008
@@ -28,45 +28,9 @@
class NCTable : public YTable, public NCPadWidget
{
-
- friend std::ostream & operator<<( std::ostream & STREAM, const NCTable & OBJ );
-
- NCTable & operator=( const NCTable & );
- NCTable( const NCTable & );
-
-private:
-
- vector<NCstring> _header;
-
-protected:
-
- /**
- * Overload myPad to narrow the type
- */
- virtual NCTablePad * myPad() const
- { return dynamic_cast( NCPadWidget::myPad() ); }
-
- bool biglist;
-
-protected:
-
- virtual const char * location() const { return "NCTable"; }
-
- virtual NCPad * CreatePad();
-
- virtual void cellChanged( int index, int colnum, const string & newtext );
- virtual void cellChanged( const YTableCell *cell );
-
-
-protected:
-
- virtual void startMultipleChanges() { startMultidraw(); }
-
- virtual void doneMultipleChanges() { stopMultidraw(); }
-
public:
- NCTable( YWidget * parent, YTableHeader *tableHeader );
+ NCTable( YWidget * parent, YTableHeader *tableHeader, bool multiSelection = false );
virtual ~NCTable();
@@ -116,6 +80,41 @@
}
void stripHotkeys() { myPad()->stripHotkeys(); }
+
+
+protected:
+
+ /**
+ * Overload myPad to narrow the type
+ */
+ virtual NCTablePad * myPad() const
+ { return dynamic_cast( NCPadWidget::myPad() ); }
+
+ bool biglist;
+
+
+protected:
+
+ virtual const char * location() const { return "NCTable"; }
+
+ virtual NCPad * CreatePad();
+
+ virtual void cellChanged( int index, int colnum, const string & newtext );
+ virtual void cellChanged( const YTableCell *cell );
+
+ virtual void startMultipleChanges() { startMultidraw(); }
+ virtual void doneMultipleChanges() { stopMultidraw(); }
+
+
+private:
+
+ vector<NCstring> _header;
+
+ friend std::ostream & operator<<( std::ostream & STREAM, const NCTable & OBJ );
+
+ NCTable & operator=( const NCTable & );
+ NCTable( const NCTable & );
+
};
Modified: trunk/ncurses/src/NCWidgetFactory.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCWidgetFactory.cc?rev=49145&r1=49144&r2=49145&view=diff
==============================================================================
--- trunk/ncurses/src/NCWidgetFactory.cc (original)
+++ trunk/ncurses/src/NCWidgetFactory.cc Wed Jul 16 12:31:16 2008
@@ -164,9 +164,9 @@
NCTable *
-NCWidgetFactory::createTable( YWidget * parent, YTableHeader * tableHeader )
+NCWidgetFactory::createTable( YWidget * parent, YTableHeader * tableHeader, bool multiSelection )
{
- NCTable *table = new NCTable( parent, tableHeader );
+ NCTable *table = new NCTable( parent, tableHeader, multiSelection );
YUI_CHECK_NEW( table );
return table;
Modified: trunk/ncurses/src/NCWidgetFactory.h
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCWidgetFactory.h?rev=49145&r1=49144&r2=49145&view=diff
==============================================================================
--- trunk/ncurses/src/NCWidgetFactory.h (original)
+++ trunk/ncurses/src/NCWidgetFactory.h Wed Jul 16 12:31:16 2008
@@ -1,18 +1,18 @@
/*---------------------------------------------------------------------\
-| |
-| __ __ ____ _____ ____ |
-| \ \ / /_ _/ ___|_ _|___ \ |
-| \ V / _` \___ \ | | __) | |
-| | | (_| |___) || | / __/ |
-| |_|\__,_|____/ |_| |_____| |
-| |
-| core system |
-| (C) SuSE GmbH |
+| |
+| __ __ ____ _____ ____ |
+| \ \ / /_ _/ ___|_ _|___ \ |
+| \ V / _` \___ \ | | __) | |
+| | | (_| |___) || | / __/ |
+| |_|\__,_|____/ |_| |_____| |
+| |
+| core system |
+| (C) SuSE GmbH |
\----------------------------------------------------------------------/
- File: NCWidgetFactory.h
+ File: NCWidgetFactory.h
- Author: Gabriele Mohr
+ Author: Gabriele Mohr
/-*/
@@ -71,129 +71,73 @@
// Dialogs
//
- virtual NCDialog * createDialog ( YDialogType dialogType, YDialogColorMode colorMode = YDialogNormalColor );
+ virtual NCDialog * createDialog ( YDialogType dialogType, YDialogColorMode colorMode = YDialogNormalColor );
//
// Layout Boxes
//
- virtual NCLayoutBox * createLayoutBox ( YWidget * parent, YUIDimension dim );
+ virtual NCLayoutBox * createLayoutBox ( YWidget * parent, YUIDimension dim );
+
//
// Common Leaf Widgets
//
- virtual NCPushButton * createPushButton ( YWidget * parent,
- const string & label );
-
- virtual NCLabel * createLabel ( YWidget * parent,
- const string & text,
- bool isHeading = false,
- bool isOutputField = false );
-
- virtual NCInputField * createInputField ( YWidget * parent,
- const string & label,
- bool passwordMode = false );
-
- virtual NCCheckBox * createCheckBox ( YWidget * parent,
- const string & label,
- bool isChecked = false );
-
- virtual NCRadioButton * createRadioButton ( YWidget * parent,
- const string & label,
- bool isChecked = false );
-
- virtual NCComboBox * createComboBox ( YWidget * parent,
- const string & label,
- bool editable = false );
-
- virtual NCSelectionBox * createSelectionBox ( YWidget * parent,
- const string & label );
-
- virtual NCTree * createTree ( YWidget * parent,
- const string & label );
-
- virtual NCTable * createTable ( YWidget * parent,
- YTableHeader * tableHeader );
-
- virtual NCProgressBar * createProgressBar ( YWidget * parent,
- const string & label,
- int maxValue = 100 );
- virtual NCBusyIndicator * createBusyIndicator ( YWidget *parent,
- const string & label,
- int timeout = 1000 );
-
- virtual NCRichText * createRichText ( YWidget * parent,
- const string & text = string(),
- bool plainTextMode = false );
-
- virtual NCIntField * createIntField ( YWidget * parent,
- const string & label,
- int minVal,
- int maxVal,
- int initialVal );
-
- virtual NCMenuButton * createMenuButton ( YWidget * parent,
- const string & label );
-
- virtual NCMultiLineEdit * createMultiLineEdit ( YWidget * parent,
- const string & label );
- virtual NCImage * createImage ( YWidget * parent,
- const string & imagePath,
- bool animated = false );
-
- virtual NCLogView * createLogView ( YWidget * parent,
- const string & label,
- int visibleLines,
- int storedLines = 0 );
-
- virtual NCMultiSelectionBox * createMultiSelectionBox ( YWidget * parent,
- const string & label );
-
- virtual YPackageSelector * createPackageSelector ( YWidget * parent,
- long ModeFlags = 0 );
+ virtual NCPushButton * createPushButton ( YWidget * parent, const string & label );
+ virtual NCLabel * createLabel ( YWidget * parent, const string & text, bool isHeading = false, bool isOutputField = false );
+ virtual NCInputField * createInputField ( YWidget * parent, const string & label, bool passwordMode = false );
+ virtual NCCheckBox * createCheckBox ( YWidget * parent, const string & label, bool isChecked = false );
+ virtual NCRadioButton * createRadioButton ( YWidget * parent, const string & label, bool isChecked = false );
+ virtual NCComboBox * createComboBox ( YWidget * parent, const string & label, bool editable = false );
+ virtual NCSelectionBox * createSelectionBox ( YWidget * parent, const string & label );
+ virtual NCTree * createTree ( YWidget * parent, const string & label );
+ virtual NCTable * createTable ( YWidget * parent, YTableHeader * tableHeader, bool multiSelection = false );
+ virtual NCProgressBar * createProgressBar ( YWidget * parent, const string & label, int maxValue = 100 );
+ virtual NCRichText * createRichText ( YWidget * parent, const string & text = string(), bool plainTextMode = false );
+
+
+ //
+ // Less Common Leaf Widgets
+ //
+
+ virtual NCIntField * createIntField ( YWidget * parent, const string & label, int minVal, int maxVal, int initialVal );
+ virtual NCMenuButton * createMenuButton ( YWidget * parent, const string & label );
+ virtual NCMultiLineEdit * createMultiLineEdit ( YWidget * parent, const string & label );
+ virtual NCImage * createImage ( YWidget * parent, const string & imagePath, bool animated = false );
+ virtual NCLogView * createLogView ( YWidget * parent, const string & label, int visibleLines, int storedLines = 0 );
+ virtual NCMultiSelectionBox*createMultiSelectionBox ( YWidget * parent, const string & label );
+ virtual YPackageSelector * createPackageSelector ( YWidget * parent, long ModeFlags = 0 );
+ virtual NCBusyIndicator * createBusyIndicator ( YWidget * parent, const string & label, int timeout = 1000 );
// NCurses only
- virtual YWidget * createPkgSpecial ( YWidget * parent,
- const string & subwidgetName );
-
+ virtual YWidget * createPkgSpecial ( YWidget * parent, const string & subwidgetName );
+
//
// Layout Helpers
//
- virtual NCSpacing * createSpacing ( YWidget * parent,
- YUIDimension dim,
- bool stretchable = false,
- YLayoutSize_t size = 0.0 );
-
- virtual NCEmpty * createEmpty ( YWidget * parent );
-
- virtual NCAlignment * createAlignment ( YWidget * parent,
- YAlignmentType horAlignment,
- YAlignmentType vertAlignment );
-
- virtual NCSquash * createSquash ( YWidget * parent,
- bool horSquash,
- bool vertSquash );
+ virtual NCSpacing * createSpacing ( YWidget * parent, YUIDimension dim, bool stretchable = false, YLayoutSize_t size = 0.0 );
+ virtual NCEmpty * createEmpty ( YWidget * parent );
+ virtual NCAlignment * createAlignment ( YWidget * parent, YAlignmentType horAlignment, YAlignmentType vertAlignment );
+ virtual NCSquash * createSquash ( YWidget * parent, bool horSquash, bool vertSquash );
+
//
// Visual Grouping
//
- virtual NCFrame * createFrame ( YWidget * parent,
- const string & label );
-
- virtual NCCheckBoxFrame * createCheckBoxFrame ( YWidget * parent,
- const string & label,
- bool checked );
+ virtual NCFrame * createFrame ( YWidget * parent, const string & label );
+ virtual NCCheckBoxFrame * createCheckBoxFrame ( YWidget * parent, const string & label, bool checked );
+
//
// Logical Grouping
//
- virtual NCRadioButtonGroup *createRadioButtonGroup ( YWidget * parent );
- virtual NCReplacePoint * createReplacePoint ( YWidget * parent );
+ virtual NCRadioButtonGroup *createRadioButtonGroup ( YWidget * parent );
+ virtual NCReplacePoint * createReplacePoint ( YWidget * parent );
protected:
@@ -208,7 +152,7 @@
NCWidgetFactory();
/**
- * Destructory.
+ * Destructor.
**/
virtual ~NCWidgetFactory();
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org