]> git.lyx.org Git - features.git/commitdiff
Rename EnumLColor as LColor_color.
authorAngus Leeming <leeming@lyx.org>
Thu, 18 Sep 2003 11:48:11 +0000 (11:48 +0000)
committerAngus Leeming <leeming@lyx.org>
Thu, 18 Sep 2003 11:48:11 +0000 (11:48 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7788 a592a061-630c-0410-9148-cb99ea01b6c8

43 files changed:
src/ChangeLog
src/LColor.h
src/frontends/ChangeLog
src/frontends/Painter.C
src/frontends/Painter.h
src/frontends/controllers/ChangeLog
src/frontends/controllers/ControlCharacter.C
src/frontends/controllers/ControlCharacter.h
src/frontends/controllers/ControlPrefs.C
src/frontends/controllers/ControlPrefs.h
src/frontends/controllers/character.h
src/frontends/gtk/ChangeLog
src/frontends/gtk/GPainter.C
src/frontends/gtk/GPainter.h
src/frontends/gtk/GWorkArea.C
src/frontends/gtk/GWorkArea.h
src/frontends/gtk/lyx_gui.C
src/frontends/lyx_gui.h
src/frontends/qt2/ChangeLog
src/frontends/qt2/QLPainter.C
src/frontends/qt2/QLPainter.h
src/frontends/qt2/QPrefsDialog.h
src/frontends/qt2/lcolorcache.C
src/frontends/qt2/lcolorcache.h
src/frontends/qt2/lyx_gui.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/Color.C
src/frontends/xforms/Color.h
src/frontends/xforms/ColorHandler.C
src/frontends/xforms/ColorHandler.h
src/frontends/xforms/FormCharacter.h
src/frontends/xforms/XPainter.C
src/frontends/xforms/XPainter.h
src/frontends/xforms/lyx_gui.C
src/insets/ChangeLog
src/insets/inset.C
src/insets/inset.h
src/insets/insettext.C
src/insets/insettext.h
src/lyxfont.C
src/lyxfont.h
src/lyxtext.h
src/text.C

index efd24b59fd3639c52027ab07e553fb4d5e7fa925..b773f4532e04c7cd32da27540f4723f5181cbb4b 100644 (file)
@@ -1,3 +1,11 @@
+2003-09-18  Angus Leeming  <leeming@lyx.org>
+       
+       * LColor.h:
+       * lyxfont.C:
+       * lyxfont.h:
+       * lyxtext.h:
+       * text.C: rename EnumLColor as LColor_color.
+
 2003-09-18  Angus Leeming  <leeming@lyx.org>
 
        * cursor.[Ch]: use the dispatch_result wrapper class DispatchResult to remove
index 6e481cf6744272c0031bc82f7b69441902431e50..d07e899dc875fd88e951d6407cfb05652301ede0 100644 (file)
@@ -239,18 +239,18 @@ private:
 };
 
 
-/** \c EnumLColor is a wrapper for LColor::color. It can be forward-declared and
+/** \c LColor_color is a wrapper for LColor::color. It can be forward-declared and
  *  passed as a function argument without having to expose LColor.h.
  */
-class EnumLColor {
+class LColor_color {
         LColor::color val_;
 public:
         /** The default constructor is nasty,
-        *  but allows us to use EnumLColor in STL containers.
+        *  but allows us to use LColor_color in STL containers.
         */
-       EnumLColor() : val_(static_cast<LColor::color>(-1)) {}
+       LColor_color() : val_(static_cast<LColor::color>(-1)) {}
 
-       EnumLColor(LColor::color val) : val_(val) {}
+       LColor_color(LColor::color val) : val_(val) {}
         operator LColor::color() const{ return val_; }
 };
 
index c0a0f7a7a643860a06ee305955f7de037a701855..557a1f84efa70d2002cd082e1df3bb2e3aac6f1f 100644 (file)
@@ -1,3 +1,9 @@
+2003-09-18  Angus Leeming  <leeming@lyx.org>
+       
+       * Painter.C:
+       * Painter.h:
+       * lyx_gui.h: rename EnumLColor as LColor_color.
+
 2003-09-18  Angus Leeming  <leeming@lyx.org>
 
        * Dialogs.[Ch] (find): renamed as find_or_build.
index 2e0c56249fb6a0ddab84cda072e6326557a58c55..79f97bf8e83721486d61f0793a8d25202c36204e 100644 (file)
@@ -59,8 +59,8 @@ Painter & Painter::buttonFrame(int x, int y, int w, int h)
 Painter & Painter::rectText(int x, int baseline,
        string const & str,
        LyXFont const & font,
-       EnumLColor back,
-       EnumLColor frame)
+       LColor_color back,
+       LColor_color frame)
 {
        int width;
        int ascent;
index 5560689c6e46ee16330dbd3f5d9f242412097336..482f77fa1c8bf1de2aef4cd75b051d991a3c227e 100644 (file)
@@ -17,7 +17,7 @@
 #include "support/std_string.h"
 
 
-class EnumLColor;
+class LColor_color;
 class LyXFont;
 
 namespace lyx {
@@ -78,7 +78,7 @@ public:
        virtual Painter & line(
                int x1, int y1,
                int x2, int y2,
-               EnumLColor,
+               LColor_color,
                line_style = line_solid,
                line_width = line_thin) = 0;
 
@@ -92,7 +92,7 @@ public:
                int const * xp,
                int const * yp,
                int np,
-               EnumLColor,
+               LColor_color,
                line_style = line_solid,
                line_width = line_thin) = 0;
 
@@ -100,7 +100,7 @@ public:
        virtual Painter & rectangle(
                int x, int y,
                int w, int h,
-               EnumLColor,
+               LColor_color,
                line_style = line_solid,
                line_width = line_thin) = 0;
 
@@ -108,26 +108,26 @@ public:
        virtual Painter & fillRectangle(
                int x, int y,
                int w, int h,
-               EnumLColor) = 0;
+               LColor_color) = 0;
 
        /// draw a filled (irregular) polygon
        virtual Painter & fillPolygon(
                int const * xp,
                int const * yp,
                int np,
-               EnumLColor) = 0;
+               LColor_color) = 0;
 
        /// draw an arc
        virtual Painter & arc(
                int x, int y,
                unsigned int w, unsigned int h,
                int a1, int a2,
-               EnumLColor) = 0;
+               LColor_color) = 0;
 
        /// draw a pixel
        virtual Painter & point(
                int x, int y,
-               EnumLColor) = 0;
+               LColor_color) = 0;
 
        /// draw a filled rectangle with the shape of a 3D button
        virtual Painter & button(int x, int y,
@@ -163,8 +163,8 @@ public:
        Painter & rectText(int x, int baseline,
                string const & string,
                LyXFont const & font,
-               EnumLColor back,
-               EnumLColor frame);
+               LColor_color back,
+               LColor_color frame);
 
        /// draw a string and enclose it inside a button frame
        Painter & buttonText(int x,
index 3db579b0dbabb22b09a83ee890507bfaab0b289b..0cb90030af6a6715b05fac78520a53d8b4d8954d 100644 (file)
@@ -1,3 +1,11 @@
+2003-09-18  Angus Leeming  <leeming@lyx.org>
+
+       * ControlCharacter.C:
+       * ControlCharacter.h:
+       * ControlPrefs.C:
+       * ControlPrefs.h:
+       * character.h: rename EnumLColor as LColor_color.
+
 2003-09-16  Angus Leeming  <leeming@lyx.org>
 
        * ControlCharacter.C: add #include "LColor.h".
index e335d51f9f6a9b972b979e8371cc5dad5a9416e1..975d740b46851ec7dd1a6be2935a5d0d78aeae99 100644 (file)
@@ -175,7 +175,7 @@ void ControlCharacter::setBar(frnt::FONT_STATE val)
 }
 
 
