]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormFloat.C
Tiny clean-ups.
[lyx.git] / src / frontends / xforms / FormFloat.C
index f62673db497134e3eff022f241e36e6e9c55a511..a102a525d8182c28c83c0cc839f2e66ab4e8cdfb 100644 (file)
@@ -7,23 +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>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
-#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 {
 
@@ -36,10 +42,10 @@ enum {
 } // namespace anon
 
 
-typedef FormCB<ControlFloat, FormDB<FD_float> > base_class;
+typedef FormController<ControlFloat, FormView<FD_float> > base_class;
 
-FormFloat::FormFloat()
-       : base_class(_("Float Options"))
+FormFloat::FormFloat(Dialog & parent)
+       : base_class(parent, _("Float Settings"))
 {}
 
 
@@ -48,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);