+2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * ColorHandler.C (LyXColorHandler): use GUIRunTime instead of
+ calling directly xforms functions.
+
+ * Painter.C (Painter):
+ * lyx_cb.C (MenuWrite):
+ * FontInfo.C (query): use GUIRunTime::x11Display() instead of
+ fl_display.
+
+ * lyx_gui.C: remove bogus guiruntime extern declaration.
+
2001-07-03 Lars Gullik Bjønnes <larsbj@birdstep.com>
* text2.C (redoHeightOfParagraph): comment out stuff we don't need
* XFormsView.[Ch]: new files
* LyXView.[Ch]: make LyXView a base class for the gui handling for
- the main window. Move the gui dependand stuff to XFormsView
+ the main window. Move the gui dependent stuff to XFormsView
2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
#include <cmath>
-#include FORMS_H_LOCATION
-#include "debug.h"
-
+#include "frontends/GUIRunTime.h"
#include "ColorHandler.h"
#include "LColor.h"
#include "gettext.h"
+#include "debug.h"
using std::endl;
LyXColorHandler::LyXColorHandler()
{
- display = fl_get_display();
- drawable = XCreatePixmap(display, fl_root, 10, 10,
- fl_get_visual_depth());
+ display = GUIRunTime::x11Display();
+ drawable = XCreatePixmap(display,
+ RootWindow(display, GUIRunTime::x11Screen()),
+ 10, 10,
+ GUIRunTime::x11VisualDepth());
- colormap = fl_state[fl_get_vclass()].colormap;
+ colormap = GUIRunTime::x11Colormap();
// Clear the GC cache
for (int i = 0; i <= LColor::ignore; ++i) {
colorGCcache[i] = 0;
#include <config.h>
#include <cmath> // fabs()
-#include FORMS_H_LOCATION
-
#ifdef __GNUG__
#pragma implementation "FontInfo.h"
#endif
#include "debug.h"
#include "lyxrc.h" // lyxrc.use_scalable_fonts
#include "support/lstrings.h"
+#include "frontends/GUIRunTime.h"
using std::endl;
char ** list = 0;
if (lyxrc.use_gui)
- list = XListFonts(fl_get_display(), pattern.c_str(), 100, &matches);
+ list = XListFonts(GUIRunTime::x11Display(), pattern.c_str(),
+ 100, &matches);
if (list == 0) {
// No fonts matched
#include "lyxrc.h" // lyxrc.font_*
#include "BufferView.h"
#include "LyXView.h"
+#include "frontends/GUIRunTime.h"
using std::endl;
}
for (int i4 = 0; i4 < 10; ++i4) {
if (fontstruct[i1][i2][i3][i4]) {
- XFreeFont(fl_get_display(), fontstruct[i1][i2][i3][i4]);
+ XFreeFont(GUIRunTime::x11Display(), fontstruct[i1][i2][i3][i4]);
fontstruct[i1][i2][i3][i4] = 0;
}
}
current_view->owner()->messagePush(_("Loading font into X-Server..."));
- fs = XLoadQueryFont(fl_get_display(), font.c_str());
+ fs = XLoadQueryFont(GUIRunTime::x11Display(), font.c_str());
if (fs == 0) {
if (font == "fixed") {
lyxerr << "We're doomed. Can't get 'fixed' font." << endl;
} else {
lyxerr << "Could not get font. Using 'fixed'." << endl;
- fs = XLoadQueryFont(fl_get_display(), "fixed");
+ fs = XLoadQueryFont(GUIRunTime::x11Display(), "fixed");
}
} else if (lyxerr.debugging(Debug::FONT)) {
// Tell user the font matching
#include <cmath>
-#include FORMS_H_LOCATION
#include "Painter.h"
#include "LString.h"
#include "debug.h"
#include "lyxfont.h"
+#include "frontends/GUIRunTime.h"
#include "support/LAssert.h"
#include "support/lstrings.h"
#include "WorkArea.h"
Painter::Painter(WorkArea & wa)
: PainterBase(wa)
{
- display = fl_get_display();
+ display = GUIRunTime::x11Display();
}
+2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * GUIRunTime.h: (x11Display):
+ (x11Screen):
+ (x11Colormap):
+ (x11VisualDepth): new methods
+
2001-07-03 Lars Gullik Bjønnes <larsbj@birdstep.com>
* GUIRunTime.h: add createMainView
#pragma interface
#endif
+#include <X11/Xlib.h>
class LyXView;
/** The LyX GUI independent guiruntime class
///
static
LyXView * createMainView(int w, int h);
+
+/* the following entries are X11 specific and should eventually go away */
+ /// The display on which LyX is running
+ static
+ Display * x11Display();
+ /// The screen on which LyX is running
+ static
+ int x11Screen();
+ /// The current colormap
+ static
+ Colormap x11Colormap();
+ /// The current visual depth
+ static
+ int x11VisualDepth();
};
#endif
+<<<<<<< ChangeLog
+2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * GUIRunTime.C (x11Display):
+ (x11Screen):
+ (x11Colormap):
+ (x11VisualDepth): new methods
+
+=======
2001-07-03 Lars Gullik Bjønnes <larsbj@birdstep.com>
* FormDocument.C (class_apply): call CutAndPaste::'s staitc method
* GUIRunTime.C (createMainView): implement
+>>>>>>> 1.104
2001-06-22 John Levon <moz@compsoc.man.ac.uk>
* FormCharacter.C:
{
return new XFormsView(w, h);
}
+
+
+Display * GUIRunTime::x11Display()
+{
+ return fl_get_display();
+}
+
+
+int GUIRunTime::x11Screen()
+{
+ return fl_screen;
+}
+
+
+Colormap GUIRunTime::x11Colormap()
+{
+ return fl_state[fl_get_vclass()].colormap;
+}
+
+
+int GUIRunTime::x11VisualDepth()
+{
+ return fl_get_visual_depth();
+}
+2001-07-03 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
+
+ * ImageLoaderXPM.C (runImageLoader): get display information from
+ GUIRunTime.
+
2001-06-14 Angus Leeming <a.leeming@ic.ac.uk>
* GraphicsCache.C:
#include <config.h>
#include "ImageLoaderXPM.h"
#include "frontends/support/LyXImage.h"
+#include "frontends/GUIRunTime.h"
#include "support/filetools.h"
-#include FORMS_H_LOCATION
#include XPM_H_LOCATION
#include <iostream>
#include <fstream>
ImageLoader::Result
ImageLoaderXPM::runImageLoader(string const & filename)
{
- Display * display = fl_get_display();
+ Display * display = GUIRunTime::x11Display();
//(BE 2000-08-05)
#ifdef WITH_WARNINGS
#warning This might be a dirty thing, but I dont know any other solution.
#endif
- Screen * screen = ScreenOfDisplay(display, fl_screen);
+ Screen * screen = ScreenOfDisplay(display, GUIRunTime::x11Screen());
Pixmap pixmap;
Pixmap mask;
#include <utility>
#include <iostream>
-#include FORMS_H_LOCATION
-
#include "lyx_cb.h"
#include "lyx_gui_misc.h"
#include "lyx_main.h"
#include "lyxrc.h"
#include "lyxtext.h"
#include "frontends/FileDialog.h"
+#include "frontends/GUIRunTime.h"
#include "insets/insetlabel.h"
#include "support/FileInfo.h"
#include "support/filetools.h"
bool MenuWrite(BufferView * bv, Buffer * buffer)
{
// FIXME: needed ?
- XFlush(fl_get_display());
+ XFlush(GUIRunTime::x11Display());
if (!buffer->save()) {
string const fname = buffer->fileName();