mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
gtk-patch_2004_2_9.new
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8454 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e6b54c9fb6
commit
65047994df
@ -35,6 +35,7 @@ src/frontends/controllers/helper_funcs.C
|
||||
src/frontends/gnome/GLog.C
|
||||
src/frontends/gtk/Dialogs.C
|
||||
src/frontends/gtk/GBC.h
|
||||
src/frontends/gtk/GMathDelim.C
|
||||
src/frontends/gtk/GMathPanel.C
|
||||
src/frontends/gtk/GTableCreate.C
|
||||
src/frontends/gtk/GUrl.C
|
||||
|
@ -1,3 +1,25 @@
|
||||
2004-02-09 Huang Ying <hying_caritas@163.com>
|
||||
* GXpmBtnTbl.C : add a GXpmBtnTbl class to automate creating a Xpm
|
||||
Button Table according to a set of xpm data or xbm data, is equivalent
|
||||
with bmtable in xforms frontend.
|
||||
* GMathPanel.C : revise using GXpmBtnTbl.
|
||||
* gimages : a directory for xpm used in gtk frontend only.
|
||||
* GMathDelim.C : math delimiter dialog.
|
||||
|
||||
2004-02-07 Huang Ying <hying_caritas@163.com>
|
||||
* GViewBase.C : add addCancel, addOK, addApply, add Restore to
|
||||
facilitate setup buttons signal.
|
||||
* GAboutLyx.C : using addxxx series functions.
|
||||
* GTableCreate.C : using addxxx series functions.
|
||||
* GText.C : using addxxx series functions.
|
||||
* GUrl.C : using addxxx series functions.
|
||||
|
||||
2004-02-02 Huang Ying <hying_caritas@163.com>
|
||||
|
||||
* GAboutLyx.C : the "CREDITS" is in "ISO8859-1" charset not locale
|
||||
charset, so change the convert function from Glib::locale_to_utf8
|
||||
to Glib::convert(credit, "UTF-8", "ISO8859-1").
|
||||
|
||||
2003-12-20 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* Dialogs.C:
|
||||
@ -11,16 +33,16 @@
|
||||
2003-10-30 Huang Ying <hying_caritas@163.com>
|
||||
|
||||
* GToolbar.C : change layouts widget update code according xforms
|
||||
frontends to prevent layouts widget from disable always.
|
||||
fronetends to prevent layouts widget from disable always.
|
||||
|
||||
2003-10-28 Huang Ying <hying_caritas@163.com>
|
||||
|
||||
* codeConvert.h (etc): Change FcChar to XftChar according to the
|
||||
libxft interface changing.
|
||||
* codeConvert.h (etc): Change FcChar to XftChar according to the libxft
|
||||
interface changing.
|
||||
* FileDialogPrivate.C : get rid of button support in FileDialog
|
||||
because of the implementation of Gtk::FileSelection changed.
|
||||
* glade/.cvsignore : add *.gladep, which is generated during
|
||||
editing *.galde
|
||||
* glade/.cvsignore : add *.gladep, which is generated during editing
|
||||
*.galde
|
||||
* Add MathPanel, TableCreate and Url dialog
|
||||
|
||||
2003-10-15 José Matos <jamatos@lyx.org>
|
||||
|
@ -42,6 +42,7 @@
|
||||
|
||||
#include "GAboutlyx.h"
|
||||
#include "GText.h"
|
||||
#include "GMathDelim.h"
|
||||
#include "FormBibitem.h"
|
||||
#include "FormBibtex.h"
|
||||
#include "FormBranch.h"
|
||||
@ -57,7 +58,6 @@
|
||||
#include "FormLog.h"
|
||||
#include "GMathPanel.h"
|
||||
#include "FormMathsBitmap.h"
|
||||
#include "FormMathsDelim.h"
|
||||
#include "FormMathsMatrix.h"
|
||||
#include "FormMathsSpace.h"
|
||||
#include "FormMathsStyle.h"
|
||||
@ -392,8 +392,9 @@ Dialog * Dialogs::build(string const & name)
|
||||
dialog->bc().bp(new IgnorantPolicy);
|
||||
|
||||
} else if (name == "mathdelimiter") {
|
||||
dialog->bc().view(new GBC(dialog->bc()));
|
||||
dialog->setController(new ControlMath(*dialog));
|
||||
dialog->setView(new FormMathsDelim(*dialog));
|
||||
dialog->setView(new GMathDelim(*dialog));
|
||||
dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
|
||||
} else if (name == "mathmatrix") {
|
||||
dialog->setController(new ControlMath(*dialog));
|
||||
|
@ -32,10 +32,10 @@ FileDialog::~FileDialog()
|
||||
|
||||
|
||||
FileDialog::Result const FileDialog::open(string const & path,
|
||||
string const & mask,
|
||||
lyx::support::FileFilterList const & filters,
|
||||
string const & suggested)
|
||||
{
|
||||
return private_->open(path, mask, suggested);
|
||||
return private_->open(path, filters, suggested);
|
||||
}
|
||||
|
||||
|
||||
@ -47,8 +47,8 @@ FileDialog::Result const FileDialog::opendir(string const & path,
|
||||
|
||||
|
||||
FileDialog::Result const FileDialog::save(string const & path,
|
||||
string const & mask,
|
||||
lyx::support::FileFilterList const & filters,
|
||||
string const & suggested)
|
||||
{
|
||||
return private_->save(path, mask, suggested);
|
||||
return private_->save(path, filters, suggested);
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ void FileDialog::Private::onButton2Clicked()
|
||||
|
||||
|
||||
FileDialog::Result const FileDialog::Private::open(string const & path,
|
||||
string const & /*mask*/,
|
||||
lyx::support::FileFilterList const & /*filters*/,
|
||||
string const & /*suggested*/)
|
||||
{
|
||||
fileSelection_.set_filename(path);
|
||||
@ -92,8 +92,8 @@ FileDialog::Result const FileDialog::Private::opendir(string const & path,
|
||||
|
||||
|
||||
FileDialog::Result const FileDialog::Private::save(string const & path,
|
||||
string const & mask,
|
||||
lyx::support::FileFilterList const & filters,
|
||||
string const & suggested)
|
||||
{
|
||||
return open(path, mask, suggested);
|
||||
return open(path, filters, suggested);
|
||||
}
|
||||
|
@ -22,13 +22,13 @@ public:
|
||||
kb_action action,
|
||||
FileDialog::Button b1, FileDialog::Button b2);
|
||||
FileDialog::Result const open(std::string const & path,
|
||||
std::string const & mask,
|
||||
lyx::support::FileFilterList const & filters,
|
||||
std::string const & suggested);
|
||||
FileDialog::Result const opendir(std::string const & path,
|
||||
std::string const & suggested);
|
||||
|
||||
FileDialog::Result const save(std::string const & path,
|
||||
std::string const & mask,
|
||||
lyx::support::FileFilterList const & filters,
|
||||
std::string const & suggested);
|
||||
|
||||
private:
|
||||
|
@ -160,7 +160,10 @@ void GAboutlyx::doBuild()
|
||||
version->set_text(Glib::locale_to_utf8(vs.str()));
|
||||
std::ostringstream crs;
|
||||
controller().getCredits(crs);
|
||||
credits->set_markup(translateMarkup(Glib::locale_to_utf8(crs.str())));
|
||||
credits->set_markup(
|
||||
translateMarkup(Glib::convert(crs.str(),
|
||||
"UTF-8",
|
||||
"ISO8859-1")));
|
||||
std::ostringstream ls;
|
||||
ls << controller().getCopyright() << "\n\n"
|
||||
<< controller().getLicense() << "\n\n"
|
||||
@ -168,5 +171,6 @@ void GAboutlyx::doBuild()
|
||||
license->set_text(Glib::locale_to_utf8(ls.str()));
|
||||
Gtk::Button * btn;
|
||||
xml_->get_widget("close_button", btn);
|
||||
btn->signal_clicked().connect(SigC::slot(*this, &GViewBase::onCancel));
|
||||
setCancel(btn);
|
||||
//btn->signal_clicked().connect(SigC::slot(*this, &GViewBase::onCancel));
|
||||
}
|
||||
|
225
src/frontends/gtk/GMathDelim.C
Normal file
225
src/frontends/gtk/GMathDelim.C
Normal file
@ -0,0 +1,225 @@
|
||||
/**
|
||||
* \file GMathDelim.C
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Huang Ying
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtkmm.h>
|
||||
#include <libglademm.h>
|
||||
#include <sstream>
|
||||
|
||||
#include "ControlMath.h"
|
||||
#include "GMathDelim.h"
|
||||
#include "support/filetools.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "delim.xbm"
|
||||
#include "delim0.xpm"
|
||||
|
||||
using std::string;
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
enum enumDelimType {LEFT, RIGHT, SINGLE};
|
||||
|
||||
int const delimType[] = {
|
||||
//row 1
|
||||
LEFT, RIGHT, LEFT, RIGHT, SINGLE, SINGLE, LEFT, RIGHT,LEFT, RIGHT,
|
||||
SINGLE, SINGLE,
|
||||
//row 2
|
||||
LEFT, RIGHT, LEFT, RIGHT, SINGLE, SINGLE, LEFT, RIGHT, SINGLE, SINGLE,
|
||||
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",
|
||||
"{", "}", "/", "backslash", "downarrow", "Downarrow",
|
||||
"langle", "rangle", "|", "Vert", ".", 0
|
||||
};
|
||||
|
||||
int const delimTblRows = 2;
|
||||
|
||||
int const delimTblCols = 12;
|
||||
|
||||
int const delimMax = 23;
|
||||
|
||||
GXpmBtnTbl::XbmData xbm =
|
||||
{
|
||||
delim_bits,
|
||||
delim_width,
|
||||
delim_height,
|
||||
{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)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GMathDelim::doBuild()
|
||||
{
|
||||
string const gladeName =
|
||||
lyx::support::LibFileSearch("glade", "mathDelim", "glade");
|
||||
xml_ = Gnome::Glade::Xml::create(gladeName);
|
||||
Gtk::Button * ok;
|
||||
Gtk::Button * apply;
|
||||
Gtk::Button * close;
|
||||
Gtk::Box * box;
|
||||
xml_->get_widget("Left", left_);
|
||||
xml_->get_widget("Right", right_);
|
||||
xml_->get_widget("Both", both_);
|
||||
xml_->get_widget("OK", ok);
|
||||
xml_->get_widget("Apply", apply);
|
||||
xml_->get_widget("Close", close);
|
||||
xml_->get_widget("Demo", demo_);
|
||||
setOK(ok);
|
||||
setApply(apply);
|
||||
setCancel(close);
|
||||
// Initialize demo button pixmap to "()" as found in images/delim0.xpm
|
||||
setDemoPixmap();
|
||||
leftSel_ = 0;
|
||||
rightSel_ = 1;
|
||||
xml_->get_widget("Box", box);
|
||||
delimTbl_.signalClicked().connect(
|
||||
SigC::slot(*this, &GMathDelim::onDelimTblClicked));
|
||||
delimTbl_.show();
|
||||
box->children().push_back(
|
||||
Gtk::Box_Helpers::Element(delimTbl_));
|
||||
bcview().addReadOnly(&delimTbl_);
|
||||
bcview().addReadOnly(left_);
|
||||
bcview().addReadOnly(right_);
|
||||
bcview().addReadOnly(both_);
|
||||
bcview().addReadOnly(demo_);
|
||||
left_->signal_clicked().connect(
|
||||
SigC::slot(*this, &GMathDelim::onRadioClicked));
|
||||
right_->signal_clicked().connect(
|
||||
SigC::slot(*this, &GMathDelim::onRadioClicked));
|
||||
both_->signal_clicked().connect(
|
||||
SigC::slot(*this, &GMathDelim::onRadioClicked));
|
||||
}
|
||||
|
||||
|
||||
void GMathDelim::setDemoPixmap()
|
||||
{
|
||||
Gtk::Image * image;
|
||||
pixmap_ = Gdk::Pixmap::create_from_xpm(demo_->get_colormap(),
|
||||
mask_,
|
||||
delim0);
|
||||
image = SigC::manage(new Gtk::Image(pixmap_, mask_));
|
||||
image->show();
|
||||
demo_->add(*image);
|
||||
gcMask_ = Gdk::GC::create(mask_);
|
||||
}
|
||||
|
||||
|
||||
void GMathDelim::apply()
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << delimValues[leftSel_] << ' ' << delimValues[rightSel_];
|
||||
controller().dispatchDelim(os.str());
|
||||
}
|
||||
|
||||
|
||||
void GMathDelim::update()
|
||||
{
|
||||
bc().valid();
|
||||
}
|
||||
|
||||
|
||||
void GMathDelim::onDelimTblClicked(int row, int col)
|
||||
{
|
||||
int const sel = index(row, col);
|
||||
if (sel >= delimMax)
|
||||
return;
|
||||
bool left = left_->get_active();
|
||||
bool right = right_->get_active();
|
||||
bool both = both_->get_active();
|
||||
if (left)
|
||||
leftSel_ = sel;
|
||||
else if (right)
|
||||
rightSel_ = sel;
|
||||
else if (both)
|
||||
if (delimType[sel] == LEFT) {
|
||||
leftSel_ = sel;
|
||||
rightSel_ = delimRevert[sel];
|
||||
} else if (delimType[sel] == RIGHT) {
|
||||
rightSel_ = sel;
|
||||
leftSel_ = delimRevert[sel];
|
||||
} else {
|
||||
leftSel_ = rightSel_ = sel;
|
||||
}
|
||||
updateDemoPixmap();
|
||||
}
|
||||
|
||||
|
||||
void GMathDelim::updateDemoPixmap()
|
||||
{
|
||||
int const delimWidth = delim_width / delimTblCols;
|
||||
Glib::RefPtr<Gdk::Pixmap> pixmap;
|
||||
Glib::RefPtr<Gdk::Bitmap> mask;
|
||||
GXpmBtnTbl::GXpmBtn * btn = delimTbl_.getBtn(indexToRow(leftSel_),
|
||||
indexToCol(leftSel_));
|
||||
pixmap = btn->getPixmap();
|
||||
mask = btn->getMask();
|
||||
pixmap_->draw_drawable(left_->get_style()->get_black_gc(),
|
||||
pixmap,
|
||||
0, 0,
|
||||
0, 0);
|
||||
mask_->draw_drawable(gcMask_,
|
||||
mask,
|
||||
0, 0,
|
||||
0, 0);
|
||||
btn = delimTbl_.getBtn(indexToRow(rightSel_),
|
||||
indexToCol(rightSel_));
|
||||
pixmap = btn->getPixmap();
|
||||
mask = btn->getMask();
|
||||
pixmap_->draw_drawable(left_->get_style()->get_black_gc(),
|
||||
pixmap,
|
||||
0, 0,
|
||||
delimWidth, 0);
|
||||
mask_->draw_drawable(gcMask_,
|
||||
mask,
|
||||
0, 0,
|
||||
delimWidth, 0);
|
||||
int x, y, width, height, depth;
|
||||
demo_->get_window()->get_geometry(x, y, width, height, depth);
|
||||
demo_->get_window()->invalidate_rect(
|
||||
Gdk::Rectangle(x, y, width, height), true);
|
||||
bc().valid();
|
||||
}
|
||||
|
||||
|
||||
void GMathDelim::onRadioClicked()
|
||||
{
|
||||
bc().valid();
|
||||
}
|
45
src/frontends/gtk/GMathDelim.h
Normal file
45
src/frontends/gtk/GMathDelim.h
Normal file
@ -0,0 +1,45 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file GMathDelim.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Huang Ying
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#ifndef GMATH_DELIM_H
|
||||
#define GMATH_DELIM_H
|
||||
|
||||
#include "GViewBase.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "GXpmBtnTbl.h"
|
||||
|
||||
class ControlMath;
|
||||
|
||||
class GMathDelim : public GViewCB<ControlMath, GViewGladeB>
|
||||
{
|
||||
public:
|
||||
GMathDelim(Dialog & parent);
|
||||
private:
|
||||
virtual void apply();
|
||||
virtual void update();
|
||||
virtual void doBuild();
|
||||
void setDemoPixmap();
|
||||
void updateDemoPixmap();
|
||||
void onDelimTblClicked(int row, int col);
|
||||
void onRadioClicked();
|
||||
GXpmBtnTbl delimTbl_;
|
||||
Gtk::Button * demo_;
|
||||
Gtk::RadioButton * left_;
|
||||
Gtk::RadioButton * right_;
|
||||
Gtk::RadioButton * both_;
|
||||
Glib::RefPtr<Gdk::Pixmap> pixmap_;
|
||||
Glib::RefPtr<Gdk::Bitmap> mask_;
|
||||
Glib::RefPtr<Gdk::GC> gcMask_;
|
||||
int leftSel_;
|
||||
int rightSel_;
|
||||
};
|
||||
|
||||
#endif
|
@ -29,10 +29,69 @@
|
||||
#include "sub.xpm"
|
||||
#include "super.xpm"
|
||||
|
||||
#include "gimages/ams_arrow.xpm"
|
||||
#include "gimages/ams_misc.xpm"
|
||||
#include "gimages/ams_brel.xpm"
|
||||
#include "gimages/ams_nrel.xpm"
|
||||
#include "gimages/ams_ops.xpm"
|
||||
#include "gimages/arrow.xpm"
|
||||
#include "gimages/boperator.xpm"
|
||||
#include "gimages/brelats.xpm"
|
||||
#include "gimages/dots.xpm"
|
||||
#include "gimages/greek.xpm"
|
||||
#include "gimages/misc.xpm"
|
||||
#include "gimages/varsize.xpm"
|
||||
|
||||
using std::string;
|
||||
|
||||
namespace {
|
||||
|
||||
char const * infoUp[][5] =
|
||||
{
|
||||
//row 1
|
||||
{0, 0, "mathdelimiter", "mathaccents", "mathspace"},
|
||||
//row 2
|
||||
{0, 0, "mathstyle", "mathmatrix", 0}
|
||||
};
|
||||
|
||||
GXpmBtnTbl::XpmData xpmUp[] =
|
||||
{
|
||||
//row 1
|
||||
sqrt_xpm, frac, delim, deco, space_xpm,
|
||||
//row 2
|
||||
super_xpm, sub_xpm, style_xpm, matrix, equation
|
||||
};
|
||||
|
||||
char const * infoDown[][3] =
|
||||
{
|
||||
//row 1
|
||||
{"mathoperators", "mathrelations", "matharrows"},
|
||||
//row 2
|
||||
{"mathbigoperators", "mathdots", "mathmisc"},
|
||||
//row 3
|
||||
{"mathgreek", "mathamsarrows", "mathamsrelations"},
|
||||
//row 4
|
||||
{"mathamsnegatedrelations", "mathamsoperators", "mathamsmisc"}
|
||||
};
|
||||
|
||||
GXpmBtnTbl::XpmData xpmDown[] =
|
||||
{
|
||||
//row 1
|
||||
boperator_xpm, brelats_xpm, arrow_xpm,
|
||||
//row 2
|
||||
varsize_xpm, dots_xpm, misc_xpm,
|
||||
//row 3
|
||||
greek_xpm, ams_arrow_xpm, ams_brel_xpm,
|
||||
//row 4
|
||||
ams_nrel_xpm, ams_ops_xpm, ams_misc_xpm
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
GMathPanel::GMathPanel(Dialog & parent)
|
||||
: GViewCB<ControlMath, GViewGladeB>(parent, _("Math Panel"))
|
||||
: GViewCB<ControlMath, GViewGladeB>(parent, _("Math Panel")),
|
||||
tableUp_(2, 5, xpmUp), tableDown_(4, 3, xpmDown)
|
||||
{
|
||||
}
|
||||
|
||||
@ -43,236 +102,21 @@ void GMathPanel::doBuild()
|
||||
lyx::support::LibFileSearch("glade", "mathPanel", "glade");
|
||||
xml_ = Gnome::Glade::Xml::create(gladeName);
|
||||
Gtk::Button * close;
|
||||
|
||||
//1
|
||||
Gtk::Button * sqrt;
|
||||
Gtk::Button * frac;
|
||||
Gtk::Button * delim;
|
||||
Gtk::Button * deco;
|
||||
Gtk::Button * space;
|
||||
|
||||
//2
|
||||
Gtk::Button * super;
|
||||
Gtk::Button * sub;
|
||||
Gtk::Button * style;
|
||||
Gtk::Button * matrix;
|
||||
Gtk::Button * equation;
|
||||
|
||||
//3
|
||||
Gtk::Button * boperator;
|
||||
Gtk::Button * brelats;
|
||||
Gtk::Button * arrow;
|
||||
|
||||
//4
|
||||
Gtk::Button * varSize;
|
||||
Gtk::Button * dots;
|
||||
Gtk::Button * misc;
|
||||
|
||||
//5
|
||||
Gtk::Button * greek;
|
||||
Gtk::Button * amsArrows;
|
||||
Gtk::Button * amsBrel;
|
||||
|
||||
//6
|
||||
Gtk::Button * amsNrel;
|
||||
Gtk::Button * amsOps;
|
||||
Gtk::Button * amsMisc;
|
||||
Gtk::VBox * vbox;
|
||||
|
||||
xml_->get_widget("Close", close);
|
||||
close->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onCancel));
|
||||
setCancel(close);
|
||||
|
||||
//1
|
||||
xml_->get_widget("Sqrt", sqrt);
|
||||
xml_->get_widget("Frac", frac);
|
||||
xml_->get_widget("Delim", delim);
|
||||
xml_->get_widget("Deco", deco);
|
||||
xml_->get_widget("Space", space);
|
||||
tableUp_.signalClicked().connect(
|
||||
SigC::slot(*this, &GMathPanel::onTableUpClicked));
|
||||
tableUp_.show();
|
||||
tableDown_.signalClicked().connect(
|
||||
SigC::slot(*this, &GMathPanel::onTableDownClicked));
|
||||
tableDown_.show();
|
||||
|
||||
//2
|
||||
xml_->get_widget("Super", super);
|
||||
xml_->get_widget("Sub", sub);
|
||||
xml_->get_widget("Style", style);
|
||||
xml_->get_widget("Matrix", matrix);
|
||||
xml_->get_widget("Equation", equation);
|
||||
|
||||
//3
|
||||
xml_->get_widget("Boperator", boperator);
|
||||
xml_->get_widget("Brelate", brelats);
|
||||
xml_->get_widget("Arrow", arrow);
|
||||
|
||||
//4
|
||||
xml_->get_widget("VarSize", varSize);
|
||||
xml_->get_widget("Dots", dots);
|
||||
xml_->get_widget("Misc", misc);
|
||||
|
||||
//5
|
||||
xml_->get_widget("Greek", greek);
|
||||
xml_->get_widget("AmsArrow", amsArrows);
|
||||
xml_->get_widget("AmsBrel", amsBrel);
|
||||
|
||||
//6
|
||||
xml_->get_widget("AmsNrel", amsNrel);
|
||||
xml_->get_widget("AmsOps", amsOps);
|
||||
xml_->get_widget("AmsMisc", amsMisc);
|
||||
|
||||
Glib::RefPtr<Gdk::Bitmap> mask;
|
||||
Glib::RefPtr<Gdk::Pixmap> pixmap;
|
||||
Glib::RefPtr<Gdk::Colormap> clrmap = window()->get_colormap();
|
||||
|
||||
pixmap = Gdk::Pixmap::create_from_xpm(clrmap, mask, ::sqrt_xpm);
|
||||
Gtk::Image * iSqrt = SigC::manage(new Gtk::Image(pixmap, mask));
|
||||
iSqrt->show();
|
||||
sqrt->add(*iSqrt);
|
||||
|
||||
pixmap = Gdk::Pixmap::create_from_xpm(clrmap, mask, ::frac);
|
||||
Gtk::Image * iFrac = SigC::manage(new Gtk::Image(pixmap, mask));
|
||||
iFrac->show();
|
||||
frac->add(*iFrac);
|
||||
|
||||
pixmap = Gdk::Pixmap::create_from_xpm(clrmap, mask, ::delim);
|
||||
Gtk::Image * iDelim = SigC::manage(new Gtk::Image(pixmap, mask));
|
||||
iDelim->show();
|
||||
delim->add(*iDelim);
|
||||
|
||||
pixmap = Gdk::Pixmap::create_from_xpm(clrmap, mask, ::deco);
|
||||
Gtk::Image * iDeco = SigC::manage(new Gtk::Image(pixmap, mask));
|
||||
iDeco->show();
|
||||
deco->add(*iDeco);
|
||||
|
||||
pixmap = Gdk::Pixmap::create_from_xpm(clrmap, mask, ::space_xpm);
|
||||
Gtk::Image * iSpace = SigC::manage(new Gtk::Image(pixmap, mask));
|
||||
iSpace->show();
|
||||
space->add(*iSpace);
|
||||
|
||||
pixmap = Gdk::Pixmap::create_from_xpm(clrmap, mask, ::super_xpm);
|
||||
Gtk::Image * iSuper = SigC::manage(new Gtk::Image(pixmap, mask));
|
||||
iSuper->show();
|
||||
super->add(*iSuper);
|
||||
|
||||
pixmap = Gdk::Pixmap::create_from_xpm(clrmap, mask, ::sub_xpm);
|
||||
Gtk::Image * iSub = SigC::manage(new Gtk::Image(pixmap, mask));
|
||||
iSub->show();
|
||||
sub->add(*iSub);
|
||||
|
||||
pixmap = Gdk::Pixmap::create_from_xpm(clrmap, mask, ::style_xpm);
|
||||
Gtk::Image * iStyle = SigC::manage(new Gtk::Image(pixmap, mask));
|
||||
iStyle->show();
|
||||
style->add(*iStyle);
|
||||
|
||||
pixmap = Gdk::Pixmap::create_from_xpm(clrmap, mask, ::matrix);
|
||||
Gtk::Image * iMatrix = SigC::manage(new Gtk::Image(pixmap, mask));
|
||||
iMatrix->show();
|
||||
matrix->add(*iMatrix);
|
||||
|
||||
pixmap = Gdk::Pixmap::create_from_xpm(clrmap, mask, ::equation);
|
||||
Gtk::Image * iEquation = SigC::manage(new Gtk::Image(pixmap, mask));
|
||||
iEquation->show();
|
||||
equation->add(*iEquation);
|
||||
|
||||
arrow->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"matharrows"));
|
||||
deco->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathaccents"));
|
||||
boperator->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathoperators"));
|
||||
brelats->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathrelations"));
|
||||
greek->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathgreek"));
|
||||
misc->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathmisc"));
|
||||
dots->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathdots"));
|
||||
varSize->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathbigoperators"));
|
||||
amsMisc->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathamsmisc"));
|
||||
amsArrows->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathamsarrows"));
|
||||
amsBrel->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathamsrelations"));
|
||||
amsNrel->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathamsnegatedrelations"));
|
||||
amsOps->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathamsoperators"));
|
||||
delim->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathdelimiter"));
|
||||
matrix->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathmatrix"));
|
||||
space->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathspace"));
|
||||
style->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onShowDialog),
|
||||
"mathstyle"));
|
||||
|
||||
super->signal_clicked().connect(
|
||||
SigC::slot(*this, &GMathPanel::onSuperClicked));
|
||||
sub->signal_clicked().connect(
|
||||
SigC::slot(*this, &GMathPanel::onSubClicked));
|
||||
equation->signal_clicked().connect(
|
||||
SigC::slot(*this, &GMathPanel::onEquationClicked));
|
||||
|
||||
frac->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onInsert),
|
||||
"frac"));
|
||||
sqrt->signal_clicked().connect(
|
||||
SigC::bind<char const *>(
|
||||
SigC::slot(*this,
|
||||
&GMathPanel::onInsert),
|
||||
"sqrt"));
|
||||
xml_->get_widget("Vbox", vbox);
|
||||
vbox->children().push_back(Gtk::Box_Helpers::Element(tableUp_));
|
||||
vbox->children().push_back(Gtk::Box_Helpers::Element(tableDown_));
|
||||
|
||||
// Functions ListView
|
||||
xml_->get_widget("Functions", functions_);
|
||||
@ -289,6 +133,29 @@ void GMathPanel::doBuild()
|
||||
}
|
||||
|
||||
|
||||
void GMathPanel::onTableUpClicked(int row, int col)
|
||||
{
|
||||
if (infoUp[row][col])
|
||||
controller().showDialog(infoUp[row][col]);
|
||||
else if (row == 0 && col == 0)
|
||||
controller().dispatchInsert("sqrt");
|
||||
else if (row == 0 && col == 1)
|
||||
controller().dispatchInsert("frac");
|
||||
else if (row == 1 && col == 0)
|
||||
controller().dispatchSuperscript();
|
||||
else if (row == 1 && col == 1)
|
||||
controller().dispatchSubscript();
|
||||
else if (row == 1 && col == 4)
|
||||
controller().dispatchToggleDisplay();
|
||||
}
|
||||
|
||||
|
||||
void GMathPanel::onTableDownClicked(int row, int col)
|
||||
{
|
||||
controller().showDialog(infoDown[row][col]);
|
||||
}
|
||||
|
||||
|
||||
void GMathPanel::onFunctionSelected()
|
||||
{
|
||||
Gtk::TreeModel::iterator it = listSel_->get_selected();
|
||||
@ -296,33 +163,3 @@ void GMathPanel::onFunctionSelected()
|
||||
controller().dispatchInsert(
|
||||
Glib::locale_from_utf8(sel));
|
||||
}
|
||||
|
||||
|
||||
void GMathPanel::onShowDialog(char const * dialogName)
|
||||
{
|
||||
controller().showDialog(dialogName);
|
||||
}
|
||||
|
||||
|
||||
void GMathPanel::onSuperClicked()
|
||||
{
|
||||
controller().dispatchSuperscript();
|
||||
}
|
||||
|
||||
|
||||
void GMathPanel::onSubClicked()
|
||||
{
|
||||
controller().dispatchSubscript();
|
||||
}
|
||||
|
||||
|
||||
void GMathPanel::onEquationClicked()
|
||||
{
|
||||
controller().dispatchToggleDisplay();
|
||||
}
|
||||
|
||||
|
||||
void GMathPanel::onInsert(char const * what)
|
||||
{
|
||||
controller().dispatchInsert(what);
|
||||
}
|
||||
|
@ -14,6 +14,7 @@
|
||||
|
||||
#include "GViewBase.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "GXpmBtnTbl.h"
|
||||
|
||||
class ControlMath;
|
||||
|
||||
@ -26,6 +27,8 @@ private:
|
||||
virtual void update() {}
|
||||
virtual void doBuild();
|
||||
void onShowDialog(char const * dialogName);
|
||||
void onTableUpClicked(int row, int col);
|
||||
void onTableDownClicked(int row, int col);
|
||||
void onSuperClicked();
|
||||
void onSubClicked();
|
||||
void onEquationClicked();
|
||||
@ -36,6 +39,8 @@ private:
|
||||
Gtk::TreeModel::ColumnRecord listCols_;
|
||||
Glib::RefPtr<Gtk::ListStore> listStore_;
|
||||
Glib::RefPtr<Gtk::TreeSelection> listSel_;
|
||||
GXpmBtnTbl tableUp_;
|
||||
GXpmBtnTbl tableDown_;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -38,15 +38,9 @@ void GTableCreate::doBuild()
|
||||
xml_->get_widget("Cancel", cancel);
|
||||
xml_->get_widget("Rows", rows_);
|
||||
xml_->get_widget("Columns", columns_);
|
||||
bcview().setOK(ok);
|
||||
bcview().setCancel(cancel);
|
||||
bcview().setApply(apply);
|
||||
ok->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onOK));
|
||||
apply->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onApply));
|
||||
cancel->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onCancel));
|
||||
setOK(ok);
|
||||
setCancel(cancel);
|
||||
setApply(apply);
|
||||
}
|
||||
|
||||
void GTableCreate::apply()
|
||||
|
@ -57,19 +57,11 @@ void GText::doBuild()
|
||||
xml_->get_widget("Apply", apply);
|
||||
xml_->get_widget("OK", ok);
|
||||
label->set_text(Glib::locale_to_utf8(id_sc::id(label_)));
|
||||
bcview().setOK(ok);
|
||||
bcview().setApply(apply);
|
||||
bcview().setCancel(cancel);
|
||||
bcview().setRestore(restore);
|
||||
setOK(ok);
|
||||
setApply(apply);
|
||||
setCancel(cancel);
|
||||
setRestore(restore);
|
||||
bcview().addReadOnly(entry_);
|
||||
ok->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onOK));
|
||||
apply->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onApply));
|
||||
cancel->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onCancel));
|
||||
restore->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onRestore));
|
||||
entry_->signal_changed().connect(
|
||||
SigC::slot(*this, >ext::onEntryChanged));
|
||||
}
|
||||
|
@ -42,22 +42,14 @@ void GUrl::doBuild()
|
||||
xml_->get_widget("Ok", ok);
|
||||
xml_->get_widget("Apply", apply);
|
||||
xml_->get_widget("Cancel", cancel);
|
||||
bcview().setOK(ok);
|
||||
bcview().setCancel(cancel);
|
||||
bcview().setApply(apply);
|
||||
bcview().setRestore(restore);
|
||||
setOK(ok);
|
||||
setCancel(cancel);
|
||||
setApply(apply);
|
||||
setRestore(restore);
|
||||
bcview().addReadOnly(name_);
|
||||
bcview().addReadOnly(url_);
|
||||
bcview().addReadOnly(htmlType_);
|
||||
|
||||
ok->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onOK));
|
||||
apply->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onApply));
|
||||
cancel->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onCancel));
|
||||
restore->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onRestore));
|
||||
url_->signal_changed().connect(
|
||||
SigC::slot(*this, &GUrl::onEntryChanged));
|
||||
name_->signal_changed().connect(
|
||||
|
@ -68,6 +68,33 @@ GBC & GViewBase::bcview()
|
||||
return static_cast<GBC &>(dialog().bc().view());
|
||||
}
|
||||
|
||||
void GViewBase::setCancel(Gtk::Button * cancel)
|
||||
{
|
||||
bcview().setCancel(cancel);
|
||||
cancel->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onCancel));
|
||||
}
|
||||
|
||||
void GViewBase::setApply(Gtk::Button * apply)
|
||||
{
|
||||
bcview().setApply(apply);
|
||||
apply->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onApply));
|
||||
}
|
||||
|
||||
void GViewBase::setOK(Gtk::Button * ok)
|
||||
{
|
||||
bcview().setOK(ok);
|
||||
ok->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onOK));
|
||||
}
|
||||
|
||||
void GViewBase::setRestore(Gtk::Button * restore)
|
||||
{
|
||||
bcview().setRestore(restore);
|
||||
restore->signal_clicked().connect(
|
||||
SigC::slot(*this, &GViewBase::onRestore));
|
||||
}
|
||||
|
||||
void GViewBase::onApply()
|
||||
{
|
||||
|
@ -24,6 +24,10 @@ class GViewBase : public Dialog::View, public SigC::Object
|
||||
public:
|
||||
GViewBase(Dialog &, std::string const &, bool allowResize);
|
||||
virtual ~GViewBase();
|
||||
void setCancel(Gtk::Button * cancel);
|
||||
void setApply(Gtk::Button * apply);
|
||||
void setOK(Gtk::Button * ok);
|
||||
void setRestore(Gtk::Button * restore);
|
||||
protected:
|
||||
// Build the dialog
|
||||
virtual void build();
|
||||
|
175
src/frontends/gtk/GXpmBtnTbl.C
Normal file
175
src/frontends/gtk/GXpmBtnTbl.C
Normal file
@ -0,0 +1,175 @@
|
||||
/**
|
||||
* \file GXpmBtnTbl.C
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Huang Ying
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
#include <gtkmm.h>
|
||||
#include <cassert>
|
||||
#include "GXpmBtnTbl.h"
|
||||
|
||||
|
||||
void GXpmBtnTbl::GXpmBtn::setXpm(XpmData xpm)
|
||||
{
|
||||
Glib::RefPtr<Gdk::Colormap> clrmap = get_colormap();
|
||||
Gtk::Image * image;
|
||||
pixmap_ = Gdk::Pixmap::create_from_xpm(clrmap,
|
||||
mask_,
|
||||
xpm);
|
||||
image = SigC::manage(new Gtk::Image(pixmap_, mask_));
|
||||
image->show();
|
||||
add(*image);
|
||||
}
|
||||
|
||||
|
||||
void GXpmBtnTbl::GXpmBtn::setXpm(Glib::RefPtr<Gdk::Pixmap> pixmap,
|
||||
Glib::RefPtr<Gdk::Bitmap> mask)
|
||||
{
|
||||
pixmap_ = pixmap;
|
||||
mask_ = mask;
|
||||
Gtk::Image * image;
|
||||
image = SigC::manage(new Gtk::Image(pixmap_, mask_));
|
||||
image->show();
|
||||
add(*image);
|
||||
}
|
||||
|
||||
|
||||
GXpmBtnTbl::GXpmBtnTbl(int rows, int cols, XpmData xpms[]) :
|
||||
Gtk::Table(rows, cols, true), rows_(rows), cols_(cols),
|
||||
xbm_(0)
|
||||
{
|
||||
construct();
|
||||
setBtnXpm(xpms);
|
||||
}
|
||||
|
||||
|
||||
GXpmBtnTbl::GXpmBtnTbl(int rows, int cols, const XbmData& xbm) :
|
||||
Gtk::Table(rows, cols, true), rows_(rows), cols_(cols),
|
||||
xbm_(&xbm)
|
||||
{
|
||||
construct();
|
||||
}
|
||||
|
||||
|
||||
GXpmBtnTbl::~GXpmBtnTbl()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
void GXpmBtnTbl::construct()
|
||||
{
|
||||
assert(rows_);
|
||||
assert(cols_);
|
||||
btns_.reset(new GXpmBtn[rows_ * cols_]);
|
||||
assert(btns_.get());
|
||||
|
||||
GXpmBtn * btn;
|
||||
int row, col;
|
||||
for (row = 0; row < rows_; ++row)
|
||||
for (col = 0; col < cols_; ++col) {
|
||||
btn = &btns_[index(row, col)];
|
||||
btn->setRow(row);
|
||||
btn->setCol(col);
|
||||
btn->signalClicked().connect(signalClicked_.slot());
|
||||
btn->show();
|
||||
attach(*btn, col, col + 1, row, row + 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GXpmBtnTbl::setBtnXpm(XpmData xpms[])
|
||||
{
|
||||
int row, col;
|
||||
for (row = 0; row < rows_; ++row)
|
||||
for (col = 0; col < cols_; ++col)
|
||||
btns_[index(row, col)].setXpm(xpms[index(row, col)]);
|
||||
}
|
||||
|
||||
|
||||
void GXpmBtnTbl::setBtnXpm(const XbmData& xbm)
|
||||
{
|
||||
Glib::RefPtr<Gdk::Bitmap> mask;
|
||||
Glib::RefPtr<Gdk::Pixmap> pixmap;
|
||||
Glib::RefPtr<Gdk::Colormap> clrmap = get_colormap();
|
||||
Gdk::Color fg(const_cast<GdkColor *>(&xbm.fg_));
|
||||
clrmap->alloc_color(fg);
|
||||
Glib::RefPtr<Gdk::Window> window = get_window();
|
||||
pixmap = Gdk::Pixmap::create_from_data(
|
||||
window,
|
||||
reinterpret_cast<char const * const>(xbm.data_),
|
||||
xbm.width_,
|
||||
xbm.height_,
|
||||
window->get_depth(),
|
||||
fg,
|
||||
get_style()->get_bg(Gtk::STATE_NORMAL));
|
||||
mask = Gdk::Bitmap::create(
|
||||
window,
|
||||
reinterpret_cast<char const * const>(xbm.data_),
|
||||
xbm.width_,
|
||||
xbm.height_);
|
||||
Glib::RefPtr<Gdk::Bitmap> maskBtn;
|
||||
Glib::RefPtr<Gdk::Pixmap> pixmapBtn;
|
||||
Glib::RefPtr<Gdk::GC> gc = Gdk::GC::create(mask);
|
||||
int row, col;
|
||||
int btnWidth = xbm.width_ / cols_;
|
||||
int btnHeight = xbm.height_ / rows_;
|
||||
for (row = 0; row < rows_; ++row)
|
||||
for (col = 0; col < cols_; ++col) {
|
||||
pixmapBtn = Gdk::Pixmap::create(
|
||||
window,
|
||||
btnWidth,
|
||||
btnHeight,
|
||||
window->get_depth());
|
||||
pixmapBtn->draw_drawable(get_style()->get_black_gc(),
|
||||
pixmap,
|
||||
col * btnWidth,
|
||||
row * btnHeight,
|
||||
0,
|
||||
0,
|
||||
btnWidth,
|
||||
btnHeight);
|
||||
maskBtn = Gdk::Bitmap::create(
|
||||
window,
|
||||
reinterpret_cast<char const * const>(xbm.data_),
|
||||
btnWidth,
|
||||
btnHeight);
|
||||
maskBtn->draw_drawable(gc,
|
||||
mask,
|
||||
col * btnWidth,
|
||||
row * btnHeight,
|
||||
0,
|
||||
0,
|
||||
btnWidth,
|
||||
btnHeight);
|
||||
btns_[index(row, col)].setXpm(pixmapBtn, maskBtn);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void GXpmBtnTbl::on_realize()
|
||||
{
|
||||
Gtk::Table::on_realize();
|
||||
if (!xbm_)
|
||||
return;
|
||||
setBtnXpm(*xbm_);
|
||||
}
|
||||
|
||||
|
||||
void buttonSetXpm(Gtk::Button * btn, char const **xpm)
|
||||
{
|
||||
Glib::RefPtr<Gdk::Bitmap> mask;
|
||||
Glib::RefPtr<Gdk::Pixmap> pixmap;
|
||||
Glib::RefPtr<Gdk::Colormap> clrmap = btn->get_colormap();
|
||||
Gtk::Image * image;
|
||||
pixmap = Gdk::Pixmap::create_from_xpm(clrmap,
|
||||
mask,
|
||||
xpm);
|
||||
image = SigC::manage(new Gtk::Image(pixmap, mask));
|
||||
image->show();
|
||||
btn->add(*image);
|
||||
}
|
83
src/frontends/gtk/GXpmBtnTbl.h
Normal file
83
src/frontends/gtk/GXpmBtnTbl.h
Normal file
@ -0,0 +1,83 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file GXpmBtnTbl.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
* \author Huang Ying
|
||||
*
|
||||
* Full author contact details are available in file CREDITS.
|
||||
*/
|
||||
|
||||
#ifndef XPM_BTN_TBL_H
|
||||
#define XPM_BTN_TBL_H
|
||||
|
||||
#include <boost/scoped_array.hpp>
|
||||
|
||||
|
||||
class GXpmBtnTbl : public Gtk::Table
|
||||
{
|
||||
public:
|
||||
typedef char const ** XpmData;
|
||||
typedef SigC::Signal2<void, int, int> SigType;
|
||||
struct XbmData
|
||||
{
|
||||
unsigned char const* data_;
|
||||
int width_;
|
||||
int height_;
|
||||
GdkColor fg_;
|
||||
};
|
||||
class GXpmBtn : public Gtk::Button
|
||||
{
|
||||
public:
|
||||
GXpmBtn() : row_(-1), col_(-1)
|
||||
{
|
||||
signal_clicked().connect(
|
||||
SigC::slot(*this,
|
||||
&GXpmBtn::onButtonClicked));
|
||||
}
|
||||
void setRow(int row) { row_ = row; }
|
||||
void setCol(int col) { col_ = col; }
|
||||
int getRow() { return row_; }
|
||||
int getCol() { return col_; }
|
||||
void setXpm(XpmData xpm);
|
||||
void setXpm(Glib::RefPtr<Gdk::Pixmap> pixmap,
|
||||
Glib::RefPtr<Gdk::Bitmap> mask);
|
||||
Glib::RefPtr<Gdk::Pixmap> getPixmap() { return pixmap_; }
|
||||
Glib::RefPtr<Gdk::Bitmap> getMask() { return mask_; }
|
||||
SigType signalClicked() { return signalClicked_; }
|
||||
void onButtonClicked()
|
||||
{ signalClicked_.emit(row_, col_); }
|
||||
private:
|
||||
int row_;
|
||||
int col_;
|
||||
Glib::RefPtr<Gdk::Pixmap> pixmap_;
|
||||
Glib::RefPtr<Gdk::Bitmap> mask_;
|
||||
SigType signalClicked_;
|
||||
};
|
||||
GXpmBtnTbl(int rows, int cols, XpmData xpms[]);
|
||||
//GXpmBtnTbl(int rows, int cols, XpmData xpm);
|
||||
GXpmBtnTbl(int rows, int cols, const XbmData& xbm);
|
||||
~GXpmBtnTbl();
|
||||
GXpmBtn* getBtn(int row, int col)
|
||||
{ return &btns_[index(row, col)]; }
|
||||
SigType signalClicked() { return signalClicked_; }
|
||||
private:
|
||||
int index(int row, int col) { return row * cols_ + col; }
|
||||
void on_realize();
|
||||
void construct();
|
||||
void setBtnXpm(XpmData xpms[]);
|
||||
void setBtnXpm(const XbmData& xbm);
|
||||
|
||||
int rows_;
|
||||
int cols_;
|
||||
boost::scoped_array<GXpmBtn> btns_;
|
||||
const XbmData * xbm_;
|
||||
SigType signalClicked_;
|
||||
};
|
||||
|
||||
|
||||
void buttonSetXpm(Gtk::Button * btn, char const **xpm);
|
||||
|
||||
|
||||
#endif
|
@ -61,7 +61,11 @@ libgtk_la_SOURCES = \
|
||||
GTableCreate.h \
|
||||
GTableCreate.C \
|
||||
GMathPanel.h \
|
||||
GMathPanel.C
|
||||
GMathPanel.C \
|
||||
GXpmBtnTbl.h \
|
||||
GXpmBtnTbl.C \
|
||||
GMathDelim.h \
|
||||
GMathDelim.C
|
||||
|
||||
# GPrint.h
|
||||
# GPrint.C
|
||||
|
23
src/frontends/gtk/gimages/ams_arrow.xpm
Normal file
23
src/frontends/gtk/gimages/ams_arrow.xpm
Normal file
@ -0,0 +1,23 @@
|
||||
/* XPM */
|
||||
static const char * ams_arrow_xpm[] = {
|
||||
"27 18 2 1",
|
||||
". c None",
|
||||
"+ c #0000FF",
|
||||
"...........................",
|
||||
".....+.....................",
|
||||
"....+++....................",
|
||||
"...+.+.+...................",
|
||||
".....+.....................",
|
||||
".....+.....................",
|
||||
".....+.....................",
|
||||
".....+.........+.....+.....",
|
||||
".....+........+++++++++....",
|
||||
".....+.......++.......++...",
|
||||
".....+........+++++++++....",
|
||||
".....+.........+.....+.....",
|
||||
".....+.....................",
|
||||
".....+.....................",
|
||||
".....+.....................",
|
||||
".....+.....................",
|
||||
".....+.....................",
|
||||
"..........................."};
|
18
src/frontends/gtk/gimages/ams_brel.xpm
Normal file
18
src/frontends/gtk/gimages/ams_brel.xpm
Normal file
@ -0,0 +1,18 @@
|
||||
/* XPM */
|
||||
static const char * ams_brel_xpm[] = {
|
||||
"22 13 2 1",
|
||||
". c None",
|
||||
"+ c #0000FF",
|
||||
"......................",
|
||||
"......................",
|
||||
"......................",
|
||||
".......++.............",
|
||||
".....++........++.+...",
|
||||
"...++.........+.++....",
|
||||
".....++...............",
|
||||
".......++.....+++++...",
|
||||
"......................",
|
||||
"...++++++.....+++++...",
|
||||
"......................",
|
||||
"......................",
|
||||
"......................"};
|
20
src/frontends/gtk/gimages/ams_misc.xpm
Normal file
20
src/frontends/gtk/gimages/ams_misc.xpm
Normal file
@ -0,0 +1,20 @@
|
||||
/* XPM */
|
||||
static const char * ams_misc_xpm[] = {
|
||||
"33 15 2 1",
|
||||
". c None",
|
||||
"+ c #0000FF",
|
||||
".................................",
|
||||
".................................",
|
||||
"....+++......+++...+.............",
|
||||
".....++......++....+.............",
|
||||
"....+.+.....+.+..................",
|
||||
"....+.+....+.+....+...+++....++..",
|
||||
"....+.+...+..+...++..+..+..++..+.",
|
||||
"...+..+..+..++....+..+.....+.....",
|
||||
"...+..+..+..+....++..++...++.....",
|
||||
"...+..+.+...+....+....++..+......",
|
||||
"..+...++...++...++.....+..+......",
|
||||
"..+...++...+....+.+.+..+..++..+..",
|
||||
".+++..+...+++...++..+++....+++...",
|
||||
".................................",
|
||||
"................................."};
|
22
src/frontends/gtk/gimages/ams_nrel.xpm
Normal file
22
src/frontends/gtk/gimages/ams_nrel.xpm
Normal file
@ -0,0 +1,22 @@
|
||||
/* XPM */
|
||||
static const char * ams_nrel_xpm[] = {
|
||||
"32 17 2 1",
|
||||
". c None",
|
||||
"+ c #0000FF",
|
||||
"................................",
|
||||
"................................",
|
||||
"................................",
|
||||
"..+.....+..................+....",
|
||||
"..+....+....................+...",
|
||||
"..+....+......++............+...",
|
||||
"..+...+.....++........++.+...+..",
|
||||
"..+...+...++.........+.++....+..",
|
||||
"..+...+.....++...............+..",
|
||||
"..+...+.......++.....+++++...+..",
|
||||
"......+......................+..",
|
||||
"..+...+...++++++.....+++++...+..",
|
||||
".......+....................+...",
|
||||
".......+....................+...",
|
||||
"........+..................+....",
|
||||
"................................",
|
||||
"................................"};
|
16
src/frontends/gtk/gimages/ams_ops.xpm
Normal file
16
src/frontends/gtk/gimages/ams_ops.xpm
Normal file
@ -0,0 +1,16 @@
|
||||
/* XPM */
|
||||
static const char * ams_ops_xpm[] = {
|
||||
"21 11 2 1",
|
||||
". c None",
|
||||
"+ c #0000FF",
|
||||
".....................",
|
||||
".....................",
|
||||
".....+...............",
|
||||
".....+.......+...+...",
|
||||
"...+++++......+.+....",
|
||||
".....+.........+.....",
|
||||
".....+........+.+....",
|
||||
".............+...+...",
|
||||
"...+++++.............",
|
||||
".....................",
|
||||
"....................."};
|
24
src/frontends/gtk/gimages/arrow.xpm
Normal file
24
src/frontends/gtk/gimages/arrow.xpm
Normal file
@ -0,0 +1,24 @@
|
||||
/* XPM */
|
||||
static const char * arrow_xpm[] = {
|
||||
"27 19 2 1",
|
||||
". c None",
|
||||
"+ c #000000",
|
||||
"...........................",
|
||||
"...........................",
|
||||
".....+.....................",
|
||||
"....+++....................",
|
||||
"...+.+.+...................",
|
||||
".....+.....................",
|
||||
".....+.....................",
|
||||
".....+.....................",
|
||||
".....+.........+.....+.....",
|
||||
".....+........+++++++++....",
|
||||
".....+.......++.......++...",
|
||||
".....+........+++++++++....",
|
||||
".....+.........+.....+.....",
|
||||
".....+.....................",
|
||||
".....+.....................",
|
||||
".....+.....................",
|
||||
".....+.....................",
|
||||
".....+.....................",
|
||||
"..........................."};
|
16
src/frontends/gtk/gimages/boperator.xpm
Normal file
16
src/frontends/gtk/gimages/boperator.xpm
Normal file
@ -0,0 +1,16 @@
|
||||
/* XPM */
|
||||
static const char * boperator_xpm[] = {
|
||||
"21 11 2 1",
|
||||
". c None",
|
||||
"+ c #000000",
|
||||
".....................",
|
||||
".....................",
|
||||
".....+...............",
|
||||
".....+.......+...+...",
|
||||
"...+++++......+.+....",
|
||||
".....+.........+.....",
|
||||
".....+........+.+....",
|
||||
".............+...+...",
|
||||
"...+++++.............",
|
||||
".....................",
|
||||
"....................."};
|
16
src/frontends/gtk/gimages/brelats.xpm
Normal file
16
src/frontends/gtk/gimages/brelats.xpm
Normal file
@ -0,0 +1,16 @@
|
||||
/* XPM */
|
||||
static const char * brelats_xpm[] = {
|
||||
"22 11 2 1",
|
||||
". c None",
|
||||
"+ c #000000",
|
||||
"......................",
|
||||
"......................",
|
||||
".......++.............",
|
||||
".....++........++.+...",
|
||||
"...++.........+.++....",
|
||||
".....++...............",
|
||||
".......++.....+++++...",
|
||||
"......................",
|
||||
"...++++++.....+++++...",
|
||||
"......................",
|
||||
"......................"};
|
18
src/frontends/gtk/gimages/dots.xpm
Normal file
18
src/frontends/gtk/gimages/dots.xpm
Normal file
@ -0,0 +1,18 @@
|
||||
/* XPM */
|
||||
static const char * dots_xpm[] = {
|
||||
"27 13 2 1",
|
||||
". c None",
|
||||
"+ c #000000",
|
||||
"...........................",
|
||||
"...........................",
|
||||
"....+++++..................",
|
||||
".....+...+.................",
|
||||
".....+....+........+.......",
|
||||
"....+.....+..++..++++.+++..",
|
||||
"....+.....+.+..+..+..+..+..",
|
||||
"....+....+.+...+..+...+....",
|
||||
"...+.....+.+...+.+.....+...",
|
||||
"...+...++..+..+..+.+.+..+..",
|
||||
"..+++++.....++....+..+++...",
|
||||
"...........................",
|
||||
"..........................."};
|
25
src/frontends/gtk/gimages/greek.xpm
Normal file
25
src/frontends/gtk/gimages/greek.xpm
Normal file
@ -0,0 +1,25 @@
|
||||
/* XPM */
|
||||
static const char * greek_xpm[] = {
|
||||
"31 20 2 1",
|
||||
". c None",
|
||||
"+ c #000000",
|
||||
"...............................",
|
||||
"...............................",
|
||||
"...............++++............",
|
||||
"..............+...++...........",
|
||||
"..............+....+...........",
|
||||
"..............+....+...........",
|
||||
"....+++..++...+...++..++....+..",
|
||||
"...++..+.++...+.+++..+.+....+..",
|
||||
"..++....++....+...++.+..+..+...",
|
||||
"..++....++....+....++...+..+...",
|
||||
"..++....++....+....++...+.+....",
|
||||
"..++....+.....+.....+...+.+....",
|
||||
"..++...++..+..+.....+....+.....",
|
||||
"...++..+.+.+..++...++....+.....",
|
||||
"....+++...+...+.++++....+......",
|
||||
"..............+.........+......",
|
||||
"..............+........++......",
|
||||
"..............+........++......",
|
||||
".............++........++......",
|
||||
"..............................."};
|
19
src/frontends/gtk/gimages/misc.xpm
Normal file
19
src/frontends/gtk/gimages/misc.xpm
Normal file
@ -0,0 +1,19 @@
|
||||
/* XPM */
|
||||
static const char * misc_xpm[] = {
|
||||
"33 14 2 1",
|
||||
". c None",
|
||||
"+ c #000000",
|
||||
".................................",
|
||||
".................................",
|
||||
"....+++......+++...+.............",
|
||||
".....++......++....+.............",
|
||||
"....+.+.....+.+..................",
|
||||
"....+.+....+.+....+...+++....++..",
|
||||
"....+.+...+..+...++..+..+..++..+.",
|
||||
"...+..+..+..++....+..+.....+.....",
|
||||
"...+..+..+..+....++..++...++.....",
|
||||
"...+..+.+...+....+....++..+......",
|
||||
"..+...++...++...++.....+..+......",
|
||||
"..+...++...+....+.+.+..+..++..+..",
|
||||
".+++..+...+++...++..+++....+++...",
|
||||
"................................."};
|
24
src/frontends/gtk/gimages/varsize.xpm
Normal file
24
src/frontends/gtk/gimages/varsize.xpm
Normal file
@ -0,0 +1,24 @@
|
||||
/* XPM */
|
||||
static const char * varsize_xpm[] = {
|
||||
"27 19 2 1",
|
||||
". c None",
|
||||
"+ c #000000",
|
||||
"...........................",
|
||||
"...........................",
|
||||
"....................++.....",
|
||||
"...................+.+.....",
|
||||
"...................+.......",
|
||||
"....++++++.........+.......",
|
||||
"....+....+.........+.......",
|
||||
"....++.............+.......",
|
||||
".....++............+.......",
|
||||
"......++...........+.......",
|
||||
"......+............+.......",
|
||||
".....+.............+.......",
|
||||
"....+.....+........+.......",
|
||||
"....+++++++........+.......",
|
||||
"...................+.......",
|
||||
".................+.+.......",
|
||||
".................++........",
|
||||
"...........................",
|
||||
"..........................."};
|
203
src/frontends/gtk/glade/mathDelim.glade
Normal file
203
src/frontends/gtk/glade/mathDelim.glade
Normal file
@ -0,0 +1,203 @@
|
||||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
|
||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||
|
||||
<glade-interface>
|
||||
|
||||
<widget class="GtkWindow" id="dialog">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="title" translatable="yes">LyX: Math Delimiters</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="window_position">GTK_WIN_POS_NONE</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">5</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox2">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<property name="spacing">4</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="Left">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">(_Left</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="Both">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">()_Both</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">Left</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkRadioButton" id="Right">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">)_Right</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<property name="group">Left</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Demo">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="Box">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox1">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="OK">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_default">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="label" translatable="yes"> _OK </property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Apply">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">_Apply</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Close">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">_Close</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
</glade-interface>
|
@ -20,417 +20,17 @@
|
||||
<property name="spacing">10</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox1">
|
||||
<widget class="GtkVBox" id="Vbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">20</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="table1">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_columns">5</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<property name="row_spacing">0</property>
|
||||
<property name="column_spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Equation">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<placeholder/>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">4</property>
|
||||
<property name="right_attach">5</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Matrix">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Style">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Sub">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Super">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Sqrt">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Frac">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Delim">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Deco">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Space">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">4</property>
|
||||
<property name="right_attach">5</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTable" id="table2">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">4</property>
|
||||
<property name="n_columns">3</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<property name="row_spacing">0</property>
|
||||
<property name="column_spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Boperator">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">+*</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Brelate">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes"><-</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Arrow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">|-</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="bottom_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Dots">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Dots</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Misc">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Misc</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="Greek">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Rpeek</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="AmsArrow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">|-</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="AmsBrel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes"><=</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="AmsOps">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">+*</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="AmsMisc">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Misc</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="AmsNrel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">!(<>)</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="VarSize">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">Ef</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
|
Loading…
Reference in New Issue
Block a user