Author: sh-sh-sh
Date: Wed Jun 11 16:51:05 2008
New Revision: 48234
URL: http://svn.opensuse.org/viewcvs/yast?rev=48234&view=rev
Log:
Call base class method in reimplementation
Modified:
trunk/ncurses/src/NCComboBox.cc
Modified: trunk/ncurses/src/NCComboBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/trunk/ncurses/src/NCComboBox.cc?rev=48234&r1=48233&r2=48234&view=diff
==============================================================================
--- trunk/ncurses/src/NCComboBox.cc (original)
+++ trunk/ncurses/src/NCComboBox.cc Wed Jun 11 16:51:05 2008
@@ -15,8 +15,8 @@
Author: Michael Andres
/-*/
-#include <climits>
+#include <climits>
#define YUILogComponent "ncurses"
#include
@@ -25,7 +25,6 @@
#include "NCPopupList.h"
-
NCComboBox::NCComboBox( YWidget * parent, const string & nlabel,
bool editable )
: YComboBox( parent, nlabel, editable )
@@ -48,7 +47,6 @@
}
-
NCComboBox::~NCComboBox()
{
delete lwin;
@@ -57,21 +55,18 @@
}
-
int NCComboBox::preferredWidth()
{
return wGetDefsze().W;
}
-
int NCComboBox::preferredHeight()
{
return wGetDefsze().H;
}
-
void NCComboBox::setEnabled( bool do_bv )
{
NCWidget::setEnabled( do_bv );
@@ -79,14 +74,12 @@
}
-
void NCComboBox::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
}
-
void NCComboBox::setDefsze()
{
// Height: label h. + 1 (text area)
@@ -98,7 +91,6 @@
}
-
void NCComboBox::wCreate( const wrect & newrect )
{
NCWidget::wCreate( newrect );
@@ -130,7 +122,6 @@
}
-
void NCComboBox::wDelete()
{
delete lwin;
@@ -141,7 +132,6 @@
}
-
void NCComboBox::addItem( YItem * item )
{
if ( item )
@@ -170,7 +160,6 @@
}
-
void NCComboBox::addItem( const string & label, bool selected )
{
YItem * newItem = new YItem( label, selected );
@@ -181,7 +170,6 @@
}
-
void NCComboBox::setLabel( const string & nlabel )
{
label = NCstring( nlabel );
@@ -192,7 +180,6 @@
}
-
void NCComboBox::setCurrentItem( int nindex )
{
int idx = 0;
@@ -220,16 +207,12 @@
}
-
-
int NCComboBox::getCurrentItem() const
{
return index;
}
-
-
void NCComboBox::setText( const string & ntext )
{
privText = NCstring( ntext );
@@ -238,36 +221,24 @@
fldstart = 0;
curpos = mayedit ? buffer.length() : 0;
- //(Maybe) no need to set default size here, it has been
- //alread calculated as the items were added (see addItem() above)
- //setDefsze();
+ // (Maybe) no need to set default size here, it has been
+ // alread calculated as the items were added (see addItem() above)
+ // setDefsze();
tUpdate();
Redraw();
}
-
string NCComboBox::text()
{
if ( modified )
return NCstring( buffer ).Str();
- //if ( index != -1 ) {
- // int idx = 0;
- // list<string>::const_iterator entry;
- // for ( entry = deflist.begin(); entry != deflist.end(); ++entry, ++idx ) {
- // if ( idx == index ) {
- // return *entry;
- // }
- // }
- //}
-
return privText.Str();
}
-
void NCComboBox::setValidChars( const string & validchars )
{
validChars = NCstring( validchars );
@@ -275,10 +246,8 @@
}
-
bool NCComboBox::validKey( wint_t key ) const
{
- // private: NCstring validChars;
const wstring vwch( validChars.str() );
if ( vwch.empty() ) // usually empty -> return true
@@ -291,7 +260,6 @@
}
-
void NCComboBox::wRecoded()
{
if ( modified )
@@ -306,7 +274,6 @@
}
-
void NCComboBox::wRedraw()
{
if ( !win )
@@ -325,7 +292,6 @@
}
-
void NCComboBox::tUpdate()
{
if ( !win )
@@ -433,7 +399,6 @@
}
-
NCursesEvent NCComboBox::wHandleInput( wint_t key )
{
NCursesEvent ret;
@@ -598,7 +563,6 @@
}
-
int NCComboBox::listPopup()
{
int idx = -1;
@@ -620,9 +584,6 @@
}
-
-// cleares the table and the lists holding
-// the values
void NCComboBox::deleteAllItems()
{
YComboBox::deleteAllItems();
@@ -641,4 +602,6 @@
tUpdate();
curpos = buffer.length();
}
+
+ YComboBox::setInputMaxLength( nr );
}
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org