Author: gs
Date: Tue Jun 26 15:27:24 2007
New Revision: 39034
URL: http://svn.opensuse.org/viewcvs/yast?rev=39034&view=rev
Log:
replace setSize(long, long) by setSize(int, int)
add preferredWidth/Height to most widgets
use YCPDialogParser::parseWidgetTreeTerm() to parse layout
Modified:
branches/tmp/sh/mod-ui/ncurses/src/NCAlignment.cc
branches/tmp/sh/mod-ui/ncurses/src/NCAlignment.h
branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.cc
branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.h
branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.cc
branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.h
branches/tmp/sh/mod-ui/ncurses/src/NCComboBox.cc
branches/tmp/sh/mod-ui/ncurses/src/NCComboBox.h
branches/tmp/sh/mod-ui/ncurses/src/NCDialog.cc
branches/tmp/sh/mod-ui/ncurses/src/NCDialog.h
branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.cc
branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.h
branches/tmp/sh/mod-ui/ncurses/src/NCFrame.cc
branches/tmp/sh/mod-ui/ncurses/src/NCFrame.h
branches/tmp/sh/mod-ui/ncurses/src/NCImage.cc
branches/tmp/sh/mod-ui/ncurses/src/NCImage.h
branches/tmp/sh/mod-ui/ncurses/src/NCIntField.cc
branches/tmp/sh/mod-ui/ncurses/src/NCIntField.h
branches/tmp/sh/mod-ui/ncurses/src/NCLabel.cc
branches/tmp/sh/mod-ui/ncurses/src/NCLabel.h
branches/tmp/sh/mod-ui/ncurses/src/NCLogView.cc
branches/tmp/sh/mod-ui/ncurses/src/NCLogView.h
branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.cc
branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.h
branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.cc
branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.h
branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.cc
branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.h
branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc
branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.h
branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.cc
branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.h
branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.cc
branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.h
branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.cc
branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.h
branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.cc
branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.h
branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.cc
branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.h
branches/tmp/sh/mod-ui/ncurses/src/NCRichText.cc
branches/tmp/sh/mod-ui/ncurses/src/NCRichText.h
branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.cc
branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.h
branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.cc
branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.h
branches/tmp/sh/mod-ui/ncurses/src/NCSplit.cc
branches/tmp/sh/mod-ui/ncurses/src/NCSplit.h
branches/tmp/sh/mod-ui/ncurses/src/NCSquash.cc
branches/tmp/sh/mod-ui/ncurses/src/NCSquash.h
branches/tmp/sh/mod-ui/ncurses/src/NCTable.cc
branches/tmp/sh/mod-ui/ncurses/src/NCTable.h
branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.cc
branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.h
branches/tmp/sh/mod-ui/ncurses/src/NCTree.cc
branches/tmp/sh/mod-ui/ncurses/src/NCTree.h
branches/tmp/sh/mod-ui/ncurses/src/NCWeight.cc
branches/tmp/sh/mod-ui/ncurses/src/NCWeight.h
branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc
branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDescr.cc
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTable.cc
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCAlignment.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCAlignment.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCAlignment.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCAlignment.cc Tue Jun 26 15:27:24 2007
@@ -28,10 +28,10 @@
//
// DESCRIPTION :
//
-NCAlignment::NCAlignment( NCWidget * parent, const YWidgetOpt & opt,
+NCAlignment::NCAlignment( NCWidget * parent,
YAlignmentType halign,
YAlignmentType valign )
- : YAlignment( opt, halign, valign )
+ : YAlignment( halign, valign )
, NCWidget( parent )
{
WIDDBG << endl;
@@ -59,7 +59,7 @@
//
// DESCRIPTION :
//
-void NCAlignment::setSize( long newwidth, long newheight )
+void NCAlignment::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YAlignment::setSize( newwidth, newheight );
@@ -73,7 +73,7 @@
//
// DESCRIPTION :
//
-void NCAlignment::moveChild( YWidget * child, long newx, long newy )
+void NCAlignment::moveChild( YWidget * child, int newx, int newy )
{
NCWidget * cw = dynamic_cast(child);
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCAlignment.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCAlignment.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCAlignment.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCAlignment.h Tue Jun 26 15:27:24 2007
@@ -47,14 +47,21 @@
public:
- NCAlignment( NCWidget * parent, const YWidgetOpt & opt,
- YAlignmentType halign, YAlignmentType valign );
+ NCAlignment( NCWidget * parent, YAlignmentType halign, YAlignmentType valign );
virtual ~NCAlignment();
- virtual long nicesize( YUIDimension dim ) { return YAlignment::nicesize( dim ); }
- virtual void setSize( long newwidth, long newheight );
+ // virtual long nicesize( YUIDimension dim ) { return YAlignment::nicesize( dim ); }
+ virtual int preferredWidth() { return YAlignment::preferredWidth(); }
+ virtual int preferredHeight() { return YAlignment::preferredHeight(); }
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
- virtual void moveChild( YWidget * child, long newx, long newy );
+ virtual void moveChild( YWidget * child, int newx, int newy );
virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
};
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.cc Tue Jun 26 15:27:24 2007
@@ -74,6 +74,16 @@
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
+int NCCheckBox::preferredWidth()
+{
+ return wGetDefsze().W;
+}
+
+int NCCheckBox::preferredHeight()
+{
+ return wGetDefsze().H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
@@ -82,7 +92,7 @@
//
// DESCRIPTION :
//
-void NCCheckBox::setSize( long newwidth, long newheight )
+void NCCheckBox::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YCheckBox::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCCheckBox.h Tue Jun 26 15:27:24 2007
@@ -69,7 +69,16 @@
virtual ~NCCheckBox();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.cc Tue Jun 26 15:27:24 2007
@@ -92,7 +92,7 @@
//
// DESCRIPTION :
//
-void NCCheckBoxFrame::setSize( long newwidth, long newheight )
+void NCCheckBoxFrame::setSize( int newwidth, int newheight )
{
wsze csze( newheight, newwidth );
wRelocate( wpos( 0 ), csze );
@@ -258,3 +258,8 @@
return YWidget::setKeyboardFocus();
return true;
}
+
+bool NCCheckBoxFrame::value()
+{
+ return getValue();
+}
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCCheckBoxFrame.h Tue Jun 26 15:27:24 2007
@@ -60,7 +60,13 @@
virtual ~NCCheckBoxFrame();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
@@ -72,6 +78,7 @@
virtual bool setKeyboardFocus();
+ virtual bool value();
virtual NCursesEvent wHandleInput( wint_t key );
};
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCComboBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCComboBox.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCComboBox.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCComboBox.cc Tue Jun 26 15:27:24 2007
@@ -79,6 +79,16 @@
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
+int NCComboBox::preferredWidth()
+{
+ return wGetDefsze().W;
+}
+
+int NCComboBox::preferredHeight()
+{
+ return wGetDefsze().H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
@@ -87,7 +97,7 @@
//
// DESCRIPTION :
//
-void NCComboBox::setSize( long newwidth, long newheight )
+void NCComboBox::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YComboBox::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCComboBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCComboBox.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCComboBox.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCComboBox.h Tue Jun 26 15:27:24 2007
@@ -92,7 +92,16 @@
bool selected );
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCDialog.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCDialog.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCDialog.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCDialog.cc Tue Jun 26 15:27:24 2007
@@ -217,7 +217,7 @@
//
// DESCRIPTION :
//
-void NCDialog::setSize( long newwidth, long newheight )
+void NCDialog::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YDialog::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCDialog.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCDialog.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCDialog.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCDialog.h Tue Jun 26 15:27:24 2007
@@ -137,7 +137,13 @@
NCursesEvent pollInput();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
protected:
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.cc Tue Jun 26 15:27:24 2007
@@ -57,7 +57,7 @@
//
// DESCRIPTION :
//
-void NCEmpty::setSize( long newwidth, long newheight )
+void NCEmpty::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YEmpty::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCEmpty.h Tue Jun 26 15:27:24 2007
@@ -50,8 +50,16 @@
NCEmpty( NCWidget * parent, const YWidgetOpt & opt );
virtual ~NCEmpty();
- virtual long nicesize( YUIDimension dim ){ return YEmpty::nicesize( dim ); }
- virtual void setSize( long newwidth, long newheight );
+ // virtual long nicesize( YUIDimension dim ){ return YEmpty::nicesize( dim ); }
+ virtual int preferredWidth() { return YEmpty::preferredWidth(); }
+ virtual int preferredHeight() { return YEmpty::preferredHeight(); }
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
};
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCFrame.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCFrame.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCFrame.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCFrame.cc Tue Jun 26 15:27:24 2007
@@ -81,7 +81,7 @@
//
// DESCRIPTION :
//
-void NCFrame::setSize( long newwidth, long newheight )
+void NCFrame::setSize( int newwidth, int newheight )
{
wsze csze( newheight, newwidth );
wRelocate( wpos( 0 ), csze );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCFrame.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCFrame.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCFrame.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCFrame.h Tue Jun 26 15:27:24 2007
@@ -58,7 +58,13 @@
virtual ~NCFrame();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCImage.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCImage.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCImage.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCImage.cc Tue Jun 26 15:27:24 2007
@@ -74,7 +74,7 @@
//
// DESCRIPTION :
//
-void NCImage::setSize( long newwidth, long newheight )
+void NCImage::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YImage::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCImage.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCImage.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCImage.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCImage.h Tue Jun 26 15:27:24 2007
@@ -53,7 +53,13 @@
virtual ~NCImage();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
};
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCIntField.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCIntField.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCIntField.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCIntField.cc Tue Jun 26 15:27:24 2007
@@ -97,7 +97,7 @@
//
// DESCRIPTION :
//
-void NCIntField::setSize( long newwidth, long newheight )
+void NCIntField::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YIntField::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCIntField.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCIntField.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCIntField.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCIntField.h Tue Jun 26 15:27:24 2007
@@ -77,7 +77,13 @@
virtual ~NCIntField();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCLabel.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCLabel.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCLabel.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCLabel.cc Tue Jun 26 15:27:24 2007
@@ -66,6 +66,16 @@
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
+int NCLabel::preferredWidth()
+{
+ return wGetDefsze().W;
+}
+
+int NCLabel::preferredHeight()
+{
+ return wGetDefsze().H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
@@ -74,7 +84,7 @@
//
// DESCRIPTION :
//
-void NCLabel::setSize( long newwidth, long newheight )
+void NCLabel::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YLabel::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCLabel.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCLabel.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCLabel.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCLabel.h Tue Jun 26 15:27:24 2007
@@ -57,10 +57,19 @@
virtual ~NCLabel();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
+
+ virtual int preferredWidth();
+ virtual int preferredHeight();
};
///////////////////////////////////////////////////////////////////
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCLogView.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCLogView.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCLogView.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCLogView.cc Tue Jun 26 15:27:24 2007
@@ -66,6 +66,17 @@
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
+int NCLogView::preferredWidth()
+{
+ defsze.W = ( 5 > labelWidht() ? 5 : labelWidht() ) + 2;
+ return wGetDefsze().W;
+}
+
+int NCLogView::preferredHeight()
+{
+ return wGetDefsze().H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
@@ -74,7 +85,7 @@
//
// DESCRIPTION :
//
-void NCLogView::setSize( long newwidth, long newheight )
+void NCLogView::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YLogView::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCLogView.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCLogView.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCLogView.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCLogView.h Tue Jun 26 15:27:24 2007
@@ -62,7 +62,16 @@
virtual ~NCLogView();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
virtual void setLogText( const YCPString & ntext);
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.cc Tue Jun 26 15:27:24 2007
@@ -69,6 +69,16 @@
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
+int NCMenuButton::preferredWidth()
+{
+ return wGetDefsze().W;
+}
+
+int NCMenuButton::preferredHeight()
+{
+ return wGetDefsze().H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
@@ -77,7 +87,7 @@
//
// DESCRIPTION :
//
-void NCMenuButton::setSize( long newwidth, long newheight )
+void NCMenuButton::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YMenuButton::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCMenuButton.h Tue Jun 26 15:27:24 2007
@@ -59,7 +59,16 @@
virtual ~NCMenuButton();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual NCursesEvent wHandleInput( wint_t key );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.cc Tue Jun 26 15:27:24 2007
@@ -66,6 +66,16 @@
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
+int NCMultiLineEditC::preferredWidth()
+{
+ defsze.W = ( 5 > labelWidht() ? 5 : labelWidht() ) + 2
+ return wGetDefsze().W;
+}
+
+int NCMultiLineEdit::preferredHeight()
+{
+ return wGetDefsze().H;
+}
///////////////////////////////////////////////////////////////////
//
//
@@ -74,7 +84,7 @@
//
// DESCRIPTION :
//
-void NCMultiLineEdit::setSize( long newwidth, long newheight )
+void NCMultiLineEdit::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YMultiLineEdit::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCMultiLineEdit.h Tue Jun 26 15:27:24 2007
@@ -69,7 +69,15 @@
virtual ~NCMultiLineEdit();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
virtual void setText( const YCPString & ntext);
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=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.cc Tue Jun 26 15:27:24 2007
@@ -65,6 +65,16 @@
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
+int NCMultiSelectionBox::preferredWidth()
+{
+ return wGetDefsze().W;
+}
+
+int NCMultiSelectionBox::preferredHeight()
+{
+ return wGetDefsze().H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
@@ -73,7 +83,7 @@
//
// DESCRIPTION :
//
-void NCMultiSelectionBox::setSize( long newwidth, long newheight )
+void NCMultiSelectionBox::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YMultiSelectionBox::setSize( newwidth, newheight );
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=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCMultiSelectionBox.h Tue Jun 26 15:27:24 2007
@@ -126,7 +126,16 @@
virtual ~NCMultiSelectionBox();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc Tue Jun 26 15:27:24 2007
@@ -76,9 +76,11 @@
if ( ! pkgLayout.isNull() && ui )
{
YWidgetOpt childrenOpt( opt );
- widgetRoot = (YContainerWidget *)ui->createWidgetTree( dynamic_cast(parent),
- childrenOpt, 0, pkgLayout );
- YCPDialogParser::parseWidgetTreeTerm(dynamic_cast(parent), childrenOpt, pkgLayout );
+ // widgetRoot = (YContainerWidget *)ui->createWidgetTree( dynamic_cast(parent),
+ // childrenOpt, 0, pkgLayout );
+ widgetRoot = (YContainerWidget * )YCPDialogParser::parseWidgetTreeTerm( dynamic_cast(parent),
+ childrenOpt,
+ pkgLayout );
}
// create the PackageSelector (creation with 'new' is required because initialization
@@ -95,7 +97,7 @@
NCDBG << "Widget tree of NCPackageSelector created" << endl;
// get the widget ID of the package table
- YWidget * pkg = ui->widgetWithId( widgetRoot, NCPkgNames::Packages(), true );
+ YWidget * pkg = YDialogParser::findWidgetWithId( widgetRoot, NCPkgNames::Packages() );
pkgList = dynamic_cast(pkg);
if ( pkgList )
@@ -160,7 +162,7 @@
//
// DESCRIPTION :
//
-void NCPackageSelectorStart::setSize( long newwidth, long newheight )
+void NCPackageSelectorStart::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
NCSplit::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.h Tue Jun 26 15:27:24 2007
@@ -76,7 +76,13 @@
virtual ~NCPackageSelectorStart();
virtual long nicesize( YUIDimension dim ) { return NCSplit::nicesize( dim ); }
- virtual void setSize( long newwidth, long newheight );
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
/**
* Fills the package table with packages belonging to the
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.cc Tue Jun 26 15:27:24 2007
@@ -77,6 +77,16 @@
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
+int NCProgressBar::preferredWidth()
+{
+ return wGetDefsze().W;
+}
+
+int NCProgressBar::preferredHeight()
+{
+ return wGetDefsze().H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
@@ -85,7 +95,7 @@
//
// DESCRIPTION :
//
-void NCProgressBar::setSize( long newwidth, long newheight )
+void NCProgressBar::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YProgressBar::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCProgressBar.h Tue Jun 26 15:27:24 2007
@@ -70,7 +70,16 @@
virtual ~NCProgressBar();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.cc Tue Jun 26 15:27:24 2007
@@ -68,6 +68,16 @@
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
+int NCPushButton::preferredWidth()
+{
+ return wGetDefsze().W;
+}
+
+int NCPushButton::preferredHeight()
+{
+ return wGetDefsze().H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
@@ -76,7 +86,7 @@
//
// DESCRIPTION :
//
-void NCPushButton::setSize( long newwidth, long newheight )
+void NCPushButton::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YPushButton::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPushButton.h Tue Jun 26 15:27:24 2007
@@ -56,7 +56,16 @@
virtual ~NCPushButton();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual NCursesEvent wHandleInput( wint_t key );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.cc Tue Jun 26 15:27:24 2007
@@ -31,18 +31,16 @@
//
// DESCRIPTION :
//
-NCRadioButton::NCRadioButton( NCWidget * parent, const YWidgetOpt & opt,
- YRadioButtonGroup * rbg,
- const YCPString & nlabel,
- bool check )
- : YRadioButton( opt, nlabel, rbg )
+NCRadioButton::NCRadioButton( NCWidget * parent,
+ const YCPString & nlabel )
+ : YRadioButton( parent, nlabel )
, NCWidget( parent )
, checked( false )
{
WIDDBG << endl;
setLabel( nlabel );
hotlabel = &label;
- setValue( check );
+ //setValue( check );
}
///////////////////////////////////////////////////////////////////
@@ -71,6 +69,16 @@
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
+int NCRadioButton::preferredWidth()
+{
+ return wGetDefsze().W;
+}
+
+int NCRadioButton::preferredHeight()
+{
+ return wGetDefsze().H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
@@ -79,7 +87,7 @@
//
// DESCRIPTION :
//
-void NCRadioButton::setSize( long newwidth, long newheight )
+void NCRadioButton::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YRadioButton::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCRadioButton.h Tue Jun 26 15:27:24 2007
@@ -54,19 +54,29 @@
public:
- NCRadioButton( NCWidget * parent, const YWidgetOpt & opt,
- YRadioButtonGroup * rbg,
- const YCPString & label,
- bool checked );
+ NCRadioButton( NCWidget * parent,
+ const YCPString & label );
virtual ~NCRadioButton();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
- virtual void setValue( const YCPBoolean & newval );
- virtual YCPBoolean getValue();
+ // virtual void setValue( const YCPBoolean & newval );
+ // virtual YCPBoolean getValue();
+
+ virtual void setValue ( bool newval ){ checked = newval; }
+ virtual bool value() { return checked; }
virtual NCursesEvent wHandleInput( wint_t key );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.cc Tue Jun 26 15:27:24 2007
@@ -58,7 +58,7 @@
//
// DESCRIPTION :
//
-void NCRadioButtonGroup::setSize( long newwidth, long newheight )
+void NCRadioButtonGroup::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YRadioButtonGroup::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCRadioButtonGroup.h Tue Jun 26 15:27:24 2007
@@ -52,8 +52,16 @@
NCRadioButtonGroup( NCWidget * parent, const YWidgetOpt & opt );
virtual ~NCRadioButtonGroup();
- virtual long nicesize( YUIDimension dim ) { return YRadioButtonGroup::nicesize( dim ); }
- virtual void setSize( long newwidth, long newheight );
+ //virtual long nicesize( YUIDimension dim ) { return YRadioButtonGroup::nicesize( dim ); }
+ virtual int preferredWidth() { return YRadioButtonGroup::preferredWidth(); }
+ virtual int preferredHeight() { return YRadioButtonGroup::preferredHeight(); }
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void addRadioButton(YRadioButton *button);
virtual void removeRadioButton(YRadioButton *button);
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.cc Tue Jun 26 15:27:24 2007
@@ -57,7 +57,7 @@
//
// DESCRIPTION :
//
-void NCReplacePoint::setSize( long newwidth, long newheight )
+void NCReplacePoint::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YReplacePoint::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCReplacePoint.h Tue Jun 26 15:27:24 2007
@@ -50,8 +50,16 @@
NCReplacePoint( NCWidget * parent, const YWidgetOpt & opt );
virtual ~NCReplacePoint();
- virtual long nicesize( YUIDimension dim ) { return YReplacePoint::nicesize( dim ); }
- virtual void setSize( long newwidth, long newheight );
+ //virtual long nicesize( YUIDimension dim ) { return YReplacePoint::nicesize( dim ); }
+ virtual int preferredWidth() { return YReplacePoint::preferredWidth(); }
+ virtual int preferredHeight() { return YReplacePoint::preferredHeight(); }
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
};
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCRichText.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCRichText.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCRichText.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCRichText.cc Tue Jun 26 15:27:24 2007
@@ -206,6 +206,16 @@
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
+int NCRichText::preferredWidth()
+{
+ return wGetDefsze().W;
+}
+
+int NCRichText::preferredHeight()
+{
+ return wGetDefsze().H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
@@ -214,7 +224,7 @@
//
// DESCRIPTION :
//
-void NCRichText::setSize( long newwidth, long newheight )
+void NCRichText::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YRichText::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCRichText.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCRichText.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCRichText.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCRichText.h Tue Jun 26 15:27:24 2007
@@ -204,7 +204,16 @@
virtual ~NCRichText();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.cc Tue Jun 26 15:27:24 2007
@@ -70,6 +70,18 @@
}
}
+int NCSelectionBox::preferredWidth()
+{
+ wsze sze = ( biglist ) ? myPad()->tableSize() + 2 : wGetDefsze();
+ return sze.W > (int)(labelWidht()+2) ? sze.W : (labelWidht()+2);
+}
+
+int NCSelectionBox::preferredHeight()
+{
+ wsze sze = ( biglist ) ? myPad()->tableSize() + 2 : wGetDefsze();
+ return sze.H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
@@ -78,7 +90,7 @@
//
// DESCRIPTION :
//
-void NCSelectionBox::setSize( long newwidth, long newheight )
+void NCSelectionBox::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YSelectionBox::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCSelectionBox.h Tue Jun 26 15:27:24 2007
@@ -69,7 +69,16 @@
virtual void itemAdded( const YCPString& string, int index, bool selected );
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.cc Tue Jun 26 15:27:24 2007
@@ -71,7 +71,7 @@
//
// DESCRIPTION :
//
-void NCSpacing::setSize( long newwidth, long newheight )
+void NCSpacing::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YSpacing::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCSpacing.h Tue Jun 26 15:27:24 2007
@@ -53,7 +53,13 @@
float size, bool horizontal, bool vertical );
virtual ~NCSpacing();
- virtual void setSize( long newwidth, long newheight );
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
};
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCSplit.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCSplit.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCSplit.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCSplit.cc Tue Jun 26 15:27:24 2007
@@ -58,7 +58,7 @@
//
// DESCRIPTION :
//
-void NCSplit::setSize( long newwidth, long newheight )
+void NCSplit::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YSplit::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCSplit.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCSplit.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCSplit.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCSplit.h Tue Jun 26 15:27:24 2007
@@ -54,7 +54,13 @@
virtual ~NCSplit();
virtual long nicesize( YUIDimension dim ) { return YSplit::nicesize( dim ); }
- virtual void setSize( long newwidth, long newheight );
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void moveChild( YWidget * child, long newx, long newy );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCSquash.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCSquash.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCSquash.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCSquash.cc Tue Jun 26 15:27:24 2007
@@ -58,7 +58,7 @@
//
// DESCRIPTION :
//
-void NCSquash::setSize( long newwidth, long newheight )
+void NCSquash::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YSquash::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCSquash.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCSquash.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCSquash.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCSquash.h Tue Jun 26 15:27:24 2007
@@ -51,8 +51,16 @@
bool hsquash, bool vsquash );
virtual ~NCSquash();
- virtual long nicesize( YUIDimension dim ) { return YSquash::nicesize( dim ); }
- virtual void setSize( long newwidth, long newheight );
+ //virtual long nicesize( YUIDimension dim ) { return YSquash::nicesize( dim ); }
+ virtual int preferredWidth() { return YSquash::preferredWidth(); }
+ virtual int preferredHeight() { return YSquash::preferredHeight(); }
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
};
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCTable.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCTable.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCTable.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCTable.cc Tue Jun 26 15:27:24 2007
@@ -80,6 +80,18 @@
return dim == YD_HORIZ ? sze.W : sze.H;
}
+int NCTable::preferredWidth()
+{
+ wsze sze = ( biglist ) ? myPad()->tableSize() + 2 : wGetDefsze();
+ return sze.W;
+}
+
+int NCTable::preferredHeight()
+{
+ wsze sze = ( biglist ) ? myPad()->tableSize() + 2 : wGetDefsze();
+ return sze.H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
@@ -88,7 +100,7 @@
//
// DESCRIPTION :
//
-void NCTable::setSize( long newwidth, long newheight )
+void NCTable::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YTable::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCTable.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCTable.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCTable.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCTable.h Tue Jun 26 15:27:24 2007
@@ -90,7 +90,16 @@
virtual void itemAdded( vector<string> elements, int index );
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.cc Tue Jun 26 15:27:24 2007
@@ -99,6 +99,16 @@
return dim == YD_HORIZ ? wGetDefsze().W : wGetDefsze().H;
}
+int NCTextEntry::preferredWidth()
+{
+ return wGetDefsze().W;
+}
+
+int NCTextEntry::preferredHeight()
+{
+ return wGetDefsze().H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
@@ -107,7 +117,7 @@
//
// DESCRIPTION :
//
-void NCTextEntry::setSize( long newwidth, long newheight )
+void NCTextEntry::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YTextEntry::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCTextEntry.h Tue Jun 26 15:27:24 2007
@@ -101,7 +101,16 @@
void setReturnOnReturn( bool on_br ) { returnOnReturn_b = on_br; }
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCTree.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCTree.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCTree.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCTree.cc Tue Jun 26 15:27:24 2007
@@ -249,6 +249,18 @@
return dim == YD_HORIZ ? sze.W : sze.H;
}
+int NCTree::preferredWidth()
+{
+ wsze sze = wsze::max( defsze, wsze( 0, labelWidht()+2 ) );
+ return sze.W;
+}
+
+int NCTree::preferredHeight()
+{
+ wsze sze = wsze::max( defsze, wsze( 0, labelWidht()+2 ) );
+ return sze.H;
+}
+
///////////////////////////////////////////////////////////////////
//
//
@@ -257,7 +269,7 @@
//
// DESCRIPTION :
//
-void NCTree::setSize( long newwidth, long newheight )
+void NCTree::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YTree::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCTree.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCTree.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCTree.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCTree.h Tue Jun 26 15:27:24 2007
@@ -67,7 +67,16 @@
virtual ~NCTree();
virtual long nicesize( YUIDimension dim );
- virtual void setSize( long newwidth, long newheight );
+
+ virtual int preferredWidth();
+ virtual int preferredHeight();
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setLabel( const YCPString & nlabel );
virtual void rebuildTree();
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCWeight.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCWeight.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCWeight.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCWeight.cc Tue Jun 26 15:27:24 2007
@@ -57,7 +57,7 @@
//
// DESCRIPTION :
//
-void NCWeight::setSize( long newwidth, long newheight )
+void NCWeight::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
YWeight::setSize( newwidth, newheight );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCWeight.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCWeight.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCWeight.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCWeight.h Tue Jun 26 15:27:24 2007
@@ -52,7 +52,13 @@
virtual long minsize(YUIDimension dim) { return YWeight::minsize( dim ); }
virtual long nicesize( YUIDimension dim ) { return YWeight::nicesize( dim ); }
- virtual void setSize( long newwidth, long newheight );
+
+ /**
+ * Set the new size of the widget.
+ *
+ * Reimplemented from YWidget.
+ **/
+ virtual void setSize( int newWidth, int newHeight );
virtual void setEnabling( bool do_bv ) { NCWidget::setEnabling( enabled=do_bv ); }
};
Modified: branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc Tue Jun 26 15:27:24 2007
@@ -24,6 +24,7 @@
#include "Y2Log.h"
#include
+#include "YDialog.h"
#include
#include
@@ -142,7 +143,7 @@
//
void YNCursesUI::idleLoop( int fd_ycp )
{
- NCDialog * ncd = static_cast( currentDialog() );
+ NCDialog * ncd = static_cast( YDialog::currentDialog() );
int timeout = 5;
struct timeval tv;
@@ -176,11 +177,21 @@
friend ostream & operator<<( std::ostream & STREAM, const NCtoY2Event & OBJ ) {
STREAM << static_cast(OBJ);
+#if 0
if ( OBJ.selection.isNull() ) {
STREAM << "(-)";
} else {
STREAM << "(" << OBJ.selection->valuetype() << ")";
}
+#endif
+ if ( !OBJ.selection )
+ {
+ STREAM << "(-)";
+ }
+ else
+ {
+ STREAM << "(" << OBJ.selection->toString() << ")"; // FIXME valuetype()???
+ }
return STREAM << " for " << OBJ.widget;
}
@@ -209,7 +220,10 @@
return 0;
case menu:
- return new YMenuEvent( selection );
+ if ( selection )
+ return new YMenuEvent( selection->toString() );
+ else
+ return 0;
case cancel:
return new YCancelEvent();
@@ -250,7 +264,7 @@
//
YEvent * YNCursesUI::userInput( unsigned long timeout_millisec )
{
- NCDialog * ncd = static_cast( currentDialog() );
+ NCDialog * ncd = static_cast( YDialog::currentDialog() );
if ( !ncd ) {
UIERR << "No current NCDialog " << endl;
return 0;
@@ -277,7 +291,7 @@
//
YEvent * YNCursesUI::pollInput()
{
- NCDialog * ncd = static_cast( currentDialog() );
+ NCDialog * ncd = static_cast( YDialog::currentDialog() );
if ( !ncd ) {
UIERR << "No current NCDialog " << endl;
return 0;
@@ -341,22 +355,22 @@
dimension );
}
-YContainerWidget * YNCursesUI::createReplacePoint( YWidget * parent, YWidgetOpt & opt )
+YSingleChildContainerWidget * YNCursesUI::createReplacePoint( YWidget * parent, YWidgetOpt & opt )
{
ONCREATE;
return new NCReplacePoint( dynamic_cast( parent ), opt );
}
-YContainerWidget * YNCursesUI::createAlignment( YWidget * parent, YWidgetOpt & opt,
- YAlignmentType halign,
- YAlignmentType valign )
+YSingleChildContainerWidget * YNCursesUI::createAlignment( YWidget * parent,
+ YAlignmentType halign,
+ YAlignmentType valign )
{
ONCREATE;
- return new NCAlignment( dynamic_cast( parent ), opt,
+ return new NCAlignment( dynamic_cast( parent ),
halign, valign );
}
-YContainerWidget * YNCursesUI::createSquash( YWidget * parent, YWidgetOpt & opt,
+YSingleChildContainerWidget * YNCursesUI::createSquash( YWidget * parent, YWidgetOpt & opt,
bool hsquash,
bool vsquash )
{
@@ -365,13 +379,7 @@
hsquash, vsquash );
}
-YContainerWidget * YNCursesUI::createRadioButtonGroup( YWidget * parent, YWidgetOpt & opt )
-{
- ONCREATE;
- return new NCRadioButtonGroup( dynamic_cast( parent ), opt );
-}
-
-YContainerWidget * YNCursesUI::createFrame( YWidget * parent, YWidgetOpt & opt,
+YSingleChildContainerWidget * YNCursesUI::createFrame( YWidget * parent, YWidgetOpt & opt,
const YCPString & label )
{
ONCREATE;
@@ -379,7 +387,7 @@
label );
}
-YContainerWidget * YNCursesUI::createCheckBoxFrame( YWidget * parent, YWidgetOpt & opt,
+YSingleChildContainerWidget * YNCursesUI::createCheckBoxFrame( YWidget * parent, YWidgetOpt & opt,
const YCPString & label, bool checked )
{
ONCREATE;
@@ -451,14 +459,12 @@
label );
}
-YWidget * YNCursesUI::createRadioButton( YWidget * parent, YWidgetOpt & opt,
- YRadioButtonGroup * rbg,
- const YCPString & label,
- bool checked )
+YWidget * YNCursesUI::createRadioButton( YWidget * parent,
+ const YCPString & label )
{
ONCREATE;
- return new NCRadioButton( dynamic_cast( parent ), opt,
- rbg, label, checked );
+ return new NCRadioButton( dynamic_cast( parent ),
+ label );
}
YWidget * YNCursesUI::createCheckBox( YWidget * parent, YWidgetOpt & opt,
@@ -660,7 +666,7 @@
{
YCPValue result = YCPVoid();
- YDialog *dialog = YUI::currentDialog();
+ YDialog *dialog = YDialog::currentDialog();
NCPackageSelectorPlugin * plugin = packageSelectorPlugin();
if ( !dialog )
Modified: branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h Tue Jun 26 15:27:24 2007
@@ -25,6 +25,8 @@
#include
#include "YUI.h"
+#include "YSingleChildContainerWidget.h"
+
#include "NCurses.h"
class YUI;
@@ -118,19 +120,19 @@
/**
* Creates a replace point.
*/
- virtual YContainerWidget * createReplacePoint( YWidget * parent, YWidgetOpt & opt );
+ virtual YSingleChildContainerWidget * createReplacePoint( YWidget * parent, YWidgetOpt & opt );
/**
* Creates an alignment widget
*/
- virtual YContainerWidget * createAlignment( YWidget * parent, YWidgetOpt & opt,
+ virtual YSingleChildContainerWidget * createAlignment( YWidget * parent,
YAlignmentType halign,
YAlignmentType valign);
/**
* Creates a squash widget
*/
- virtual YContainerWidget * createSquash( YWidget * parent, YWidgetOpt & opt,
+ virtual YSingleChildContainerWidget * createSquash( YWidget * parent, YWidgetOpt & opt,
bool hsquash,
bool vsquash );
@@ -142,12 +144,12 @@
/**
* Creates a frame widget
*/
- virtual YContainerWidget * createFrame( YWidget * parent, YWidgetOpt & opt,
- const YCPString & label );
+ virtual YSingleChildContainerWidget * createFrame( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label );
- virtual YContainerWidget * createCheckBoxFrame( YWidget * parent, YWidgetOpt & opt,
- const YCPString & label,
- bool checked );
+ virtual YSingleChildContainerWidget * createCheckBoxFrame( YWidget * parent, YWidgetOpt & opt,
+ const YCPString & label,
+ bool checked );
//
// Widget creation functions - leaf widgets
//
@@ -221,10 +223,8 @@
* @param label Label of the radio button
* @param rbg the radio button group the new button will belong to
*/
- virtual YWidget * createRadioButton( YWidget * parent, YWidgetOpt & opt,
- //YRadioButtonGroup * rbg,
- const YCPString & label,
- bool checked );
+ virtual YWidget * createRadioButton( YWidget * parent,
+ const YCPString & label );
/**
* Creates a check box
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc Tue Jun 26 15:27:24 2007
@@ -129,8 +129,8 @@
vSplit->addChild( new NCSpacing( vSplit, opt, 0.8, false, true ) );
- // add the headline
- opt.isHeading.setValue( true );
+ // FIXME: add the headline
+ // opt.isHeading.setValue( true );
head = new NCLabel( vSplit, opt, YCPString("") );
vSplit->addChild( head );
@@ -143,7 +143,8 @@
this);
vSplit->addChild( problemw );
opt.isHStretchable.setValue( true );
- opt.isHeading.setValue( false );
+ // FIXME
+ // opt.isHeading.setValue( false );
//vSplit->addChild( new NCSpacing( vSplit, opt, 0.2, false, true ) );
@@ -161,7 +162,8 @@
vSplit->addChild( solutionw );
opt.isHStretchable.setValue( false );
- opt.isHeading.setValue( true );
+ // FIXME
+ //opt.isHeading.setValue( true );
vSplit->addChild( new NCSpacing( vSplit, opt, 0.6, false, true ) );
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDescr.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDescr.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDescr.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDescr.cc Tue Jun 26 15:27:24 2007
@@ -86,8 +86,8 @@
split->addChild( new NCSpacing( split, opt, 0.8, false, true ) );
- // add the headline
- opt.isHeading.setValue( true );
+ // FIXME - add the headline
+ // opt.isHeading.setValue( true );
headline = new NCLabel( split, opt, YCPString( "" ) );
split->addChild( headline );
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc Tue Jun 26 15:27:24 2007
@@ -105,8 +105,8 @@
NCSplit * split = new NCSplit( this, opt, YD_VERT );
addChild( split );
- // add the headline
- opt.isHeading.setValue( true );
+ // FIXME - add the headline
+ // opt.isHeading.setValue( true );
head = new NCLabel( split, opt, YCPString( "" ) );
split->addChild( head );
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc Tue Jun 26 15:27:24 2007
@@ -29,6 +29,8 @@
#include "NCPkgNames.h"
#include "NCPackageSelector.h"
+#include "YWidgetID.h"
+
#include "NCi18n.h"
/*
@@ -91,8 +93,8 @@
vSplit->addChild( new NCSpacing( vSplit, opt, 0.8, false, true ) );
- // add the headline
- opt.isHeading.setValue( true );
+ // FIXME - add the headline
+ // opt.isHeading.setValue( true );
NCLabel * head = new NCLabel( vSplit, opt, headline );
vSplit->addChild( head );
@@ -157,12 +159,14 @@
// add the cancel and the ok button
opt.key_Fxx.setValue( 10 );
okButton = new NCPushButton( hSplit3, opt, YCPString(NCPkgNames::OKLabel()) );
- okButton->setId( NCPkgNames::OkButton () );
+ YStringWidgetID * okID = new YStringWidgetID("ok");
+ okButton->setId( okID );
opt.key_Fxx.setValue( 9 );
opt.isVStretchable.setValue( false );
cancelButton = new NCPushButton( hSplit3, opt, YCPString(NCPkgNames::CancelLabel()) );
- cancelButton->setId( NCPkgNames::Cancel () );
+ YStringWidgetID * cancelID = new YStringWidgetID("cancel");
+ cancelButton->setId( cancelID );
opt.isHStretchable.setValue( true );
hSplit3->addChild( new NCSpacing( hSplit3, opt, 0.2, true, false ) );
@@ -281,10 +285,10 @@
postevent.result = YCPNull();
- YCPValue currentId = dynamic_cast(postevent.widget)->id();
+ YWidgetID * currentId = dynamic_cast(postevent.widget)->id();
- if ( !currentId.isNull() &&
- currentId->compare( NCPkgNames::Cancel () ) == YO_EQUAL )
+ if ( currentId &&
+ currentId->toString() == "cancel" )
{
postevent = NCursesEvent::cancel;
}
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc Tue Jun 26 15:27:24 2007
@@ -101,8 +101,8 @@
opt.notifyMode.setValue( false );
- //the headline
- opt.isHeading.setValue( true );
+ // FIXME - the headline
+ // opt.isHeading.setValue( true );
NCLabel * head = new NCLabel( split, opt, label );
split->addChild( head );
@@ -142,7 +142,8 @@
// add an OK button
opt.key_Fxx.setValue( 10 );
okButton = new NCPushButton( split, opt, YCPString(NCPkgNames::OKLabel()) );
- okButton->setId( NCPkgNames::OkButton () );
+ YStringWidgetID * okID = new YStringWidgetID("ok");
+ okButton->setId( okID );
split->addChild( okButton );
@@ -310,10 +311,10 @@
postevent.detail = NCursesEvent::NODETAIL;
- YCPValue currentId = dynamic_cast(postevent.widget)->id();
+ YWidgetID * currentId = dynamic_cast(postevent.widget)->id();
- if ( !currentId.isNull()
- && currentId->compare( NCPkgNames::OkButton () ) == YO_EQUAL )
+ if ( currentId
+ && currentId->toString() == "ok" )
{
postevent.detail = NCursesEvent::USERDEF ;
// return false means: close the popup
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTable.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTable.cc?rev=39034&r1=39033&r2=39034&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTable.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTable.cc Tue Jun 26 15:27:24 2007
@@ -86,14 +86,14 @@
split->addChild( new NCSpacing( split, opt, 0.6, false, true ) );
- // add the headline
- opt.isHeading.setValue( true );
+ // FIXME - add the headline
+ // opt.isHeading.setValue( true );
NCLabel * head = new NCLabel( split, opt, YCPString(NCPkgNames::AutoChangeLabel()) );
split->addChild( head );
split->addChild( new NCSpacing( split, opt, 0.6, false, true ) );
-
- opt.isHeading.setValue( false );
+ // FIXME
+ // opt.isHeading.setValue( false );
NCLabel * lb1 = new NCLabel( split, opt, YCPString(NCPkgNames::AutoChangeText1()) );
split->addChild( lb1 );
NCLabel * lb2 = new NCLabel( split, opt, YCPString(NCPkgNames::AutoChangeText2()) );
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org