-EnumLColor ControlCharacter::getColor() const
+LColor_color ControlCharacter::getColor() const
 {
        if (!font_.get())
                return LColor::ignore;
@@ -184,7 +184,7 @@ EnumLColor ControlCharacter::getColor() const
 }
 
 
-void ControlCharacter::setColor(EnumLColor val)
+void ControlCharacter::setColor(LColor_color val)
 {
        switch (val) {
        case LColor::ignore:
index e22ecbefc0b1f9e1a5ce76ea03f122c2ee0878df..e6a3b15a89969ab1982faaa4ba00fc232b45d453 100644 (file)
@@ -17,7 +17,7 @@
 #include "character.h"
 
 
-class EnumLColor;
+class LColor_color;
 
 
 class ControlCharacter : public Dialog::Controller {
@@ -44,7 +44,7 @@ public:
        ///
        void setBar(frnt::FONT_STATE);
        ///
-       void setColor(EnumLColor);
+       void setColor(LColor_color);
        ///
        void setLanguage(string const &);
        ///
@@ -61,7 +61,7 @@ public:
        ///
        frnt::FONT_STATE getBar() const;
        ///
-       EnumLColor getColor() const;
+       LColor_color getColor() const;
        ///
        string getLanguage() const;
        ///
index 7c60b949fd4e57b8c02d079867232ceaa7f5252f..31696286e34fc173b54b3479ce58dc1f5c5e94b4 100644 (file)
@@ -134,7 +134,7 @@ void ControlPrefs::redrawGUI()
 }
 
 
-void ControlPrefs::setColor(EnumLColor col, string const & hex)
+void ControlPrefs::setColor(LColor_color col, string const & hex)
 {
        string const s = lcolor.getLyXName(col) + ' ' + hex;
        lv_.dispatch(FuncRequest(LFUN_SET_COLOR, s));
index c5f1a4b3017d14b51778aea181bf3260b7614daa..8a5f789b58bf5283b5f8206df11f16dd7fd8ae63 100644 (file)
@@ -19,7 +19,7 @@
 
 
 class Converters;
-class EnumLColor;
+class LColor_color;
 class Formats;
 
 class ControlPrefs : public ControlDialogBI {
@@ -50,7 +50,7 @@ public:
        void redrawGUI();
 
        /// set a color
-       void setColor(EnumLColor col, string const & hex);
+       void setColor(LColor_color col, string const & hex);
 
        /// update the screen fonts after change
        void updateScreenFonts();
index ae12385820240cf4440125deae95ebf59ef7ad36..26aba08af97032ec544d72c571e5a5613e7fc1db 100644 (file)
@@ -19,7 +19,7 @@
 #include <vector>
 
 
-class EnumLColor;
+class LColor_color;
 
 
 /** Functions of use to the character GUI controller and view */
@@ -50,7 +50,7 @@ typedef std::pair<string, LyXFont::FONT_SIZE>   SizePair;
 ///
 typedef std::pair<string, FONT_STATE> BarPair;
 ///
-typedef std::pair<string, EnumLColor> ColorPair;
+typedef std::pair<string, LColor_color> ColorPair;
 
 ///
 std::vector<FamilyPair>   const getFamilyData();
index eb4b9a7f09349c90d864c1848bbe40f761c878d5..343eba2c5d3770bfeb31a6ab706b968e26d644b7 100644 (file)
@@ -1,3 +1,11 @@
+2003-09-18  Angus Leeming  <leeming@lyx.org>
+
+       * GPainter.C:
+       * GPainter.h:
+       * GWorkArea.C:
+       * GWorkArea.h:
+       * lyx_gui.C: rename EnumLColor as LColor_color.
+
 2003-09-16  Angus Leeming  <leeming@lyx.org>
 
        * GScreen.[Ch] (workarea):
index f5357cec9d260bbb131b097f19765fe52615defd..958e25c1ce0cf049a60465ab47f34bd56ea44254 100644 (file)
@@ -51,7 +51,7 @@ int GPainter::paperHeight() const
 }
 
 
-void GPainter::setForeground(Glib::RefPtr<Gdk::GC> gc, EnumLColor clr)
+void GPainter::setForeground(Glib::RefPtr<Gdk::GC> gc, LColor_color clr)
 {
        Gdk::Color * gclr = owner_.getColorHandler().getGdkColor(clr);
        gc->set_foreground(*gclr);
@@ -85,7 +85,7 @@ void GPainter::setLineParam(Glib::RefPtr<Gdk::GC> gc,
 }
 
 
-Painter & GPainter::point(int x, int y, EnumLColor c)
+Painter & GPainter::point(int x, int y, LColor_color c)
 {
        setForeground(owner_.getGC(), c);
        owner_.getPixmap()->draw_point(owner_.getGC(), x, y);
@@ -95,7 +95,7 @@ Painter & GPainter::point(int x, int y, EnumLColor c)
 
 Painter & GPainter::line(int x1, int y1,
        int x2, int y2,
-       EnumLColor col,
+       LColor_color col,
        line_style ls,
        line_width lw)
 {
@@ -108,7 +108,7 @@ Painter & GPainter::line(int x1, int y1,
 
 Painter & GPainter::lines(int const * xp, int const * yp,
        int np,
-       EnumLColor col,
+       LColor_color col,
        line_style ls,
        line_width lw)
 {
@@ -127,7 +127,7 @@ Painter & GPainter::lines(int const * xp, int const * yp,
 
 Painter & GPainter::rectangle(int x, int y,
        int w, int h,
-       EnumLColor col,
+       LColor_color col,
        line_style ls,
        line_width lw)
 {
@@ -140,7 +140,7 @@ Painter & GPainter::rectangle(int x, int y,
 
 Painter & GPainter::fillRectangle(int x, int y,
        int w, int h,
-       EnumLColor col)
+       LColor_color col)
 {
        setForeground(owner_.getGC(), col);
        owner_.getPixmap()->draw_rectangle(owner_.getGC(), true, x, y, w, h);
@@ -149,7 +149,7 @@ Painter & GPainter::fillRectangle(int x, int y,
 
 
 Painter & GPainter::fillPolygon(int const * xp, int const * yp,
-       int np, EnumLColor col)
+       int np, LColor_color col)
 {
        setForeground(owner_.getGC(), col);
        std::vector<Gdk::Point> points(np);
@@ -165,7 +165,7 @@ Painter & GPainter::fillPolygon(int const * xp, int const * yp,
 
 Painter & GPainter::arc(int x, int y,
        unsigned int w, unsigned int h,
-       int a1, int a2, EnumLColor col)
+       int a1, int a2, LColor_color col)
 {
        setForeground(owner_.getGC(), col);
        owner_.getPixmap()->draw_arc(owner_.getGC(),
index 8d20826bb9811531aad97ef531524d4d315e0dca..3c93e2418db19e8dafe66096d1bbf7ef6a139ca4 100644 (file)
@@ -33,15 +33,15 @@ public:
        /// return the height of the work area in pixels
        virtual int paperHeight() const;
 
-       void setForeground(Glib::RefPtr<Gdk::GC> gc, EnumLColor clr);
+       void setForeground(Glib::RefPtr<Gdk::GC> gc, LColor_color clr);
        void setLineParam(Glib::RefPtr<Gdk::GC> gc,
                          line_style ls, line_width lw);
-       XftColor * getXftColor(EnumLColor clr);
+       XftColor * getXftColor(LColor_color clr);
        /// draw a line from point to point
        virtual Painter & line(
                int x1, int y1,
                int x2, int y2,
-               EnumLColor,
+               LColor_color,
                line_style = line_solid,
                line_width = line_thin);
 
@@ -55,7 +55,7 @@ public:
                int const * xp,
                int const * yp,
                int np,
-               EnumLColor,
+               LColor_color,
                line_style = line_solid,
                line_width = line_thin);
 
@@ -63,7 +63,7 @@ public:
        virtual Painter & rectangle(
                int x, int y,
                int w, int h,
-               EnumLColor,
+               LColor_color,
                line_style = line_solid,
                line_width = line_thin);
 
@@ -71,26 +71,26 @@ public:
        virtual Painter & fillRectangle(
                int x, int y,
                int w, int h,
-               EnumLColor);
+               LColor_color);
 
        /// draw a filled (irregular) polygon
        virtual Painter & fillPolygon(
                int const * xp,
                int const * yp,
                int np,
-               EnumLColor);
+               LColor_color);
 
        /// draw an arc
        virtual Painter & arc(
                int x, int y,
                unsigned int w, unsigned int h,
                int a1, int a2,
-               EnumLColor);
+               LColor_color);
 
        /// draw a pixel
        virtual Painter & point(
                int x, int y,
-               EnumLColor);
+               LColor_color);
 
        /// draw an image from the image cache
        virtual Painter & image(int x, int y,
index 695015533f1a1f0bc3ca62b40d71693ed0414e91..d3be415f89e38025d1b5f4898d80ac937b6488e7 100644 (file)
@@ -30,27 +30,27 @@ ColorCache::~ColorCache()
 }
 
 
-Gdk::Color * ColorCache::getColor(EnumLColor clr)
+Gdk::Color * ColorCache::getColor(LColor_color clr)
 {
        MapIt it = cache_.find(clr);
        return it == cache_.end() ? 0 : it->second;
 }
 
 
-XftColor * ColorCache::getXftColor(EnumLColor clr)
+XftColor * ColorCache::getXftColor(LColor_color clr)
 {
        MapIt2 it = cache2_.find(clr);
        return it == cache2_.end() ? 0 : it->second;
 }
 
 
-void ColorCache::cacheColor(EnumLColor clr, Gdk::Color * gclr)
+void ColorCache::cacheColor(LColor_color clr, Gdk::Color * gclr)
 {
        cache_[clr] = gclr;
 }
 
 
-void ColorCache::cacheXftColor(EnumLColor clr, XftColor * xclr)
+void ColorCache::cacheXftColor(LColor_color clr, XftColor * xclr)
 {
        cache2_[clr] = xclr;
 }
@@ -69,7 +69,7 @@ void ColorCache::clear()
 }
 
 
-XftColor * ColorHandler::getXftColor(EnumLColor clr)
+XftColor * ColorHandler::getXftColor(LColor_color clr)
 {
        XftColor * xclr = colorCache.getXftColor(clr);
        if (!xclr) {
@@ -86,7 +86,7 @@ XftColor * ColorHandler::getXftColor(EnumLColor clr)
 }
 
 
-Gdk::Color * ColorHandler::getGdkColor(EnumLColor clr)
+Gdk::Color * ColorHandler::getGdkColor(LColor_color clr)
 {
        Gdk::Color * gclr = colorCache.getColor(clr);
        if (!gclr) {
index ffb3abc8a32048b0852475159f8c7c50a7f53e2b..d47c77107f99e905e7693e49e10f39a8dd83bbbc 100644 (file)
 
 #include <X11/Xft/Xft.h>
 
-class EnumLColor;
+class LColor_color;
 
 class ColorCache
 {
-       typedef std::map<EnumLColor, Gdk::Color *> Map;
+       typedef std::map<LColor_color, Gdk::Color *> Map;
        typedef Map::iterator MapIt;
-       typedef std::map<EnumLColor, XftColor *> Map2;
+       typedef std::map<LColor_color, XftColor *> Map2;
        typedef Map2::iterator MapIt2;
 public:
        ~ColorCache();
-       Gdk::Color * getColor(EnumLColor);
-       XftColor * getXftColor(EnumLColor);
-       void cacheColor(EnumLColor, Gdk::Color *);
-       void cacheXftColor(EnumLColor, XftColor *);
+       Gdk::Color * getColor(LColor_color);
+       XftColor * getXftColor(LColor_color);
+       void cacheColor(LColor_color, Gdk::Color *);
+       void cacheXftColor(LColor_color, XftColor *);
        void clear();
 private:
        Map cache_;
@@ -46,8 +46,8 @@ class ColorHandler
 {
 public:
        ColorHandler(GWorkArea& owner) : owner_(owner) {}
-       XftColor * getXftColor(EnumLColor clr);
-       Gdk::Color * getGdkColor(EnumLColor clr);
+       XftColor * getXftColor(LColor_color clr);
+       Gdk::Color * getGdkColor(LColor_color clr);
 private:
        GWorkArea & owner_;
 };
index b5455b579e438748cd7b0ddf57fedacdf9c8e028..d11ce197fe4e4856b448e5e0a1138c27e0179b50 100644 (file)
@@ -363,7 +363,7 @@ FuncStatus lyx_gui::getStatus(FuncRequest const & /*ev*/)
 }
 
 
-string const lyx_gui::hexname(EnumLColor col)
+string const lyx_gui::hexname(LColor_color col)
 {
        Gdk::Color gdkColor;
        Gdk::Color * gclr = colorCache.getColor(col);
@@ -385,7 +385,7 @@ string const lyx_gui::hexname(EnumLColor col)
 }
 
 
-void lyx_gui::update_color(EnumLColor /*col*/)
+void lyx_gui::update_color(LColor_color /*col*/)
 {
        colorCache.clear();
 }
index e27e2ffccfce747fcf8d069de26a17b3056e3798..04f889e701e12955f4997fc699744bb397c3b147 100644 (file)
@@ -18,7 +18,7 @@
 #include <vector>
 
 class Dialogs;
-class EnumLColor;
+class LColor_color;
 class LyXFont;
 class LyXComm;
 class FuncRequest;
@@ -72,12 +72,12 @@ FuncStatus getStatus(FuncRequest const & ev);
 /** Eg, passing LColor::black returns "000000",
  *      passing LColor::white returns "ffffff".
  */
-string const hexname(EnumLColor col);
+string const hexname(LColor_color col);
 
 /**
  * update an altered GUI color
  */
-void update_color(EnumLColor col);
+void update_color(LColor_color col);
 
 /**
  * update the font cache
index 0e0bef6ceef0ab7bddcdc67fa265271628e9e988..7096deed916652fddc7c6ea73e1d9443102e5b7c 100644 (file)
@@ -1,3 +1,12 @@
+2003-09-18  Angus Leeming  <leeming@lyx.org>
+
+       * QLPainter.C:
+       * QLPainter.h:
+       * QPrefsDialog.h:
+       * lcolorcache.C:
+       * lcolorcache.h:
+       * lyx_gui.C: rename EnumLColor as LColor_color.
+
 2003-09-16  Angus Leeming  <leeming@lyx.org>
 
        * QLImage.[Ch]: separate interface from implementation. Make all the virtual
index 8de17fae2a1e1778dabd37ec5cae96ed4332c6fa..a6dce362dbca80d831e28a040f8ea28a4269b7c3 100644 (file)
@@ -63,7 +63,7 @@ int QLPainter::paperHeight() const
 }
 
 
-QPainter & QLPainter::setPen(EnumLColor c,
+QPainter & QLPainter::setPen(LColor_color c,
        Painter::line_style ls, Painter::line_width lw)
 {
        QPen pen = qp_->pen();
@@ -85,7 +85,7 @@ QPainter & QLPainter::setPen(EnumLColor c,
 }
 
 
-Painter & QLPainter::point(int x, int y, EnumLColor c)
+Painter & QLPainter::point(int x, int y, LColor_color c)
 {
        setPen(c).drawPoint(x, y);
        return *this;
@@ -94,7 +94,7 @@ Painter & QLPainter::point(int x, int y, EnumLColor c)
 
 Painter & QLPainter::line(int x1, int y1,
        int x2, int y2,
-       EnumLColor col,
+       LColor_color col,
        line_style ls,
        line_width lw)
 {
@@ -105,7 +105,7 @@ Painter & QLPainter::line(int x1, int y1,
 
 Painter & QLPainter::lines(int const * xp, int const * yp,
        int np,
-       EnumLColor col,
+       LColor_color col,
        line_style ls,
        line_width lw)
 {
@@ -127,7 +127,7 @@ Painter & QLPainter::lines(int const * xp, int const * yp,
 
 Painter & QLPainter::rectangle(int x, int y,
        int w, int h,
-       EnumLColor col,
+       LColor_color col,
        line_style ls,
        line_width lw)
 {
@@ -138,7 +138,7 @@ Painter & QLPainter::rectangle(int x, int y,
 
 Painter & QLPainter::fillRectangle(int x, int y,
        int w, int h,
-       EnumLColor col)
+       LColor_color col)
 {
        qp_->fillRect(x, y, w, h, lcolorcache.get(col));
        return *this;
@@ -146,7 +146,7 @@ Painter & QLPainter::fillRectangle(int x, int y,
 
 
 Painter & QLPainter::fillPolygon(int const * xp, int const * yp,
-       int np, EnumLColor col)
+       int np, LColor_color col)
 {
        // Must use new as np is not known at compile time.
        boost::scoped_array<QCOORD> points(new QCOORD[np * 2]);
@@ -169,7 +169,7 @@ Painter & QLPainter::fillPolygon(int const * xp, int const * yp,
 
 Painter & QLPainter::arc(int x, int y,
        unsigned int w, unsigned int h,
-       int a1, int a2, EnumLColor col)
+       int a1, int a2, LColor_color col)
 {
        // LyX usings 1/64ths degree, Qt usings 1/16th
        setPen(col).drawArc(x, y, w, h, a1 / 4, a2 / 4);
index ff3fc3d4fb0d117850f262a521dcf25f48af6e1d..e24a56335ba33edb32688740a69a55acfc97c158 100644 (file)
@@ -45,7 +45,7 @@ public:
        virtual Painter & line(
                int x1, int y1,
                int x2, int y2,
-               EnumLColor,
+               LColor_color,
                line_style = line_solid,
                line_width = line_thin);
 
@@ -59,7 +59,7 @@ public:
                int const * xp,
                int const * yp,
                int np,
-               EnumLColor,
+               LColor_color,
                line_style = line_solid,
                line_width = line_thin);
 
@@ -67,7 +67,7 @@ public:
        virtual Painter & rectangle(
                int x, int y,
                int w, int h,
-               EnumLColor,
+               LColor_color,
                line_style = line_solid,
                line_width = line_thin);
 
@@ -75,26 +75,26 @@ public:
        virtual Painter & fillRectangle(
                int x, int y,
                int w, int h,
-               EnumLColor);
+               LColor_color);
 
        /// draw a filled (irregular) polygon
        virtual Painter & fillPolygon(
                int const * xp,
                int const * yp,
                int np,
-               EnumLColor);
+               LColor_color);
 
        /// draw an arc
        virtual Painter & arc(
                int x, int y,
                unsigned int w, unsigned int h,
                int a1, int a2,
-               EnumLColor);
+               LColor_color);
 
        /// draw a pixel
        virtual Painter & point(
                int x, int y,
-               EnumLColor);
+               LColor_color);
 
        /// draw an image from the image cache
        virtual Painter & image(int x, int y,
@@ -121,7 +121,7 @@ private:
                QString const & str, LyXFont const & f);
 
        /// set pen parameters
-       QPainter & setPen(EnumLColor c,
+       QPainter & setPen(LColor_color c,
                line_style ls = line_solid,
                line_width lw = line_thin);
 
index a99dfd58a9cdf282be1afb59cbf95bfb8643752e..2f1afcc6d6aba63e003312ef6724947c4d29dd99 100644 (file)
@@ -17,7 +17,7 @@
 
 #include <vector>
 
-class EnumLColor;
+class LColor_color;
 class QPrefs;
 class QPrefAsciiModule;
 class QPrefDateModule;
@@ -83,7 +83,7 @@ protected:
 
 private:
 
-       std::vector<EnumLColor> colors_;
+       std::vector<LColor_color> colors_;
 
        QPrefAsciiModule * asciiModule;
        QPrefDateModule * dateModule;
index 9e128ad04bbaaa2e435cc9ef8fc1f9f7f96c9b2f..f7cd8a27298d9f8fc9f9563eb7ddc40682efbf37 100644 (file)
@@ -22,7 +22,7 @@ LColorCache::LColorCache()
 }
 
 
-QColor const & LColorCache::get(EnumLColor col) const
+QColor const & LColorCache::get(LColor_color col) const
 {
        lcolor_map::const_iterator cit = colormap.find(col);
        if (cit != colormap.end())
index 60ee45ff305ae64f5e81d0df3e71c65626218d9e..90d384ccd937ade02d4d798ed3e95f7a683aaaed 100644 (file)
@@ -17,7 +17,7 @@
 #include <qcolor.h>
 
 
-class EnumLColor;
+class LColor_color;
 
 
 // FIXME: use a fixed-size array not a map ?
@@ -30,13 +30,13 @@ public:
        LColorCache();
 
        /// get the given color
-       QColor const & get(EnumLColor color) const;
+       QColor const & get(LColor_color color) const;
 
        /// clear all colors
        void clear();
 
 private:
-       typedef std::map<EnumLColor, QColor> lcolor_map;
+       typedef std::map<LColor_color, QColor> lcolor_map;
 
        mutable lcolor_map colormap;
 };
index d39173d205db86ffa50b05ef7eb6814cfaa66276..8139691036e11de027b55c3052d4999e7c9ba3cb 100644 (file)
@@ -193,13 +193,13 @@ FuncStatus getStatus(FuncRequest const & ev)
 }
 
 
-string const hexname(EnumLColor col)
+string const hexname(LColor_color col)
 {
        return ltrim(fromqstr(lcolorcache.get(col).name()), "#");
 }
 
 
-void update_color(EnumLColor)
+void update_color(LColor_color)
 {
        // FIXME: Bleh, can't we just clear them all at once ?
        lcolorcache.clear();
index cb3b3440a8bbc21258a548f1af785df0506a64fa..da55eb7d57319a9d8934a7eba2b6e4f108dd831d 100644 (file)
@@ -1,3 +1,14 @@
+2003-09-18  Angus Leeming  <leeming@lyx.org>
+
+       * Color.C:
+       * Color.h:
+       * ColorHandler.C:
+       * ColorHandler.h:
+       * FormCharacter.h:
+       * XPainter.C:
+       * XPainter.h:
+       * lyx_gui.C: rename EnumLColor as LColor_color.
+
 2003-09-16  Angus Leeming  <leeming@lyx.org>
 
        * xformsImage.[Ch]: separate interface from implementation. Make all the virtual
index 8b688d47344e596a3c98e7164e3389af8d684fbf..03aed496ae4d8e1075bf3ca9259e27aa8d6d2169 100644 (file)
@@ -50,7 +50,7 @@ int hexstrToInt(string const & str)
 
 
 
-bool getRGBColor(EnumLColor col,
+bool getRGBColor(LColor_color col,
                 unsigned int & r, unsigned int & g, unsigned int & b)
 {
        string const name = lcolor.getX11Name(col);
index 6216e5cefd127f18d69eae46b04a351745e55211..79979b7f03810643f440ba39f00978d5deb92004 100644 (file)
 #include "support/std_string.h"
 
 
-class EnumLColor;
+class LColor_color;
 
 
 /** Given col, fills r, g, b in the range 0-255.
     The function returns true if successful.
     It returns false on failure and sets r, g, b to 0. */
-bool getRGBColor(EnumLColor col,
+bool getRGBColor(LColor_color col,
                 unsigned int & r, unsigned int & g, unsigned int & b);
 
 struct RGBColor;
index 846792886089077880b89a17683bec6ea9ddb671..fcc38a859f22635c6fee9c1927ef62f1ac0376e6 100644 (file)
@@ -77,7 +77,7 @@ LyXColorHandler::~LyXColorHandler()
 }
 
 
-unsigned long LyXColorHandler::colorPixel(EnumLColor c)
+unsigned long LyXColorHandler::colorPixel(LColor_color c)
 {
        XGCValues val;
        XGetGCValues(display, getGCForeground(c), GCForeground, &val);
@@ -163,7 +163,7 @@ GC LyXColorHandler::getGCForeground(string const & s)
 
 // Gets GC according to color
 // Uses caching
-GC LyXColorHandler::getGCForeground(EnumLColor c)
+GC LyXColorHandler::getGCForeground(LColor_color c)
 {
        if (static_cast<unsigned>(c) >= colorGCcache.size()) {
                colorGCcache.resize(c + 1, 0);
@@ -188,7 +188,7 @@ GC LyXColorHandler::getGCForeground(EnumLColor c)
 
 // Gets GC for line
 GC LyXColorHandler::getGCLinepars(Painter::line_style ls,
-                                 Painter::line_width lw, EnumLColor c)
+                                 Painter::line_width lw, LColor_color c)
 {
        //if (lyxerr.debugging()) {
        //      lyxerr << "Painter drawable: " << drawable() << endl;
@@ -234,7 +234,7 @@ GC LyXColorHandler::getGCLinepars(Painter::line_style ls,
 
 
 // update GC cache after color redefinition
-void LyXColorHandler::updateColor (EnumLColor c)
+void LyXColorHandler::updateColor (LColor_color c)
 {
        // color GC cache
        GC gc = colorGCcache[c];
index f1acce0b473150372811c931ee8361b554b69a61..625246310daeddba8bf28a3be56266d0c3760d23 100644 (file)
@@ -22,7 +22,7 @@
 // This is only included to provide stuff for the non-public sections
 #include <X11/Xlib.h>
 
-class EnumLColor;
+class LColor_color;
 class LyXFont;
 
 /**
@@ -36,14 +36,14 @@ public:
        ///
        ~LyXColorHandler();
        ///
-       unsigned long colorPixel(EnumLColor c);
+       unsigned long colorPixel(LColor_color c);
        ///
-       GC getGCForeground(EnumLColor c);
+       GC getGCForeground(LColor_color c);
        ///
        GC getGCLinepars(Painter::line_style,
-                        Painter::line_width, EnumLColor c);
+                        Painter::line_width, LColor_color c);
        /// update the cache after a color definition change
-       void updateColor(EnumLColor c);
+       void updateColor(LColor_color c);
 
 private:
        ///
index a66c85d2a1e0f6b86e23907a0f02ad591ca74927..76cca5bb796cb5caea838369643319e1249f36a0 100644 (file)
@@ -16,7 +16,7 @@
 #include "FormDialogView.h"
 #include "ControlCharacter.h" // for ControlCharacter enum
 
-struct EnumLColor;
+struct LColor_color;
 struct FD_character;
 
 /**
@@ -54,7 +54,7 @@ private:
        ///
        std::vector<frnt::FONT_STATE>      bar_;
        ///
-       std::vector<EnumLColor>            color_;
+       std::vector<LColor_color>            color_;
        ///
        std::vector<string>                lang_;
 };
index dc762f7cfed950312a6ac6afed7a8a93f670afc5..1c48f846ad8bf7380e39832c0447e13c0f01c583 100644 (file)
@@ -49,7 +49,7 @@ int XPainter::paperHeight() const
 }
 
 
-Painter & XPainter::point(int x, int y, EnumLColor c)
+Painter & XPainter::point(int x, int y, LColor_color c)
 {
        XDrawPoint(fl_get_display(), owner_.getPixmap(),
                lyxColorHandler->getGCForeground(c), x, y);
@@ -59,7 +59,7 @@ Painter & XPainter::point(int x, int y, EnumLColor c)
 
 Painter & XPainter::line(int x1, int y1,
        int x2, int y2,
-       EnumLColor col,
+       LColor_color col,
        line_style ls,
        line_width lw)
 {
@@ -72,7 +72,7 @@ Painter & XPainter::line(int x1, int y1,
 
 Painter & XPainter::lines(int const * xp, int const * yp,
        int np,
-       EnumLColor col,
+       LColor_color col,
        line_style ls,
        line_width lw)
 {
@@ -93,7 +93,7 @@ Painter & XPainter::lines(int const * xp, int const * yp,
 
 Painter & XPainter::rectangle(int x, int y,
        int w, int h,
-       EnumLColor col,
+       LColor_color col,
        line_style ls,
        line_width lw)
 {
@@ -106,7 +106,7 @@ Painter & XPainter::rectangle(int x, int y,
 
 Painter & XPainter::fillRectangle(int x, int y,
        int w, int h,
-       EnumLColor col)
+       LColor_color col)
 {
        XFillRectangle(fl_get_display(), owner_.getPixmap(),
                lyxColorHandler->getGCForeground(col), x, y, w, h);
@@ -115,7 +115,7 @@ Painter & XPainter::fillRectangle(int x, int y,
 
 
 Painter & XPainter::fillPolygon(int const * xp, int const * yp,
-       int np, EnumLColor col)
+       int np, LColor_color col)
 {
        boost::scoped_array<XPoint> points(new XPoint[np]);
 
@@ -134,7 +134,7 @@ Painter & XPainter::fillPolygon(int const * xp, int const * yp,
 
 Painter & XPainter::arc(int x, int y,
        unsigned int w, unsigned int h,
-       int a1, int a2, EnumLColor col)
+       int a1, int a2, LColor_color col)
 {
        XDrawArc(fl_get_display(), owner_.getPixmap(),
                lyxColorHandler->getGCForeground(col),
index ba1d8e602b2631a676b408fb07e4d1665b010fbc..d5473486d51a8f9099bdde5f3a64205f9e697fd3 100644 (file)
@@ -38,7 +38,7 @@ public:
        virtual Painter & line(
                int x1, int y1,
                int x2, int y2,
-               EnumLColor,
+               LColor_color,
                line_style = line_solid,
                line_width = line_thin);
 
@@ -52,7 +52,7 @@ public:
                int const * xp,
                int const * yp,
                int np,
-               EnumLColor,
+               LColor_color,
                line_style = line_solid,
                line_width = line_thin);
 
@@ -60,7 +60,7 @@ public:
        virtual Painter & rectangle(
                int x, int y,
                int w, int h,
-               EnumLColor,
+               LColor_color,
                line_style = line_solid,
                line_width = line_thin);
 
@@ -68,26 +68,26 @@ public:
        virtual Painter & fillRectangle(
                int x, int y,
                int w, int h,
-               EnumLColor);
+               LColor_color);
 
        /// draw a filled (irregular) polygon
        virtual Painter & fillPolygon(
                int const * xp,
                int const * yp,
                int np,
-               EnumLColor);
+               LColor_color);
 
        /// draw an arc
        virtual Painter & arc(
                int x, int y,
                unsigned int w, unsigned int h,
                int a1, int a2,
-               EnumLColor);
+               LColor_color);
 
        /// draw a pixel
        virtual Painter & point(
                int x, int y,
-               EnumLColor);
+               LColor_color);
 
        /// draw an image from the image cache
        virtual Painter & image(int x, int y,
index 52326b410e6e57a3914423cdde024d1939a9fabc..6ad47a3afc2867c98c4431a06e3d78d37c394e70 100644 (file)
@@ -332,7 +332,7 @@ FuncStatus getStatus(FuncRequest const & /*ev*/)
        return FuncStatus();
 }
 
-string const hexname(EnumLColor col)
+string const hexname(LColor_color col)
 {
        unsigned int r, g, b;
        bool const success = getRGBColor(col, r, g, b);
@@ -353,7 +353,7 @@ string const hexname(EnumLColor col)
 }
 
 
-void update_color(EnumLColor col)
+void update_color(LColor_color col)
 {
        lyxColorHandler->updateColor(col);
 }
index ec1d6a81c42438a33ad3957c52fea048e77b7fe1..d84a0548efeae9365ad7d1df29e1bced1b7e679e 100644 (file)
@@ -1,3 +1,10 @@
+2003-09-18  Angus Leeming  <leeming@lyx.org>
+
+       * inset.C:
+       * inset.h:
+       * insettext.C:
+       * insettext.h: rename EnumLColor as LColor_color.
+
 2003-09-18  Angus Leeming  <leeming@lyx.org>
 
        * inset.h: add the InsetOld::Code wrapper class InsetOld_code.
index eaa9ac769e1bdc87e24f97ffcbb2061fd4c3e2d3..8b8aa3def7d836e8a1b38d25ede0b172a53516b0 100644 (file)
@@ -85,13 +85,13 @@ LyXText * InsetOld::getLyXText(BufferView const * bv, bool /*recursive*/) const
 }
 
 
-void InsetOld::setBackgroundColor(EnumLColor color)
+void InsetOld::setBackgroundColor(LColor_color color)
 {
        background_color_ = color;
 }
 
 
-EnumLColor InsetOld::backgroundColor() const
+LColor_color InsetOld::backgroundColor() const
 {
        if (background_color_ == LColor::inherit) {
                if (owner())
index 2a7c88624359e74192314c47f226dcad6b37fd3f..94b2b477831eb30333d58f6f10d6c2a651687a97 100644 (file)
@@ -20,7 +20,7 @@
 #include "ParagraphList_fwd.h"
 
 class Buffer;
-class EnumLColor;
+class LColor_color;
 class FuncRequest;
 class LatexRunParams;
 class LyXCursor;
@@ -204,9 +204,9 @@ public:
        ///
        UpdatableInset * owner() const { return owner_; }
        ///
-       void setBackgroundColor(EnumLColor);
+       void setBackgroundColor(LColor_color);
        ///
-       EnumLColor backgroundColor() const;
+       LColor_color backgroundColor() const;
        ///
        int x() const { return top_x; }
        ///
index 435f4c431864a0c620a214d7f0e1f5baf3ec5488..83b8baeb8d41cc7ae351c7d73db2b0bc103d1a14 100644 (file)
@@ -1452,13 +1452,13 @@ void InsetText::setDrawFrame(DrawFrame how)
 }
 
 
-EnumLColor InsetText::frameColor() const
+LColor_color InsetText::frameColor() const
 {
        return LColor::color(frame_color_);
 }
 
 
-void InsetText::setFrameColor(EnumLColor col)
+void InsetText::setFrameColor(LColor_color col)
 {
        frame_color_ = col;
 }
index d1079994fbf09b23c58f71d4393e42a8e6a21609..d110d619cfe3792ba02de20bf2fea7741baf7c6f 100644 (file)
@@ -27,7 +27,7 @@ class Buffer;
 class BufferParams;
 class BufferView;
 class Dimension;
-class EnumLColor;
+class LColor_color;
 class LyXCursor;
 class Painter;
 class Paragraph;
@@ -128,8 +128,8 @@ public:
        ///
        void setDrawFrame(DrawFrame);
        ///
-       EnumLColor frameColor() const;
-       void setFrameColor(EnumLColor);
+       LColor_color frameColor() const;
+       void setFrameColor(LColor_color);
        ///
        LyXText * getLyXText(BufferView const *,
                             bool const recursive = false) const;
index 4dfe32f3208e48927d0f7fd7cb6488794d884ba3..18bdaea92cb1076381c0f9a535fd8bdf32b2ff77 100644 (file)
@@ -203,7 +203,7 @@ LyXFont::FONT_MISC_STATE LyXFont::underbar() const
 }
 
 
-EnumLColor LyXFont::color() const
+LColor_color LyXFont::color() const
 {
        return LColor::color(bits.color);
 }
@@ -276,7 +276,7 @@ void LyXFont::setNoun(LyXFont::FONT_MISC_STATE n)
 }
 
 
-void LyXFont::setColor(EnumLColor c)
+void LyXFont::setColor(LColor_color c)
 {
        bits.color = int(c);
 }
@@ -921,7 +921,7 @@ int LyXFont::latexWriteEndChanges(ostream & os, LyXFont const & base,
 }
 
 
-EnumLColor LyXFont::realColor() const
+LColor_color LyXFont::realColor() const
 {
        if (color() == LColor::none)
                return LColor::foreground;
index f407257baff20dba65b2b02e2d57b923ba1ede17..1706ea2ab0409da4163aed511626391ae2ad557a 100644 (file)
@@ -18,7 +18,7 @@
 #include "support/std_string.h"
 #include <iosfwd>
 
-class EnumLColor;
+class LColor_color;
 class LyXLex;
 class BufferParams;
 class Language;
@@ -206,7 +206,7 @@ public:
        FONT_MISC_STATE number() const;
 
        ///
-       EnumLColor color() const;
+       LColor_color color() const;
 
        ///
        Language const * language() const;
@@ -229,7 +229,7 @@ public:
        void setUnderbar(LyXFont::FONT_MISC_STATE u);
        void setNoun(LyXFont::FONT_MISC_STATE n);
        void setNumber(LyXFont::FONT_MISC_STATE n);
-       void setColor(EnumLColor c);
+       void setColor(LColor_color c);
        void setLanguage(Language const * l);
 
        /// Set family after LyX text format
@@ -300,7 +300,7 @@ public:
        string const stateText(BufferParams * params) const;
 
        ///
-       EnumLColor realColor() const;
+       LColor_color realColor() const;
 
        ///
        friend
index e536a1aefb5eda73956050954270930813b9b787..4561c55c6917e7e930a2a9b06b5c9a7d32bb9f13 100644 (file)
@@ -27,7 +27,7 @@ class Buffer;
 class BufferParams;
 class BufferView;
 class Dimension;
-class EnumLColor;
+class LColor_color;
 class InsetText;
 class LyXCursor;
 class MetricsInfo;
@@ -399,7 +399,7 @@ public:
                lyx::pos_type pos, char c, LyXFont const & Font) const;
 
        /// return the color of the canvas
-       EnumLColor backgroundColor() const;
+       LColor_color backgroundColor() const;
 
        ///
        mutable bool bidi_same_direction;
index 6088af6a858c88fde16b6c5d8f72a40a608d1087..8069b925bc623d4aa253291a76e8a4cb89422b48 100644 (file)
@@ -878,7 +878,7 @@ int LyXText::labelFill(ParagraphList::iterator pit, Row const & row) const
 }
 
 
-EnumLColor LyXText::backgroundColor() const
+LColor_color LyXText::backgroundColor() const
 {
        if (inset_owner)
                return inset_owner->backgroundColor();