Author: gs
Date: Thu Jun 28 14:16:22 2007
New Revision: 39078
URL: http://svn.opensuse.org/viewcvs/yast?rev=39078&view=rev
Log:
use NCLayoutBox instead of NCSplit
Removed:
branches/tmp/sh/mod-ui/ncurses/src/NCSplit.cc
branches/tmp/sh/mod-ui/ncurses/src/NCSplit.h
Modified:
branches/tmp/sh/mod-ui/ncurses/src/Makefile.am
branches/tmp/sh/mod-ui/ncurses/src/NCAskForDirectory.cc
branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc
branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.h
branches/tmp/sh/mod-ui/ncurses/src/NCLayoutBox.cc
branches/tmp/sh/mod-ui/ncurses/src/NCLayoutBox.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/NCPopupInfo.cc
branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc
branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.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
branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTree.cc
Modified: branches/tmp/sh/mod-ui/ncurses/src/Makefile.am
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/Makefile.am?rev=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/Makefile.am (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/Makefile.am Thu Jun 28 14:16:22 2007
@@ -62,7 +62,7 @@
NCAlignment.h \
NCFrame.h \
NCCheckBoxFrame.h \
- NCSplit.h \
+ NCLayoutBox.h \
NCReplacePoint.h \
NCRadioButtonGroup.h \
NCImage.h \
@@ -90,15 +90,14 @@
NCPopupMenu.h \
NCPopupTextEntry.h \
NCPopupInfo.h \
+ NCAskForDirectory.h \
+ NCAskForFile.h \
NCstyle.braille.h NCstyle.mono.h \
NCstyle.linux.h NCstyle.xterm.h \
NCstyle.rxvt.h \
Y2CCNCursesUI.h \
YNCursesComponent.h
-# NCAskForDirectory.h \
-# NCAskForFile.h
-
libpy2ncurses_la_SOURCES = \
Y2Log.cc \
position.cc \
@@ -134,7 +133,7 @@
NCAlignment.cc \
NCFrame.cc \
NCCheckBoxFrame.cc \
- NCSplit.cc \
+ NCLayoutBox.cc \
NCReplacePoint.cc \
NCRadioButtonGroup.cc \
NCImage.cc \
@@ -163,11 +162,11 @@
NCPopupMenu.cc \
NCPopupTextEntry.cc \
NCPopupInfo.cc \
+ NCAskForDirectory.cc \
+ NCAskForFile.cc \
\
Y2CCNCursesUI.cc
-# NCAskForDirectory.cc \
-# NCAskForFile.cc
#libpy2ncurses_la_SOURCES = $(liby2ncurses_la_SOURCES) \
# Y2CCNCursesUI.cc Y2CCNCursesUI.h \
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCAskForDirectory.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCAskForDirectory.cc?rev=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCAskForDirectory.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCAskForDirectory.cc Thu Jun 28 14:16:22 2007
@@ -24,7 +24,7 @@
#include
#include "YDialog.h"
-#include "NCSplit.h"
+#include "NCLayoutBox.h"
#include "NCSpacing.h"
#include "NCFrame.h"
#include "NCi18n.h"
@@ -99,7 +99,7 @@
YWidgetOpt opt;
// the vertical split is the (only) child of the dialog
- NCSplit * split = new NCSplit( this, opt, YD_VERT );
+ NCLayoutBox * split = new NCLayoutBox( this, YD_VERT );
addChild( split );
opt.notifyMode.setValue( false );
@@ -113,26 +113,26 @@
opt.isHStretchable.setValue( true );
NCFrame * frame = new NCFrame( split, "" );
- NCSplit * vSplit = new NCSplit( frame, opt, YD_VERT );
+ NCLayoutBox * vSplit = new NCLayoutBox( frame, YD_VERT );
opt.isEditable.setValue( false );
opt.notifyMode.setValue( true );
// label for text field showing the selected dir
dirName = new NCComboBox( frame, opt, YCPString(_( "Selected Directory:" )) );
frame->addChild( dirName );
-
- dirName->setId( YCPString(idDirName->name()) );
+ YStringWidgetID * dirID = new YStringWidgetID( idDirName->name() );
+ dirName->setId( dirID );
vSplit->addChild( new NCSpacing( vSplit, YD_VERT, false, 0.6 ) );
split->addChild( frame );
// add the checkBox detailed
- NCSplit * hSplit = new NCSplit( split, opt, YD_HORIZ );
+ NCLayoutBox * hSplit = new NCLayoutBox( split, YD_HORIZ );
split->addChild( hSplit );
// label for checkbox
detailed = new NCCheckBox( hSplit, opt, YCPString(_( "&Detailed View" )), false );
- YStringWidgetID * detailsID = YStringWidgetID( idDetails->name() );
+ YStringWidgetID * detailsID = new YStringWidgetID( idDetails->name() );
detailed->setId( detailsID );
//hSplit->addChild( new NCSpacing( hSplit, opt, 0.1, true, false ) );
@@ -146,10 +146,11 @@
dirList->setId( dirListID );
split->addChild( dirList );
- split->addChild( new NCSpacing( split, opt, 0.4, false, true ) );
+ //split->addChild( new NCSpacing( split, opt, 0.4, false, true ) );
+ split->addChild( new NCSpacing( split, YD_VERT, false, 0.4 ) );
// HBox for the buttons
- NCSplit * hSplit1 = new NCSplit( split, opt, YD_HORIZ );
+ NCLayoutBox * hSplit1 = new NCLayoutBox( split, YD_HORIZ );
split->addChild( hSplit1 );
opt.isHStretchable.setValue( true );
//hSplit1->addChild( new NCSpacing( hSplit1, opt, 0.2, true, false ) );
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc?rev=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.cc Thu Jun 28 14:16:22 2007
@@ -22,7 +22,9 @@
#include
#include "YDialog.h"
-#include "NCSplit.h"
+#include "YWidgetID.h"
+
+#include "NCLayoutBox.h"
#include "NCSpacing.h"
#include "NCFrame.h"
#include "NCi18n.h"
@@ -137,72 +139,79 @@
startDir = checkIniDir( iniDir->value() );
// the vertical split is the (only) child of the dialog
- NCSplit * split = new NCSplit( this, opt, YD_VERT );
+ NCLayoutBox * split = new NCLayoutBox( this, YD_VERT );
addChild( split );
opt.notifyMode.setValue( false );
//the headline
- opt.isHeading.setValue( true );
+ //opt.isHeading.setValue( true );
- NCLabel * head = new NCLabel( split, opt, headline );
+ NCLabel * head = new NCLabel( split, headline->toString(), true, false ); // isHeading = true
split->addChild( head );
- split->addChild( new NCSpacing( split, opt, 0.4, false, true ) );
+ split->addChild( new NCSpacing( split, YD_VERT, false, 0.4 ) );
opt.isHStretchable.setValue( true );
- NCFrame * frame = new NCFrame( split, opt, YCPString("" ) );
- NCSplit * vSplit = new NCSplit( frame, opt, YD_VERT );
+ NCFrame * frame = new NCFrame( split, "" );
+ NCLayoutBox * vSplit = new NCLayoutBox( frame, YD_VERT );
opt.isEditable.setValue( false );
opt.notifyMode.setValue( true );
// label for text field showing the selected dir
dirName = new NCComboBox( frame, opt, YCPString(_( "Selected Directory:" )) );
frame->addChild( dirName );
+ YStringWidgetID * dirID = new YStringWidgetID( idDirName->name() );
+ dirName->setId( dirID );
- dirName->setId( YCPString(idDirName->name()) );
-
- vSplit->addChild( new NCSpacing( vSplit, opt, 0.6, false, true ) );
+ vSplit->addChild( new NCSpacing( vSplit, YD_VERT, false, 0.6 ) );
split->addChild( frame );
// add the checkBox detailed
- NCSplit * hSplit = new NCSplit( split, opt, YD_HORIZ );
+ NCLayoutBox * hSplit = new NCLayoutBox( split, YD_HORIZ );
split->addChild( hSplit );
// label for checkbox
detailed = new NCCheckBox( hSplit, opt, YCPString( _( "&Detailed View" ) ), false );
- detailed->setId( YCPString( idDetails->name()) );
- hSplit->addChild( new NCSpacing( hSplit, opt, 0.1, true, false ) );
+ YStringWidgetID * detailsID = new YStringWidgetID( idDetails->name() );
+ detailed->setId( detailsID );
+ hSplit->addChild( new NCSpacing( hSplit, YD_HORIZ, true, 0.1 ) ); // stretchable = true
hSplit->addChild( detailed );
// HBox for the lists
- NCSplit * hSplit1 = new NCSplit( split, opt, YD_HORIZ );
+ NCLayoutBox * hSplit1 = new NCLayoutBox( split, YD_HORIZ );
// add the list of directories
opt.keyEvents.setValue( true );
dirList = new NCDirectoryTable( hSplit1, opt, NCFileSelection::T_Overview, YCPString(startDir) );
- dirList->setId( YCPString(idDirList->name()) );
+ YStringWidgetID * dirListID = new YStringWidgetID( idDirList->name() );
+ dirList->setId( dirListID );
hSplit1->addChild( dirList );
// add the list of files
fileList = new NCFileTable( hSplit1, opt, NCFileSelection::T_Overview, filter, YCPString(startDir) );
- fileList->setId( YCPString(idFileList->name()) );
+ YStringWidgetID * dirFileID = new YStringWidgetID( idFileList->name() );
+ fileList->setId( dirFileID );
hSplit1->addChild( fileList );
split->addChild( hSplit1 );
opt.notifyMode.setValue( false );
opt.keyEvents.setValue( false );
- NCSplit * hSplit2 = new NCSplit( split, opt, YD_HORIZ );
+ NCLayoutBox * hSplit2 = new NCLayoutBox( split, YD_HORIZ );
// add the text entry for the file name
- opt.isEditable.setValue( edit );
- fileName = new NCTextEntry( hSplit2, opt,
+ opt.isEditable.setValue( edit ); // FIXME
+ fileName = new NCInputField( hSplit2,
// label for text field showing the filename
- YCPString(_( "&File name:" )),
- YCPString( iniFileName ),
- 100, 50 );
+ _( "&File name:" ),
+ false ); // passWordMode = false
+ fileName->setValue( iniFileName );
+ fileName->setInputMaxLength( 100 );
+ // FIXME
+ // fileName->setMaxFld( 50);
+
hSplit2->addChild( fileName );
// label for text field showing the filter (e.g. *.bak)
NCComboBox * extension = new NCComboBox( hSplit2, opt, YCPString(_( "Filter:" )) );
@@ -212,32 +221,36 @@
true ); // selected
split->addChild( hSplit2 );
- split->addChild( new NCSpacing( split, opt, 0.8, false, true ) );
+ //split->addChild( new NCSpacing( split, opt, 0.8, false, true ) );
+ split->addChild( new NCSpacing( split, YD_VERT, false, 0.8 ) );
// HBox for the buttons
- NCSplit * hSplit3 = new NCSplit( split, opt, YD_HORIZ );
+ NCLayoutBox * hSplit3 = new NCLayoutBox( split, YD_HORIZ );
split->addChild( hSplit3 );
opt.isHStretchable.setValue( true );
- hSplit3->addChild( new NCSpacing( hSplit3, opt, 0.2, true, false ) );
+ //hSplit3->addChild( new NCSpacing( hSplit3, opt, 0.2, true, false ) );
+ hSplit3->addChild( new NCSpacing( hSplit3, YD_HORIZ, true, 0.2 ) );
// add the OK button
opt.key_Fxx.setValue( 10 );
// the label of the OK button
- okButton = new NCPushButton( hSplit3, opt, YCPString(_( "&OK" )) );
- okButton->setId( YCPString(idOk->name()) );
+ okButton = new NCPushButton( hSplit3, _( "&OK" ) );
+ YStringWidgetID * okID = new YStringWidgetID(idOk->name() );
+ okButton->setId( okID );
hSplit3->addChild( okButton );
- hSplit3->addChild( new NCSpacing( hSplit3, opt, 0.4, true, false ) );
+ hSplit3->addChild( new NCSpacing( hSplit3, YD_HORIZ, true, 0.4 ) );
// add the Cancel button
opt.key_Fxx.setValue( 9 );
// the label of the Cancel button
- cancelButton = new NCPushButton( hSplit3, opt, YCPString(_( "&Cancel" )) );
- cancelButton->setId( YCPString(idCancel->name()) );
+ cancelButton = new NCPushButton( hSplit3, _( "&Cancel" ) );
+ YStringWidgetID * cancelID = new YStringWidgetID( idCancel->name() );
+ cancelButton->setId( cancelID );
hSplit3->addChild( cancelButton );
- hSplit3->addChild( new NCSpacing( hSplit3, opt, 0.2, true, false ) );
+ hSplit3->addChild( new NCSpacing( hSplit3, YD_HORIZ, true, 0.2 ) );
}
@@ -345,18 +358,18 @@
return true;
}
- YCPValue currentId = dynamic_cast(postevent.widget)->id();
+ YWidgetID * currentId = dynamic_cast(postevent.widget)->id();
- if ( !currentId.isNull() )
+ if ( currentId )
{
- if ( currentId->compare( YCPString(idOk->name()) ) == YO_EQUAL )
+ if ( currentId->toString() == idOk->name() )
{
postevent.result = YCPString( dirList->getCurrentDir() + "/"
+ getFileName() );
// return false means: close the popup
return false;
}
- else if ( currentId->compare( YCPString(idDirList->name()) ) == YO_EQUAL
+ else if ( currentId->toString() == idDirList->name()
&& !postevent.result.isNull() )
{
unsigned int i = dirName->getListSize();
@@ -373,14 +386,14 @@
updateFileList();
}
}
- else if ( currentId->compare( YCPString(idDirName->name()) ) == YO_EQUAL )
+ else if ( currentId->toString() == idDirName->name() )
{
dirList->setStartDir( dirName->getValue() );
dirList->fillList();
updateFileList();
}
- else if ( currentId->compare( YCPString(idDetails->name()) ) == YO_EQUAL )
+ else if ( currentId->toString() == idDetails->name() )
{
bool details = getCheckBoxValue( detailed );
if ( details )
@@ -396,7 +409,7 @@
fileList->fillList();
dirList->fillList();
}
- else if ( currentId->compare( YCPString(idFileList->name()) ) == YO_EQUAL )
+ else if ( currentId->toString() == idFileList->name() )
{
if ( !postevent.result.isNull() )
{
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.h?rev=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCAskForFile.h Thu Jun 28 14:16:22 2007
@@ -30,7 +30,7 @@
#include "NCPushButton.h"
#include "NCComboBox.h"
#include "NCCheckBox.h"
-#include "NCTextEntry.h"
+#include "NCInputField.h"
///////////////////////////////////////////////////////////////////
@@ -59,7 +59,7 @@
protected:
NCFileTable *fileList; // the file list
- NCTextEntry *fileName;
+ NCInputField *fileName;
virtual bool postAgain();
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCLayoutBox.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCLayoutBox.cc?rev=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCLayoutBox.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCLayoutBox.cc Thu Jun 28 14:16:22 2007
@@ -28,9 +28,9 @@
//
// DESCRIPTION :
//
-NCLayoutBox::NCLayoutBox( NCWidget * parent, const YWidgetOpt & opt,
- YUIDimension dimension )
- : YLayoutBox( opt, dimension )
+NCLayoutBox::NCLayoutBox( NCWidget * parent,
+ YUIDimension dimension )
+ : YLayoutBox( dynamic_cast(parent), dimension )
, NCWidget( parent )
{
WIDDBG << endl;
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCLayoutBox.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCLayoutBox.h?rev=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCLayoutBox.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCLayoutBox.h Thu Jun 28 14:16:22 2007
@@ -49,8 +49,7 @@
public:
- NCLayoutBox( NCWidget * parent, const YWidgetOpt & opt,
- YUIDimension dimension );
+ NCLayoutBox( NCWidget * parent, YUIDimension dimension );
virtual ~NCLayoutBox();
//virtual long nicesize( YUIDimension dim ) { return YLayoutBox::nicesize( dim ); }
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=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.cc Thu Jun 28 14:16:22 2007
@@ -44,7 +44,7 @@
NCPackageSelectorStart::NCPackageSelectorStart( NCWidget * parent,
const YWidgetOpt & opt,
YUIDimension dimension )
- : NCSplit( parent, opt, dimension )
+ : NCLayoutBox( parent, dimension )
, widgetRoot( 0 )
, packager( 0 )
, youMode ( false )
@@ -78,7 +78,7 @@
YWidgetOpt childrenOpt( opt );
// widgetRoot = (YContainerWidget *)ui->createWidgetTree( dynamic_cast(parent),
// childrenOpt, 0, pkgLayout );
- widgetRoot = (YContainerWidget * )YCPDialogParser::parseWidgetTreeTerm( dynamic_cast(parent),
+ widgetRoot = YCPDialogParser::parseWidgetTreeTerm( dynamic_cast(parent),
childrenOpt,
pkgLayout );
}
@@ -165,7 +165,7 @@
void NCPackageSelectorStart::setSize( int newwidth, int newheight )
{
wRelocate( wpos( 0 ), wsze( newheight, newwidth ) );
- NCSplit::setSize( newwidth, newheight );
+ NCLayoutBox::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=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPackageSelectorStart.h Thu Jun 28 14:16:22 2007
@@ -23,8 +23,8 @@
#include "YNCursesUI.h"
#include "YPackageSelector.h"
-#include "YSplit.h"
-#include "NCSplit.h"
+#include "YLayoutBox.h"
+#include "NCLayoutBox.h"
#include "NCPackageSelector.h"
#include "NCPopupTable.h"
@@ -36,7 +36,7 @@
/**
* @short the package selector widget
*/
-class NCPackageSelectorStart : public NCSplit
+class NCPackageSelectorStart : public NCLayoutBox
{
friend std::ostream & operator<<( std::ostream & STREAM, const NCPackageSelectorStart & OBJ );
@@ -46,7 +46,7 @@
private:
- YContainerWidget * widgetRoot; // root of the widget tree of the package selection dialog
+ YWidget * widgetRoot; // root of the widget tree of the package selection dialog
NCPkgTable * pkgList; // the package table widget
@@ -58,7 +58,7 @@
protected:
virtual const char * location() const {
- return dimension() == YD_HORIZ ? "NC(H)PackageSelectorStart" : "NC(V)PackageSelectorStart" ;
+ return primary() == YD_HORIZ ? "NC(H)PackageSelectorStart" : "NC(V)PackageSelectorStart" ;
}
public:
@@ -75,10 +75,8 @@
*/
virtual ~NCPackageSelectorStart();
- virtual long nicesize( YUIDimension dim ) { return NCSplit::nicesize( dim ); }
-
- virtual int preferredWidth() { return NCSplit::preferredWidth(); }
- virtual int preferredHeight() { return NCSplit::preferredHeight(); }
+ virtual int preferredWidth() { return NCLayoutBox::preferredWidth(); }
+ virtual int preferredHeight() { return NCLayoutBox::preferredHeight(); }
/**
* Set the new size of the widget.
@@ -105,7 +103,7 @@
/**
* Returns the root of the widget tree.
*/
- YContainerWidget * root( ) const { return widgetRoot; };
+ YWidget * root( ) const { return widgetRoot; };
/**
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCPopupInfo.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCPopupInfo.cc?rev=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCPopupInfo.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCPopupInfo.cc Thu Jun 28 14:16:22 2007
@@ -22,7 +22,7 @@
#include "NCTree.h"
#include "YMenuButton.h"
#include "YDialog.h"
-#include "NCSplit.h"
+#include "NCLayoutBox.h"
#include "NCSpacing.h"
#include "YWidgetID.h"
@@ -86,7 +86,7 @@
YWidgetOpt opt;
// the vertical split is the (only) child of the dialog
- NCSplit * split = new NCSplit( this, opt, YD_VERT );
+ NCLayoutBox * split = new NCLayoutBox( this, YD_VERT );
addChild( split );
// add the headline
@@ -99,7 +99,7 @@
helpText = new NCRichText( split, opt, text );
split->addChild( helpText );
- NCSplit * hSplit = new NCSplit( split, opt, YD_HORIZ );
+ NCLayoutBox * hSplit = new NCLayoutBox( split, YD_HORIZ );
split->addChild( hSplit );
if ( okButtonLabel != "" && cancelButtonLabel != "" )
{
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc?rev=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.cc Thu Jun 28 14:16:22 2007
@@ -259,6 +259,14 @@
return spacing;
}
+NCLayoutBox *
+NCWidgetFactory::createLayoutBox( YWidget * parent, YUIDimension dim )
+{
+ NCLayoutBox * layoutBox = new NCLayoutBox( dynamic_cast(parent), dim );
+ YUI_CHECK_NEW( layoutBox );
+
+ return layoutBox;
+}
NCEmpty *
NCWidgetFactory::createEmpty( YWidget * parent )
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.h?rev=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCWidgetFactory.h Thu Jun 28 14:16:22 2007
@@ -48,6 +48,7 @@
#include "NCSquash.h"
#include "NCTable.h"
#include "NCTree.h"
+#include "NCLayoutBox.h"
using std::string;
@@ -72,6 +73,12 @@
virtual NCDialog * createPopupDialog();
//
+ // Layout Boxes
+ //
+
+ virtual NCLayoutBox * createLayoutBox( YWidget * parent, YUIDimension dim );
+
+ //
// Common Leaf Widgets
//
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=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.cc Thu Jun 28 14:16:22 2007
@@ -51,7 +51,7 @@
#include "NCRichText.h"
#include "NCSelectionBox.h"
#include "NCMultiSelectionBox.h"
-#include "NCSplit.h"
+#include "NCLayoutBox.h"
#include "NCSquash.h"
#include "NCTable.h"
#include "NCInputField.h"
@@ -380,13 +380,14 @@
//#define ONCREATE WIDDBG << endl
#define ONCREATE
-YContainerWidget * YNCursesUI::createSplit( YWidget * parent, YWidgetOpt & opt,
+#if 0
+YLayoutBox * YNCursesUI::createSplit( YWidget * parent, YWidgetOpt & opt,
YUIDimension dimension )
{
ONCREATE;
- return new NCSplit( dynamic_cast( parent ), opt,
- dimension );
+ return new NCLayoutBox( dynamic_cast( parent ), dimension );
}
+#endif
YSingleChildContainerWidget * YNCursesUI::createReplacePoint( YWidget * parent )
{
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=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/YNCursesUI.h Thu Jun 28 14:16:22 2007
@@ -138,13 +138,13 @@
//
// Widget creation functions - container widgets
//
-
+#if 0
/**
* Creates a split
*/
- virtual YContainerWidget * createSplit( YWidget * parent, YWidgetOpt & opt,
- YUIDimension dimension );
-
+ virtual YLayoutBox * createSplit( YWidget * parent, YWidgetOpt & opt,
+ YUIDimension dimension );
+#endif
/**
* Creates a replace point.
*/
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=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDeps.cc Thu Jun 28 14:16:22 2007
@@ -21,7 +21,7 @@
#include "NCTree.h"
#include "YDialog.h"
-#include "NCSplit.h"
+#include "NCLayoutBox.h"
#include "NCSpacing.h"
#include "NCPkgNames.h"
#include "NCSelectionBox.h"
@@ -120,7 +120,7 @@
YWidgetOpt opt;
// vertical split is the (only) child of the dialog
- NCSplit * vSplit = new NCSplit( this, opt, YD_VERT );
+ NCLayoutBox * vSplit = new NCLayoutBox( this, YD_VERT );
addChild( vSplit );
// opt.vWeight.setValue( 40 );
@@ -174,7 +174,7 @@
//vSplit->addChild( new NCSpacing( vSplit, opt, 0.6, false, true ) );
vSplit->addChild( new NCSpacing( vSplit, YD_VERT, false, 0.6 ) ); // stretchable = false
- NCSplit * hSplit = new NCSplit( vSplit, opt, YD_HORIZ );
+ NCLayoutBox * hSplit = new NCLayoutBox( vSplit, YD_HORIZ );
vSplit->addChild( hSplit );
opt.isHStretchable.setValue( 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=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDescr.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDescr.cc Thu Jun 28 14:16:22 2007
@@ -23,7 +23,7 @@
#include "YDialog.h"
#include "YWidgetID.h"
-#include "NCSplit.h"
+#include "NCLayoutBox.h"
#include "NCSpacing.h"
#include "NCPkgNames.h"
#include "NCLabel.h"
@@ -82,7 +82,7 @@
YWidgetOpt opt;
// the vertical split is the (only) child of the dialog
- NCSplit * split = new NCSplit( this, opt, YD_VERT );
+ NCLayoutBox * split = new NCLayoutBox( this, YD_VERT );
addChild( split );
//split->addChild( new NCSpacing( split, opt, 0.8, false, true ) );
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=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupDiskspace.cc Thu Jun 28 14:16:22 2007
@@ -23,7 +23,7 @@
#include "YDialog.h"
#include "YWidgetID.h"
-#include "NCSplit.h"
+#include "NCLayoutBox.h"
#include "NCSpacing.h"
#include "NCPkgNames.h"
#include "NCLabel.h"
@@ -102,7 +102,7 @@
YWidgetOpt opt;
// the vertical split is the (only) child of the dialog
- NCSplit * split = new NCSplit( this, opt, YD_VERT );
+ NCLayoutBox * split = new NCLayoutBox( this, YD_VERT );
addChild( split );
// opt.isHeading.setValue( true );
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=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSearch.cc Thu Jun 28 14:16:22 2007
@@ -22,7 +22,7 @@
#include "NCTree.h"
#include "YMenuButton.h"
#include "YDialog.h"
-#include "NCSplit.h"
+#include "NCLayoutBox.h"
#include "NCSpacing.h"
#include "NCFrame.h"
@@ -88,7 +88,7 @@
YWidgetOpt opt;
// vertical split is the (only) child of the dialog
- NCSplit * vSplit = new NCSplit( this, opt, YD_VERT );
+ NCLayoutBox * vSplit = new NCLayoutBox( this, YD_VERT );
addChild( vSplit );
//vSplit->addChild( new NCSpacing( vSplit, opt, 0.8, false, true ) );
@@ -107,7 +107,7 @@
//NCFrame * frame0 = new NCFrame( vSplit, opt, YCPString("" ) );
NCFrame * frame0 = new NCFrame( vSplit, "" );
- NCSplit * vSplit2 = new NCSplit( frame0, opt, YD_VERT );
+ NCLayoutBox * vSplit2 = new NCLayoutBox( frame0, YD_VERT );
opt.isEditable.setValue( true );
searchExpr = new NCComboBox( frame0, opt, YCPString(NCPkgNames::SearchPhrase()) );
@@ -125,7 +125,7 @@
if ( !packager->isYouMode() )
{
// add the checkBox ignore case
- NCSplit * hSplit2 = new NCSplit( vSplit, opt, YD_HORIZ );
+ NCLayoutBox * hSplit2 = new NCLayoutBox( vSplit, YD_HORIZ );
vSplit->addChild( hSplit2 );
ignoreCase = new NCCheckBox( hSplit2, opt, YCPString(NCPkgNames::IgnoreCase()), true );
//hSplit2->addChild( new NCSpacing( hSplit2, opt, 0.1, true, false ) );
@@ -141,7 +141,7 @@
//NCFrame * frame = new NCFrame( vSplit, opt, YCPString(NCPkgNames::SearchIn()) );
// label of a frame in search popup (without hotkey)
NCFrame * frame = new NCFrame( vSplit, _( " Search in " ) );
- NCSplit * vSplit3 = new NCSplit( frame, opt, YD_VERT );
+ NCLayoutBox * vSplit3 = new NCLayoutBox( frame, YD_VERT );
opt.isVStretchable.setValue( false );
checkName = new NCCheckBox( vSplit3, opt, YCPString(NCPkgNames::CheckName()), true );
@@ -163,7 +163,7 @@
vSplit->addChild( new NCSpacing( vSplit, YD_VERT, false, 0.8 ) );
}
- NCSplit * hSplit3 = new NCSplit( vSplit, opt, YD_HORIZ );
+ NCLayoutBox * hSplit3 = new NCLayoutBox( vSplit, YD_HORIZ );
vSplit->addChild( hSplit3 );
// add the cancel and the ok button
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=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupSelection.cc Thu Jun 28 14:16:22 2007
@@ -20,7 +20,7 @@
#include "NCPkgPopupSelection.h"
#include "YDialog.h"
-#include "NCSplit.h"
+#include "NCLayoutBox.h"
#include "NCSpacing.h"
#include "NCPkgNames.h"
#include "NCPkgTable.h"
@@ -97,7 +97,7 @@
YWidgetOpt opt;
// the vertical split is the (only) child of the dialog
- NCSplit * split = new NCSplit( this, opt, YD_VERT );
+ NCLayoutBox * split = new NCLayoutBox( this, YD_VERT );
addChild( split );
opt.notifyMode.setValue( false );
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=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTable.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTable.cc Thu Jun 28 14:16:22 2007
@@ -22,7 +22,7 @@
#include "YDialog.h"
#include "YWidgetID.h"
-#include "NCSplit.h"
+#include "NCLayoutBox.h"
#include "NCSpacing.h"
#include "NCPkgNames.h"
#include "NCPackageSelector.h"
@@ -83,7 +83,7 @@
YWidgetOpt opt;
// the vertical split is the (only) child of the dialog
- NCSplit * split = new NCSplit( this, opt, YD_VERT );
+ NCLayoutBox * split = new NCLayoutBox( this, YD_VERT );
addChild( split );
//split->addChild( new NCSpacing( split, opt, 0.6, false, true ) );
@@ -116,7 +116,7 @@
split->addChild( pkgTable );
// HBox for the buttons
- NCSplit * hSplit = new NCSplit( split, opt, YD_HORIZ );
+ NCLayoutBox * hSplit = new NCLayoutBox( split, YD_HORIZ );
split->addChild( hSplit );
opt.isHStretchable.setValue( true );
Modified: branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTree.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTree.cc?rev=39078&r1=39077&r2=39078&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTree.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/pkg/NCPkgPopupTree.cc Thu Jun 28 14:16:22 2007
@@ -22,7 +22,7 @@
#include "NCTree.h"
#include "YMenuButton.h"
#include "YDialog.h"
-#include "NCSplit.h"
+#include "NCLayoutBox.h"
#include "NCPkgNames.h"
#include "NCPackageSelector.h"
@@ -76,7 +76,7 @@
opt.vWeight.setValue( 70 );
// the vertical split is the (only) child of the dialog
- NCSplit * split = new NCSplit( this, opt, YD_VERT );
+ NCLayoutBox * split = new NCLayoutBox( this, YD_VERT );
addChild( split );
// create the tree
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org