X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FFormBox.C;h=e9ef91b0e9949d07176a861da3aae79447cc0c81;hb=d5443737342903de489d527802cd2cdd38987d74;hp=3e02a095e9679fdb8c53df2d061c6474f194de94;hpb=68b7ef25fb7d2da230d3eb11d6737701abfc2e64;p=lyx.git diff --git a/src/frontends/xforms/FormBox.C b/src/frontends/xforms/FormBox.C index 3e02a095e9..e9ef91b0e9 100644 --- a/src/frontends/xforms/FormBox.C +++ b/src/frontends/xforms/FormBox.C @@ -17,7 +17,7 @@ #include "controllers/ButtonPolicies.h" #include "controllers/helper_funcs.h" #include "support/lstrings.h" -#include "support/tostr.h" +#include "support/convert.h" #include "Tooltips.h" #include "xforms_helpers.h" @@ -30,16 +30,21 @@ #include -using lyx::support::getStringFromVector; -using lyx::support::isStrDbl; -using lyx::support::subst; using std::string; +namespace lyx { + +using support::getStringFromVector; +using support::isStrDbl; +using support::subst; + +namespace frontend { + typedef FormController > base_class; FormBox::FormBox(Dialog & parent) - : base_class(parent, _("Box")) + : base_class(parent, _("Box Settings")) {} @@ -54,17 +59,17 @@ void FormBox::build() } string str = _("Frameless: No border\n" - "Boxed: Rectangular\n" - "ovalbox: Oval, thin border\n" - "Ovalbox: Oval, thick border\n" - "Shadowbox: Box casting shadow\n" - "Doublebox: Double line border"); + "Boxed: Rectangular\n" + "ovalbox: Oval, thin border\n" + "Ovalbox: Oval, thick border\n" + "Shadowbox: Box casting shadow\n" + "Doublebox: Double line border"); tooltips().init(dialog_->choice_type, str); bcview().addReadOnly(dialog_->check_inner_box); str = _("The inner box may be a parbox or a minipage,\n" - "with appropriate arguments from this dialog."); + "with appropriate arguments from this dialog."); tooltips().init(dialog_->check_inner_box, str); bcview().addReadOnly(dialog_->radio_parbox); @@ -146,7 +151,7 @@ void FormBox::update() setEnabled(dialog_->radio_minipage, controller().params().inner_box); LyXLength len(controller().params().width); - fl_set_input(dialog_->input_width, tostr(len.value()).c_str()); + fl_set_input(dialog_->input_width, convert(len.value()).c_str()); fl_set_choice(dialog_->choice_width_unit, len.unit() + 1); string special(controller().params().special); for (unsigned int i = 0; i < gui_names_spec_.size(); ++i) { @@ -155,12 +160,12 @@ void FormBox::update() gui_names_spec_[i].c_str()); } // Special width unit must be default for general units to be enabled - if(controller().params().special != "none") + if (controller().params().special != "none") setEnabled(dialog_->choice_width_unit, false); setEnabled(dialog_->choice_special, !controller().params().inner_box); LyXLength ht(controller().params().height); - fl_set_input(dialog_->input_height, tostr(ht.value()).c_str()); + fl_set_input(dialog_->input_height, convert(ht.value()).c_str()); fl_set_choice(dialog_->choice_height_unit, ht.unit() + 1); string const height_special(controller().params().height_special); for (unsigned int i = 0; i < gui_names_spec_.size(); ++i) { @@ -172,7 +177,7 @@ void FormBox::update() setEnabled(dialog_->choice_height_unit, controller().params().inner_box); setEnabled(dialog_->choice_height_special, controller().params().inner_box); // Same here - if(height_special != "none") + if (height_special != "none") setEnabled(dialog_->choice_height_unit, false); } @@ -285,3 +290,6 @@ ButtonPolicy::SMInput FormBox::input(FL_OBJECT * ob, long) return ButtonPolicy::SMI_VALID; } + +} // namespace frontend +} // namespace lyx