+2002-01-10 Martin Vermeer <martin.vermeer@hut.fi>
+
+ * commandtags.h:
+ * LyXAction.C: two new LFUNS, LFUN_FRAK and LFUN_ITAL.
+
2002-01-10 Angus Leeming <a.leeming@ic.ac.uk>
* lyxrc.[Ch]: change names and descriptions of popup font variables to
{ LFUN_ROMAN, "font-roman", N_("Toggle roman font style"),
Noop },
{ LFUN_SANS, "font-sans", N_("Toggle sans font style"), Noop },
+ { LFUN_FRAK, "font-frak", N_("Toggle fraktur font style"), Noop },
+ { LFUN_ITAL, "font-ital", N_("Toggle italic font style"), Noop },
{ LFUN_FONT_SIZE, "font-size", N_("Set font size"), Noop },
{ LFUN_FONT_STATE, "font-state", N_("Show font state"),
ReadOnly },
LFUN_BOLD,
LFUN_ROMAN,
LFUN_NOUN,
+ LFUN_ITAL,
+ LFUN_FRAK,
LFUN_RIGHT,
LFUN_LEFT, // 40
LFUN_UP,
+2002-01-10 Martin Vermeer <martin.vermeer@hut.fi>
+
+ * FormMathsPanel.[Ch] (dispatchFunc): new method. Invokes
+ LyXFunc::dispatch.
+
+ * FormMathsStyle.C (apply): use LFUNs to apply, not insertSymbol.
+
2002-01-10 Angus Leeming <a.leeming@ic.ac.uk>
* FormPreferences.C:
lv_->getLyXFunc()->dispatch(LFUN_INSERT_MATH, '\\' + sym);
}
+void FormMathsPanel::dispatchFunc(string const & funcode) const
+{
+ lv_->getLyXFunc()->dispatch(funcode);
+}
void FormMathsPanel::mathDisplay() const
{
void setActive(FormMathsSub *) const;
/// dispatch a symbol insert
void insertSymbol(string const & sym) const;
-
+ /// dispatch an LFUN:
+ void dispatchFunc(string const & funcode) const;
private:
/// Pointer to the actual instantiation of the ButtonController.
virtual xformsBC & bc();
#include "form_maths_style.h"
extern char * latex_mathstyle[];
+extern char * latex_mathfontcmds[];
FormMathsStyle::FormMathsStyle(LyXView * lv, Dialogs * d,
FormMathsPanel const & p)
void FormMathsStyle::apply()
{
- if (style_ >= 0)
+ if ( (style_ >= 0) && (style_ < 4) )
parent_.insertSymbol(latex_mathstyle[style_]);
+ else
+ parent_.dispatchFunc(latex_mathfontcmds[style_ - 4]);
}
bool FormMathsStyle::input(FL_OBJECT *, long data)
+2002-01-10 Martin Vermeer <martin.vermeer@hut.fi>
+
+ * formulabase.C (localDispatch): handle LFUN_FRAK and LFUN_ITAL.
+
+ * math_support.C: separate string arrays for math style and for
+ font commands.
+
2002-01-10 Dekel Tsur <dekelts@tau.ac.il>
* math_parser.C (parse_normal): Support for \begin{math}
hideInsetCursor(bv);
mathcursor->normalize();
-
switch (action) {
// --- Cursor Movements ---------------------------------------------
case LFUN_EMPH: handleFont(bv, LM_TC_CAL); break;
case LFUN_ROMAN: handleFont(bv, LM_TC_RM); break;
case LFUN_CODE: handleFont(bv, LM_TC_TT); break;
+ case LFUN_FRAK: handleFont(bv, LM_TC_EUFRAK); break;
+ case LFUN_ITAL: handleFont(bv, LM_TC_IT); break;
case LFUN_NOUN: handleFont(bv, LM_TC_BB); break;
case LFUN_DEFAULT: handleFont(bv, LM_TC_VAR); break;
case LFUN_FREE: handleFont(bv, LM_TC_TEXTRM); break;
char const * latex_mathstyle[] = {
- "textstyle", "displaystyle", "scriptstyle", "scriptscriptstyle",
- "mathbf", "mathcal","mathrm","mathtt", "mathsf", "mathit",
- "mathbb","mathfrak", "textrm", "mathnormal"
+ "textstyle", "displaystyle", "scriptstyle", "scriptscriptstyle"
+};
+
+char const * latex_mathfontcmds[] = {
+ "font-bold", "font-emph", "font-roman", "font-code", "font-sans",
+ "font-ital", "font-noun", "font-frak", "font-free", "font-default"
};