1 /*---------------------------------------------------------------------\
3 | __ __ ____ _____ ____ |
4 | \ \ / /_ _/ ___|_ _|___ \ |
5 | \ V / _` \___ \ | | __) | |
6 | | | (_| |___) || | / __/ |
7 | |_|\__,_|____/ |_| |_____| |
11 \----------------------------------------------------------------------/
13 File: YWebWidgetFactory.h
15 Author: Stefan Hundhammer <sh@suse.de>
16 Stanislav Visnovsky <visnov@suse.de>
20 #ifndef YWebWidgetFactory_h
21 #define YWebWidgetFactory_h
23 #include <yui/YWidgetFactory.h>
47 class YMultiSelectionBox;
48 class YPackageSelector;
52 class YRadioButtonGroup;
66 * Abstract widget factory for mandatory widgets.
67 * Use YOptionalWidgetFactory for optional ("special") widgets.
69 * Refer to the respective widget's documentation (in the header file) for
70 * documentation about the function parameters.
72 class YWebWidgetFactory: public YWidgetFactory
80 virtual YDialog * createMainDialog() ;
81 virtual YDialog * createPopupDialog() ;
87 YLayoutBox * createVBox ( YWidget * parent );
88 YLayoutBox * createHBox ( YWidget * parent );
89 virtual YLayoutBox * createLayoutBox ( YWidget * parent, YUIDimension dimension ) ;
91 virtual YAlignment * createAlignment ( YWidget * parent, YAlignmentType horAlignment, YAlignmentType vertAlignment ) ;
93 // Common Leaf Widgets
96 virtual YPushButton * createPushButton ( YWidget * parent, const string & label ) ;
97 virtual YLabel * createLabel ( YWidget * parent, const string & text, bool isHeading = false, bool isOutputField = false ) ;
98 virtual YInputField * createInputField ( YWidget * parent, const string & label, bool passwordMode = false ) ;
99 virtual YCheckBox * createCheckBox ( YWidget * parent, const string & label, bool isChecked = false ) ;
100 virtual YRadioButton * createRadioButton ( YWidget * parent, const string & label, bool isChecked = false ) ;
101 virtual YComboBox * createComboBox ( YWidget * parent, const string & label, bool editable = false ) ;
102 virtual YSelectionBox * createSelectionBox ( YWidget * parent, const string & label ) ;
103 virtual YTree * createTree ( YWidget * parent, const string & label ) ;
104 virtual YTable * createTable ( YWidget * parent, YTableHeader * header ) ;
105 virtual YProgressBar * createProgressBar ( YWidget * parent, const string & label, int maxValue = 100 ) ;
106 virtual YRichText * createRichText ( YWidget * parent, const string & text, bool plainTextMode = false ) ;
109 // Less Common Leaf Widgets
112 virtual YIntField * createIntField ( YWidget * parent, const string & label, int minVal, int maxVal, int initialVal ) ;
114 virtual YMenuButton * createMenuButton ( YWidget * parent, const string & label ) ;
115 virtual YMultiLineEdit * createMultiLineEdit ( YWidget * parent, const string & label ) ;
116 virtual YImage * createImage ( YWidget * parent, const string & imageFileName, bool animated = false ) ;
117 virtual YLogView * createLogView ( YWidget * parent, const string & label, int visibleLines, int storedLines = 0 ) ;
118 virtual YMultiSelectionBox *createMultiSelectionBox ( YWidget * parent, const string & label ) ;
120 virtual YPackageSelector * createPackageSelector ( YWidget * parent, long ModeFlags = 0 ) ;
121 virtual YWidget * createPkgSpecial ( YWidget * parent, const string & subwidgetName ) ; // NCurses only
127 YSpacing * createHStretch ( YWidget * parent );
128 YSpacing * createVStretch ( YWidget * parent );
129 YSpacing * createHSpacing ( YWidget * parent, YLayoutSize_t size = 1.0 );
130 YSpacing * createVSpacing ( YWidget * parent, YLayoutSize_t size = 1.0 );
131 virtual YSpacing * createSpacing ( YWidget * parent, YUIDimension dim, bool stretchable = false, YLayoutSize_t size = 0.0 ) ;
132 virtual YEmpty * createEmpty ( YWidget * parent ) ;
134 virtual YSquash * createSquash ( YWidget * parent, bool horSquash, bool vertSquash ) ;
140 virtual YFrame * createFrame ( YWidget * parent, const string & label ) ;
141 virtual YCheckBoxFrame * createCheckBoxFrame ( YWidget * parent, const string & label, bool checked ) ;
147 virtual YRadioButtonGroup * createRadioButtonGroup ( YWidget * parent ) ;
148 virtual YReplacePoint * createReplacePoint ( YWidget * parent ) ;
158 * Use YUI::widgetFactory() to get the singleton for this class.
165 virtual ~YWebWidgetFactory();
167 }; // class YWebWidgetFactory
170 #endif // YWebWidgetFactory_h