*/
#include <config.h>
-#include <gtkmm.h>
-#include <libglademm.h>
-#include <sstream>
+
+// Too hard to make concept checks work with this file
+#ifdef _GLIBCPP_CONCEPT_CHECKS
+#undef _GLIBCPP_CONCEPT_CHECKS
+#endif
#include "ControlMath.h"
#include "GMathDelim.h"
#include "support/lstrings.h"
+#include <libglademm.h>
+
+#include <sstream>
+
#include "delim.xbm"
#include "delim0.xpm"
using std::string;
+namespace lyx {
+namespace frontend {
+
namespace
{
enum enumDelimType {LEFT, RIGHT, SINGLE};
+
int const delimType[] = {
//row 1
LEFT, RIGHT, LEFT, RIGHT, SINGLE, SINGLE, LEFT, RIGHT,LEFT, RIGHT,
SINGLE
};
+
int const delimRevert[] = {
1,0,3,2,4,5,7,6,9,8,10,11,
13,12,15,14,16,17,19,18,20,21,22
};
+
char const * delimValues[] = {
"(", ")", "lceil", "rceil", "uparrow", "Uparrow",
"[", "]", "lfloor", "rfloor", "updownarrow", "Updownarrow",
int const delimMax = 23;
+
GXpmBtnTbl::XbmData xbm =
{
delim_bits,
{0, 0, 0, 65535}
};
+
inline int index(int row, int col)
{
return row * delimTblCols + col;
}
+
inline int indexToRow(int index)
{
return index / delimTblCols;
}
+
inline int indexToCol(int index)
{
return index % delimTblCols;
}
+
GMathDelim::GMathDelim(Dialog & parent) :
GViewCB<ControlMath, GViewGladeB>(parent, _("Math Delimiters")),
delimTbl_(delimTblRows, delimTblCols, xbm)
rightSel_ = 1;
xml_->get_widget("Box", box);
delimTbl_.signalClicked().connect(
- SigC::slot(*this, &GMathDelim::onDelimTblClicked));
+ sigc::mem_fun(*this, &GMathDelim::onDelimTblClicked));
delimTbl_.show();
box->children().push_back(
Gtk::Box_Helpers::Element(delimTbl_));
bcview().addReadOnly(both_);
bcview().addReadOnly(demo_);
left_->signal_clicked().connect(
- SigC::slot(*this, &GMathDelim::onRadioClicked));
+ sigc::mem_fun(*this, &GMathDelim::onRadioClicked));
right_->signal_clicked().connect(
- SigC::slot(*this, &GMathDelim::onRadioClicked));
+ sigc::mem_fun(*this, &GMathDelim::onRadioClicked));
both_->signal_clicked().connect(
- SigC::slot(*this, &GMathDelim::onRadioClicked));
+ sigc::mem_fun(*this, &GMathDelim::onRadioClicked));
}
pixmap_ = Gdk::Pixmap::create_from_xpm(demo_->get_colormap(),
mask_,
delim0);
- image = SigC::manage(new Gtk::Image(pixmap_, mask_));
+ image = Gtk::manage(new Gtk::Image(pixmap_, mask_));
image->show();
demo_->add(*image);
gcMask_ = Gdk::GC::create(mask_);
{
bc().valid();
}
+
+} // namespace frontend
+} // namespace lyx