]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormFloat.C
Introduce LFUN_PRINT.
[lyx.git] / src / frontends / xforms / FormFloat.C
index 8507c1d28b9c72a2ec1e75407686591c7d341f14..c683fbcfbade875b25067ebba6b4cc76e1c65b48 100644 (file)
@@ -7,21 +7,29 @@
  * \author Jürgen Spitzmüller
  * \author Rob Lahaye
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
-
-#include "xformsBC.h"
-#include "ControlFloat.h"
 #include "FormFloat.h"
+#include "ControlFloat.h"
 #include "forms/form_float.h"
+
 #include "Tooltips.h"
 #include "xforms_helpers.h"
+#include "xformsBC.h"
+
 #include "insets/insetfloat.h"
+
 #include "support/lstrings.h"
-#include FORMS_H_LOCATION
+
+#include "lyx_forms.h"
+
+using lyx::support::contains;
+
+using std::string;
+
 
 namespace {
 
@@ -37,7 +45,7 @@ enum {
 typedef FormController<ControlFloat, FormView<FD_float> > base_class;
 
 FormFloat::FormFloat(Dialog & parent)
-       : base_class(parent, _("Float Options"))
+       : base_class(parent, _("Float Settings"))
 {}
 
 
@@ -46,21 +54,21 @@ void FormFloat::build()
        dialog_.reset(build_float(this));
 
        // Manage the ok, apply and cancel/close buttons
-       bc().setOK(dialog_->button_ok);
-       bc().setApply(dialog_->button_apply);
-       bc().setCancel(dialog_->button_close);
-       bc().setRestore(dialog_->button_restore);
+       bcview().setOK(dialog_->button_ok);
+       bcview().setApply(dialog_->button_apply);
+       bcview().setCancel(dialog_->button_close);
+       bcview().setRestore(dialog_->button_restore);
 
        // disable for read-only documents
-       bc().addReadOnly(dialog_->radio_default);
-       bc().addReadOnly(dialog_->radio_here_definitely);
-       bc().addReadOnly(dialog_->radio_alternatives);
-       bc().addReadOnly(dialog_->check_top);
-       bc().addReadOnly(dialog_->check_bottom);
-       bc().addReadOnly(dialog_->check_page);
-       bc().addReadOnly(dialog_->check_here);
-       bc().addReadOnly(dialog_->check_force);
-       bc().addReadOnly(dialog_->check_wide);
+       bcview().addReadOnly(dialog_->radio_default);
+       bcview().addReadOnly(dialog_->radio_here_definitely);
+       bcview().addReadOnly(dialog_->radio_alternatives);
+       bcview().addReadOnly(dialog_->check_top);
+       bcview().addReadOnly(dialog_->check_bottom);
+       bcview().addReadOnly(dialog_->check_page);
+       bcview().addReadOnly(dialog_->check_here);
+       bcview().addReadOnly(dialog_->check_force);
+       bcview().addReadOnly(dialog_->check_wide);
 
        placement_.init(dialog_->radio_default,         DOCUMENT_DEFAULTS);
        placement_.init(dialog_->radio_here_definitely, HERE_DEFINITELY);
@@ -152,13 +160,13 @@ void FormFloat::update()
        string placement(controller().params().placement);
        bool const wide = controller().params().wide;
 
-       bool const here_definitely = contains(placement, "H");
+       bool const here_definitely = contains(placement, 'H');
 
-       bool const top    = contains(placement, "t");
-       bool const bottom = contains(placement, "b");
-       bool const page   = contains(placement, "p");
-       bool const here   = contains(placement, "h");
-       bool const force  = contains(placement, "!");
+       bool const top    = contains(placement, 't');
+       bool const bottom = contains(placement, 'b');
+       bool const page   = contains(placement, 'p');
+       bool const here   = contains(placement, 'h');
+       bool const force  = contains(placement, '!');
        bool const alternatives = top || bottom || page || (here && !wide);
 
        if (alternatives) {