From 04d8b7b72b86ad91a36f0cce95e95fa233459b62 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Wed, 27 Mar 2002 12:04:55 +0000 Subject: [PATCH] MathsSymbols doesn't depend on xforms. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3852 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/xforms/ChangeLog | 8 ++++++++ src/frontends/xforms/FormMathsPanel.h | 29 +-------------------------- src/frontends/xforms/MathsSymbols.C | 7 +++---- src/frontends/xforms/MathsSymbols.h | 28 +++++++++++++++++++++++++- 4 files changed, 39 insertions(+), 33 deletions(-) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 87a75d1fa8..bcc825a94a 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,11 @@ +2002-03-27 Angus Leeming + + * 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 * FormPreferences.C (browse): don't use BrowseRelPath here you noodle! diff --git a/src/frontends/xforms/FormMathsPanel.h b/src/frontends/xforms/FormMathsPanel.h index bface63092..925e61d218 100644 --- a/src/frontends/xforms/FormMathsPanel.h +++ b/src/frontends/xforms/FormMathsPanel.h @@ -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. */ diff --git a/src/frontends/xforms/MathsSymbols.C b/src/frontends/xforms/MathsSymbols.C index ef2f07d7ac..386769b638 100644 --- a/src/frontends/xforms/MathsSymbols.C +++ b/src/frontends/xforms/MathsSymbols.C @@ -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(reinterpret_cast(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(&data), sbima, sbima, 0); + XpmCreateDataFromImage(GUIRunTime::x11Display(), const_cast(&data), sbima, sbima, 0); // Dirty hack to get blue symbols quickly char * sx = const_cast(strstr(data[2], "FFFFFFFF")); diff --git a/src/frontends/xforms/MathsSymbols.h b/src/frontends/xforms/MathsSymbols.h index afdc6d6e7f..c8da60c7f6 100644 --- a/src/frontends/xforms/MathsSymbols.h +++ b/src/frontends/xforms/MathsSymbols.h @@ -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; -- 2.39.2