]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormBox.C
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / xforms / FormBox.C
index baf8f19ef9068acbcf2e6c827f5c61379bc62291..0c90df376e1bb007918c11664a2352cd4be4d812 100644 (file)
 
 #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;
 
@@ -71,21 +76,21 @@ void FormBox::build()
        bcview().addReadOnly(dialog_->radio_minipage);
 
        bcview().addReadOnly(dialog_->choice_pos);
-       fl_addto_choice(dialog_->choice_pos, _("top").c_str());
-       fl_addto_choice(dialog_->choice_pos, _("middle").c_str());
-       fl_addto_choice(dialog_->choice_pos, _("bottom").c_str());
+       fl_addto_choice(dialog_->choice_pos, _("Top").c_str());
+       fl_addto_choice(dialog_->choice_pos, _("Middle").c_str());
+       fl_addto_choice(dialog_->choice_pos, _("Bottom").c_str());
 
        bcview().addReadOnly(dialog_->choice_inner_pos);
-       fl_addto_choice(dialog_->choice_inner_pos, _("top").c_str());
-       fl_addto_choice(dialog_->choice_inner_pos, _("middle").c_str());
-       fl_addto_choice(dialog_->choice_inner_pos, _("bottom").c_str());
-       fl_addto_choice(dialog_->choice_inner_pos, _("stretch").c_str());
+       fl_addto_choice(dialog_->choice_inner_pos, _("Top").c_str());
+       fl_addto_choice(dialog_->choice_inner_pos, _("Middle").c_str());
+       fl_addto_choice(dialog_->choice_inner_pos, _("Bottom").c_str());
+       fl_addto_choice(dialog_->choice_inner_pos, _("Stretch").c_str());
 
        bcview().addReadOnly(dialog_->choice_hor_pos);
-       fl_addto_choice(dialog_->choice_hor_pos, _("left").c_str());
-       fl_addto_choice(dialog_->choice_hor_pos, _("center").c_str());
-       fl_addto_choice(dialog_->choice_hor_pos, _("right").c_str());
-       fl_addto_choice(dialog_->choice_hor_pos, _("stretch").c_str());
+       fl_addto_choice(dialog_->choice_hor_pos, _("Left").c_str());
+       fl_addto_choice(dialog_->choice_hor_pos, _("Center").c_str());
+       fl_addto_choice(dialog_->choice_hor_pos, _("Right").c_str());
+       fl_addto_choice(dialog_->choice_hor_pos, _("Stretch").c_str());
 
        bcview().addReadOnly(dialog_->input_width);
        bcview().addReadOnly(dialog_->choice_width_unit);
@@ -155,7 +160,7 @@ 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);
 
@@ -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);
 }
 
@@ -261,7 +266,7 @@ ButtonPolicy::SMInput FormBox::input(FL_OBJECT * ob, long)
                string const input = getString(dialog_->input_width);
                bool const invalid = !isValidLength(input) && !isStrDbl(input);
                if (invalid) {
-                       postWarning(_("Invalid Length!"));
+                       postWarning(_("Invalid length!"));
                        return ButtonPolicy::SMI_INVALID;
                }
        }
@@ -269,7 +274,7 @@ ButtonPolicy::SMInput FormBox::input(FL_OBJECT * ob, long)
                string const input = getString(dialog_->input_height);
                bool const invalid = !isValidLength(input) && !isStrDbl(input);
                if (invalid) {
-                       postWarning(_("Invalid Length!"));
+                       postWarning(_("Invalid length!"));
                        return ButtonPolicy::SMI_INVALID;
                }
        }
@@ -286,3 +291,5 @@ ButtonPolicy::SMInput FormBox::input(FL_OBJECT * ob, long)
        return ButtonPolicy::SMI_VALID;
 }
 
+} // namespace frontend
+} // namespace lyx