Export the wrap to WML.

This commit is contained in:
Mark de Wever 2009-05-23 09:05:14 +00:00
parent 3b188dd248
commit 0bf5e72e90
2 changed files with 23 additions and 12 deletions

View file

@ -689,12 +689,33 @@ tbuilder_gridcell::tbuilder_gridcell(const config& cfg) :
{
}
tbuilder_label::tbuilder_label(const config& cfg)
: tbuilder_control(cfg)
, wrap(utils::string_bool("wrap"))
{
/*WIKI
* @page = GUIWidgetInstanceWML
* @order = 2_label
*
* == Label ==
*
* Instance of a label.
*
* List with the label specific variables:
* @start_table = config
* wrap (bool = false) Is wrapping enabled for the label.
* @end_table
*/
}
twidget* tbuilder_label::build() const
{
tlabel* tmp_label = new tlabel();
init_control(tmp_label);
tmp_label->set_can_wrap(wrap);
DBG_GUI_G << "Window builder: placed label '" << id << "' with defintion '"
<< definition << "'.\n";

View file

@ -132,21 +132,11 @@ struct tbuilder_label : public tbuilder_control
private:
tbuilder_label();
public:
/*WIKI
* @page = GUIWidgetInstanceWML
* @order = 2_label
*
* == Label ==
*
* A label has no special fields.
*
*/
tbuilder_label(const config& cfg) :
tbuilder_control(cfg)
{}
tbuilder_label(const config& cfg);
twidget* build () const;
bool wrap;
};
struct tbuilder_listbox : public tbuilder_control