#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"
#include <vector>
-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<ControlBox, FormView<FD_box> > base_class;
FormBox::FormBox(Dialog & parent)
- : base_class(parent, _("Box"))
+ : base_class(parent, _("Box Settings"))
{}
}
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);
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<string>(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) {
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<string>(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) {
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);
}
return ButtonPolicy::SMI_VALID;
}
+
+} // namespace frontend
+} // namespace lyx