Author: gs
Date: Thu Jul 5 12:43:20 2007
New Revision: 39185
URL: http://svn.opensuse.org/viewcvs/yast?rev=39185&view=rev
Log:
add constructor NCWidget( YWidget * parent );
Modified:
branches/tmp/sh/mod-ui/ncurses/src/NCWidget.cc
branches/tmp/sh/mod-ui/ncurses/src/NCWidget.h
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCWidget.cc
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCWidget.cc?rev=39185&r1=39184&r2=39185&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCWidget.cc (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCWidget.cc Thu Jul 5 12:43:20 2007
@@ -37,6 +37,28 @@
//
// DESCRIPTION :
//
+NCWidget::NCWidget( YWidget * parent )
+ : tnode( this )
+ , magic( YWIDGET_MAGIC )
+ , grabedBy( 0 )
+ , win( 0 )
+ , defsze( 11, 45 )
+ , framedim( 0, 0 )
+ , inparent( -1, -1 )
+ , noUpdates( false )
+ , skipNoDimWin( true )
+ , wstate( NC::WSnormal )
+ , hotlabel( 0 )
+ , hotfkey( 0 )
+{
+ NCWidget * myparent = (NCWidget *)parent->widgetRep();
+
+ if ( myparent ) {
+ ReparentTo( *myparent );
+ }
+ WIDDBG << "CCC " << this << " parent " << myparent << endl;
+}
+
NCWidget::NCWidget( NCWidget * myparent )
: tnode( this )
, magic( YWIDGET_MAGIC )
@@ -188,7 +210,9 @@
NCursesWindow * NCWidget::ParentWin()
{
if ( !Parent() )
+ {
return 0;
+ }
return Parent()->Value()->win;
}
@@ -296,7 +320,8 @@
//
void NCWidget::wCreate( const wrect & newrect )
{
- if ( win )
+ NCMIL << "wCreate" << endl;
+ if ( win )
throw NCError( "wCreate: already have win" );
inparent = newrect;
@@ -350,8 +375,10 @@
}
}
else
- win = new NCursesWindow( inparent.Sze.H, inparent.Sze.W,
+ {
+ win = new NCursesWindow( inparent.Sze.H, inparent.Sze.W,
inparent.Pos.L, inparent.Pos.C );
+ }
WIDDBG << "cw- " << this << ' ' << inparent << endl;
}
Modified: branches/tmp/sh/mod-ui/ncurses/src/NCWidget.h
URL: http://svn.opensuse.org/viewcvs/yast/branches/tmp/sh/mod-ui/ncurses/src/NCWidget.h?rev=39185&r1=39184&r2=39185&view=diff
==============================================================================
--- branches/tmp/sh/mod-ui/ncurses/src/NCWidget.h (original)
+++ branches/tmp/sh/mod-ui/ncurses/src/NCWidget.h Thu Jul 5 12:43:20 2007
@@ -130,6 +130,7 @@
public:
NCWidget( NCWidget * myparent = 0 );
+ NCWidget( YWidget * parent );
virtual ~NCWidget();
bool isValid() const { return magic == YWIDGET_MAGIC; }
--
To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org
For additional commands, e-mail: yast-commit+help@opensuse.org