* \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 "FormMathsMatrix.h"
#include "forms/form_maths_matrix.h"
#include "ControlMath.h"
+
#include "xformsBC.h"
-#include "ButtonController.h"
-#include "support/LAssert.h"
-#include "support/lyxalgo.h" // lyx::count
+#include "controllers/ButtonController.h"
-#include "Lsstream.h"
+#include "support/lyxalgo.h" // lyx::count
#include "lyx_forms.h"
-#include <algorithm>
+#include <sstream>
+
-using namespace lyx::support;
+using std::ostringstream;
#ifndef CXX_GLOBAL_CSTD
using std::strlen;
#endif
+namespace lyx {
+namespace frontend {
-static char h_align_str[80] = "c";
-static char v_align_c[] = "tcb";
+namespace {
+char h_align_str[80] = "c";
+char v_align_c[] = "tcb";
-extern "C" {
-
- static
- int C_FormMathsMatrixAlignFilter(FL_OBJECT * ob, char const *,
- char const * cur, int c)
- {
- Assert(ob);
- FormMathsMatrix * pre =
- static_cast<FormMathsMatrix *>(ob->u_vdata);
- Assert(pre);
- return pre->AlignFilter(cur, c);
- }
+extern "C"
+int C_FormMathsMatrixAlignFilter(FL_OBJECT * ob, char const *,
+ char const * cur, int c)
+{
+ BOOST_ASSERT(ob);
+ FormMathsMatrix * pre =
+ static_cast<FormMathsMatrix *>(ob->u_vdata);
+ BOOST_ASSERT(pre);
+ return pre->AlignFilter(cur, c);
}
+} // namespace anon
+
typedef FormController<ControlMath, FormView<FD_maths_matrix> > base_class;
dialog_.reset(build_maths_matrix(this));
fl_addto_choice(dialog_->choice_valign,
- _("Top | Center | Bottom").c_str());
+ _("Top | Middle | Bottom").c_str());
fl_set_choice(dialog_->choice_valign, 2);
fl_set_input(dialog_->input_halign, h_align_str);
dialog_->input_halign->u_vdata = this;
ostringstream os;
os << nx << ' ' << ny << ' ' << c << ' ' << sh;
- controller().dispatchMatrix(STRCONV(os.str()));
+ controller().dispatchMatrix(os.str());
}
int const n = int(fl_get_slider_value(dialog_->slider_columns) + 0.5)
- int(len)
- + int(lyx::count(cur, cur + len, '|'));
+ + int(count(cur, cur + len, '|'));
if (n < 0)
return FL_INVALID;
return FL_INVALID;
}
+
+} // namespace frontend
+} // namespace lyx