]> icculus.org git repositories - duncan/yast2-web-wt.git/blob - src/YWebWidgetFactory.cc
missing files
[duncan/yast2-web-wt.git] / src / YWebWidgetFactory.cc
1 /*---------------------------------------------------------------------\
2 |                                                                      |
3 |                      __   __    ____ _____ ____                      |
4 |                      \ \ / /_ _/ ___|_   _|___ \                     |
5 |                       \ V / _` \___ \ | |   __) |                    |
6 |                        | | (_| |___) || |  / __/                     |
7 |                        |_|\__,_|____/ |_| |_____|                    |
8 |                                                                      |
9 |                               core system                            |
10 |                                                        (C) SuSE GmbH |
11 \----------------------------------------------------------------------/
12
13   File:         YWebWidgetFactory.cc
14
15   Author:       Stanislav Visnovsky <visnov@suse.de>
16
17 /-*/
18
19 #define y2log_component "web-ui"
20 #include <ycp/y2log.h>
21
22 #include "YWebWidgetFactory.h"
23 #include "YWebPushButton.h"
24
25 #include <string>
26
27
28 using std::string;
29
30 class YWidget;
31 class YAlignment;
32 class YCheckBox;
33 class YCheckBoxFrame;
34 class YComboBox;
35 class YDialog;
36 class YEmpty;
37 class YFrame;
38 class YImage;
39 class YInputField;
40 class YIntField;
41 class YLabel;
42 class YLayoutBox;
43 class YLogView;
44 class YMenuButton;
45 class YMultiLineEdit;
46 class YMultiSelectionBox;
47 class YPackageSelector;
48 class YProgressBar;
49 class YRadioButton;
50 class YRadioButtonGroup;
51 class YReplacePoint;
52 class YRichText;
53 class YSelectionBox;
54 class YSpacing;
55 class YSquash;
56 class YTable;
57 class YTableHeader;
58 class YTimeField;
59 class YTree;
60
61
62
63 /**
64  * Abstract widget factory for mandatory widgets.
65  * Use YOptionalWidgetFactory for optional ("special") widgets.
66  *
67  * Refer to the respective widget's documentation (in the header file) for
68  * documentation about the function parameters.
69  **/
70
71     //
72     // Dialogs
73     //
74
75     YDialog *           YWebWidgetFactory::createMainDialog()   {}
76     YDialog *           YWebWidgetFactory::createPopupDialog()  {}
77
78     //
79     // Layout Boxes
80     //
81
82     YLayoutBox *        YWebWidgetFactory::createVBox           ( YWidget * parent ){}
83     YLayoutBox *        YWebWidgetFactory::createHBox           ( YWidget * parent ){}
84     YLayoutBox *        YWebWidgetFactory::createLayoutBox              ( YWidget * parent, YUIDimension dimension )                            {}              
85     YAlignment *        YWebWidgetFactory::createAlignment         ( YWidget * parent, YAlignmentType horAlignment, YAlignmentType vertAlignment ) {}
86     //
87     // Common Leaf Widgets
88     //
89
90 YPushButton *   YWebWidgetFactory::createPushButton     ( YWidget * parent, const string & label )                              
91 {
92     y2milestone( "Creating push button '%s'", label.c_str() );
93     return new YWebPushButton( parent, label );
94 }
95
96     YLabel *            YWebWidgetFactory::createLabel          ( YWidget * parent, const string & text, bool isHeading, bool isOutputField ) {}
97     YInputField *       YWebWidgetFactory::createInputField     ( YWidget * parent, const string & label, bool passwordMode )   {}
98     YCheckBox *         YWebWidgetFactory::createCheckBox               ( YWidget * parent, const string & label, bool isChecked )      {}
99     YRadioButton *      YWebWidgetFactory::createRadioButton    ( YWidget * parent, const string & label, bool isChecked )      {}
100     YComboBox *         YWebWidgetFactory::createComboBox               ( YWidget * parent, const string & label, bool editable )       {}
101     YSelectionBox *     YWebWidgetFactory::createSelectionBox   ( YWidget * parent, const string & label )                              {}
102     YTree *             YWebWidgetFactory::createTree           ( YWidget * parent, const string & label )                              {}
103     YTable *            YWebWidgetFactory::createTable          ( YWidget * parent, YTableHeader * header )                             {}
104     YProgressBar *      YWebWidgetFactory::createProgressBar    ( YWidget * parent, const string & label, int maxValue )                {}
105     YRichText *         YWebWidgetFactory::createRichText       ( YWidget * parent, const string & text, bool plainTextMode )   {}
106
107     //
108     // Less Common Leaf Widgets
109     //
110
111     YIntField *         YWebWidgetFactory::createIntField       ( YWidget * parent, const string & label, int minVal, int maxVal, int initialVal )      {}
112
113     YMenuButton *       YWebWidgetFactory::createMenuButton     ( YWidget * parent, const string & label )                                              {}
114     YMultiLineEdit *    YWebWidgetFactory::createMultiLineEdit  ( YWidget * parent, const string & label )                                              {}
115     YImage *            YWebWidgetFactory::createImage          ( YWidget * parent, const string & imageFileName, bool animated )               {}
116     YLogView *          YWebWidgetFactory::createLogView        ( YWidget * parent, const string & label, int visibleLines, int storedLines )   {}
117     YMultiSelectionBox *YWebWidgetFactory::createMultiSelectionBox ( YWidget * parent, const string & label )                                           {}
118
119     YPackageSelector *  YWebWidgetFactory::createPackageSelector( YWidget * parent, long ModeFlags )            {}
120     YWidget *           YWebWidgetFactory::createPkgSpecial     ( YWidget * parent, const string & subwidgetName )      {} // NCurses only
121
122     //
123     // Layout Helpers
124     //
125
126     YSpacing *          YWebWidgetFactory::createSpacing        ( YWidget * parent, YUIDimension dim, bool stretchable, YLayoutSize_t size ) {}
127     YEmpty *            YWebWidgetFactory::createEmpty          ( YWidget * parent )    {}
128
129     YSquash *           YWebWidgetFactory::createSquash         ( YWidget * parent, bool horSquash, bool vertSquash ) {}
130
131     //
132     // Visual Grouping
133     //
134
135     YFrame *            YWebWidgetFactory::createFrame          ( YWidget * parent, const string & label )               {}
136     YCheckBoxFrame *    YWebWidgetFactory::createCheckBoxFrame  ( YWidget * parent, const string & label, bool checked ) {}
137
138     //
139     // Logical Grouping
140     //
141
142     YRadioButtonGroup * YWebWidgetFactory::createRadioButtonGroup       ( YWidget * parent )    {}
143     YReplacePoint *     YWebWidgetFactory::createReplacePoint   ( YWidget * parent )    {}
144
145
146     /**
147      * Constructor.
148      *
149      * Use YUI::widgetFactory() to get the singleton for this class.
150      **/
151     YWebWidgetFactory::YWebWidgetFactory(){}
152
153     /**
154      * Destructory.
155      **/
156     YWebWidgetFactory::~YWebWidgetFactory(){}
157