mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Martin's math dialog patch.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3322 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
e49241e1e5
commit
d57d71fc5c
@ -1,3 +1,7 @@
|
||||
2002-01-09 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* style.xpm: style button for the math panel
|
||||
|
||||
2002-01-03 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* super.xpm:
|
||||
|
28
images/style.xpm
Normal file
28
images/style.xpm
Normal file
@ -0,0 +1,28 @@
|
||||
/* XPM */
|
||||
static char const * style_xpm[] = {
|
||||
"20 20 5 1",
|
||||
" c None",
|
||||
". c Blue",
|
||||
"X c Black",
|
||||
"o c Blue",
|
||||
"Y c Blue",
|
||||
" ",
|
||||
" ...... oooooo ",
|
||||
" ...... oo oo ",
|
||||
" .. .. oo oo ",
|
||||
" ...... ooooooo ",
|
||||
" ...... oo oo ",
|
||||
" .. .. oo oo ",
|
||||
" .. .. oo oo ",
|
||||
" .. .. oo oo ",
|
||||
" ",
|
||||
" XX ",
|
||||
" XXXX YYYYY ",
|
||||
" XX XX Y Y ",
|
||||
" XX XX Y Y ",
|
||||
" XXXXXXXX YYYYYYY ",
|
||||
" XX XX Y Y ",
|
||||
" XX XX Y Y ",
|
||||
" XX XX Y Y ",
|
||||
" XX XX YYY YYY ",
|
||||
" "};
|
@ -1,3 +1,12 @@
|
||||
2002-01-09 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* forms/form_maths_style.fd:
|
||||
* FormMathsStyle.[Ch]: New files, Implementing a mathed pop-up for math
|
||||
size "styles" and font types.
|
||||
* FormMathsPanel.[Ch]:
|
||||
* MathsSymbols.C:
|
||||
* forms/form_maths_panel.fd: Modified too.
|
||||
|
||||
2002-01-08 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* Menubar_pimpl.C (create_submenu):
|
||||
|
@ -27,12 +27,14 @@
|
||||
#include "form_maths_delim.h"
|
||||
#include "form_maths_matrix.h"
|
||||
#include "form_maths_space.h"
|
||||
#include "form_maths_style.h"
|
||||
|
||||
#include "FormMathsBitmap.h"
|
||||
#include "FormMathsDeco.h"
|
||||
#include "FormMathsDelim.h"
|
||||
#include "FormMathsMatrix.h"
|
||||
#include "FormMathsSpace.h"
|
||||
#include "FormMathsStyle.h"
|
||||
|
||||
#include "deco.xpm"
|
||||
#include "delim.xpm"
|
||||
@ -40,6 +42,7 @@
|
||||
#include "frac.xpm"
|
||||
#include "matrix.xpm"
|
||||
#include "space.xpm"
|
||||
#include "style.xpm"
|
||||
#include "sqrt.xpm"
|
||||
#include "sub.xpm"
|
||||
#include "super.xpm"
|
||||
@ -63,6 +66,7 @@ FormMathsPanel::FormMathsPanel(LyXView * lv, Dialogs * d)
|
||||
delim_.reset( new FormMathsDelim( lv, d, *this));
|
||||
matrix_.reset(new FormMathsMatrix(lv, d, *this));
|
||||
space_.reset( new FormMathsSpace( lv, d, *this));
|
||||
style_.reset( new FormMathsStyle( lv, d, *this));
|
||||
|
||||
typedef vector<string> StringVec;
|
||||
|
||||
@ -149,6 +153,8 @@ void FormMathsPanel::build()
|
||||
const_cast<char**>(deco));
|
||||
fl_set_pixmap_data(dialog_->button_space,
|
||||
const_cast<char**>(space_xpm));
|
||||
fl_set_pixmap_data(dialog_->button_style,
|
||||
const_cast<char**>(style_xpm));
|
||||
fl_set_pixmap_data(dialog_->button_matrix,
|
||||
const_cast<char**>(matrix));
|
||||
fl_set_pixmap_data(dialog_->button_equation,
|
||||
@ -270,6 +276,12 @@ bool FormMathsPanel::input(FL_OBJECT *, long data)
|
||||
space_->show();
|
||||
break;
|
||||
|
||||
case MM_STYLE:
|
||||
if (active_ && active_ != style_.get())
|
||||
active_->hide();
|
||||
style_->show();
|
||||
break;
|
||||
|
||||
case MM_EQU:
|
||||
mathDisplay();
|
||||
break;
|
||||
|
@ -25,6 +25,7 @@ class FormMathsDeco;
|
||||
class FormMathsDelim;
|
||||
class FormMathsMatrix;
|
||||
class FormMathsSpace;
|
||||
class FormMathsStyle;
|
||||
class FormMathsSub;
|
||||
struct FD_form_maths_panel;
|
||||
|
||||
@ -46,6 +47,7 @@ enum MathsCallbackValues {
|
||||
MM_EQU,
|
||||
MM_DECO,
|
||||
MM_SPACE,
|
||||
MM_STYLE,
|
||||
MM_DOTS,
|
||||
MM_FUNC
|
||||
};
|
||||
@ -88,6 +90,7 @@ private:
|
||||
boost::scoped_ptr<FormMathsDelim> delim_;
|
||||
boost::scoped_ptr<FormMathsMatrix> matrix_;
|
||||
boost::scoped_ptr<FormMathsSpace> space_;
|
||||
boost::scoped_ptr<FormMathsStyle> style_;
|
||||
boost::scoped_ptr<FormMathsBitmap> arrow_;
|
||||
boost::scoped_ptr<FormMathsBitmap> boperator_;
|
||||
boost::scoped_ptr<FormMathsBitmap> brelats_;
|
||||
|
81
src/frontends/xforms/FormMathsStyle.C
Normal file
81
src/frontends/xforms/FormMathsStyle.C
Normal file
@ -0,0 +1,81 @@
|
||||
/**
|
||||
* \file FormMathsStyle.C
|
||||
* Copyright 2001 The LyX Team.
|
||||
* See the file COPYING.
|
||||
*
|
||||
* \author Alejandro Aguilar Sierra
|
||||
* \author Pablo De Napoli, pdenapo@dm.uba.ar
|
||||
* \author John Levon, moz@compsoc.man.ac.uk
|
||||
* \author Angus Leeming, a.leeming@ic.ac.uk
|
||||
* Adapted from FormMathsSpace martin.vermeer@hut.fi
|
||||
*/
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#ifdef __GNUG_
|
||||
#pragma implementation
|
||||
#endif
|
||||
|
||||
#include "FormMathsStyle.h"
|
||||
#include "form_maths_style.h"
|
||||
|
||||
extern char * latex_mathstyle[];
|
||||
|
||||
FormMathsStyle::FormMathsStyle(LyXView * lv, Dialogs * d,
|
||||
FormMathsPanel const & p)
|
||||
: FormMathsSub(lv, d, p, _("Maths Styles & Fonts"), false),
|
||||
style_(-1)
|
||||
{}
|
||||
|
||||
|
||||
FL_FORM * FormMathsStyle::form() const
|
||||
{
|
||||
if (dialog_.get())
|
||||
return dialog_->form;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void FormMathsStyle::build()
|
||||
{
|
||||
dialog_.reset(build_maths_style());
|
||||
|
||||
fl_set_button(dialog_->radio_text, 1);
|
||||
style_ = 1;
|
||||
|
||||
bc().setOK(dialog_->button_ok);
|
||||
bc().setApply(dialog_->button_apply);
|
||||
bc().setCancel(dialog_->button_cancel);
|
||||
|
||||
bc().addReadOnly(dialog_->radio_display);
|
||||
bc().addReadOnly(dialog_->radio_text);
|
||||
bc().addReadOnly(dialog_->radio_script);
|
||||
bc().addReadOnly(dialog_->radio_scriptscript);
|
||||
bc().addReadOnly(dialog_->radio_bold);
|
||||
bc().addReadOnly(dialog_->radio_calligraphic);
|
||||
bc().addReadOnly(dialog_->radio_roman);
|
||||
bc().addReadOnly(dialog_->radio_typewriter);
|
||||
bc().addReadOnly(dialog_->radio_sans);
|
||||
bc().addReadOnly(dialog_->radio_italic);
|
||||
bc().addReadOnly(dialog_->radio_bbbold);
|
||||
bc().addReadOnly(dialog_->radio_fraktur);
|
||||
bc().addReadOnly(dialog_->radio_textrm);
|
||||
bc().addReadOnly(dialog_->radio_normal);
|
||||
}
|
||||
|
||||
|
||||
void FormMathsStyle::apply()
|
||||
{
|
||||
if (style_ >= 0)
|
||||
parent_.insertSymbol(latex_mathstyle[style_]);
|
||||
}
|
||||
|
||||
bool FormMathsStyle::input(FL_OBJECT *, long data)
|
||||
{
|
||||
style_ = -1;
|
||||
|
||||
if (data >= 0 && data < 14) {
|
||||
style_ = short(data);
|
||||
}
|
||||
return true;
|
||||
}
|
54
src/frontends/xforms/FormMathsStyle.h
Normal file
54
src/frontends/xforms/FormMathsStyle.h
Normal file
@ -0,0 +1,54 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file FormMathsStyle.h
|
||||
* Copyright 2001 The LyX Team.
|
||||
* See the file COPYING.
|
||||
*
|
||||
* \author Alejandro Aguilar Sierra
|
||||
* \author John Levon, moz@compsoc.man.ac.uk
|
||||
* \author Angus Leeming, a.leeming@ic.ac.uk
|
||||
*/
|
||||
|
||||
#ifndef FORM_MATHSSTYLE_H
|
||||
#define FORM_MATHSSTYLE_H
|
||||
|
||||
#include <boost/smart_ptr.hpp>
|
||||
|
||||
#ifdef __GNUG_
|
||||
#pragma interface
|
||||
#endif
|
||||
|
||||
#include "FormMathsPanel.h"
|
||||
|
||||
struct FD_form_maths_style;
|
||||
|
||||
/**
|
||||
* This class provides an XForms implementation of the maths style.
|
||||
*/
|
||||
class FormMathsStyle : public FormMathsSub {
|
||||
public:
|
||||
///
|
||||
FormMathsStyle(LyXView *, Dialogs *, FormMathsPanel const &);
|
||||
|
||||
private:
|
||||
/// Build the dialog
|
||||
virtual void build();
|
||||
/// input handler
|
||||
virtual bool input(FL_OBJECT *, long);
|
||||
/// Apply from dialog (modify or create inset)
|
||||
virtual void apply();
|
||||
|
||||
/// Pointer to the actual instantiation of the xforms form
|
||||
virtual FL_FORM * form() const;
|
||||
|
||||
// build the form
|
||||
FD_form_maths_style * build_maths_style();
|
||||
|
||||
// Real GUI implementation
|
||||
boost::scoped_ptr<FD_form_maths_style> dialog_;
|
||||
|
||||
/// The current choice.
|
||||
short style_;
|
||||
};
|
||||
|
||||
#endif // FORM_MATHSSTYLE_H
|
@ -115,6 +115,10 @@ libxforms_la_SOURCES = \
|
||||
FormMathsSpace.h \
|
||||
form_maths_space.C \
|
||||
form_maths_space.h \
|
||||
FormMathsStyle.C \
|
||||
FormMathsStyle.h \
|
||||
form_maths_style.C \
|
||||
form_maths_style.h \
|
||||
FormMinipage.C \
|
||||
FormMinipage.h \
|
||||
form_minipage.C \
|
||||
|
@ -44,6 +44,7 @@ using std::strstr;
|
||||
#include "frac.xpm"
|
||||
#include "sub.xpm"
|
||||
#include "super.xpm"
|
||||
#include "style.xpm"
|
||||
#include "sqrt.xpm"
|
||||
#include "delim.xbm"
|
||||
#include "delim.xpm"
|
||||
@ -150,6 +151,7 @@ static char const ** mathed_get_pixmap_from_icon(int d)
|
||||
case MM_SQRT: return sqrt_xpm;
|
||||
case MM_SUPER: return super_xpm;
|
||||
case MM_SUB: return sub_xpm;
|
||||
case MM_STYLE: return style_xpm;
|
||||
case MM_DELIM: return delim;
|
||||
case MM_MATRIX: return matrix;
|
||||
case MM_EQU: return equation;
|
||||
|
@ -88,6 +88,9 @@ FD_form_maths_panel * FormMathsPanel::build_maths_panel()
|
||||
fdui->button_super = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 10, 40, 30, 30, "");
|
||||
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_SUPER);
|
||||
fdui->button_style = obj = fl_add_pixmapbutton(FL_NORMAL_BUTTON, 70, 40, 30, 30, "");
|
||||
fl_set_object_color(obj, FL_MCOL, FL_BLUE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, MM_STYLE);
|
||||
fl_end_form();
|
||||
|
||||
fdui->form->fdui = fdui;
|
||||
|
@ -32,6 +32,7 @@ struct FD_form_maths_panel {
|
||||
FL_OBJECT *button_varsize;
|
||||
FL_OBJECT *button_sub;
|
||||
FL_OBJECT *button_super;
|
||||
FL_OBJECT *button_style;
|
||||
};
|
||||
|
||||
#endif /* FD_form_maths_panel_h_ */
|
||||
|
175
src/frontends/xforms/form_maths_style.C
Normal file
175
src/frontends/xforms/form_maths_style.C
Normal file
@ -0,0 +1,175 @@
|
||||
// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
|
||||
#include <config.h>
|
||||
#include "xforms_helpers.h"
|
||||
#include "gettext.h"
|
||||
|
||||
/* Form definition file generated with fdesign. */
|
||||
|
||||
#include FORMS_H_LOCATION
|
||||
#include <stdlib.h>
|
||||
#include "form_maths_style.h"
|
||||
#include "FormMathsStyle.h"
|
||||
|
||||
FD_form_maths_style::~FD_form_maths_style()
|
||||
{
|
||||
if ( form->visible ) fl_hide_form( form );
|
||||
fl_free_form( form );
|
||||
}
|
||||
|
||||
|
||||
FD_form_maths_style * FormMathsStyle::build_maths_style()
|
||||
{
|
||||
FL_OBJECT *obj;
|
||||
FD_form_maths_style *fdui = new FD_form_maths_style;
|
||||
|
||||
fdui->form = fl_bgn_form(FL_NO_BOX, 373, 251);
|
||||
fdui->form->u_vdata = this;
|
||||
obj = fl_add_box(FL_UP_BOX, 0, 0, 373, 251, "");
|
||||
{
|
||||
char const * const dummy = N_("Apply|#A");
|
||||
fdui->button_apply = obj = fl_add_button(FL_NORMAL_BUTTON, 152, 212, 80, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedApplyCB, 0);
|
||||
fdui->button_ok = obj = fl_add_button(FL_RETURN_BUTTON, 62, 212, 80, 30, _("OK "));
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedOKCB, 0);
|
||||
{
|
||||
char const * const dummy = N_("Cancel|^[");
|
||||
fdui->button_cancel = obj = fl_add_button(FL_NORMAL_BUTTON, 244, 212, 80, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedCancelCB, 0);
|
||||
|
||||
fdui->styles = fl_bgn_group();
|
||||
{
|
||||
char const * const dummy = N_("Display|#D");
|
||||
fdui->radio_display = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 15, 15, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_MEDIUM_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 1);
|
||||
{
|
||||
char const * const dummy = N_("Text|#T");
|
||||
fdui->radio_text = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 15, 45, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 0);
|
||||
fl_set_button(obj, 1);
|
||||
{
|
||||
char const * const dummy = N_("Script|#S");
|
||||
fdui->radio_script = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 15, 75, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 2);
|
||||
{
|
||||
char const * const dummy = N_("Bold|#B");
|
||||
fdui->radio_bold = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 140, 15, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_BOLD_STYLE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 4);
|
||||
{
|
||||
char const * const dummy = N_("Calligraphy|#C");
|
||||
fdui->radio_calligraphic = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 140, 45, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, 14);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 5);
|
||||
{
|
||||
char const * const dummy = N_("Roman|#m");
|
||||
fdui->radio_roman = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 140, 75, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_TIMES_STYLE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 6);
|
||||
{
|
||||
char const * const dummy = N_("scriptscript|#p");
|
||||
fdui->radio_scriptscript = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 15, 105, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_TINY_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 3);
|
||||
{
|
||||
char const * const dummy = N_("Fixed|#x");
|
||||
fdui->radio_typewriter = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 140, 105, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_FIXED_STYLE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 7);
|
||||
{
|
||||
char const * const dummy = N_("Italic|#I");
|
||||
fdui->radio_italic = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 140, 165, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_lstyle(obj, FL_TIMESITALIC_STYLE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 9);
|
||||
{
|
||||
char const * const dummy = N_("BB Bold|#o");
|
||||
fdui->radio_bbbold = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 260, 15, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 10);
|
||||
{
|
||||
char const * const dummy = N_("Fraktur|#F");
|
||||
fdui->radio_fraktur = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 260, 45, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 11);
|
||||
{
|
||||
char const * const dummy = N_("Reset|#R");
|
||||
fdui->radio_normal = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 260, 165, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 13);
|
||||
{
|
||||
char const * const dummy = N_("textrm|#e");
|
||||
fdui->radio_textrm = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 260, 105, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 12);
|
||||
{
|
||||
char const * const dummy = N_("Sans Serif|#n");
|
||||
fdui->radio_sans = obj = fl_add_round3dbutton(FL_RADIO_BUTTON, 140, 135, 120, 30, idex(_(dummy)));
|
||||
fl_set_button_shortcut(obj, scex(_(dummy)), 1);
|
||||
}
|
||||
fl_set_object_color(obj, FL_MCOL, FL_YELLOW);
|
||||
fl_set_object_lsize(obj, FL_NORMAL_SIZE);
|
||||
fl_set_object_callback(obj, C_FormBaseDeprecatedInputCB, 8);
|
||||
fl_end_group();
|
||||
|
||||
obj = fl_add_frame(FL_ENGRAVED_FRAME, 136, 16, 226, 184, "");
|
||||
obj = fl_add_frame(FL_ENGRAVED_FRAME, 14, 16, 110, 124, "");
|
||||
fl_end_form();
|
||||
|
||||
fdui->form->fdui = fdui;
|
||||
|
||||
return fdui;
|
||||
}
|
||||
/*---------------------------------------*/
|
||||
|
39
src/frontends/xforms/form_maths_style.h
Normal file
39
src/frontends/xforms/form_maths_style.h
Normal file
@ -0,0 +1,39 @@
|
||||
// File modified by fdfix.sh for use by lyx (with xforms >= 0.88) and gettext
|
||||
/** Header file generated with fdesign **/
|
||||
|
||||
#ifndef FD_form_maths_style_h_
|
||||
#define FD_form_maths_style_h_
|
||||
|
||||
/** Callbacks, globals and object handlers **/
|
||||
extern "C" void C_FormBaseDeprecatedApplyCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormBaseDeprecatedOKCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormBaseDeprecatedCancelCB(FL_OBJECT *, long);
|
||||
extern "C" void C_FormBaseDeprecatedInputCB(FL_OBJECT *, long);
|
||||
|
||||
|
||||
/**** Forms and Objects ****/
|
||||
struct FD_form_maths_style {
|
||||
~FD_form_maths_style();
|
||||
|
||||
FL_FORM *form;
|
||||
FL_OBJECT *button_apply;
|
||||
FL_OBJECT *button_ok;
|
||||
FL_OBJECT *button_cancel;
|
||||
FL_OBJECT *styles;
|
||||
FL_OBJECT *radio_display;
|
||||
FL_OBJECT *radio_text;
|
||||
FL_OBJECT *radio_script;
|
||||
FL_OBJECT *radio_bold;
|
||||
FL_OBJECT *radio_calligraphic;
|
||||
FL_OBJECT *radio_roman;
|
||||
FL_OBJECT *radio_scriptscript;
|
||||
FL_OBJECT *radio_typewriter;
|
||||
FL_OBJECT *radio_italic;
|
||||
FL_OBJECT *radio_bbbold;
|
||||
FL_OBJECT *radio_fraktur;
|
||||
FL_OBJECT *radio_normal;
|
||||
FL_OBJECT *radio_textrm;
|
||||
FL_OBJECT *radio_sans;
|
||||
};
|
||||
|
||||
#endif /* FD_form_maths_style_h_ */
|
@ -10,7 +10,7 @@ Unit of measure: FL_COORD_PIXEL
|
||||
Name: form_maths_panel
|
||||
Width: 260
|
||||
Height: 180
|
||||
Number of Objects: 19
|
||||
Number of Objects: 20
|
||||
|
||||
--------------------
|
||||
class: FL_BOX
|
||||
@ -355,5 +355,23 @@ name: button_super
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: MM_SUPER
|
||||
|
||||
--------------------
|
||||
class: FL_PIXMAPBUTTON
|
||||
type: NORMAL_BUTTON
|
||||
box: 70 40 30 30
|
||||
boxtype: FL_UP_BOX
|
||||
colors: FL_MCOL FL_BLUE
|
||||
alignment: FL_ALIGN_BOTTOM
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_DEFAULT_SIZE
|
||||
lcol: FL_BLACK
|
||||
label:
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_style
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: MM_STYLE
|
||||
|
||||
==============================
|
||||
create_the_forms
|
||||
|
414
src/frontends/xforms/forms/form_maths_style.fd
Normal file
414
src/frontends/xforms/forms/form_maths_style.fd
Normal file
@ -0,0 +1,414 @@
|
||||
Magic: 13000
|
||||
|
||||
Internal Form Definition File
|
||||
(do not change)
|
||||
|
||||
Number of forms: 1
|
||||
Unit of measure: FL_COORD_PIXEL
|
||||
SnapGrid: 2
|
||||
|
||||
=============== FORM ===============
|
||||
Name: form_maths_style
|
||||
Width: 373
|
||||
Height: 251
|
||||
Number of Objects: 22
|
||||
|
||||
--------------------
|
||||
class: FL_BOX
|
||||
type: UP_BOX
|
||||
box: 0 0 373 251
|
||||
boxtype: FL_UP_BOX
|
||||
colors: FL_COL1 FL_COL1
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_DEFAULT_SIZE
|
||||
lcol: FL_BLACK
|
||||
label:
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name:
|
||||
callback:
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
class: FL_BUTTON
|
||||
type: NORMAL_BUTTON
|
||||
box: 152 212 80 30
|
||||
boxtype: FL_UP_BOX
|
||||
colors: FL_COL1 FL_COL1
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Apply|#A
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_apply
|
||||
callback: C_FormBaseDeprecatedApplyCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_BUTTON
|
||||
type: RETURN_BUTTON
|
||||
box: 62 212 80 30
|
||||
boxtype: FL_UP_BOX
|
||||
colors: FL_COL1 FL_COL1
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: OK
|
||||
shortcut: ^M
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_ok
|
||||
callback: C_FormBaseDeprecatedOKCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_BUTTON
|
||||
type: NORMAL_BUTTON
|
||||
box: 244 212 80 30
|
||||
boxtype: FL_UP_BOX
|
||||
colors: FL_COL1 FL_COL1
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Cancel|^[
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: button_cancel
|
||||
callback: C_FormBaseDeprecatedCancelCB
|
||||
argument: 0
|
||||
|
||||
--------------------
|
||||
class: FL_BEGIN_GROUP
|
||||
type: 0
|
||||
box: 0 0 0 0
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_COL1 FL_MCOL
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_DEFAULT_SIZE
|
||||
lcol: FL_BLACK
|
||||
label:
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: styles
|
||||
callback:
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
class: FL_ROUND3DBUTTON
|
||||
type: RADIO_BUTTON
|
||||
box: 15 15 120 30
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_MCOL FL_YELLOW
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_MEDIUM_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Display|#D
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_display
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 1
|
||||
|
||||
--------------------
|
||||
class: FL_ROUND3DBUTTON
|
||||
type: RADIO_BUTTON
|
||||
box: 15 45 120 30
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_MCOL FL_YELLOW
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Text|#T
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_text
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 0
|
||||
value: 1
|
||||
|
||||
--------------------
|
||||
class: FL_ROUND3DBUTTON
|
||||
type: RADIO_BUTTON
|
||||
box: 15 75 120 30
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_MCOL FL_YELLOW
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_DEFAULT_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Script|#S
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_script
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 2
|
||||
|
||||
--------------------
|
||||
class: FL_ROUND3DBUTTON
|
||||
type: RADIO_BUTTON
|
||||
box: 140 15 120 30
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_MCOL FL_YELLOW
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_BOLD_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Bold|#B
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_bold
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 4
|
||||
|
||||
--------------------
|
||||
class: FL_ROUND3DBUTTON
|
||||
type: RADIO_BUTTON
|
||||
box: 140 45 120 30
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_MCOL FL_YELLOW
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: 14
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Calligraphy|#C
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_calligraphic
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 5
|
||||
|
||||
--------------------
|
||||
class: FL_ROUND3DBUTTON
|
||||
type: RADIO_BUTTON
|
||||
box: 140 75 120 30
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_MCOL FL_YELLOW
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_TIMES_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Roman|#m
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_roman
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 6
|
||||
|
||||
--------------------
|
||||
class: FL_ROUND3DBUTTON
|
||||
type: RADIO_BUTTON
|
||||
box: 15 105 120 30
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_MCOL FL_YELLOW
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_TINY_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: scriptscript|#p
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_scriptscript
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 3
|
||||
|
||||
--------------------
|
||||
class: FL_ROUND3DBUTTON
|
||||
type: RADIO_BUTTON
|
||||
box: 140 105 120 30
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_MCOL FL_YELLOW
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_FIXED_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Fixed|#x
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_typewriter
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 7
|
||||
|
||||
--------------------
|
||||
class: FL_ROUND3DBUTTON
|
||||
type: RADIO_BUTTON
|
||||
box: 140 165 120 30
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_MCOL FL_YELLOW
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_TIMESITALIC_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Italic|#I
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_italic
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 9
|
||||
|
||||
--------------------
|
||||
class: FL_ROUND3DBUTTON
|
||||
type: RADIO_BUTTON
|
||||
box: 260 15 120 30
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_MCOL FL_YELLOW
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: BB Bold|#o
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_bbbold
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 10
|
||||
|
||||
--------------------
|
||||
class: FL_ROUND3DBUTTON
|
||||
type: RADIO_BUTTON
|
||||
box: 260 45 120 30
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_MCOL FL_YELLOW
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Fraktur|#F
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_fraktur
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 11
|
||||
|
||||
--------------------
|
||||
class: FL_ROUND3DBUTTON
|
||||
type: RADIO_BUTTON
|
||||
box: 260 165 120 30
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_MCOL FL_YELLOW
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Reset|#R
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_normal
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 13
|
||||
|
||||
--------------------
|
||||
class: FL_ROUND3DBUTTON
|
||||
type: RADIO_BUTTON
|
||||
box: 260 105 120 30
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_MCOL FL_YELLOW
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: textrm|#e
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_textrm
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 12
|
||||
|
||||
--------------------
|
||||
class: FL_ROUND3DBUTTON
|
||||
type: RADIO_BUTTON
|
||||
box: 140 135 120 30
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_MCOL FL_YELLOW
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_NORMAL_SIZE
|
||||
lcol: FL_BLACK
|
||||
label: Sans Serif|#n
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name: radio_sans
|
||||
callback: C_FormBaseDeprecatedInputCB
|
||||
argument: 8
|
||||
|
||||
--------------------
|
||||
class: FL_END_GROUP
|
||||
type: 0
|
||||
box: 0 0 0 0
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_COL1 FL_MCOL
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_DEFAULT_SIZE
|
||||
lcol: FL_BLACK
|
||||
label:
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name:
|
||||
callback:
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
class: FL_FRAME
|
||||
type: ENGRAVED_FRAME
|
||||
box: 136 16 226 184
|
||||
boxtype: FL_NO_BOX
|
||||
colors: FL_BLACK FL_COL1
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_DEFAULT_SIZE
|
||||
lcol: FL_BLACK
|
||||
label:
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name:
|
||||
callback:
|
||||
argument:
|
||||
|
||||
--------------------
|
||||
class: FL_FRAME
|
||||
type: ENGRAVED_FRAME
|
||||
box: 14 16 110 124
|
||||
boxtype: FL_FRAME_BOX
|
||||
colors: FL_BLACK FL_COL1
|
||||
alignment: FL_ALIGN_CENTER
|
||||
style: FL_NORMAL_STYLE
|
||||
size: FL_DEFAULT_SIZE
|
||||
lcol: FL_BLACK
|
||||
label:
|
||||
shortcut:
|
||||
resize: FL_RESIZE_ALL
|
||||
gravity: FL_NoGravity FL_NoGravity
|
||||
name:
|
||||
callback:
|
||||
argument:
|
||||
|
||||
==============================
|
||||
create_the_forms
|
@ -38,6 +38,7 @@ SRCS = form_aboutlyx.fd \
|
||||
form_maths_matrix.fd \
|
||||
form_maths_panel.fd \
|
||||
form_maths_space.fd \
|
||||
form_maths_style.fd \
|
||||
form_minipage.fd \
|
||||
form_paragraph.fd \
|
||||
form_preamble.fd \
|
||||
|
@ -1,3 +1,8 @@
|
||||
2002-01-09 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* math_support.C: modified to support a mathed pop-up for math
|
||||
size "styles" and font types.
|
||||
|
||||
2002-01-07 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* math_defs.h: remove trailing comma from enum MathTextCodes.
|
||||
|
@ -775,6 +775,13 @@ char const * latex_mathspace[] = {
|
||||
};
|
||||
|
||||
|
||||
char const * latex_mathstyle[] = {
|
||||
"textstyle", "displaystyle", "scriptstyle", "scriptscriptstyle",
|
||||
"mathbf", "mathcal","mathrm","mathtt", "mathsf", "mathit",
|
||||
"mathbb","mathfrak", "textrm", "mathnormal"
|
||||
};
|
||||
|
||||
|
||||
char const * math_font_name(MathTextCodes code)
|
||||
{
|
||||
static char const * theFontNames[] = {
|
||||
|
Loading…
Reference in New Issue
Block a user