MathsSymbols doesn't depend on xforms.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3852 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2002-03-27 12:04:55 +00:00
parent 28fa90eda0
commit 04d8b7b72b
4 changed files with 39 additions and 33 deletions

View File

@ -1,3 +1,11 @@
2002-03-27 Angus Leeming <a.leeming@ic.ac.uk>
* MathsSymbols.[Ch]: remove #include "bmtable.h" & "FormMathsPanel.h".
Move enum MathsCallbackValues from FormMathsPanel.h to MathsSymbols.h.
The MathsSymbols are now xforms-independent.
* FormMathsPanel.h: #include MathsSymbols.h for the enum.
2002-03-26 Angus Leeming <a.leeming@ic.ac.uk>
* FormPreferences.C (browse): don't use BrowseRelPath here you noodle!

View File

@ -20,6 +20,7 @@
#endif
#include "FormBaseDeprecated.h"
#include "MathsSymbols.h"
class FormMathsBitmap;
class FormMathsDeco;
@ -30,34 +31,6 @@ class FormMathsStyle;
class FormMathsSub;
struct FD_form_maths_panel;
/// values used by the xforms callbacks
enum MathsCallbackValues {
MM_GREEK,
MM_ARROW,
MM_BOP,
MM_BRELATS,
MM_VARSIZE,
MM_MISC,
MM_FRAC,
MM_SQRT,
MM_DELIM,
MM_SUPER,
MM_SUB,
MM_SUBSUPER,
MM_MATRIX,
MM_EQU,
MM_DECO,
MM_SPACE,
MM_STYLE,
MM_DOTS,
MM_AMS_MISC,
MM_AMS_ARROWS,
MM_AMS_BREL,
MM_AMS_NREL,
MM_AMS_OPS,
MM_FUNC
};
/**
* This class provides an XForms implementation of the maths panel.
*/

View File

@ -20,7 +20,7 @@
#include "support/lstrings.h"
#include "debug.h"
#include "MathsSymbols.h"
#include "FormMathsPanel.h"
#include "GUIRunTime.h"
using std::max;
using std::endl;
@ -30,7 +30,6 @@ using std::ostream;
using std::strstr;
#endif
/* Latex code for those bitmaps */
#include "greek.xbm"
@ -385,7 +384,7 @@ static char const ** pixmapFromBitmapData(char const * s, int wx, int hx)
}
int ww = w / dw;
int hh = h / dh;
XImage * xima = XCreateImage(fl_get_display(), 0, 1, XYBitmap, 0,
XImage * xima = XCreateImage(GUIRunTime::x11Display(), 0, 1, XYBitmap, 0,
const_cast<char*>(reinterpret_cast<char const *>(bdata)), w, h, 8, 0);
xima->byte_order = LSBFirst;
xima->bitmap_bit_order = LSBFirst;
@ -394,7 +393,7 @@ static char const ** pixmapFromBitmapData(char const * s, int wx, int hx)
if (ww > wx) ww = wx;
if (hh > hx) hh = hx;
XImage * sbima = XSubImage(xima, x, y, ww, hh);
XpmCreateDataFromImage(fl_get_display(), const_cast<char***>(&data), sbima, sbima, 0);
XpmCreateDataFromImage(GUIRunTime::x11Display(), const_cast<char***>(&data), sbima, sbima, 0);
// Dirty hack to get blue symbols quickly
char * sx = const_cast<char*>(strstr(data[2], "FFFFFFFF"));

View File

@ -15,7 +15,33 @@
#pragma interface
#endif
#include "bmtable.h"
/// values used by the xforms callbacks
enum MathsCallbackValues {
MM_GREEK,
MM_ARROW,
MM_BOP,
MM_BRELATS,
MM_VARSIZE,
MM_MISC,
MM_FRAC,
MM_SQRT,
MM_DELIM,
MM_SUPER,
MM_SUB,
MM_SUBSUPER,
MM_MATRIX,
MM_EQU,
MM_DECO,
MM_SPACE,
MM_STYLE,
MM_DOTS,
MM_AMS_MISC,
MM_AMS_ARROWS,
MM_AMS_BREL,
MM_AMS_NREL,
MM_AMS_OPS,
MM_FUNC
};
extern char const * function_names[];
extern int const nr_function_names;