YContainerWidget.h

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------\
00002 |                                                                      |
00003 |                      __   __    ____ _____ ____                      |
00004 |                      \ \ / /_ _/ ___|_   _|___ \                     |
00005 |                       \ V / _` \___ \ | |   __) |                    |
00006 |                        | | (_| |___) || |  / __/                     |
00007 |                        |_|\__,_|____/ |_| |_____|                    |
00008 |                                                                      |
00009 |                               core system                            |
00010 |                                                        (C) SuSE GmbH |
00011 \----------------------------------------------------------------------/
00012 
00013   File:       YContainerWidget.h
00014 
00015   Author:     Mathias Kettner <kettner@suse.de>
00016   Maintainer: Stefan Hundhammer <sh@suse.de>
00017 
00018 /-*/
00019 
00020 #ifndef YContainerWidget_h
00021 #define YContainerWidget_h
00022 
00023 #include <ycp/YCPMap.h>
00024 #include "YWidget.h"
00025 
00035 class YContainerWidget : public YWidget
00036 {
00037 public:
00041     YContainerWidget( const YWidgetOpt & opt );
00042 
00046     virtual ~YContainerWidget();
00047 
00052     virtual char *widgetClass() { return "YContainerWidget"; }
00053 
00057     bool hasChildren() const;
00058 
00062     int numChildren() const;
00063 
00067     YWidget *child( int i ) const;
00068 
00074     long nicesize( YUIDimension dim );
00075 
00081     bool stretchable( YUIDimension dim ) const;
00082 
00087     void setSize( long newwidth, long newheight );
00088 
00093     virtual void addChild( YWidget *child );
00094 
00100     void removeChildren();
00101 
00107     YWidget *findWidget( const YCPValue & id ) const;
00108 
00112     bool isContainer() const;
00113 
00117     virtual void childDeleted( YWidget *child );
00118 
00119 
00120 protected:
00126     virtual void childAdded( YWidget *child );
00127 
00133     virtual void childRemoved( YWidget *child );
00134 
00135 
00136 public:
00141     void dumpWidgetTree( int indentationLevel = 0 );
00142 
00149     void dumpDialogWidgetTree();
00150 
00154     void setChildrenEnabling( bool enabled );
00155 
00160     virtual std::string debugLabel();
00161 
00170     virtual void saveUserInput( YMacroRecorder *macroRecorder );
00171 
00177     virtual void collectUserInput( YCPList & fieldContents );
00178 
00179 
00180 protected:
00181 
00186     void dumpWidget( YWidget *w, int indentationLevel );
00187 
00191     string formatDebugLabel( YWidget * widget, const string & debLabel );
00192 
00193     //
00194     // Data members
00195     //
00196 
00197     vector<YWidget *>   children;
00198     YWidget *           _debugLabelWidget;
00199 };
00200 
00201 
00202 #endif // YContainerWidget_h
00203 

Generated on Tue Nov 6 01:27:46 2007 for yast2-core by  doxygen 1.5.3