Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Examples

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 "YWidget.h"
00024 
00034 class YContainerWidget : public YWidget
00035 {
00036 public:
00040     YContainerWidget( const YWidgetOpt & opt );
00041 
00045     virtual ~YContainerWidget();
00046 
00051     virtual char *widgetClass() { return "YContainerWidget"; }
00052 
00056     bool hasChildren() const;
00057 
00061     int numChildren() const;
00062 
00066     YWidget *child( int i ) const;
00067 
00073     long nicesize( YUIDimension dim );
00074 
00080     bool stretchable( YUIDimension dim ) const;
00081 
00086     void setSize( long newwidth, long newheight );
00087 
00092     virtual void addChild( YWidget *child );
00093 
00099     void removeChildren();
00100 
00106     YWidget *findWidget( const YCPValue & id ) const;
00107 
00111     bool isContainer() const;
00112 
00116     virtual void childDeleted( YWidget *child );
00117 
00118 
00119 protected:
00125     virtual void childAdded( YWidget *child );
00126 
00132     virtual void childRemoved( YWidget *child );
00133 
00134 
00135 public:
00140     void dumpWidgetTree( int indentationLevel = 0 );
00141 
00148     void dumpDialogWidgetTree();
00149 
00154     virtual std::string debugLabel();
00155 
00164     virtual void saveUserInput( YMacroRecorder *macroRecorder );
00165 
00166 
00167 protected:
00168 
00173     void dumpWidget( YWidget *w, int indentationLevel );
00174 
00178     string formatDebugLabel( YWidget * widget, const string & debLabel );
00179 
00180     //
00181     // Data members
00182     //
00183 
00184     vector<YWidget *>   children;
00185     YWidget *           _debugLabelWidget;
00186 };
00187 
00188 
00189 #endif // YContainerWidget_h
00190 

Generated on Wed Sep 14 10:34:29 2005 for yast2-core by  doxygen 1.4.4