]> git.lyx.org Git - features.git/blobdiff - src/frontends/xforms/FormMathsDelim.C
Replace LString.h with support/std_string.h,
[features.git] / src / frontends / xforms / FormMathsDelim.C
index 347d456cd2a2829c1f503a4ecfc116e803f5447f..2415e74902e2c71c81527cda4c8e4cc701ffe39f 100644 (file)
@@ -8,24 +8,21 @@
  * \author John Levon
  * \author Angus Leeming
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #include <config.h>
 
-
 #include "FormMathsDelim.h"
 #include "forms/form_maths_delim.h"
 #include "ControlMath.h"
-#include "xformsBC.h"
 
 #include "bmtable.h"
+#include "xformsBC.h"
 
-#include "support/lstrings.h"
-
-#include "Lsstream.h"
+#include "controllers/ButtonController.h"
 
-#include FORMS_H_LOCATION
+#include "support/std_sstream.h"
 
 #include "delim.xbm"
 #include "delim0.xpm"
@@ -48,10 +45,10 @@ static char const * delim_values[] = {
 using std::endl;
 
 
-typedef FormCB<ControlMathSub, FormDB<FD_maths_delim> > base_class;
+typedef FormController<ControlMath, FormView<FD_maths_delim> > base_class;
 
-FormMathsDelim::FormMathsDelim()
-       : base_class(_("Maths Delimiters"), false)
+FormMathsDelim::FormMathsDelim(Dialog & parent)
+       : base_class(parent, _("Math Delimiters"), false)
 {}
 
 
@@ -70,15 +67,15 @@ void FormMathsDelim::build()
                            delim_width, delim_height, delim_bits);
        fl_set_bmtable_maxitems(dialog_->bmtable, 23);
 
-       bc().setOK(dialog_->button_ok);
-       bc().setApply(dialog_->button_apply);
-       bc().setCancel(dialog_->button_close);
+       bcview().setOK(dialog_->button_ok);
+       bcview().setApply(dialog_->button_apply);
+       bcview().setCancel(dialog_->button_close);
 
-       bc().addReadOnly(dialog_->bmtable);
-       bc().addReadOnly(dialog_->radio_right);
-       bc().addReadOnly(dialog_->radio_left);
-       bc().addReadOnly(dialog_->radio_both);
-       bc().addReadOnly(dialog_->button_pix);
+       bcview().addReadOnly(dialog_->bmtable);
+       bcview().addReadOnly(dialog_->radio_right);
+       bcview().addReadOnly(dialog_->radio_left);
+       bcview().addReadOnly(dialog_->radio_both);
+       bcview().addReadOnly(dialog_->button_pix);
 }
 
 
@@ -89,7 +86,7 @@ void FormMathsDelim::apply()
 
        ostringstream os;
        os << delim_values[left] << ' ' << delim_values[right];
-       controller().dispatchFunc(LFUN_MATH_DELIM, STRCONV(os.str()));
+       controller().dispatchDelim(STRCONV(os.str()));
 }