]> git.lyx.org Git - features.git/commitdiff
Move fontloader into lyx_gui stuff. Now Qt should compile out of the box
authorJohn Levon <levon@movementarian.org>
Fri, 12 Jul 2002 03:05:13 +0000 (03:05 +0000)
committerJohn Levon <levon@movementarian.org>
Fri, 12 Jul 2002 03:05:13 +0000 (03:05 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4612 a592a061-630c-0410-9148-cb99ea01b6c8

15 files changed:
src/ChangeLog
src/frontends/ChangeLog
src/frontends/Makefile.am
src/frontends/font_loader.h [deleted file]
src/frontends/lyx_gui.h
src/frontends/qt2/ChangeLog
src/frontends/qt2/TODO
src/frontends/qt2/lyx_gui.C
src/frontends/qt2/qfont_loader.h
src/frontends/xforms/ChangeLog
src/frontends/xforms/lyx_gui.C
src/lyxfunc.C
src/mathed/ChangeLog
src/mathed/math_factory.C
src/mathed/math_support.C

index ae72761610ec6a02cf491b35b66cd94bfb8c98c7..220be184eb11a1b5b516db1cfa8ce285d43e6c60 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
+
+       * lyxfunc.C: use lyx_gui::update_fonts()
 2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
 
        * lyxfunc.C: use lyx_gui::update_color()
index f8216c10d5183be13bfc8261be0311dd7a4aa07f..c732d5cf988ed8a90570f2278b70ab8bc272147e 100644 (file)
@@ -1,3 +1,10 @@
+2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
+
+       * Makefile.am:
+       * font_loader.h: remove
+       * lyx_gui.h: add update_fonts(), font_available()
 2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
 
        * lyx_gui.h: add update_color
index 71d76b3edeeccb112027ba0258f5f8c72983abfb..3bc6960fa69a40d90e58b6b4753d0848960e9bb4 100644 (file)
@@ -41,7 +41,6 @@ libfrontends_la_SOURCES = \
        WorkArea.C \
        WorkArea.h \
        WorkAreaFactory.h \
-       font_loader.h \
        font_metrics.h \
        guiapi.h \
        key_state.h \
diff --git a/src/frontends/font_loader.h b/src/frontends/font_loader.h
deleted file mode 100644 (file)
index 4f169af..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-// very temporary
-
-#include "xforms/xfont_loader.h"
index b839db26cb81e1b21e5324ad162097458cb34972..4da6f3dc390c5af2c05e7e5b4cee364869bbddf4 100644 (file)
@@ -15,6 +15,7 @@
 #include <vector>
 
 class Dialogs;
+class LyXFont;
 
 /// GUI interaction
 namespace lyx_gui {
@@ -46,6 +47,16 @@ namespace lyx_gui {
         * update an altered GUI color
         */
        void update_color(LColor::color col);
+
+       /**
+        * update the font cache
+        */
+       void update_fonts();
+
+       /**
+        * is the given font available ?
+        */
+       bool font_available(LyXFont const & font);
 }
 
 #endif // LYX_GUI_H
index 5940891742383569ee9f5ec159cdfc7c8e3cc60a..4789ac03a7a3ec7ca45e65fe191f2416f2910f84 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
+
+       * lyx_gui.C: implement update_fonts(), font_available() 
 2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
 
        * lyx_gui.C: add un-needed update_color()
index f065aaf4a12bd5ef514b5d2da443ce174ff8dcab..778eb7c648930e15ff85d776887bff95c03631c9 100644 (file)
@@ -3,10 +3,6 @@ we can say the first iteration of the Qt frontend is "finished".
 
 Those with asterisks are what I perceive as being "big jobs"
 
-ColorHandler
-
-       - remove mentions in core code
 FileDialog
 
        - add buttons for Documents, Templates, etc. to the file dialog toolbar
index 7826081da65dd51664e57023e0a82b113a14ccc5..b318a1f3a0eb2f3da059636d50021a855f1574c6 100644 (file)
@@ -21,6 +21,7 @@
 #include "lyx_gui.h"
 #include "lyx_main.h"
 #include "lyxrc.h"
+#include "lyxfont.h"
  
 // FIXME: move this stuff out again
 #include "bufferlist.h"
@@ -36,6 +37,7 @@
  
 #include "QtView.h"
 #include "QLImage.h"
+#include "qfont_loader.h"
  
 #include <qapplication.h>
  
@@ -128,7 +130,19 @@ string const lyx_gui::hexname(LColor::color col)
 }
 
 
-void lyx_gui::update_color(LColor::color col)
+void lyx_gui::update_color(LColor::color)
 {
        // no need
 }
+
+
+void lyx_gui::update_fonts()
+{
+       fontloader.update();
+}
+
+
+bool lyx_gui::font_available(LyXFont const & font)
+{
+       return fontloader.available(font);
+}
index aea8ff88c541988c0c76fa5d6adc3cc36e1880f0..dab300a3d2adae08416be9e90d3706d96bf81529 100644 (file)
@@ -32,13 +32,13 @@ class qfont_loader {
 public:
        qfont_loader();
 
-       virtual ~qfont_loader();
+       ~qfont_loader();
 
        /// update fonts after zoom, dpi, font names, or norm change
-       virtual void update();
+       void update();
 
        /// do we have anything matching?
-       virtual bool available(LyXFont const & f);
+       bool available(LyXFont const & f);
  
        /// get the QFont for this LyXFont
        QFont const & get(LyXFont const & f) {
index 76fd8b5e17fae50b6a131629ce949b548af08e4e..e1fb4dee91a5bf35f7c3ed7b2eb6d700e0930cdb 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
+
+       * lyx_gui.C: implement update_fonts(), font_available()
 2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
 
        * lyx_gui.C: add update_color()
index 33b7f49736fb60237f5da5e2ed3261ed4b4f03cd..7eaaf8f3b108cdcc7b3b7224a759140f194b24de 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "lyx_main.h"
 #include "lyxrc.h"
+#include "lyxfont.h"
 
 // FIXME: move this stuff out again
 #include "bufferlist.h"
@@ -31,6 +32,7 @@
 #include FORMS_H_LOCATION
 #include "ColorHandler.h"
 #include "xforms_helpers.h"
+#include "xfont_loader.h"
 #ifdef USE_XFORMS_IMAGE_LOADER
 #include "xformsImage.h"
 #else
@@ -344,3 +346,15 @@ void lyx_gui::update_color(LColor::color col)
 {
        lyxColorHandler->updateColor(col);
 }
+
+
+void lyx_gui::update_fonts()
+{
+       fontloader.update();
+}
+
+
+bool lyx_gui::font_available(LyXFont const & font)
+{
+       return fontloader.available(font);
+}
index 1071eb048e73ea66eefae4b6b9712a70c3118cf3..8f59ef76d56e28eca4b05983e74b4b34252d1eaf 100644 (file)
@@ -99,8 +99,6 @@
 #include <utility>
 #include <algorithm>
 
-#include "frontends/font_loader.h"
-
 using std::pair;
 using std::make_pair;
 using std::endl;
@@ -1578,7 +1576,7 @@ string const LyXFunc::dispatch(kb_action action, string argument)
                // handle the screen font changes.
                //
                lyxrc.set_font_norm_type();
-               fontloader.update();
+               lyx_gui::update_fonts();
                // Of course we should only do the resize and the textcache.clear
                // if values really changed...but not very important right now. (Lgb)
                // All visible buffers will need resize
index efada9d5b0c95b164cc310ffdb9b0d3ec5587197..61bec342eada63adda2201bb1d515da6271ce78b 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
+
+       * math_support.C:
+       * math_factory.C: use lyx_gui::font_available()
 2002-07-09  Angus Leeming  <leeming@lyx.org>
 
        * math_braceinset.h:
index 70cf8a096ff248ab4586ecc4679ce132efbdd9f9..712c7c4a79ee8d36d72f0667357b544043ce35f4 100644 (file)
@@ -39,7 +39,7 @@
 #include "math_support.h"
 #include "Lsstream.h"
 #include "support/filetools.h" // LibFileSearch
-#include "frontends/font_loader.h"
+#include "frontends/lyx_gui.h"
 
 #include <map>
 #include <fstream>
@@ -58,7 +58,7 @@ bool math_font_available(string & name)
        augmentFont(f, name);
 
        // Do we have the font proper?
-       if (fontloader.available(f))
+       if (lyx_gui::font_available(f))
                return true;
 
        // can we fake it?
index c0fb7761424ceb9142fdfdb10aa99b28dedea8a2..8d576ae111e85e8c447bea73ebaab7a3b054f514 100644 (file)
@@ -9,7 +9,7 @@
 #include "math_parser.h"
 #include "frontends/Painter.h"
 #include "frontends/font_metrics.h"
-#include "frontends/font_loader.h"
+#include "frontends/lyx_gui.h"
 #include "debug.h"
 #include "commandtags.h"
 #include "dimension.h"
@@ -632,9 +632,9 @@ void augmentFont(LyXFont & font, string const & name)
                initialized = true;
 
                // fake fonts if necessary
-               if (!fontloader.available(getFont("mathfrak")))
+               if (!lyx_gui::font_available(getFont("mathfrak")))
                        fakeFont("mathfrak", "lyxfakefrak");
-               if (!fontloader.available(getFont("mathcal")))
+               if (!lyx_gui::font_available(getFont("mathcal")))
                        fakeFont("mathcal", "lyxfakecal");
        }
        fontinfo * info = searchFont(name);