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 
00155     virtual std::string debugLabel();
00156 
00165     virtual void saveUserInput( YMacroRecorder *macroRecorder );
00166 
00172     virtual void collectUserInput( YCPList & fieldContents );
00173 
00174 
00175 protected:
00176 
00181     void dumpWidget( YWidget *w, int indentationLevel );
00182 
00186     string formatDebugLabel( YWidget * widget, const string & debLabel );
00187 
00188     //
00189     // Data members
00190     //
00191 
00192     vector<YWidget *>   children;
00193     YWidget *           _debugLabelWidget;
00194 };
00195 
00196 
00197 #endif // YContainerWidget_h
00198 

Generated on Fri Jun 16 18:07:45 2006 for yast2-core by  doxygen 1.4.6