25 #ifndef YWidgetFactory_h
26 #define YWidgetFactory_h
31 #include "YItemCustomStatus.h"
86 YDialog * createMainDialog ( YDialogColorMode colorMode = YDialogNormalColor );
87 YDialog * createPopupDialog ( YDialogColorMode colorMode = YDialogNormalColor );
88 virtual YDialog * createDialog (
YDialogType dialogType, YDialogColorMode colorMode = YDialogNormalColor ) = 0;
96 virtual YLayoutBox * createLayoutBox (
YWidget * parent, YUIDimension dimension ) = 0;
103 virtual YPushButton * createPushButton (
YWidget * parent,
const std::string & label ) = 0;
104 virtual YLabel * createLabel (
YWidget * parent,
const std::string & text,
bool isHeading =
false,
bool isOutputField =
false ) = 0;
105 YLabel * createHeading (
YWidget * parent,
const std::string & label );
106 virtual YInputField * createInputField (
YWidget * parent,
const std::string & label,
bool passwordMode =
false ) = 0;
107 virtual YCheckBox * createCheckBox (
YWidget * parent,
const std::string & label,
bool isChecked =
false ) = 0;
108 virtual YRadioButton * createRadioButton (
YWidget * parent,
const std::string & label,
bool isChecked =
false ) = 0;
109 virtual YComboBox * createComboBox (
YWidget * parent,
const std::string & label,
bool editable =
false ) = 0;
111 virtual YTree * createTree (
YWidget * parent,
const std::string & label,
bool multiselection =
false,
bool recursiveselection =
false ) = 0;
113 virtual YProgressBar * createProgressBar (
YWidget * parent,
const std::string & label,
int maxValue = 100 ) = 0;
114 virtual YRichText * createRichText (
YWidget * parent,
const std::string & text = std::string(),
bool plainTextMode =
false ) = 0;
115 virtual YBusyIndicator * createBusyIndicator (
YWidget * parent,
const std::string & label,
int timeout = 1000 ) = 0;
121 YPushButton * createIconButton (
YWidget * parent,
const std::string & iconName,
const std::string & fallbackTextLabel );
122 YLabel * createOutputField (
YWidget * parent,
const std::string & label );
123 virtual YIntField * createIntField (
YWidget * parent,
const std::string & label,
int minVal,
int maxVal,
int initialVal ) = 0;
126 virtual YMenuButton * createMenuButton (
YWidget * parent,
const std::string & label ) = 0;
128 virtual YImage * createImage (
YWidget * parent,
const std::string & imageFileName,
bool animated =
false ) = 0;
129 virtual YLogView * createLogView (
YWidget * parent,
const std::string & label,
int visibleLines,
int storedLines = 0 ) = 0;
133 virtual YWidget * createPkgSpecial (
YWidget * parent,
const std::string & subwidgetName ) = 0;
141 YSpacing * createHSpacing (
YWidget * parent, YLayoutSize_t size = 1.0 );
142 YSpacing * createVSpacing (
YWidget * parent, YLayoutSize_t size = 1.0 );
143 virtual YSpacing * createSpacing (
YWidget * parent, YUIDimension dim,
bool stretchable =
false, YLayoutSize_t size = 0.0 ) = 0;
154 YAlignment * createMarginBox (
YWidget * parent, YLayoutSize_t horMargin, YLayoutSize_t vertMargin );
156 YLayoutSize_t leftMargin, YLayoutSize_t rightMargin,
157 YLayoutSize_t topMargin, YLayoutSize_t bottomMargin );
161 YAlignment * createMinSize (
YWidget * parent, YLayoutSize_t minWidth, YLayoutSize_t minHeight );
163 virtual YAlignment * createAlignment (
YWidget * parent, YAlignmentType horAlignment, YAlignmentType vertAlignment ) = 0;
168 virtual YSquash * createSquash (
YWidget * parent,
bool horSquash,
bool vertSquash ) = 0;
174 virtual YFrame * createFrame (
YWidget * parent,
const std::string & label ) = 0;
175 virtual YCheckBoxFrame * createCheckBoxFrame (
YWidget * parent,
const std::string & label,
bool checked ) = 0;
188 virtual YItemSelector * createItemSelector (
YWidget * parent,
bool enforceSingleSelection =
true );
191 virtual YItemSelector * createCustomStatusItemSelector (
YWidget * parent,
const YItemCustomStatusVector & customStates );
210 #endif // YWidgetFactory_h