3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
12 #pragma implementation
15 #include "GUIRunTime.h"
20 #include FORMS_H_LOCATION
24 // tell me again why this test is cluttering up the source rather than
25 // being in lyxinclude.m4 ? - jbl
26 #if !defined(FL_REVISION) || FL_REVISION < 88 || FL_VERSION != 0
27 #error LyX will not compile with this version of XForms.\
28 Please get version 0.89.\
29 If you want to try to compile anyway, delete this test in src/frontends/kde/GUIRunTime.C.
34 static int const xforms_include_version = FL_INCLUDE_VERSION;
36 int GUIRunTime::initApplication(int argc, char * argv[])
38 // same here, this is clearly a configure-time test - jbl
39 int xforms_lib_version = fl_library_version(0, 0);
40 if (xforms_include_version != xforms_lib_version) {
41 lyxerr << "You are either running LyX with wrong "
42 "version of a dynamic XForms library\n"
43 "or you have build LyX with conflicting header "
44 "and library (different\n"
45 "versions of XForms. Sorry but there is no point "
46 "in continuing executing LyX!" << endl;
50 // I belive this is done in the wrong place, imo this should
51 // be done in lyx_gui.C similar to how/where xforms does it (Lgb)
52 static KApplication a(argc, argv);
58 void GUIRunTime::processEvents()
60 kapp->processEvents();
64 void GUIRunTime::runTime()
66 // We still use xforms event handler as the main one...
70 if (fl_check_forms() == FL_EVENT) {
71 lyxerr << "LyX: This shouldn't happen..." << endl;
78 void GUIRunTime::setDefaults()
81 cntl.buttonFontSize = FL_NORMAL_SIZE;
82 cntl.browserFontSize = FL_NORMAL_SIZE;
83 cntl.labelFontSize = FL_NORMAL_SIZE;
84 cntl.choiceFontSize = FL_NORMAL_SIZE;
85 cntl.inputFontSize = FL_NORMAL_SIZE;
86 cntl.menuFontSize = FL_NORMAL_SIZE;
87 cntl.borderWidth = -1;
88 cntl.vclass = FL_DefaultVisual;
89 fl_set_defaults(FL_PDVisual
91 | FL_PDBrowserFontSize
96 | FL_PDBorderWidth, &cntl);