mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
rename LColor into Color
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18046 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
06baeac064
commit
5008ee540f
@ -11,7 +11,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "BranchList.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include "frontends/Application.h"
|
||||
|
||||
@ -25,7 +25,7 @@ using std::string;
|
||||
|
||||
Branch::Branch()
|
||||
{
|
||||
theApp()->getRgbColor(LColor::background, color_);
|
||||
theApp()->getRgbColor(Color::background, color_);
|
||||
}
|
||||
|
||||
|
||||
@ -74,7 +74,7 @@ void Branch::setColor(string const & c)
|
||||
color_ = RGBColor(c);
|
||||
else
|
||||
// no color set or invalid color - use normal background
|
||||
theApp()->getRgbColor(LColor::background, color_);
|
||||
theApp()->getRgbColor(Color::background, color_);
|
||||
}
|
||||
|
||||
|
||||
|
@ -60,9 +60,9 @@ public:
|
||||
void setColor(RGBColor const &);
|
||||
/**
|
||||
* Set color from a string "#rrggbb".
|
||||
* Use LColor:background if the string is no valid color.
|
||||
* Use Color:background if the string is no valid color.
|
||||
* This ensures compatibility with LyX 1.4.0 that had the symbolic
|
||||
* color "none" that was displayed as LColor:background.
|
||||
* color "none" that was displayed as Color:background.
|
||||
*/
|
||||
void setColor(std::string const &);
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "gettext.h"
|
||||
#include "Language.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyXFont.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXRC.h"
|
||||
@ -527,9 +527,9 @@ string const BufferParams::readToken(Lexer & lex, string const & token)
|
||||
string color = lex.getString();
|
||||
if (branch_ptr)
|
||||
branch_ptr->setColor(color);
|
||||
// Update also the LColor table:
|
||||
// Update also the Color table:
|
||||
if (color == "none")
|
||||
color = lcolor.getX11Name(LColor::background);
|
||||
color = lcolor.getX11Name(Color::background);
|
||||
// FIXME UNICODE
|
||||
lcolor.setColor(to_utf8(branch), color);
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* \file LColor.cpp
|
||||
* \file Color.cpp
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
@ -18,7 +18,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <map>
|
||||
@ -36,7 +36,7 @@ using std::string;
|
||||
namespace {
|
||||
|
||||
struct ColorEntry {
|
||||
LColor::color lcolor;
|
||||
Color::color lcolor;
|
||||
char const * guiname;
|
||||
char const * latexname;
|
||||
char const * x11name;
|
||||
@ -45,7 +45,7 @@ struct ColorEntry {
|
||||
|
||||
}
|
||||
|
||||
class LColor::Pimpl {
|
||||
class Color::Pimpl {
|
||||
public:
|
||||
///
|
||||
class information {
|
||||
@ -74,11 +74,11 @@ public:
|
||||
}
|
||||
|
||||
///
|
||||
typedef std::map<LColor::color, information> InfoTab;
|
||||
typedef std::map<Color::color, information> InfoTab;
|
||||
/// the table of color information
|
||||
InfoTab infotab;
|
||||
|
||||
typedef std::map<string, LColor::color> Transform;
|
||||
typedef std::map<string, Color::color> Transform;
|
||||
/// the transform between LyX color name string and integer code.
|
||||
Transform lyxcolors;
|
||||
/// the transform between LaTeX color name string and integer code.
|
||||
@ -87,10 +87,10 @@ public:
|
||||
};
|
||||
|
||||
|
||||
LColor::LColor()
|
||||
Color::Color()
|
||||
: pimpl_(new Pimpl)
|
||||
{
|
||||
// LColor::color, gui, latex, x11, lyx
|
||||
// Color::color, gui, latex, x11, lyx
|
||||
static ColorEntry const items[] = {
|
||||
{ none, N_("none"), "none", "black", "none" },
|
||||
{ black, N_("black"), "black", "black", "black" },
|
||||
@ -158,23 +158,23 @@ LColor::LColor()
|
||||
}
|
||||
|
||||
|
||||
LColor::LColor(LColor const & c)
|
||||
Color::Color(Color const & c)
|
||||
: pimpl_(new Pimpl(*c.pimpl_))
|
||||
{}
|
||||
|
||||
|
||||
LColor::~LColor()
|
||||
Color::~Color()
|
||||
{}
|
||||
|
||||
|
||||
LColor & LColor::operator=(LColor tmp)
|
||||
Color & Color::operator=(Color tmp)
|
||||
{
|
||||
boost::swap(pimpl_, tmp.pimpl_);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
docstring const LColor::getGUIName(LColor::color c) const
|
||||
docstring const Color::getGUIName(Color::color c) const
|
||||
{
|
||||
Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
|
||||
if (it != pimpl_->infotab.end())
|
||||
@ -183,20 +183,20 @@ docstring const LColor::getGUIName(LColor::color c) const
|
||||
}
|
||||
|
||||
|
||||
string const LColor::getX11Name(LColor::color c) const
|
||||
string const Color::getX11Name(Color::color c) const
|
||||
{
|
||||
Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
|
||||
if (it != pimpl_->infotab.end())
|
||||
return it->second.x11name;
|
||||
|
||||
lyxerr << "LyX internal error: Missing color"
|
||||
" entry in LColor.cpp for " << c << '\n'
|
||||
" entry in Color.cpp for " << c << '\n'
|
||||
<< "Using black." << endl;
|
||||
return "black";
|
||||
}
|
||||
|
||||
|
||||
string const LColor::getLaTeXName(LColor::color c) const
|
||||
string const Color::getLaTeXName(Color::color c) const
|
||||
{
|
||||
Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
|
||||
if (it != pimpl_->infotab.end())
|
||||
@ -205,7 +205,7 @@ string const LColor::getLaTeXName(LColor::color c) const
|
||||
}
|
||||
|
||||
|
||||
string const LColor::getLyXName(LColor::color c) const
|
||||
string const Color::getLyXName(Color::color c) const
|
||||
{
|
||||
Pimpl::InfoTab::const_iterator it = pimpl_->infotab.find(c);
|
||||
if (it != pimpl_->infotab.end())
|
||||
@ -214,7 +214,7 @@ string const LColor::getLyXName(LColor::color c) const
|
||||
}
|
||||
|
||||
|
||||
bool LColor::setColor(LColor::color col, string const & x11name)
|
||||
bool Color::setColor(Color::color col, string const & x11name)
|
||||
{
|
||||
Pimpl::InfoTab::iterator it = pimpl_->infotab.find(col);
|
||||
if (it == pimpl_->infotab.end()) {
|
||||
@ -236,12 +236,12 @@ bool LColor::setColor(LColor::color col, string const & x11name)
|
||||
}
|
||||
|
||||
|
||||
bool LColor::setColor(string const & lyxname, string const &x11name)
|
||||
bool Color::setColor(string const & lyxname, string const &x11name)
|
||||
{
|
||||
string const lcname = ascii_lowercase(lyxname);
|
||||
if (pimpl_->lyxcolors.find(lcname) == pimpl_->lyxcolors.end()) {
|
||||
LYXERR(Debug::GUI)
|
||||
<< "LColor::setColor: Unknown color \""
|
||||
<< "Color::setColor: Unknown color \""
|
||||
<< lyxname << '"' << endl;
|
||||
addColor(static_cast<color>(pimpl_->infotab.size()), lcname);
|
||||
}
|
||||
@ -250,18 +250,18 @@ bool LColor::setColor(string const & lyxname, string const &x11name)
|
||||
}
|
||||
|
||||
|
||||
void LColor::addColor(LColor::color c, string const & lyxname) const
|
||||
void Color::addColor(Color::color c, string const & lyxname) const
|
||||
{
|
||||
ColorEntry ce = { c, "", "", "", lyxname.c_str() };
|
||||
pimpl_->fill(ce);
|
||||
}
|
||||
|
||||
|
||||
LColor::color LColor::getFromLyXName(string const & lyxname) const
|
||||
Color::color Color::getFromLyXName(string const & lyxname) const
|
||||
{
|
||||
string const lcname = ascii_lowercase(lyxname);
|
||||
if (pimpl_->lyxcolors.find(lcname) == pimpl_->lyxcolors.end()) {
|
||||
lyxerr << "LColor::getFromLyXName: Unknown color \""
|
||||
lyxerr << "Color::getFromLyXName: Unknown color \""
|
||||
<< lyxname << '"' << endl;
|
||||
return none;
|
||||
}
|
||||
@ -270,10 +270,10 @@ LColor::color LColor::getFromLyXName(string const & lyxname) const
|
||||
}
|
||||
|
||||
|
||||
LColor::color LColor::getFromLaTeXName(string const & latexname) const
|
||||
Color::color Color::getFromLaTeXName(string const & latexname) const
|
||||
{
|
||||
if (pimpl_->latexcolors.find(latexname) == pimpl_->latexcolors.end()) {
|
||||
lyxerr << "LColor::getFromLaTeXName: Unknown color \""
|
||||
lyxerr << "Color::getFromLaTeXName: Unknown color \""
|
||||
<< latexname << '"' << endl;
|
||||
return none;
|
||||
}
|
||||
@ -282,10 +282,10 @@ LColor::color LColor::getFromLaTeXName(string const & latexname) const
|
||||
}
|
||||
|
||||
|
||||
// The evil global LColor instance
|
||||
LColor lcolor;
|
||||
// An equally evil global system LColor instance
|
||||
LColor system_lcolor;
|
||||
// The evil global Color instance
|
||||
Color lcolor;
|
||||
// An equally evil global system Color instance
|
||||
Color system_lcolor;
|
||||
|
||||
|
||||
} // namespace lyx
|
@ -1,6 +1,6 @@
|
||||
// -*- C++ -*-
|
||||
/**
|
||||
* \file LColor.h
|
||||
* \file Color.h
|
||||
* This file is part of LyX, the document processor.
|
||||
* Licence details can be found in the file COPYING.
|
||||
*
|
||||
@ -33,7 +33,7 @@ namespace lyx {
|
||||
* To serve as a color-namespace container (the Color enum).
|
||||
*/
|
||||
/**
|
||||
* \class LColor
|
||||
* \class Color
|
||||
*
|
||||
* A class holding color definitions and associated names for
|
||||
* LaTeX, X11, the GUI, and LyX internally.
|
||||
@ -44,7 +44,7 @@ namespace lyx {
|
||||
* - A logical color, such as no color, inherit, math
|
||||
*/
|
||||
|
||||
class LColor
|
||||
class Color
|
||||
// made copyable for same reasons as LyXRC was made copyable. See there for
|
||||
// explanation.
|
||||
{
|
||||
@ -184,18 +184,18 @@ public:
|
||||
|
||||
|
||||
///
|
||||
LColor();
|
||||
Color();
|
||||
///
|
||||
LColor(LColor const &);
|
||||
Color(Color const &);
|
||||
///
|
||||
~LColor();
|
||||
~Color();
|
||||
///
|
||||
LColor & operator=(LColor);
|
||||
Color & operator=(Color);
|
||||
|
||||
/** set the given LyX color to the color defined by the X11 name given
|
||||
* \returns true if successful.
|
||||
*/
|
||||
bool setColor(LColor::color col, std::string const & x11name);
|
||||
bool setColor(Color::color col, std::string const & x11name);
|
||||
|
||||
/** set the given LyX color to the color defined by the X11
|
||||
* name given \returns true if successful. A new color entry
|
||||
@ -204,24 +204,24 @@ public:
|
||||
bool setColor(std::string const & lyxname, std::string const & x11name);
|
||||
|
||||
/// Get the GUI name of \c color.
|
||||
docstring const getGUIName(LColor::color c) const;
|
||||
docstring const getGUIName(Color::color c) const;
|
||||
|
||||
/// Get the X11 name of \c color.
|
||||
std::string const getX11Name(LColor::color c) const;
|
||||
std::string const getX11Name(Color::color c) const;
|
||||
|
||||
/// Get the LaTeX name of \c color.
|
||||
std::string const getLaTeXName(LColor::color c) const;
|
||||
std::string const getLaTeXName(Color::color c) const;
|
||||
|
||||
/// Get the LyX name of \c color.
|
||||
std::string const getLyXName(LColor::color c) const;
|
||||
std::string const getLyXName(Color::color c) const;
|
||||
|
||||
/// \returns the LColor::color associated with the LyX name.
|
||||
LColor::color getFromLyXName(std::string const & lyxname) const;
|
||||
/// \returns the LColor::color associated with the LaTeX name.
|
||||
LColor::color getFromLaTeXName(std::string const & latexname) const;
|
||||
/// \returns the Color::color associated with the LyX name.
|
||||
Color::color getFromLyXName(std::string const & lyxname) const;
|
||||
/// \returns the Color::color associated with the LaTeX name.
|
||||
Color::color getFromLaTeXName(std::string const & latexname) const;
|
||||
private:
|
||||
///
|
||||
void addColor(LColor::color c, std::string const & lyxname) const;
|
||||
void addColor(Color::color c, std::string const & lyxname) const;
|
||||
///
|
||||
class Pimpl;
|
||||
///
|
||||
@ -229,26 +229,26 @@ private:
|
||||
};
|
||||
|
||||
|
||||
/** \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.
|
||||
/** \c Color_color is a wrapper for Color::color. It can be forward-declared and
|
||||
* passed as a function argument without having to expose Color.h.
|
||||
*/
|
||||
class LColor_color {
|
||||
LColor::color val_;
|
||||
class Color_color {
|
||||
Color::color val_;
|
||||
public:
|
||||
/** The default constructor is nasty,
|
||||
* but allows us to use LColor_color in STL containers.
|
||||
* but allows us to use Color_color in STL containers.
|
||||
*/
|
||||
LColor_color() : val_(static_cast<LColor::color>(-1)) {}
|
||||
Color_color() : val_(static_cast<Color::color>(-1)) {}
|
||||
|
||||
LColor_color(LColor::color val) : val_(val) {}
|
||||
operator LColor::color() const{ return val_; }
|
||||
Color_color(Color::color val) : val_(val) {}
|
||||
operator Color::color() const{ return val_; }
|
||||
};
|
||||
|
||||
|
||||
/// the current color definitions
|
||||
extern LColor lcolor;
|
||||
extern Color lcolor;
|
||||
/// the system color definitions
|
||||
extern LColor system_lcolor;
|
||||
extern Color system_lcolor;
|
||||
|
||||
|
||||
} // namespace lyx
|
@ -22,7 +22,7 @@
|
||||
#include "Encoding.h"
|
||||
#include "Floating.h"
|
||||
#include "FloatList.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Language.h"
|
||||
#include "Lexer.h"
|
||||
#include "lyx_sty.h"
|
||||
@ -328,7 +328,7 @@ string const LaTeXFeatures::getPackages() const
|
||||
}
|
||||
// shadecolor for shaded
|
||||
if (mustProvide("framed")) {
|
||||
RGBColor c = RGBColor(lcolor.getX11Name(LColor::shadedbg));
|
||||
RGBColor c = RGBColor(lcolor.getX11Name(Color::shadedbg));
|
||||
packages << "\\definecolor{shadecolor}{rgb}{"
|
||||
<< c.r/255 << ',' << c.g/255 << ',' << c.b/255 << "}\n";
|
||||
}
|
||||
|
@ -30,7 +30,7 @@
|
||||
#include "kb_keymap.h"
|
||||
#include "Language.h"
|
||||
#include "Session.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "lyx_cb.h"
|
||||
#include "LyXAction.h"
|
||||
#include "LyXFunc.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "debug.h"
|
||||
#include "gettext.h"
|
||||
#include "Language.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXRC.h"
|
||||
|
||||
@ -116,7 +116,7 @@ LyXFont::FontBits LyXFont::sane = {
|
||||
MEDIUM_SERIES,
|
||||
UP_SHAPE,
|
||||
SIZE_NORMAL,
|
||||
LColor::none,
|
||||
Color::none,
|
||||
OFF,
|
||||
OFF,
|
||||
OFF,
|
||||
@ -128,7 +128,7 @@ LyXFont::FontBits LyXFont::inherit = {
|
||||
INHERIT_SERIES,
|
||||
INHERIT_SHAPE,
|
||||
INHERIT_SIZE,
|
||||
LColor::inherit,
|
||||
Color::inherit,
|
||||
INHERIT,
|
||||
INHERIT,
|
||||
INHERIT,
|
||||
@ -140,7 +140,7 @@ LyXFont::FontBits LyXFont::ignore = {
|
||||
IGNORE_SERIES,
|
||||
IGNORE_SHAPE,
|
||||
IGNORE_SIZE,
|
||||
LColor::ignore,
|
||||
Color::ignore,
|
||||
IGNORE,
|
||||
IGNORE,
|
||||
IGNORE,
|
||||
@ -198,9 +198,9 @@ LyXFont::LyXFont(LyXFont::FONT_INIT3, Language const * l)
|
||||
|
||||
|
||||
|
||||
LColor_color LyXFont::color() const
|
||||
Color_color LyXFont::color() const
|
||||
{
|
||||
return LColor::color(bits.color);
|
||||
return Color::color(bits.color);
|
||||
}
|
||||
|
||||
|
||||
@ -259,7 +259,7 @@ void LyXFont::setNoun(LyXFont::FONT_MISC_STATE n)
|
||||
}
|
||||
|
||||
|
||||
void LyXFont::setColor(LColor_color c)
|
||||
void LyXFont::setColor(Color_color c)
|
||||
{
|
||||
bits.color = int(c);
|
||||
}
|
||||
@ -417,8 +417,8 @@ void LyXFont::update(LyXFont const & newfont,
|
||||
setLanguage(newfont.language());
|
||||
|
||||
if (newfont.color() == color() && toggleall)
|
||||
setColor(LColor::inherit); // toggle 'back'
|
||||
else if (newfont.color() != LColor::ignore)
|
||||
setColor(Color::inherit); // toggle 'back'
|
||||
else if (newfont.color() != Color::ignore)
|
||||
setColor(newfont.color());
|
||||
}
|
||||
|
||||
@ -441,7 +441,7 @@ void LyXFont::reduce(LyXFont const & tmplt)
|
||||
if (noun() == tmplt.noun())
|
||||
setNoun(INHERIT);
|
||||
if (color() == tmplt.color())
|
||||
setColor(LColor::inherit);
|
||||
setColor(Color::inherit);
|
||||
}
|
||||
|
||||
|
||||
@ -474,7 +474,7 @@ LyXFont & LyXFont::realize(LyXFont const & tmplt)
|
||||
if (bits.noun == INHERIT)
|
||||
bits.noun = tmplt.bits.noun;
|
||||
|
||||
if (bits.color == LColor::inherit)
|
||||
if (bits.color == Color::inherit)
|
||||
bits.color = tmplt.bits.color;
|
||||
|
||||
return *this;
|
||||
@ -488,7 +488,7 @@ bool LyXFont::resolved() const
|
||||
shape() != INHERIT_SHAPE && size() != INHERIT_SIZE &&
|
||||
emph() != INHERIT && underbar() != INHERIT &&
|
||||
noun() != INHERIT &&
|
||||
color() != LColor::inherit);
|
||||
color() != Color::inherit);
|
||||
}
|
||||
|
||||
|
||||
@ -503,7 +503,7 @@ docstring const LyXFont::stateText(BufferParams * params) const
|
||||
os << _(GUIShapeNames[shape()]) << ", ";
|
||||
if (size() != INHERIT_SIZE)
|
||||
os << _(GUISizeNames[size()]) << ", ";
|
||||
if (color() != LColor::inherit)
|
||||
if (color() != Color::inherit)
|
||||
os << lcolor.getGUIName(color()) << ", ";
|
||||
if (emph() != INHERIT)
|
||||
os << bformat(_("Emphasis %1$s, "),
|
||||
@ -791,7 +791,7 @@ int LyXFont::latexWriteStartChanges(odocstream & os, LyXFont const & base,
|
||||
count += strlen(LaTeXShapeNames[f.shape()]) + 2;
|
||||
env = true; //We have opened a new environment
|
||||
}
|
||||
if (f.color() != LColor::inherit && f.color() != LColor::ignore) {
|
||||
if (f.color() != Color::inherit && f.color() != Color::ignore) {
|
||||
os << "\\textcolor{"
|
||||
<< from_ascii(lcolor.getLaTeXName(f.color()))
|
||||
<< "}{";
|
||||
@ -859,7 +859,7 @@ int LyXFont::latexWriteEndChanges(odocstream & os, LyXFont const & base,
|
||||
++count;
|
||||
env = true; // Size change need not bother about closing env.
|
||||
}
|
||||
if (f.color() != LColor::inherit && f.color() != LColor::ignore) {
|
||||
if (f.color() != Color::inherit && f.color() != Color::ignore) {
|
||||
os << '}';
|
||||
++count;
|
||||
env = true; // Size change need not bother about closing env.
|
||||
@ -902,10 +902,10 @@ int LyXFont::latexWriteEndChanges(odocstream & os, LyXFont const & base,
|
||||
}
|
||||
|
||||
|
||||
LColor_color LyXFont::realColor() const
|
||||
Color_color LyXFont::realColor() const
|
||||
{
|
||||
if (color() == LColor::none)
|
||||
return LColor::foreground;
|
||||
if (color() == Color::none)
|
||||
return Color::foreground;
|
||||
return color();
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#ifndef LYXFONT_H
|
||||
#define LYXFONT_H
|
||||
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "support/docstream.h"
|
||||
|
||||
|
||||
@ -170,7 +170,7 @@ public:
|
||||
FONT_SHAPE shape;
|
||||
///
|
||||
FONT_SIZE size;
|
||||
/** We store the LColor::color value as an int to get LColor.h out
|
||||
/** We store the Color::color value as an int to get Color.h out
|
||||
* of the header file.
|
||||
*/
|
||||
int color;
|
||||
@ -223,7 +223,7 @@ public:
|
||||
///
|
||||
FONT_MISC_STATE number() const { return bits.number; }
|
||||
///
|
||||
LColor_color color() const;
|
||||
Color_color color() const;
|
||||
///
|
||||
Language const * language() const { return lang; }
|
||||
///
|
||||
@ -242,7 +242,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(LColor_color c);
|
||||
void setColor(Color_color c);
|
||||
void setLanguage(Language const * l);
|
||||
|
||||
/// Set family after LyX text format
|
||||
@ -314,7 +314,7 @@ public:
|
||||
docstring const stateText(BufferParams * params) const;
|
||||
|
||||
///
|
||||
LColor_color realColor() const;
|
||||
Color_color realColor() const;
|
||||
|
||||
///
|
||||
friend
|
||||
|
@ -44,7 +44,7 @@
|
||||
#include "Intl.h"
|
||||
#include "kb_keymap.h"
|
||||
#include "Language.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Session.h"
|
||||
#include "LyX.h"
|
||||
#include "lyx_cb.h"
|
||||
@ -1489,8 +1489,8 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
||||
}
|
||||
|
||||
bool const graphicsbg_changed =
|
||||
(lyx_name == lcolor.getLyXName(LColor::graphicsbg) &&
|
||||
x11_name != lcolor.getX11Name(LColor::graphicsbg));
|
||||
(lyx_name == lcolor.getLyXName(Color::graphicsbg) &&
|
||||
x11_name != lcolor.getX11Name(Color::graphicsbg));
|
||||
|
||||
if (!lcolor.setColor(lyx_name, x11_name)) {
|
||||
setErrorMessage(
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "Format.h"
|
||||
#include "gettext.h"
|
||||
#include "Session.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXFont.h"
|
||||
#include "Mover.h"
|
||||
@ -812,11 +812,11 @@ int LyXRC::read(Lexer & lexrc)
|
||||
break;
|
||||
}
|
||||
|
||||
LColor::color const col =
|
||||
Color::color const col =
|
||||
lcolor.getFromLyXName(lyx_name);
|
||||
if (col == LColor::none ||
|
||||
col == LColor::inherit ||
|
||||
col == LColor::ignore)
|
||||
if (col == Color::none ||
|
||||
col == Color::inherit ||
|
||||
col == Color::ignore)
|
||||
break;
|
||||
|
||||
if (!lcolor.setColor(col, x11_name)) {
|
||||
@ -1586,8 +1586,8 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc) const
|
||||
<< "#\n\n";
|
||||
|
||||
case RC_SET_COLOR:
|
||||
for (int i = 0; i < LColor::ignore; ++i) {
|
||||
LColor::color lc = static_cast<LColor::color>(i);
|
||||
for (int i = 0; i < Color::ignore; ++i) {
|
||||
Color::color lc = static_cast<Color::color>(i);
|
||||
|
||||
string const col(lcolor.getX11Name(lc));
|
||||
if (ignore_system_lyxrc ||
|
||||
|
@ -35,7 +35,7 @@ class ErrorList;
|
||||
class FuncRequest;
|
||||
class FuncStatus;
|
||||
class InsetBase;
|
||||
class LColor_color;
|
||||
class Color_color;
|
||||
class Cursor;
|
||||
class PainterInfo;
|
||||
class Row;
|
||||
@ -296,7 +296,7 @@ public:
|
||||
LyXFont const & Font) const;
|
||||
|
||||
/// return the color of the canvas
|
||||
LColor_color backgroundColor() const;
|
||||
Color_color backgroundColor() const;
|
||||
|
||||
/**
|
||||
* Returns the left beginning of the text.
|
||||
|
@ -88,8 +88,8 @@ lyx_SOURCES = \
|
||||
FuncStatus.h \
|
||||
InsetList.cpp \
|
||||
InsetList.h \
|
||||
LColor.cpp \
|
||||
LColor.h \
|
||||
Color.cpp \
|
||||
Color.h \
|
||||
LaTeX.cpp \
|
||||
LaTeX.h \
|
||||
LaTeXFeatures.cpp \
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <config.h>
|
||||
|
||||
#include "BufferView.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "MetricsInfo.h"
|
||||
|
||||
#include "mathed/MathSupport.h"
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "gettext.h"
|
||||
#include "Language.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyXLength.h"
|
||||
#include "LyXFont.h"
|
||||
#include "LyXRC.h"
|
||||
@ -969,13 +969,13 @@ void Paragraph::Pimpl::validate(LaTeXFeatures & features,
|
||||
<< endl;
|
||||
}
|
||||
switch (fcit->font().color()) {
|
||||
case LColor::none:
|
||||
case LColor::inherit:
|
||||
case LColor::ignore:
|
||||
case Color::none:
|
||||
case Color::inherit:
|
||||
case Color::ignore:
|
||||
// probably we should put here all interface colors used for
|
||||
// font displaying! For now I just add this ones I know of (Jug)
|
||||
case LColor::latex:
|
||||
case LColor::note:
|
||||
case Color::latex:
|
||||
case Color::note:
|
||||
break;
|
||||
default:
|
||||
features.require("color");
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "debug.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "FontIterator.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyXLength.h"
|
||||
#include "LyXRC.h"
|
||||
#include "LyXText.h"
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "CoordCache.h"
|
||||
#include "gettext.h"
|
||||
#include "Language.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "Row.h"
|
||||
#include "Paragraph.h"
|
||||
@ -130,7 +130,7 @@ bool string2font(string const & data, LyXFont & font, bool & toggle)
|
||||
|
||||
} else if (token == "color") {
|
||||
int const next = lex.getInteger();
|
||||
font.setColor(LColor::color(next));
|
||||
font.setColor(Color::color(next));
|
||||
|
||||
} else if (token == "language") {
|
||||
string const next = lex.getString();
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include "color.h"
|
||||
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include <cmath>
|
||||
#include <sstream>
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "debug.h"
|
||||
#include "FloatList.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyX.h"
|
||||
#include "Paragraph.h"
|
||||
@ -211,7 +211,7 @@ InsetBase * createInset(BufferView * bv, FuncRequest const & cmd)
|
||||
auto_ptr<InsetCaption> inset(new InsetCaption(params));
|
||||
inset->setAutoBreakRows(true);
|
||||
inset->setDrawFrame(true);
|
||||
inset->setFrameColor(LColor::captionframe);
|
||||
inset->setFrameColor(Color::captionframe);
|
||||
return inset.release();
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ namespace lyx {
|
||||
|
||||
class BufferView;
|
||||
class LyXView;
|
||||
class LColor_color;
|
||||
class Color_color;
|
||||
struct RGBColor;
|
||||
|
||||
namespace frontend {
|
||||
@ -145,17 +145,17 @@ public:
|
||||
* The function returns true if successful.
|
||||
* It returns false on failure and sets r, g, b to 0.
|
||||
*/
|
||||
virtual bool getRgbColor(LColor_color col, RGBColor & rgbcol) = 0;
|
||||
virtual bool getRgbColor(Color_color col, RGBColor & rgbcol) = 0;
|
||||
|
||||
/** Eg, passing LColor::black returns "000000",
|
||||
* passing LColor::white returns "ffffff".
|
||||
/** Eg, passing Color::black returns "000000",
|
||||
* passing Color::white returns "ffffff".
|
||||
*/
|
||||
virtual std::string const hexName(LColor_color col) = 0;
|
||||
virtual std::string const hexName(Color_color col) = 0;
|
||||
|
||||
/**
|
||||
* update an altered GUI color
|
||||
*/
|
||||
virtual void updateColor(LColor_color col) = 0;
|
||||
virtual void updateColor(Color_color col) = 0;
|
||||
|
||||
/**
|
||||
* add a callback for socket read notification
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "frontends/FontMetrics.h"
|
||||
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyXFont.h"
|
||||
|
||||
using lyx::docstring;
|
||||
@ -29,27 +29,27 @@ namespace frontend {
|
||||
void Painter::button(int x, int y, int w, int h, bool mouseHover)
|
||||
{
|
||||
if (mouseHover)
|
||||
fillRectangle(x, y, w, h, LColor::buttonhoverbg);
|
||||
fillRectangle(x, y, w, h, Color::buttonhoverbg);
|
||||
else
|
||||
fillRectangle(x, y, w, h, LColor::buttonbg);
|
||||
fillRectangle(x, y, w, h, Color::buttonbg);
|
||||
buttonFrame(x, y, w, h);
|
||||
}
|
||||
|
||||
|
||||
void Painter::buttonFrame(int x, int y, int w, int h)
|
||||
{
|
||||
line(x, y, x, y + h - 1, LColor::buttonframe);
|
||||
line(x - 1 + w, y, x - 1 + w, y + h - 1, LColor::buttonframe);
|
||||
line(x, y - 1, x - 1 + w, y - 1, LColor::buttonframe);
|
||||
line(x, y + h - 1, x - 1 + w, y + h - 1, LColor::buttonframe);
|
||||
line(x, y, x, y + h - 1, Color::buttonframe);
|
||||
line(x - 1 + w, y, x - 1 + w, y + h - 1, Color::buttonframe);
|
||||
line(x, y - 1, x - 1 + w, y - 1, Color::buttonframe);
|
||||
line(x, y + h - 1, x - 1 + w, y + h - 1, Color::buttonframe);
|
||||
}
|
||||
|
||||
|
||||
void Painter::rectText(int x, int y,
|
||||
docstring const & str,
|
||||
LyXFont const & font,
|
||||
LColor_color back,
|
||||
LColor_color frame)
|
||||
Color_color back,
|
||||
Color_color frame)
|
||||
{
|
||||
int width;
|
||||
int ascent;
|
||||
@ -58,11 +58,11 @@ void Painter::rectText(int x, int y,
|
||||
FontMetrics const & fm = theFontMetrics(font);
|
||||
fm.rectText(str, width, ascent, descent);
|
||||
|
||||
if (back != LColor::none)
|
||||
if (back != Color::none)
|
||||
fillRectangle(x + 1, y - ascent + 1, width - 1,
|
||||
ascent + descent - 1, back);
|
||||
|
||||
if (frame != LColor::none)
|
||||
if (frame != Color::none)
|
||||
rectangle(x, y - ascent, width, ascent + descent, frame);
|
||||
|
||||
text(x + 3, y, str, font);
|
||||
@ -97,17 +97,17 @@ int Painter::preeditText(int x, int y, char_type c,
|
||||
switch (style) {
|
||||
case preedit_default:
|
||||
// default unselecting mode.
|
||||
fillRectangle(x, y - height + 1, width, height, LColor::background);
|
||||
fillRectangle(x, y - height + 1, width, height, Color::background);
|
||||
dashedUnderline(font, x, y - descent + 1, width);
|
||||
break;
|
||||
case preedit_selecting:
|
||||
// We are in selecting mode: white text on black background.
|
||||
fillRectangle(x, y - height + 1, width, height, LColor::black);
|
||||
temp_font.setColor(LColor::white);
|
||||
fillRectangle(x, y - height + 1, width, height, Color::black);
|
||||
temp_font.setColor(Color::white);
|
||||
break;
|
||||
case preedit_cursor:
|
||||
// The character comes with a cursor.
|
||||
fillRectangle(x, y - height + 1, width, height, LColor::background);
|
||||
fillRectangle(x, y - height + 1, width, height, Color::background);
|
||||
underline(font, x, y - descent + 1, width);
|
||||
break;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
|
||||
namespace lyx {
|
||||
|
||||
class LColor_color;
|
||||
class Color_color;
|
||||
class LyXFont;
|
||||
|
||||
namespace graphics { class Image; }
|
||||
@ -80,7 +80,7 @@ public:
|
||||
virtual void line(
|
||||
int x1, int y1,
|
||||
int x2, int y2,
|
||||
LColor_color,
|
||||
Color_color,
|
||||
line_style = line_solid,
|
||||
line_width = line_thin) = 0;
|
||||
|
||||
@ -94,7 +94,7 @@ public:
|
||||
int const * xp,
|
||||
int const * yp,
|
||||
int np,
|
||||
LColor_color,
|
||||
Color_color,
|
||||
line_style = line_solid,
|
||||
line_width = line_thin) = 0;
|
||||
|
||||
@ -102,7 +102,7 @@ public:
|
||||
virtual void rectangle(
|
||||
int x, int y,
|
||||
int w, int h,
|
||||
LColor_color,
|
||||
Color_color,
|
||||
line_style = line_solid,
|
||||
line_width = line_thin) = 0;
|
||||
|
||||
@ -110,19 +110,19 @@ public:
|
||||
virtual void fillRectangle(
|
||||
int x, int y,
|
||||
int w, int h,
|
||||
LColor_color) = 0;
|
||||
Color_color) = 0;
|
||||
|
||||
/// draw an arc
|
||||
virtual void arc(
|
||||
int x, int y,
|
||||
unsigned int w, unsigned int h,
|
||||
int a1, int a2,
|
||||
LColor_color) = 0;
|
||||
Color_color) = 0;
|
||||
|
||||
/// draw a pixel
|
||||
virtual void point(
|
||||
int x, int y,
|
||||
LColor_color) = 0;
|
||||
Color_color) = 0;
|
||||
|
||||
/// draw a filled rectangle with the shape of a 3D button
|
||||
virtual void button(int x, int y,
|
||||
@ -158,8 +158,8 @@ public:
|
||||
void rectText(int x, int baseline,
|
||||
docstring const & str,
|
||||
LyXFont const & font,
|
||||
LColor_color back,
|
||||
LColor_color frame);
|
||||
Color_color back,
|
||||
Color_color frame);
|
||||
|
||||
/// draw a string and enclose it inside a button frame
|
||||
void buttonText(int x, int baseline, docstring const & s,
|
||||
|
@ -29,7 +29,7 @@
|
||||
#include "Cursor.h"
|
||||
#include "debug.h"
|
||||
#include "Language.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyXFont.h"
|
||||
#include "LyXRC.h"
|
||||
#include "Row.h"
|
||||
|
@ -572,7 +572,7 @@
|
||||
* ControlBranch.[Ch] (branchlist): new member function.
|
||||
|
||||
* ControlDocument.C (setBranchColor): removed.
|
||||
(apply): update LColor to accommodate the new BranchList colors.
|
||||
(apply): update Color to accommodate the new BranchList colors.
|
||||
|
||||
2003-12-14 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
@ -720,28 +720,28 @@
|
||||
* ControlCharacter.h:
|
||||
* ControlPrefs.C:
|
||||
* ControlPrefs.h:
|
||||
* character.h: rename EnumLColor as LColor_color.
|
||||
* character.h: rename EnumColor as Color_color.
|
||||
|
||||
2003-09-16 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* ControlCharacter.C: add #include "LColor.h".
|
||||
* ControlCharacter.C: add #include "Color.h".
|
||||
|
||||
2003-09-16 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* character.C: add #include "LColor.h".
|
||||
* character.C: add #include "Color.h".
|
||||
|
||||
2003-09-15 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* ControlCharacter.C (setColor, getColor):
|
||||
pass EnumLColor args, rather than LColor::color ones.
|
||||
pass EnumColor args, rather than Color::color ones.
|
||||
|
||||
* ControlPrefs.C: add #include "LColor.h".
|
||||
* ControlPrefs.h:remove #include "LColor.h".
|
||||
* ControlPrefs.C: add #include "Color.h".
|
||||
* ControlPrefs.h:remove #include "Color.h".
|
||||
|
||||
* ControlPrefs.[Ch] (setColor): pass EnumLColor arg, not than LColor::color one.
|
||||
* ControlPrefs.[Ch] (setColor): pass EnumColor arg, not than Color::color one.
|
||||
|
||||
* character.h:remove #include "LColor.h".
|
||||
typedef ColorPair as a std::pair<string, EnumLColor>.
|
||||
* character.h:remove #include "Color.h".
|
||||
typedef ColorPair as a std::pair<string, EnumColor>.
|
||||
|
||||
2003-09-15 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
@ -808,7 +808,7 @@
|
||||
and have a "display colour" to distinguish them on-screen.
|
||||
|
||||
ColorHandler was somewhat cleaned up.
|
||||
(1) make possible a dynamically growing LColor list by allowing
|
||||
(1) make possible a dynamically growing Color list by allowing
|
||||
the graphic context cache to grow along (vector);
|
||||
(2) eliminate an IMHO unnecessary step in colour allocation.
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "bufferview_funcs.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "Language.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
using lyx::bv_funcs::font2string;
|
||||
using std::string;
|
||||
@ -44,7 +44,7 @@ bool ControlCharacter::initialiseParams(string const &)
|
||||
getShape() != LyXFont::IGNORE_SHAPE ||
|
||||
getSize() != LyXFont::IGNORE_SIZE ||
|
||||
getBar() != IGNORE ||
|
||||
getColor() != LColor::ignore ||
|
||||
getColor() != Color::ignore ||
|
||||
font_->language() != ignore_language)
|
||||
dialog().bc().valid();
|
||||
|
||||
@ -178,29 +178,29 @@ void ControlCharacter::setBar(FONT_STATE val)
|
||||
}
|
||||
|
||||
|
||||
LColor_color ControlCharacter::getColor() const
|
||||
Color_color ControlCharacter::getColor() const
|
||||
{
|
||||
if (!font_.get())
|
||||
return LColor::ignore;
|
||||
return Color::ignore;
|
||||
|
||||
return font_->color();
|
||||
}
|
||||
|
||||
|
||||
void ControlCharacter::setColor(LColor_color val)
|
||||
void ControlCharacter::setColor(Color_color val)
|
||||
{
|
||||
switch (val) {
|
||||
case LColor::ignore:
|
||||
case LColor::none:
|
||||
case LColor::black:
|
||||
case LColor::white:
|
||||
case LColor::red:
|
||||
case LColor::green:
|
||||
case LColor::blue:
|
||||
case LColor::cyan:
|
||||
case LColor::magenta:
|
||||
case LColor::yellow:
|
||||
case LColor::inherit:
|
||||
case Color::ignore:
|
||||
case Color::none:
|
||||
case Color::black:
|
||||
case Color::white:
|
||||
case Color::red:
|
||||
case Color::green:
|
||||
case Color::blue:
|
||||
case Color::cyan:
|
||||
case Color::magenta:
|
||||
case Color::yellow:
|
||||
case Color::inherit:
|
||||
font_->setColor(val);
|
||||
break;
|
||||
default:
|
||||
|
@ -19,7 +19,7 @@
|
||||
|
||||
namespace lyx {
|
||||
|
||||
class LColor_color;
|
||||
class Color_color;
|
||||
|
||||
namespace frontend {
|
||||
|
||||
@ -49,7 +49,7 @@ public:
|
||||
///
|
||||
void setBar(FONT_STATE);
|
||||
///
|
||||
void setColor(LColor_color);
|
||||
void setColor(Color_color);
|
||||
///
|
||||
void setLanguage(std::string const &);
|
||||
///
|
||||
@ -66,7 +66,7 @@ public:
|
||||
///
|
||||
FONT_STATE getBar() const;
|
||||
///
|
||||
LColor_color getColor() const;
|
||||
Color_color getColor() const;
|
||||
///
|
||||
std::string getLanguage() const;
|
||||
///
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "gettext.h"
|
||||
#include "Language.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "OutputParams.h"
|
||||
#include "LyXTextClassList.h"
|
||||
#include "tex-strings.h"
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "gettext.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "paper.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include "support/FileFilterList.h"
|
||||
|
||||
@ -92,7 +92,7 @@ void ControlPrefs::dispatchParams()
|
||||
}
|
||||
|
||||
|
||||
void ControlPrefs::setColor(LColor_color col, string const & hex)
|
||||
void ControlPrefs::setColor(Color_color col, string const & hex)
|
||||
{
|
||||
colors_.push_back(lcolor.getLyXName(col) + ' ' + hex);
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
namespace lyx {
|
||||
|
||||
class LColor_color;
|
||||
class Color_color;
|
||||
|
||||
namespace frontend {
|
||||
|
||||
@ -66,7 +66,7 @@ public:
|
||||
docstring const & title) const;
|
||||
|
||||
/// set a color
|
||||
void setColor(LColor_color col, std::string const & hex);
|
||||
void setColor(Color_color col, std::string const & hex);
|
||||
|
||||
/// update the screen fonts after change
|
||||
void updateScreenFonts();
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <algorithm>
|
||||
#include <config.h>
|
||||
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include "frontends/FileDialog.h"
|
||||
#include "frontends/Alert.h"
|
||||
@ -1050,47 +1050,47 @@ vector<ColorPair> const getColorData()
|
||||
ColorPair pr;
|
||||
|
||||
pr.first = _("No change");
|
||||
pr.second = LColor::ignore;
|
||||
pr.second = Color::ignore;
|
||||
color[0] = pr;
|
||||
|
||||
pr.first = _("No color");
|
||||
pr.second = LColor::none;
|
||||
pr.second = Color::none;
|
||||
color[1] = pr;
|
||||
|
||||
pr.first = _("Black");
|
||||
pr.second = LColor::black;
|
||||
pr.second = Color::black;
|
||||
color[2] = pr;
|
||||
|
||||
pr.first = _("White");
|
||||
pr.second = LColor::white;
|
||||
pr.second = Color::white;
|
||||
color[3] = pr;
|
||||
|
||||
pr.first = _("Red");
|
||||
pr.second = LColor::red;
|
||||
pr.second = Color::red;
|
||||
color[4] = pr;
|
||||
|
||||
pr.first = _("Green");
|
||||
pr.second = LColor::green;
|
||||
pr.second = Color::green;
|
||||
color[5] = pr;
|
||||
|
||||
pr.first = _("Blue");
|
||||
pr.second = LColor::blue;
|
||||
pr.second = Color::blue;
|
||||
color[6] = pr;
|
||||
|
||||
pr.first = _("Cyan");
|
||||
pr.second = LColor::cyan;
|
||||
pr.second = Color::cyan;
|
||||
color[7] = pr;
|
||||
|
||||
pr.first = _("Magenta");
|
||||
pr.second = LColor::magenta;
|
||||
pr.second = Color::magenta;
|
||||
color[8] = pr;
|
||||
|
||||
pr.first = _("Yellow");
|
||||
pr.second = LColor::yellow;
|
||||
pr.second = Color::yellow;
|
||||
color[9] = pr;
|
||||
|
||||
pr.first = _("Reset");
|
||||
pr.second = LColor::inherit;
|
||||
pr.second = Color::inherit;
|
||||
color[10] = pr;
|
||||
|
||||
return color;
|
||||
|
@ -174,7 +174,7 @@ getAuthorYearStrings(std::string const & key,
|
||||
} // namespace lyx
|
||||
|
||||
|
||||
class LColor_color;
|
||||
class Color_color;
|
||||
|
||||
|
||||
/** Functions of use to the character GUI controller and view */
|
||||
@ -206,7 +206,7 @@ typedef std::pair<docstring, LyXFont::FONT_SIZE> SizePair;
|
||||
///
|
||||
typedef std::pair<docstring, FONT_STATE> BarPair;
|
||||
///
|
||||
typedef std::pair<docstring, LColor_color> ColorPair;
|
||||
typedef std::pair<docstring, Color_color> ColorPair;
|
||||
|
||||
///
|
||||
std::vector<FamilyPair> const getFamilyData();
|
||||
|
@ -759,7 +759,7 @@
|
||||
|
||||
2004-11-17 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* QPrefsDialog.h: include LColor.h to satisfy concept checks.
|
||||
* QPrefsDialog.h: include Color.h to satisfy concept checks.
|
||||
* lcolorcache.h: ditto
|
||||
|
||||
2004-11-15 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
@ -1034,7 +1034,7 @@
|
||||
2004-05-02 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* QLPainter.C (image): set the background colour to
|
||||
LColor::graphicsbg.
|
||||
Color::graphicsbg.
|
||||
|
||||
* QLImage.C (setPixmap_impl): remove commented out xforms code
|
||||
to set pixmap background colour.
|
||||
@ -1658,7 +1658,7 @@
|
||||
* QPrefsDialog.h:
|
||||
* lcolorcache.C:
|
||||
* lcolorcache.h:
|
||||
* lyx_gui.C: rename EnumLColor as LColor_color.
|
||||
* lyx_gui.C: rename EnumColor as Color_color.
|
||||
|
||||
2003-09-16 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
@ -1667,27 +1667,27 @@
|
||||
|
||||
2003-09-16 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* QCharacter.C, QPrefs.C, lyx_gui.C: add #include "LColor.h".
|
||||
* QCharacter.C, QPrefs.C, lyx_gui.C: add #include "Color.h".
|
||||
|
||||
2003-09-15 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* QLPainter.C: add #include "LColor.h".
|
||||
* QLPainter.C: add #include "Color.h".
|
||||
* QLPainter.[Ch] (setPen, point, line, lines, rectangle, fillPolygon, arc):
|
||||
pass EnumLColor args, rather than LColor::color ones.
|
||||
pass EnumColor args, rather than Color::color ones.
|
||||
|
||||
* QPrefsDialog.C: add #include "LColor.h".
|
||||
* QPrefsDialog.h: remove #include "LColor.h". Store a vector<EnumLColor> colors_;
|
||||
* QPrefsDialog.C: add #include "Color.h".
|
||||
* QPrefsDialog.h: remove #include "Color.h". Store a vector<EnumColor> colors_;
|
||||
|
||||
* QWorkArea.C: add #include "LColor.h".
|
||||
* QWorkArea.C: add #include "Color.h".
|
||||
|
||||
* lcolorcache.C: add #include "LColor.h".
|
||||
* lcolorcache.h: store a map<EnumLColor, QColor>.
|
||||
* lcolorcache.[Ch] (get):pass EnumLColor args, rather than LColor::color ones.
|
||||
* lcolorcache.C: add #include "Color.h".
|
||||
* lcolorcache.h: store a map<EnumColor, QColor>.
|
||||
* lcolorcache.[Ch] (get):pass EnumColor args, rather than Color::color ones.
|
||||
|
||||
* qscreen.C: add #include "LColor.h".
|
||||
* qscreen.C: add #include "Color.h".
|
||||
|
||||
* lyx_gui.C (hexname, update_color): pass EnumLColor args, rather
|
||||
than LColor::color ones.
|
||||
* lyx_gui.C (hexname, update_color): pass EnumColor args, rather
|
||||
than Color::color ones.
|
||||
|
||||
2003-09-15 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
@ -2129,7 +2129,7 @@
|
||||
|
||||
* Makefile.am:
|
||||
* lcolorcache.h:
|
||||
* lcolorcache.C: add LColor::color -> QColor cache
|
||||
* lcolorcache.C: add Color::color -> QColor cache
|
||||
|
||||
* QLPainter.C:
|
||||
* QPrefs.C:
|
||||
@ -3394,7 +3394,7 @@
|
||||
|
||||
2002-11-25 John Levon <levon@movementarian.org>
|
||||
|
||||
* qscreen.C: use LColor::cursor properly
|
||||
* qscreen.C: use Color::cursor properly
|
||||
|
||||
* QPrefs.C:
|
||||
* ui/QPrefKeyboardModule.ui:
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "color.h"
|
||||
#include "ColorCache.h"
|
||||
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
|
||||
namespace lyx {
|
||||
@ -24,7 +24,7 @@ const QColor grey80(0xcc, 0xcc, 0xcc);
|
||||
const QColor grey90(0xe5, 0xe5, 0xe5);
|
||||
const QColor none = Qt::black;
|
||||
|
||||
QColor const & ColorCache::get(LColor_color col) const
|
||||
QColor const & ColorCache::get(Color_color col) const
|
||||
{
|
||||
lcolor_map::const_iterator cit = colormap.find(col);
|
||||
if (cit != colormap.end())
|
||||
|
@ -12,7 +12,7 @@
|
||||
#ifndef COLORCACHE_H
|
||||
#define COLORCACHE_H
|
||||
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include <QColor>
|
||||
|
||||
@ -26,20 +26,20 @@ struct RGBColor;
|
||||
// FIXME: use a fixed-size array not a map ?
|
||||
|
||||
/**
|
||||
* Cache from LColor to QColor.
|
||||
* Cache from Color to QColor.
|
||||
*/
|
||||
class ColorCache {
|
||||
public:
|
||||
ColorCache() {}
|
||||
|
||||
/// get the given color
|
||||
QColor const & get(LColor_color color) const;
|
||||
QColor const & get(Color_color color) const;
|
||||
|
||||
/// clear all colors
|
||||
void clear();
|
||||
|
||||
private:
|
||||
typedef std::map<LColor_color, QColor> lcolor_map;
|
||||
typedef std::map<Color_color, QColor> lcolor_map;
|
||||
|
||||
mutable lcolor_map colormap;
|
||||
};
|
||||
|
@ -248,7 +248,7 @@ void GuiApplication::syncEvents()
|
||||
}
|
||||
|
||||
|
||||
bool GuiApplication::getRgbColor(LColor_color col,
|
||||
bool GuiApplication::getRgbColor(Color_color col,
|
||||
RGBColor & rgbcol)
|
||||
{
|
||||
QColor const & qcol = color_cache_.get(col);
|
||||
@ -265,13 +265,13 @@ bool GuiApplication::getRgbColor(LColor_color col,
|
||||
}
|
||||
|
||||
|
||||
string const GuiApplication::hexName(LColor_color col)
|
||||
string const GuiApplication::hexName(Color_color col)
|
||||
{
|
||||
return lyx::support::ltrim(fromqstr(color_cache_.get(col).name()), "#");
|
||||
}
|
||||
|
||||
|
||||
void GuiApplication::updateColor(LColor_color)
|
||||
void GuiApplication::updateColor(Color_color)
|
||||
{
|
||||
// FIXME: Bleh, can't we just clear them all at once ?
|
||||
color_cache_.clear();
|
||||
|
@ -63,9 +63,9 @@ public:
|
||||
virtual std::string const romanFontName();
|
||||
virtual std::string const sansFontName();
|
||||
virtual std::string const typewriterFontName();
|
||||
virtual bool getRgbColor(LColor_color col, RGBColor & rgbcol);
|
||||
virtual std::string const hexName(LColor_color col);
|
||||
virtual void updateColor(LColor_color col);
|
||||
virtual bool getRgbColor(Color_color col, RGBColor & rgbcol);
|
||||
virtual std::string const hexName(Color_color col);
|
||||
virtual void updateColor(Color_color col);
|
||||
virtual void registerSocketCallback(
|
||||
int fd, boost::function<void()> func);
|
||||
void unregisterSocketCallback(int fd);
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "rowpainter.h"
|
||||
#include "debug.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "version.h"
|
||||
#include "LyXRC.h"
|
||||
|
||||
@ -129,7 +129,7 @@ public:
|
||||
|
||||
void update(int x, int y, int h, CursorShape shape)
|
||||
{
|
||||
color_ = guiApp->colorCache().get(LColor::cursor);
|
||||
color_ = guiApp->colorCache().get(Color::cursor);
|
||||
rect_ = QRect(x, y, CursorWidth, h);
|
||||
shape_ = shape;
|
||||
}
|
||||
@ -458,7 +458,7 @@ void GuiWorkArea::update(int x, int y, int w, int h)
|
||||
void GuiWorkArea::doGreyOut(QLPainter & pain)
|
||||
{
|
||||
pain.fillRectangle(0, 0, width(), height(),
|
||||
LColor::bottomarea);
|
||||
Color::bottomarea);
|
||||
|
||||
//if (!lyxrc.show_banner)
|
||||
// return;
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "Qt2BC.h"
|
||||
#include "qt_helpers.h"
|
||||
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
|
||||
#include <QCloseEvent>
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
#include "Language.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include "support/unicode.h"
|
||||
|
||||
@ -38,7 +38,7 @@ QLPainter::QLPainter(QPaintDevice * device)
|
||||
: QPainter(device), Painter()
|
||||
{
|
||||
// new QPainter has default QPen:
|
||||
current_color_ = LColor::black;
|
||||
current_color_ = Color::black;
|
||||
current_ls_ = line_solid;
|
||||
current_lw_ = line_thin;
|
||||
}
|
||||
@ -51,7 +51,7 @@ QLPainter::~QLPainter()
|
||||
}
|
||||
|
||||
|
||||
void QLPainter::setQPainterPen(LColor_color col,
|
||||
void QLPainter::setQPainterPen(Color_color col,
|
||||
Painter::line_style ls, Painter::line_width lw)
|
||||
{
|
||||
if (col == current_color_ && ls == current_ls_ && lw == current_lw_)
|
||||
@ -79,7 +79,7 @@ void QLPainter::setQPainterPen(LColor_color col,
|
||||
}
|
||||
|
||||
|
||||
void QLPainter::point(int x, int y, LColor_color col)
|
||||
void QLPainter::point(int x, int y, Color_color col)
|
||||
{
|
||||
if (!isDrawingEnabled())
|
||||
return;
|
||||
@ -90,7 +90,7 @@ void QLPainter::point(int x, int y, LColor_color col)
|
||||
|
||||
|
||||
void QLPainter::line(int x1, int y1, int x2, int y2,
|
||||
LColor_color col,
|
||||
Color_color col,
|
||||
line_style ls,
|
||||
line_width lw)
|
||||
{
|
||||
@ -105,7 +105,7 @@ void QLPainter::line(int x1, int y1, int x2, int y2,
|
||||
|
||||
|
||||
void QLPainter::lines(int const * xp, int const * yp, int np,
|
||||
LColor_color col,
|
||||
Color_color col,
|
||||
line_style ls,
|
||||
line_width lw)
|
||||
{
|
||||
@ -133,7 +133,7 @@ void QLPainter::lines(int const * xp, int const * yp, int np,
|
||||
|
||||
|
||||
void QLPainter::rectangle(int x, int y, int w, int h,
|
||||
LColor_color col,
|
||||
Color_color col,
|
||||
line_style ls,
|
||||
line_width lw)
|
||||
{
|
||||
@ -145,14 +145,14 @@ void QLPainter::rectangle(int x, int y, int w, int h,
|
||||
}
|
||||
|
||||
|
||||
void QLPainter::fillRectangle(int x, int y, int w, int h, LColor_color col)
|
||||
void QLPainter::fillRectangle(int x, int y, int w, int h, Color_color col)
|
||||
{
|
||||
fillRect(x, y, w, h, guiApp->colorCache().get(col));
|
||||
}
|
||||
|
||||
|
||||
void QLPainter::arc(int x, int y, unsigned int w, unsigned int h,
|
||||
int a1, int a2, LColor_color col)
|
||||
int a1, int a2, Color_color col)
|
||||
{
|
||||
if (!isDrawingEnabled())
|
||||
return;
|
||||
@ -170,7 +170,7 @@ void QLPainter::image(int x, int y, int w, int h, graphics::Image const & i)
|
||||
graphics::QLImage const & qlimage =
|
||||
static_cast<graphics::QLImage const &>(i);
|
||||
|
||||
fillRectangle(x, y, w, h, LColor::graphicsbg);
|
||||
fillRectangle(x, y, w, h, Color::graphicsbg);
|
||||
|
||||
if (!isDrawingEnabled())
|
||||
return;
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include <QPainter>
|
||||
|
||||
@ -39,7 +39,7 @@ public:
|
||||
virtual void line(
|
||||
int x1, int y1,
|
||||
int x2, int y2,
|
||||
LColor_color,
|
||||
Color_color,
|
||||
line_style = line_solid,
|
||||
line_width = line_thin);
|
||||
|
||||
@ -53,7 +53,7 @@ public:
|
||||
int const * xp,
|
||||
int const * yp,
|
||||
int np,
|
||||
LColor_color,
|
||||
Color_color,
|
||||
line_style = line_solid,
|
||||
line_width = line_thin);
|
||||
|
||||
@ -61,7 +61,7 @@ public:
|
||||
virtual void rectangle(
|
||||
int x, int y,
|
||||
int w, int h,
|
||||
LColor_color,
|
||||
Color_color,
|
||||
line_style = line_solid,
|
||||
line_width = line_thin);
|
||||
|
||||
@ -69,19 +69,19 @@ public:
|
||||
virtual void fillRectangle(
|
||||
int x, int y,
|
||||
int w, int h,
|
||||
LColor_color);
|
||||
Color_color);
|
||||
|
||||
/// draw an arc
|
||||
virtual void arc(
|
||||
int x, int y,
|
||||
unsigned int w, unsigned int h,
|
||||
int a1, int a2,
|
||||
LColor_color);
|
||||
Color_color);
|
||||
|
||||
/// draw a pixel
|
||||
virtual void point(
|
||||
int x, int y,
|
||||
LColor_color);
|
||||
Color_color);
|
||||
|
||||
/// draw an image from the image cache
|
||||
virtual void image(int x, int y,
|
||||
@ -104,11 +104,11 @@ private:
|
||||
QString const & str, LyXFont const & f);
|
||||
|
||||
/// set pen parameters
|
||||
void setQPainterPen(LColor_color col,
|
||||
void setQPainterPen(Color_color col,
|
||||
line_style ls = line_solid,
|
||||
line_width lw = line_thin);
|
||||
|
||||
LColor::color current_color_;
|
||||
Color::color current_color_;
|
||||
Painter::line_style current_ls_;
|
||||
Painter::line_width current_lw_;
|
||||
};
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#include "Session.h"
|
||||
#include "debug.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyXFont.h"
|
||||
#include "PanelStack.h"
|
||||
#include "QFontExample.h"
|
||||
@ -517,19 +517,19 @@ PrefColors::PrefColors(QPrefs * form, QWidget * parent)
|
||||
// FIXME: all of this initialization should be put into the controller.
|
||||
// See http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg113301.html
|
||||
// for some discussion of why that is not trivial.
|
||||
for (int i = 0; i < LColor::ignore; ++i) {
|
||||
LColor::color lc = static_cast<LColor::color>(i);
|
||||
if (lc == LColor::none
|
||||
|| lc == LColor::black
|
||||
|| lc == LColor::white
|
||||
|| lc == LColor::red
|
||||
|| lc == LColor::green
|
||||
|| lc == LColor::blue
|
||||
|| lc == LColor::cyan
|
||||
|| lc == LColor::magenta
|
||||
|| lc == LColor::yellow
|
||||
|| lc == LColor::inherit
|
||||
|| lc == LColor::ignore) continue;
|
||||
for (int i = 0; i < Color::ignore; ++i) {
|
||||
Color::color lc = static_cast<Color::color>(i);
|
||||
if (lc == Color::none
|
||||
|| lc == Color::black
|
||||
|| lc == Color::white
|
||||
|| lc == Color::red
|
||||
|| lc == Color::green
|
||||
|| lc == Color::blue
|
||||
|| lc == Color::cyan
|
||||
|| lc == Color::magenta
|
||||
|| lc == Color::yellow
|
||||
|| lc == Color::inherit
|
||||
|| lc == Color::ignore) continue;
|
||||
|
||||
lcolors_.push_back(lc);
|
||||
QColor color = QColor(guiApp->colorCache().get(lc));
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "QDialogView.h"
|
||||
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyXRC.h"
|
||||
|
||||
#include "ui/PrefsUi.h"
|
||||
@ -158,7 +158,7 @@ private Q_SLOTS:
|
||||
void change_color();
|
||||
|
||||
private:
|
||||
std::vector<LColor_color> lcolors_;
|
||||
std::vector<Color_color> lcolors_;
|
||||
// FIXME the use of mutable here is required due to the
|
||||
// fact that initialization is not done in the controller
|
||||
// but in the constructor.
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "debug.h"
|
||||
#include "Format.h"
|
||||
#include "InsetIterator.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyXRC.h"
|
||||
#include "OutputParams.h"
|
||||
#include "Paragraph.h"
|
||||
@ -592,8 +592,8 @@ void PreviewLoader::Impl::startLoading()
|
||||
cs << pconverter_->command << ' ' << pconverter_->to << ' '
|
||||
<< support::quoteName(latexfile.toFilesystemEncoding()) << ' '
|
||||
<< int(font_scaling_factor_) << ' '
|
||||
<< theApp()->hexName(LColor::preview) << ' '
|
||||
<< theApp()->hexName(LColor::background);
|
||||
<< theApp()->hexName(Color::preview) << ' '
|
||||
<< theApp()->hexName(Color::background);
|
||||
|
||||
string const command = support::libScriptSearch(cs.str());
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "Buffer.h"
|
||||
#include "CoordCache.h"
|
||||
#include "BufferView.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Cursor.h"
|
||||
#include "debug.h"
|
||||
#include "Dimension.h"
|
||||
@ -109,7 +109,7 @@ static TranslatorMap const build_translator()
|
||||
|
||||
|
||||
/// pretty arbitrary dimensions
|
||||
InsetBase::InsetBase(): dim_(10, 10, 10), background_color_(LColor::background)
|
||||
InsetBase::InsetBase(): dim_(10, 10, 10), background_color_(Color::background)
|
||||
{}
|
||||
|
||||
|
||||
@ -286,8 +286,8 @@ void InsetBase::metricsMarkers2(Dimension & dim, int framesize) const
|
||||
|
||||
void InsetBase::drawMarkers(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
LColor::color pen_color = editing(pi.base.bv)?
|
||||
LColor::mathframe : LColor::background;
|
||||
Color::color pen_color = editing(pi.base.bv)?
|
||||
Color::mathframe : Color::background;
|
||||
|
||||
int const t = x + width() - 1;
|
||||
int const d = y + descent();
|
||||
@ -301,8 +301,8 @@ void InsetBase::drawMarkers(PainterInfo & pi, int x, int y) const
|
||||
|
||||
void InsetBase::drawMarkers2(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
LColor::color pen_color = editing(pi.base.bv)?
|
||||
LColor::mathframe : LColor::background;
|
||||
Color::color pen_color = editing(pi.base.bv)?
|
||||
Color::mathframe : Color::background;
|
||||
|
||||
drawMarkers(pi, x, y);
|
||||
int const t = x + width() - 1;
|
||||
@ -355,15 +355,15 @@ void InsetBase::dump() const
|
||||
}
|
||||
|
||||
|
||||
void InsetBase::setBackgroundColor(LColor_color color)
|
||||
void InsetBase::setBackgroundColor(Color_color color)
|
||||
{
|
||||
background_color_ = color;
|
||||
}
|
||||
|
||||
|
||||
LColor_color InsetBase::backgroundColor() const
|
||||
Color_color InsetBase::backgroundColor() const
|
||||
{
|
||||
return LColor::color(background_color_);
|
||||
return Color::color(background_color_);
|
||||
}
|
||||
|
||||
|
||||
|
@ -31,7 +31,7 @@ class FuncStatus;
|
||||
class InsetMath;
|
||||
class InsetText;
|
||||
class LaTeXFeatures;
|
||||
class LColor_color;
|
||||
class Color_color;
|
||||
class Cursor;
|
||||
class Lexer;
|
||||
class LyXText;
|
||||
@ -446,9 +446,9 @@ public:
|
||||
///
|
||||
int scroll() const { return 0; }
|
||||
///
|
||||
void setBackgroundColor(LColor_color);
|
||||
void setBackgroundColor(Color_color);
|
||||
///
|
||||
LColor_color backgroundColor() const;
|
||||
Color_color backgroundColor() const;
|
||||
///
|
||||
enum CollapseStatus {
|
||||
Collapsed,
|
||||
@ -477,7 +477,7 @@ protected:
|
||||
mutable Dimension dim_;
|
||||
private:
|
||||
virtual std::auto_ptr<InsetBase> doClone() const = 0;
|
||||
/** We store the LColor::color value as an int to get LColor.h out
|
||||
/** We store the Color::color value as an int to get Color.h out
|
||||
* of the header file.
|
||||
*/
|
||||
int background_color_;
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "FuncRequest.h"
|
||||
#include "gettext.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "Paragraph.h"
|
||||
@ -164,8 +164,8 @@ void InsetBox::setButtonLabel()
|
||||
|
||||
setLabel(label);
|
||||
|
||||
font.setColor(LColor::foreground);
|
||||
setBackgroundColor(LColor::background);
|
||||
font.setColor(Color::foreground);
|
||||
setBackgroundColor(Color::background);
|
||||
setLabelFont(font);
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include "FuncRequest.h"
|
||||
#include "FuncStatus.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "Paragraph.h"
|
||||
#include "OutputParams.h"
|
||||
@ -99,17 +99,17 @@ void InsetBranch::setButtonLabel()
|
||||
font.decSize();
|
||||
|
||||
docstring s = _("Branch: ") + params_.branch;
|
||||
font.setColor(LColor::foreground);
|
||||
font.setColor(Color::foreground);
|
||||
if (!params_.branch.empty()) {
|
||||
// FIXME UNICODE
|
||||
LColor_color c = lcolor.getFromLyXName(to_utf8(params_.branch));
|
||||
if (c == LColor::none) {
|
||||
c = LColor::error;
|
||||
Color_color c = lcolor.getFromLyXName(to_utf8(params_.branch));
|
||||
if (c == Color::none) {
|
||||
c = Color::error;
|
||||
s = _("Undef: ") + s;
|
||||
}
|
||||
setBackgroundColor(c);
|
||||
} else
|
||||
setBackgroundColor(LColor::background);
|
||||
setBackgroundColor(Color::background);
|
||||
setLabel(isOpen() ? s : getNewLabel(s) );
|
||||
setLabelFont(font);
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "FuncRequest.h"
|
||||
#include "FuncStatus.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "output_latex.h"
|
||||
#include "OutputParams.h"
|
||||
@ -56,7 +56,7 @@ InsetCaption::InsetCaption(BufferParams const & bp)
|
||||
{
|
||||
setAutoBreakRows(true);
|
||||
setDrawFrame(true);
|
||||
setFrameColor(LColor::captionframe);
|
||||
setFrameColor(Color::captionframe);
|
||||
}
|
||||
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "Cursor.h"
|
||||
#include "gettext.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXText.h"
|
||||
#include "MetricsInfo.h"
|
||||
@ -102,7 +102,7 @@ void InsetCharStyle::setUndefined()
|
||||
params_.latexparam.clear();
|
||||
params_.font = LyXFont(LyXFont::ALL_INHERIT);
|
||||
params_.labelfont = LyXFont(LyXFont::ALL_INHERIT);
|
||||
params_.labelfont.setColor(LColor::error);
|
||||
params_.labelfont.setColor(Color::error);
|
||||
params_.show_label = true;
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ void InsetCharStyle::draw(PainterInfo & pi, int x, int y) const
|
||||
s = _("Undef: ") + s;
|
||||
theFontMetrics(font).rectText(s, w, a, d);
|
||||
pi.pain.rectText(x + (dim_.wid - w) / 2, y + desc + a,
|
||||
s, font, LColor::none, LColor::none);
|
||||
s, font, Color::none, Color::none);
|
||||
}
|
||||
|
||||
// a visual clue when the cursor is inside the inset
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "FloatList.h"
|
||||
#include "FuncStatus.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "MetricsInfo.h"
|
||||
@ -57,7 +57,7 @@ InsetCollapsable::InsetCollapsable
|
||||
{
|
||||
setAutoBreakRows(true);
|
||||
setDrawFrame(true);
|
||||
setFrameColor(LColor::collapsableframe);
|
||||
setFrameColor(Color::collapsableframe);
|
||||
setInsetName(from_ascii("Collapsable"));
|
||||
setButtonLabel();
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "FuncStatus.h"
|
||||
#include "gettext.h"
|
||||
#include "Language.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyXAction.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXTextClass.h"
|
||||
@ -57,7 +57,7 @@ void InsetERT::init()
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.decSize();
|
||||
font.decSize();
|
||||
font.setColor(LColor::latex);
|
||||
font.setColor(Color::latex);
|
||||
setLabelFont(font);
|
||||
text_.current_font.setLanguage(latex_language);
|
||||
text_.real_current_font.setLanguage(latex_language);
|
||||
@ -431,7 +431,7 @@ void InsetERT::getDrawFont(LyXFont & font) const
|
||||
{
|
||||
font = LyXFont(LyXFont::ALL_INHERIT, latex_language);
|
||||
font.setFamily(LyXFont::TYPEWRITER_FAMILY);
|
||||
font.setColor(LColor::latex);
|
||||
font.setColor(Color::latex);
|
||||
}
|
||||
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "FuncStatus.h"
|
||||
#include "gettext.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "OutputParams.h"
|
||||
#include "Paragraph.h"
|
||||
@ -122,7 +122,7 @@ InsetFloat::InsetFloat(BufferParams const & bp, string const & type)
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.decSize();
|
||||
font.decSize();
|
||||
font.setColor(LColor::collapsable);
|
||||
font.setColor(Color::collapsable);
|
||||
setLabelFont(font);
|
||||
params_.type = type;
|
||||
setInsetName(from_utf8(type));
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "Buffer.h"
|
||||
#include "BufferView.h"
|
||||
#include "BufferParams.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "Paragraph.h"
|
||||
|
||||
@ -28,7 +28,7 @@ InsetFootlike::InsetFootlike(BufferParams const & bp)
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.decSize();
|
||||
font.decSize();
|
||||
font.setColor(LColor::collapsable);
|
||||
font.setColor(Color::collapsable);
|
||||
setLabelFont(font);
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ InsetFootlike::InsetFootlike(InsetFootlike const & in)
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.decSize();
|
||||
font.decSize();
|
||||
font.setColor(LColor::collapsable);
|
||||
font.setColor(Color::collapsable);
|
||||
setLabelFont(font);
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "InsetLine.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyXText.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
@ -55,7 +55,7 @@ bool InsetLine::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
|
||||
void InsetLine::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
pi.pain.line(x, y, x + dim_.wid, y, LColor::topline, Painter::line_solid,
|
||||
pi.pain.line(x, y, x + dim_.wid, y, Color::topline, Painter::line_solid,
|
||||
Painter::line_thick);
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "InsetNewline.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyXText.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "OutputParams.h"
|
||||
@ -101,7 +101,7 @@ void InsetNewline::draw(PainterInfo & pi, int x, int y) const
|
||||
xp[2] = int(x + wid * 0.625);
|
||||
}
|
||||
|
||||
pi.pain.lines(xp, yp, 3, LColor::eolmarker);
|
||||
pi.pain.lines(xp, yp, 3, Color::eolmarker);
|
||||
|
||||
yp[0] = int(y - 0.500 * asc * 0.75);
|
||||
yp[1] = int(y - 0.500 * asc * 0.75);
|
||||
@ -117,7 +117,7 @@ void InsetNewline::draw(PainterInfo & pi, int x, int y) const
|
||||
xp[2] = int(x);
|
||||
}
|
||||
|
||||
pi.pain.lines(xp, yp, 3, LColor::eolmarker);
|
||||
pi.pain.lines(xp, yp, 3, Color::eolmarker);
|
||||
}
|
||||
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "FuncStatus.h"
|
||||
#include "gettext.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "OutputParams.h"
|
||||
@ -176,24 +176,24 @@ void InsetNote::setButtonLabel()
|
||||
|
||||
switch (params_.type) {
|
||||
case InsetNoteParams::Note:
|
||||
font.setColor(LColor::note);
|
||||
setBackgroundColor(LColor::notebg);
|
||||
font.setColor(Color::note);
|
||||
setBackgroundColor(Color::notebg);
|
||||
break;
|
||||
case InsetNoteParams::Comment:
|
||||
font.setColor(LColor::comment);
|
||||
setBackgroundColor(LColor::commentbg);
|
||||
font.setColor(Color::comment);
|
||||
setBackgroundColor(Color::commentbg);
|
||||
break;
|
||||
case InsetNoteParams::Greyedout:
|
||||
font.setColor(LColor::greyedout);
|
||||
setBackgroundColor(LColor::greyedoutbg);
|
||||
font.setColor(Color::greyedout);
|
||||
setBackgroundColor(Color::greyedoutbg);
|
||||
break;
|
||||
case InsetNoteParams::Framed:
|
||||
font.setColor(LColor::greyedout);
|
||||
setBackgroundColor(LColor::greyedoutbg);
|
||||
font.setColor(Color::greyedout);
|
||||
setBackgroundColor(Color::greyedoutbg);
|
||||
break;
|
||||
case InsetNoteParams::Shaded:
|
||||
font.setColor(LColor::greyedout);
|
||||
setBackgroundColor(LColor::shadedbg);
|
||||
font.setColor(Color::greyedout);
|
||||
setBackgroundColor(Color::shadedbg);
|
||||
break;
|
||||
}
|
||||
setLabelFont(font);
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Paragraph.h"
|
||||
|
||||
#include <sstream>
|
||||
@ -32,7 +32,7 @@ InsetOptArg::InsetOptArg(BufferParams const & ins)
|
||||
: InsetCollapsable(ins)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.setColor(LColor::collapsable);
|
||||
font.setColor(Color::collapsable);
|
||||
setLabelFont(font);
|
||||
setLabel(_("opt"));
|
||||
}
|
||||
@ -42,7 +42,7 @@ InsetOptArg::InsetOptArg(InsetOptArg const & in)
|
||||
: InsetCollapsable(in)
|
||||
{
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.setColor(LColor::collapsable);
|
||||
font.setColor(Color::collapsable);
|
||||
setLabelFont(font);
|
||||
setLabel(_("opt"));
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyXText.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "OutputParams.h"
|
||||
@ -58,7 +58,7 @@ bool InsetPagebreak::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
void InsetPagebreak::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
LyXFont font;
|
||||
font.setColor(LColor::pagebreak);
|
||||
font.setColor(Color::pagebreak);
|
||||
font.decSize();
|
||||
|
||||
int w = 0;
|
||||
@ -70,12 +70,12 @@ void InsetPagebreak::draw(PainterInfo & pi, int x, int y) const
|
||||
int const text_end = text_start + w;
|
||||
|
||||
pi.pain.rectText(text_start, y + d, insetLabel(), font,
|
||||
LColor::none, LColor::none);
|
||||
Color::none, Color::none);
|
||||
|
||||
pi.pain.line(x, y, text_start, y,
|
||||
LColor::pagebreak, Painter::line_onoffdash);
|
||||
Color::pagebreak, Painter::line_onoffdash);
|
||||
pi.pain.line(text_end, y, int(x + dim_.wid), y,
|
||||
LColor::pagebreak, Painter::line_onoffdash);
|
||||
Color::pagebreak, Painter::line_onoffdash);
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "InsetSpace.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
#include "OutputParams.h"
|
||||
@ -101,9 +101,9 @@ void InsetSpace::draw(PainterInfo & pi, int x, int y) const
|
||||
yp[3] = y - max(h / 4, 1);
|
||||
|
||||
if (kind_ == PROTECTED || kind_ == ENSPACE || kind_ == NEGTHIN)
|
||||
pi.pain.lines(xp, yp, 4, LColor::latex);
|
||||
pi.pain.lines(xp, yp, 4, Color::latex);
|
||||
else
|
||||
pi.pain.lines(xp, yp, 4, LColor::special);
|
||||
pi.pain.lines(xp, yp, 4, Color::special);
|
||||
}
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include "debug.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
|
||||
@ -74,25 +74,25 @@ void InsetSpecialChar::draw(PainterInfo & pi, int x, int y) const
|
||||
switch (kind_) {
|
||||
case HYPHENATION:
|
||||
{
|
||||
font.setColor(LColor::special);
|
||||
font.setColor(Color::special);
|
||||
pi.pain.text(x, y, char_type('-'), font);
|
||||
break;
|
||||
}
|
||||
case LIGATURE_BREAK:
|
||||
{
|
||||
font.setColor(LColor::special);
|
||||
font.setColor(Color::special);
|
||||
pi.pain.text(x, y, char_type('|'), font);
|
||||
break;
|
||||
}
|
||||
case END_OF_SENTENCE:
|
||||
{
|
||||
font.setColor(LColor::special);
|
||||
font.setColor(Color::special);
|
||||
pi.pain.text(x, y, char_type('.'), font);
|
||||
break;
|
||||
}
|
||||
case LDOTS:
|
||||
{
|
||||
font.setColor(LColor::special);
|
||||
font.setColor(Color::special);
|
||||
string ell = ". . . ";
|
||||
docstring dell(ell.begin(), ell.end());
|
||||
pi.pain.text(x, y, dell, font);
|
||||
@ -114,7 +114,7 @@ void InsetSpecialChar::draw(PainterInfo & pi, int x, int y) const
|
||||
xp[2] = ox + w; yp[2] = y - h/2;
|
||||
xp[3] = ox; yp[3] = y;
|
||||
|
||||
pi.pain.lines(xp, yp, 4, LColor::special);
|
||||
pi.pain.lines(xp, yp, 4, Color::special);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "gettext.h"
|
||||
#include "Language.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "lyx_cb.h"
|
||||
#include "Lexer.h"
|
||||
#include "MetricsInfo.h"
|
||||
@ -3096,7 +3096,7 @@ void InsetTabular::drawSelection(PainterInfo & pi, int x, int y) const
|
||||
int const w = tabular.getWidthOfColumn(cell);
|
||||
if (i >= cs && i <= ce && j >= rs && j <= re)
|
||||
pi.pain.fillRectangle(xx, y, w, h,
|
||||
LColor::selection);
|
||||
Color::selection);
|
||||
xx += w;
|
||||
}
|
||||
y += h;
|
||||
@ -3113,12 +3113,12 @@ void InsetTabular::drawCellLines(Painter & pain, int x, int y,
|
||||
{
|
||||
int x2 = x + tabular.getWidthOfColumn(cell);
|
||||
bool on_off = false;
|
||||
LColor::color col = LColor::tabularline;
|
||||
LColor::color onoffcol = LColor::tabularonoffline;
|
||||
Color::color col = Color::tabularline;
|
||||
Color::color onoffcol = Color::tabularonoffline;
|
||||
|
||||
if (erased) {
|
||||
col = LColor::strikeout;
|
||||
onoffcol = LColor::strikeout;
|
||||
col = Color::strikeout;
|
||||
onoffcol = Color::strikeout;
|
||||
}
|
||||
|
||||
if (!tabular.topAlreadyDrawn(cell)) {
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "FuncRequest.h"
|
||||
#include "gettext.h"
|
||||
#include "Intl.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "lyxfind.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXRC.h"
|
||||
@ -77,7 +77,7 @@ int InsetText::border_ = 2;
|
||||
|
||||
|
||||
InsetText::InsetText(BufferParams const & bp)
|
||||
: drawFrame_(false), frame_color_(LColor::insetframe)
|
||||
: drawFrame_(false), frame_color_(Color::insetframe)
|
||||
{
|
||||
paragraphs().push_back(Paragraph());
|
||||
paragraphs().back().layout(bp.getLyXTextClass().defaultLayout());
|
||||
@ -393,13 +393,13 @@ void InsetText::setDrawFrame(bool flag)
|
||||
}
|
||||
|
||||
|
||||
LColor_color InsetText::frameColor() const
|
||||
Color_color InsetText::frameColor() const
|
||||
{
|
||||
return LColor::color(frame_color_);
|
||||
return Color::color(frame_color_);
|
||||
}
|
||||
|
||||
|
||||
void InsetText::setFrameColor(LColor_color col)
|
||||
void InsetText::setFrameColor(Color_color col)
|
||||
{
|
||||
frame_color_ = col;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@ class BufferParams;
|
||||
class BufferView;
|
||||
class CursorSlice;
|
||||
class Dimension;
|
||||
class LColor_color;
|
||||
class Color_color;
|
||||
class ParagraphList;
|
||||
|
||||
|
||||
@ -89,9 +89,9 @@ public:
|
||||
///
|
||||
void setDrawFrame(bool);
|
||||
///
|
||||
LColor_color frameColor() const;
|
||||
Color_color frameColor() const;
|
||||
///
|
||||
void setFrameColor(LColor_color);
|
||||
void setFrameColor(Color_color);
|
||||
///
|
||||
bool showInsetDialog(BufferView *) const;
|
||||
///
|
||||
@ -150,7 +150,7 @@ private:
|
||||
|
||||
///
|
||||
bool drawFrame_;
|
||||
/** We store the LColor::color value as an int to get LColor.h out
|
||||
/** We store the Color::color value as an int to get Color.h out
|
||||
* of the header file.
|
||||
*/
|
||||
int frame_color_;
|
||||
|
@ -42,7 +42,7 @@ InsetTheorem::InsetTheorem()
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.decSize();
|
||||
font.decSize();
|
||||
font.setColor(LColor::collapsable);
|
||||
font.setColor(Color::collapsable);
|
||||
setLabelFont(font);
|
||||
#if 0
|
||||
setAutoCollapse(false);
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "DispatchResult.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXText.h"
|
||||
#include "MetricsInfo.h"
|
||||
@ -179,7 +179,7 @@ void InsetVSpace::draw(PainterInfo & pi, int x, int y) const
|
||||
int d = 0;
|
||||
|
||||
LyXFont font;
|
||||
font.setColor(LColor::added_space);
|
||||
font.setColor(Color::added_space);
|
||||
font.decSize();
|
||||
font.decSize();
|
||||
docstring const lab = label();
|
||||
@ -187,18 +187,18 @@ void InsetVSpace::draw(PainterInfo & pi, int x, int y) const
|
||||
|
||||
pi.pain.rectText(x + 2 * arrow_size + 5,
|
||||
start + (end - start) / 2 + (a - d) / 2,
|
||||
lab, font, LColor::none, LColor::none);
|
||||
lab, font, Color::none, Color::none);
|
||||
|
||||
// top arrow
|
||||
pi.pain.line(x, ty1, midx, ty2, LColor::added_space);
|
||||
pi.pain.line(midx, ty2, rightx, ty1, LColor::added_space);
|
||||
pi.pain.line(x, ty1, midx, ty2, Color::added_space);
|
||||
pi.pain.line(midx, ty2, rightx, ty1, Color::added_space);
|
||||
|
||||
// bottom arrow
|
||||
pi.pain.line(x, by1, midx, by2, LColor::added_space);
|
||||
pi.pain.line(midx, by2, rightx, by1, LColor::added_space);
|
||||
pi.pain.line(x, by1, midx, by2, Color::added_space);
|
||||
pi.pain.line(midx, by2, rightx, by1, Color::added_space);
|
||||
|
||||
// joining line
|
||||
pi.pain.line(midx, ty2, midx, by2, LColor::added_space);
|
||||
pi.pain.line(midx, ty2, midx, by2, Color::added_space);
|
||||
}
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
||||
#include "FuncStatus.h"
|
||||
#include "gettext.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "OutputParams.h"
|
||||
#include "Paragraph.h"
|
||||
@ -50,7 +50,7 @@ InsetWrap::InsetWrap(BufferParams const & bp, string const & type)
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.decSize();
|
||||
font.decSize();
|
||||
font.setColor(LColor::collapsable);
|
||||
font.setColor(Color::collapsable);
|
||||
setLabelFont(font);
|
||||
params_.type = type;
|
||||
params_.width = LyXLength(50, LyXLength::PCW);
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include "RenderButton.h"
|
||||
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "MetricsInfo.h"
|
||||
|
||||
#include "frontends/FontMetrics.h"
|
||||
@ -67,14 +67,14 @@ void RenderButton::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
// Draw it as a box with the LaTeX text
|
||||
LyXFont font(LyXFont::ALL_SANE);
|
||||
font.setColor(LColor::command);
|
||||
font.setColor(Color::command);
|
||||
font.decSize();
|
||||
|
||||
if (editable_) {
|
||||
pi.pain.buttonText(x + 2, y, text_, font, renderState());
|
||||
} else {
|
||||
pi.pain.rectText(x + 2, y, text_, font,
|
||||
LColor::commandbg, LColor::commandframe);
|
||||
Color::commandbg, Color::commandframe);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "insets/Inset.h"
|
||||
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyX.h"
|
||||
#include "LyXRC.h"
|
||||
#include "MetricsInfo.h"
|
||||
@ -205,7 +205,7 @@ void RenderGraphic::draw(PainterInfo & pi, int x, int y) const
|
||||
y - dim_.asc,
|
||||
dim_.wid - 2 * InsetOld::TEXT_TO_INSET_OFFSET,
|
||||
dim_.asc + dim_.des,
|
||||
LColor::foreground);
|
||||
Color::foreground);
|
||||
|
||||
// Print the file name.
|
||||
LyXFont msgFont = pi.base.font;
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "BufferView.h"
|
||||
#include "Dimension.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyX.h"
|
||||
#include "LyXRC.h"
|
||||
#include "MetricsInfo.h"
|
||||
@ -160,7 +160,7 @@ void RenderPreview::draw(PainterInfo & pi, int x, int y) const
|
||||
y - dim_.asc,
|
||||
dim_.wid - 2 * offset,
|
||||
dim_.asc + dim_.des,
|
||||
LColor::foreground);
|
||||
Color::foreground);
|
||||
|
||||
LyXFont font(pi.base.font);
|
||||
font.setFamily(LyXFont::SANS_FAMILY);
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "Cursor.h"
|
||||
#include "debug.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Lexer.h"
|
||||
#include "OutputParams.h"
|
||||
|
||||
@ -145,7 +145,7 @@ void InsetFormulaMacro::draw(PainterInfo & p, int x, int y) const
|
||||
{
|
||||
// label
|
||||
LyXFont font = p.base.font;
|
||||
font.setColor(LColor::math);
|
||||
font.setColor(Color::math);
|
||||
|
||||
PainterInfo pi(p.base.bv, p.pain);
|
||||
pi.base.style = LM_ST_TEXT;
|
||||
@ -155,9 +155,9 @@ void InsetFormulaMacro::draw(PainterInfo & p, int x, int y) const
|
||||
int const w = dim_.wid - 2;
|
||||
int const h = dim_.height() - 2;
|
||||
|
||||
// LColor::mathbg used to be "AntiqueWhite" but is "linen" now, too
|
||||
pi.pain.fillRectangle(x, a, w, h, LColor::mathmacrobg);
|
||||
pi.pain.rectangle(x, a, w, h, LColor::mathframe);
|
||||
// Color::mathbg used to be "AntiqueWhite" but is "linen" now, too
|
||||
pi.pain.fillRectangle(x, a, w, h, Color::mathmacrobg);
|
||||
pi.pain.rectangle(x, a, w, h, Color::mathframe);
|
||||
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning FIXME
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "MathData.h"
|
||||
#include "MathStream.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include "support/std_ostream.h"
|
||||
#include "frontends/Painter.h"
|
||||
@ -50,7 +50,7 @@ bool InsetMathBoxed::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
void InsetMathBoxed::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
pi.pain.rectangle(x + 1, y - dim_.ascent() + 1,
|
||||
dim_.width() - 2, dim_.height() - 2, LColor::foreground);
|
||||
dim_.width() - 2, dim_.height() - 2, Color::foreground);
|
||||
cell(0).draw(pi, x + 3, y);
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "MathData.h"
|
||||
#include "MathStream.h"
|
||||
#include "MathSupport.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include "frontends/FontMetrics.h"
|
||||
#include "frontends/Painter.h"
|
||||
@ -63,7 +63,7 @@ bool InsetMathBrace::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
void InsetMathBrace::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
LyXFont font = pi.base.font;
|
||||
font.setColor(LColor::latex);
|
||||
font.setColor(Color::latex);
|
||||
Dimension t = theFontMetrics(font).dimension('{');
|
||||
pi.pain.text(x, y, '{', font);
|
||||
cell(0).draw(pi, x + t.wid, y);
|
||||
|
@ -24,7 +24,7 @@ namespace lyx {
|
||||
using std::auto_ptr;
|
||||
using std::string;
|
||||
|
||||
InsetMathColor::InsetMathColor(bool oldstyle, LColor_color const & color)
|
||||
InsetMathColor::InsetMathColor(bool oldstyle, Color_color const & color)
|
||||
: InsetMathNest(1), oldstyle_(oldstyle),
|
||||
color_(from_utf8(lcolor.getLaTeXName(color)))
|
||||
{}
|
||||
@ -54,7 +54,7 @@ bool InsetMathColor::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
|
||||
void InsetMathColor::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
LColor_color origcol = pi.base.font.color();
|
||||
Color_color origcol = pi.base.font.color();
|
||||
pi.base.font.setColor(lcolor.getFromLaTeXName(to_utf8(color_)));
|
||||
cell(0).draw(pi, x + 1, y);
|
||||
pi.base.font.setColor(origcol);
|
||||
|
@ -12,7 +12,7 @@
|
||||
#ifndef MATH_COLORINSET_H
|
||||
#define MATH_COLORINSET_H
|
||||
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include "InsetMathNest.h"
|
||||
|
||||
@ -25,7 +25,7 @@ class InsetMathColor : public InsetMathNest {
|
||||
public:
|
||||
/// Create a color inset from LyX color number
|
||||
explicit InsetMathColor(bool oldstyle,
|
||||
LColor_color const & color = LColor::none);
|
||||
Color_color const & color = Color::none);
|
||||
/// Create a color inset from LaTeX color name
|
||||
explicit InsetMathColor(bool oldstyle, docstring const & color);
|
||||
///
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "MathData.h"
|
||||
#include "MathStream.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ void InsetMathDFrac::draw(PainterInfo & pi, int x, int y) const
|
||||
int m = x + dim_.wid / 2;
|
||||
cell(0).draw(pi, m - cell(0).width() / 2, y - cell(0).descent() - 2 - 5);
|
||||
cell(1).draw(pi, m - cell(1).width() / 2, y + cell(1).ascent() + 2 - 5);
|
||||
pi.pain.line(x + 1, y - 5, x + dim_.wid - 2, y - 5, LColor::math);
|
||||
pi.pain.line(x + 1, y - 5, x + dim_.wid - 2, y - 5, Color::math);
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "InsetMathFBox.h"
|
||||
#include "MathData.h"
|
||||
#include "MathStream.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include "support/std_ostream.h"
|
||||
#include "frontends/Painter.h"
|
||||
@ -56,7 +56,7 @@ bool InsetMathFBox::metrics(MetricsInfo & mi, Dimension & dim) const
|
||||
void InsetMathFBox::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
pi.pain.rectangle(x + 1, y - dim_.ascent() + 1,
|
||||
dim_.width() - 2, dim_.height() - 2, LColor::foreground);
|
||||
dim_.width() - 2, dim_.height() - 2, Color::foreground);
|
||||
FontSetChanger dummy(pi.base, "textnormal");
|
||||
cell(0).draw(pi, x + 3, y);
|
||||
setPosCache(pi, x, y);
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "MathStream.h"
|
||||
#include "TextPainter.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ void InsetMathFrac::draw(PainterInfo & pi, int x, int y) const
|
||||
pi.pain.line(x + cell(0).width(),
|
||||
y + dim_.des - 2,
|
||||
x + cell(0).width() + 5,
|
||||
y - dim_.asc + 2, LColor::math);
|
||||
y - dim_.asc + 2, Color::math);
|
||||
} else {
|
||||
cell(0).draw(pi, m - cell(0).width() / 2,
|
||||
y - cell(0).descent() - 2 - 5);
|
||||
@ -95,7 +95,7 @@ void InsetMathFrac::draw(PainterInfo & pi, int x, int y) const
|
||||
}
|
||||
if (kind_ == FRAC || kind_ == OVER)
|
||||
pi.pain.line(x + 1, y - 5,
|
||||
x + dim_.wid - 2, y - 5, LColor::math);
|
||||
x + dim_.wid - 2, y - 5, Color::math);
|
||||
drawMarkers(pi, x, y);
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "MathData.h"
|
||||
#include "MathStream.h"
|
||||
#include "MathSupport.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
|
||||
@ -54,7 +54,7 @@ void InsetMathFrameBox::draw(PainterInfo & pi, int x, int y) const
|
||||
{
|
||||
FontSetChanger dummy(pi.base, "textnormal");
|
||||
pi.pain.rectangle(x + 1, y - dim_.ascent() + 1,
|
||||
dim_.width() - 2, dim_.height() - 2, LColor::foreground);
|
||||
dim_.width() - 2, dim_.height() - 2, Color::foreground);
|
||||
x += 5;
|
||||
|
||||
drawStrBlack(pi, x, y, from_ascii("["));
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "BufferView.h"
|
||||
#include "CutAndPaste.h"
|
||||
#include "FuncStatus.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "Cursor.h"
|
||||
#include "debug.h"
|
||||
#include "FuncRequest.h"
|
||||
@ -492,7 +492,7 @@ void InsetMathGrid::drawWithMargin(PainterInfo & pi, int x, int y,
|
||||
- i * hlinesep() - hlinesep()/2 - rowsep()/2;
|
||||
pi.pain.line(x + lmargin + 1, yy,
|
||||
x + dim_.width() - rmargin - 1, yy,
|
||||
LColor::foreground);
|
||||
Color::foreground);
|
||||
}
|
||||
|
||||
for (col_type col = 0; col <= ncols(); ++col)
|
||||
@ -501,7 +501,7 @@ void InsetMathGrid::drawWithMargin(PainterInfo & pi, int x, int y,
|
||||
- i * vlinesep() - vlinesep()/2 - colsep()/2;
|
||||
pi.pain.line(xx, y - dim_.ascent() + 1,
|
||||
xx, y + dim_.descent() - 1,
|
||||
LColor::foreground);
|
||||
Color::foreground);
|
||||
}
|
||||
drawMarkers2(pi, x, y);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "BufferView.h"
|
||||
#include "CutAndPaste.h"
|
||||
#include "FuncStatus.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "Cursor.h"
|
||||
#include "debug.h"
|
||||
@ -1307,7 +1307,7 @@ void InsetMathHull::handleFont2(Cursor & cur, docstring const & arg)
|
||||
LyXFont font;
|
||||
bool b;
|
||||
bv_funcs::string2font(to_utf8(arg), font, b);
|
||||
if (font.color() != LColor::inherit) {
|
||||
if (font.color() != Color::inherit) {
|
||||
MathAtom at = MathAtom(new InsetMathColor(true, font.color()));
|
||||
cur.handleNest(at, 0);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@
|
||||
#include "BufferView.h"
|
||||
#include "CutAndPaste.h"
|
||||
#include "FuncStatus.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "bufferview_funcs.h"
|
||||
#include "CoordCache.h"
|
||||
#include "Cursor.h"
|
||||
@ -213,7 +213,7 @@ void InsetMathNest::draw(PainterInfo & pi, int x, int y) const
|
||||
#if 0
|
||||
if (lock_)
|
||||
pi.pain.fillRectangle(x, y - ascent(), width(), height(),
|
||||
LColor::mathlockbg);
|
||||
Color::mathlockbg);
|
||||
#endif
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
@ -245,7 +245,7 @@ void InsetMathNest::drawSelection(PainterInfo & pi, int x, int y) const
|
||||
int y1 = c.yo(bv) - c.ascent();
|
||||
int x2 = c.xo(bv) + c.pos2x(s2.pos());
|
||||
int y2 = c.yo(bv) + c.descent();
|
||||
pi.pain.fillRectangle(x1, y1, x2 - x1, y2 - y1, LColor::selection);
|
||||
pi.pain.fillRectangle(x1, y1, x2 - x1, y2 - y1, Color::selection);
|
||||
//lyxerr << "InsetMathNest::drawing selection 3: "
|
||||
// << " x1: " << x1 << " x2: " << x2
|
||||
// << " y1: " << y1 << " y2: " << y2 << endl;
|
||||
@ -257,7 +257,7 @@ void InsetMathNest::drawSelection(PainterInfo & pi, int x, int y) const
|
||||
int y1 = c.yo(bv) - c.ascent();
|
||||
int x2 = c.xo(bv) + c.width();
|
||||
int y2 = c.yo(bv) + c.descent();
|
||||
pi.pain.fillRectangle(x1, y1, x2 - x1, y2 - y1, LColor::selection);
|
||||
pi.pain.fillRectangle(x1, y1, x2 - x1, y2 - y1, Color::selection);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -409,7 +409,7 @@ void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
|
||||
LyXFont font;
|
||||
bool b;
|
||||
bv_funcs::string2font(to_utf8(arg), font, b);
|
||||
if (font.color() != LColor::inherit) {
|
||||
if (font.color() != Color::inherit) {
|
||||
MathAtom at = MathAtom(new InsetMathColor(true, font.color()));
|
||||
cur.handleNest(at, 0);
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "MathStream.h"
|
||||
#include "MathStream.h"
|
||||
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
@ -51,8 +51,8 @@ void InsetMathPhantom::draw(PainterInfo & pi, int x, int y) const
|
||||
static int const arrow_size = 4;
|
||||
|
||||
// We first draw the text and then an arrow
|
||||
LColor_color const origcol = pi.base.font.color();
|
||||
pi.base.font.setColor(LColor::special);
|
||||
Color_color const origcol = pi.base.font.color();
|
||||
pi.base.font.setColor(Color::special);
|
||||
cell(0).draw(pi, x + 1, y);
|
||||
pi.base.font.setColor(origcol);
|
||||
|
||||
@ -79,15 +79,15 @@ void InsetMathPhantom::draw(PainterInfo & pi, int x, int y) const
|
||||
int const y3 = y4 - arrow_size;
|
||||
|
||||
// top arrow
|
||||
pi.pain.line(x2, y1, x1, y2, LColor::added_space);
|
||||
pi.pain.line(x2, y1, x3, y2, LColor::added_space);
|
||||
pi.pain.line(x2, y1, x1, y2, Color::added_space);
|
||||
pi.pain.line(x2, y1, x3, y2, Color::added_space);
|
||||
|
||||
// bottom arrow
|
||||
pi.pain.line(x2, y4, x1, y3, LColor::added_space);
|
||||
pi.pain.line(x2, y4, x3, y3, LColor::added_space);
|
||||
pi.pain.line(x2, y4, x1, y3, Color::added_space);
|
||||
pi.pain.line(x2, y4, x3, y3, Color::added_space);
|
||||
|
||||
// joining line
|
||||
pi.pain.line(x2, y1, x2, y4, LColor::added_space);
|
||||
pi.pain.line(x2, y1, x2, y4, Color::added_space);
|
||||
}
|
||||
|
||||
if (kind_ == phantom || kind_ == hphantom) {
|
||||
@ -109,15 +109,15 @@ void InsetMathPhantom::draw(PainterInfo & pi, int x, int y) const
|
||||
int const y3 = y2 + arrow_size;
|
||||
|
||||
// left arrow
|
||||
pi.pain.line(x1, y2, x2, y3, LColor::added_space);
|
||||
pi.pain.line(x1, y2, x2, y1, LColor::added_space);
|
||||
pi.pain.line(x1, y2, x2, y3, Color::added_space);
|
||||
pi.pain.line(x1, y2, x2, y1, Color::added_space);
|
||||
|
||||
// right arrow
|
||||
pi.pain.line(x4, y2, x3, y3, LColor::added_space);
|
||||
pi.pain.line(x4, y2, x3, y1, LColor::added_space);
|
||||
pi.pain.line(x4, y2, x3, y3, Color::added_space);
|
||||
pi.pain.line(x4, y2, x3, y1, Color::added_space);
|
||||
|
||||
// joining line
|
||||
pi.pain.line(x1, y2, x4, y2, LColor::added_space);
|
||||
pi.pain.line(x1, y2, x4, y2, Color::added_space);
|
||||
}
|
||||
|
||||
drawMarkers(pi, x, y);
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "MathData.h"
|
||||
#include "MathStream.h"
|
||||
#include "Cursor.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
@ -68,7 +68,7 @@ void InsetMathRoot::draw(PainterInfo & pi, int x, int y) const
|
||||
xp[2] = x + w; yp[2] = y + d;
|
||||
xp[3] = x + w - 2; yp[3] = y + (d - a)/2 + 2;
|
||||
xp[4] = x + w - 5; yp[4] = y + (d - a)/2 + 4;
|
||||
pi.pain.lines(xp, yp, 5, LColor::math);
|
||||
pi.pain.lines(xp, yp, 5, Color::math);
|
||||
drawMarkers(pi, x, y);
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "MathStream.h"
|
||||
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
@ -109,7 +109,7 @@ void InsetMathSpace::draw(PainterInfo & pi, int x, int y) const
|
||||
xp[2] = x + w - 2; yp[2] = y;
|
||||
xp[3] = x + w - 2; yp[3] = y - 3;
|
||||
|
||||
pi.pain.lines(xp, yp, 4, (space_ < 3) ? LColor::latex : LColor::math);
|
||||
pi.pain.lines(xp, yp, 4, (space_ < 3) ? Color::latex : Color::math);
|
||||
}
|
||||
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "MathData.h"
|
||||
#include "MathStream.h"
|
||||
#include "TextPainter.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
|
||||
@ -59,7 +59,7 @@ void InsetMathSqrt::draw(PainterInfo & pi, int x, int y) const
|
||||
xp[1] = x + 8; yp[1] = y - a + 1;
|
||||
xp[2] = x + 5; yp[2] = y + d - 1;
|
||||
xp[3] = x; yp[3] = y + (d - a)/2;
|
||||
pi.pain.lines(xp, yp, 4, LColor::math);
|
||||
pi.pain.lines(xp, yp, 4, Color::math);
|
||||
drawMarkers(pi, x, y);
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
#include "MathStream.h"
|
||||
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
@ -61,7 +61,7 @@ void InsetMathTFrac::draw(PainterInfo & pi, int x, int y) const
|
||||
int m = x + dim_.wid / 2;
|
||||
cell(0).draw(pi, m - cell(0).width() / 2, y - cell(0).descent() - 2 - 5);
|
||||
cell(1).draw(pi, m - cell(1).width() / 2, y + cell(1).ascent() + 2 - 5);
|
||||
pi.pain.line(x + 1, y - 5, x + dim_.wid - 2, y - 5, LColor::math);
|
||||
pi.pain.line(x + 1, y - 5, x + dim_.wid - 2, y - 5, Color::math);
|
||||
setPosCache(pi, x, y);
|
||||
}
|
||||
|
||||
|
@ -133,7 +133,7 @@ void InsetMathXYArrow::draw(PainterInfo & pi, int x, int y) const
|
||||
pi.pain.text(x, y, "X");
|
||||
MathData const & s = sourceCell();
|
||||
MathData const & t = targetCell();
|
||||
pi.pain.line(s.xm(), s.ym(), t.xm(), t.ym(), LColor::math);
|
||||
pi.pain.line(s.xm(), s.ym(), t.xm(), t.ym(), Color::math);
|
||||
cell(1).draw(pi, (s.xm() + t.xm())/2, (s.ym() + t.ym())/2);
|
||||
|
||||
}
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "Buffer.h"
|
||||
#include "Cursor.h"
|
||||
#include "debug.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include "frontends/FontMetrics.h"
|
||||
#include "frontends/Painter.h"
|
||||
@ -299,7 +299,7 @@ void MathData::draw(PainterInfo & pi, int x, int y) const
|
||||
setXY(bv, x, y);
|
||||
|
||||
if (empty()) {
|
||||
pi.pain.rectangle(x, y - ascent(), width(), height(), LColor::mathline);
|
||||
pi.pain.rectangle(x, y - ascent(), width(), height(), Color::mathline);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "debug.h"
|
||||
#include "gettext.h"
|
||||
#include "Lexer.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include "frontends/FontMetrics.h"
|
||||
#include "frontends/Painter.h"
|
||||
@ -143,7 +143,7 @@ void MathMacroTemplate::draw(PainterInfo & p, int x, int y) const
|
||||
|
||||
// label
|
||||
LyXFont font = p.base.font;
|
||||
font.setColor(LColor::math);
|
||||
font.setColor(Color::math);
|
||||
|
||||
PainterInfo pi(p.base.bv, p.pain);
|
||||
pi.base.style = LM_ST_TEXT;
|
||||
@ -153,10 +153,10 @@ void MathMacroTemplate::draw(PainterInfo & p, int x, int y) const
|
||||
int const w = dim_.wid - 2;
|
||||
int const h = dim_.height() - 2;
|
||||
|
||||
// LColor::mathbg used to be "AntiqueWhite" but is "linen" now, too
|
||||
// Color::mathbg used to be "AntiqueWhite" but is "linen" now, too
|
||||
// the next line would overwrite the selection!
|
||||
//pi.pain.fillRectangle(x, a, w, h, LColor::mathmacrobg);
|
||||
pi.pain.rectangle(x, a, w, h, LColor::mathframe);
|
||||
//pi.pain.fillRectangle(x, a, w, h, Color::mathmacrobg);
|
||||
pi.pain.rectangle(x, a, w, h, Color::mathframe);
|
||||
|
||||
#ifdef WITH_WARNINGS
|
||||
#warning FIXME
|
||||
@ -175,10 +175,10 @@ void MathMacroTemplate::draw(PainterInfo & p, int x, int y) const
|
||||
int const w1 = cell(1).width();
|
||||
cell(0).draw(pi, x + 2, y + 1);
|
||||
pi.pain.rectangle(x, y - dim_.ascent() + 3,
|
||||
w0 + 4, dim_.height() - 6, LColor::mathline);
|
||||
w0 + 4, dim_.height() - 6, Color::mathline);
|
||||
cell(1).draw(pi, x + 8 + w0, y + 1);
|
||||
pi.pain.rectangle(x + w0 + 6, y - dim_.ascent() + 3,
|
||||
w1 + 4, dim_.height() - 6, LColor::mathline);
|
||||
w1 + 4, dim_.height() - 6, Color::mathline);
|
||||
|
||||
if (lockMacro)
|
||||
MacroTable::globalMacros().get(name_).unlock();
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "MathParser.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
|
||||
#include "frontends/FontLoader.h"
|
||||
#include "frontends/FontMetrics.h"
|
||||
@ -410,7 +410,7 @@ void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
|
||||
{
|
||||
if (name == ".") {
|
||||
pi.pain.line(x + w/2, y, x + w/2, y + h,
|
||||
LColor::cursor, Painter::line_onoffdash);
|
||||
Color::cursor, Painter::line_onoffdash);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -452,7 +452,7 @@ void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
|
||||
pi.pain.line(
|
||||
int(x + xx + 0.5), int(y + yy + 0.5),
|
||||
int(x + x2 + 0.5), int(y + y2 + 0.5),
|
||||
LColor::math);
|
||||
Color::math);
|
||||
} else {
|
||||
int xp[32];
|
||||
int yp[32];
|
||||
@ -469,7 +469,7 @@ void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
|
||||
yp[j] = int(y + yy + 0.5);
|
||||
// lyxerr << "P[" << j ' ' << xx << ' ' << yy << ' ' << x << ' ' << y << ']';
|
||||
}
|
||||
pi.pain.lines(xp, yp, n, LColor::math);
|
||||
pi.pain.lines(xp, yp, n, Color::math);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -478,7 +478,7 @@ void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
|
||||
void drawStrRed(PainterInfo & pi, int x, int y, docstring const & str)
|
||||
{
|
||||
LyXFont f = pi.base.font;
|
||||
f.setColor(LColor::latex);
|
||||
f.setColor(Color::latex);
|
||||
pi.pain.text(x, y, str, f);
|
||||
}
|
||||
|
||||
@ -486,7 +486,7 @@ void drawStrRed(PainterInfo & pi, int x, int y, docstring const & str)
|
||||
void drawStrBlack(PainterInfo & pi, int x, int y, docstring const & str)
|
||||
{
|
||||
LyXFont f = pi.base.font;
|
||||
f.setColor(LColor::foreground);
|
||||
f.setColor(Color::foreground);
|
||||
pi.pain.text(x, y, str, f);
|
||||
}
|
||||
|
||||
@ -504,7 +504,7 @@ struct fontinfo {
|
||||
LyXFont::FONT_FAMILY family_;
|
||||
LyXFont::FONT_SERIES series_;
|
||||
LyXFont::FONT_SHAPE shape_;
|
||||
LColor::color color_;
|
||||
Color::color color_;
|
||||
};
|
||||
|
||||
|
||||
@ -518,87 +518,87 @@ LyXFont::FONT_SHAPE const inh_shape = LyXFont::INHERIT_SHAPE;
|
||||
fontinfo fontinfos[] = {
|
||||
// math fonts
|
||||
{"mathnormal", LyXFont::ROMAN_FAMILY, LyXFont::MEDIUM_SERIES,
|
||||
LyXFont::ITALIC_SHAPE, LColor::math},
|
||||
LyXFont::ITALIC_SHAPE, Color::math},
|
||||
{"mathbf", inh_family, LyXFont::BOLD_SERIES,
|
||||
inh_shape, LColor::math},
|
||||
inh_shape, Color::math},
|
||||
{"mathcal", LyXFont::CMSY_FAMILY, inh_series,
|
||||
inh_shape, LColor::math},
|
||||
inh_shape, Color::math},
|
||||
{"mathfrak", LyXFont::EUFRAK_FAMILY, inh_series,
|
||||
inh_shape, LColor::math},
|
||||
inh_shape, Color::math},
|
||||
{"mathrm", LyXFont::ROMAN_FAMILY, inh_series,
|
||||
LyXFont::UP_SHAPE, LColor::math},
|
||||
LyXFont::UP_SHAPE, Color::math},
|
||||
{"mathsf", LyXFont::SANS_FAMILY, inh_series,
|
||||
inh_shape, LColor::math},
|
||||
inh_shape, Color::math},
|
||||
{"mathbb", LyXFont::MSB_FAMILY, inh_series,
|
||||
inh_shape, LColor::math},
|
||||
inh_shape, Color::math},
|
||||
{"mathtt", LyXFont::TYPEWRITER_FAMILY, inh_series,
|
||||
inh_shape, LColor::math},
|
||||
inh_shape, Color::math},
|
||||
{"mathit", inh_family, inh_series,
|
||||
LyXFont::ITALIC_SHAPE, LColor::math},
|
||||
LyXFont::ITALIC_SHAPE, Color::math},
|
||||
{"cmex", LyXFont::CMEX_FAMILY, inh_series,
|
||||
inh_shape, LColor::math},
|
||||
inh_shape, Color::math},
|
||||
{"cmm", LyXFont::CMM_FAMILY, inh_series,
|
||||
inh_shape, LColor::math},
|
||||
inh_shape, Color::math},
|
||||
{"cmr", LyXFont::CMR_FAMILY, inh_series,
|
||||
inh_shape, LColor::math},
|
||||
inh_shape, Color::math},
|
||||
{"cmsy", LyXFont::CMSY_FAMILY, inh_series,
|
||||
inh_shape, LColor::math},
|
||||
inh_shape, Color::math},
|
||||
{"eufrak", LyXFont::EUFRAK_FAMILY, inh_series,
|
||||
inh_shape, LColor::math},
|
||||
inh_shape, Color::math},
|
||||
{"msa", LyXFont::MSA_FAMILY, inh_series,
|
||||
inh_shape, LColor::math},
|
||||
inh_shape, Color::math},
|
||||
{"msb", LyXFont::MSB_FAMILY, inh_series,
|
||||
inh_shape, LColor::math},
|
||||
inh_shape, Color::math},
|
||||
{"wasy", LyXFont::WASY_FAMILY, inh_series,
|
||||
inh_shape, LColor::none},
|
||||
inh_shape, Color::none},
|
||||
{"esint", LyXFont::ESINT_FAMILY, inh_series,
|
||||
inh_shape, LColor::none},
|
||||
inh_shape, Color::none},
|
||||
|
||||
// Text fonts
|
||||
{"text", inh_family, inh_series,
|
||||
inh_shape, LColor::foreground},
|
||||
inh_shape, Color::foreground},
|
||||
{"textbf", inh_family, LyXFont::BOLD_SERIES,
|
||||
inh_shape, LColor::foreground},
|
||||
inh_shape, Color::foreground},
|
||||
{"textit", inh_family, inh_series,
|
||||
LyXFont::ITALIC_SHAPE, LColor::foreground},
|
||||
LyXFont::ITALIC_SHAPE, Color::foreground},
|
||||
{"textmd", inh_family, LyXFont::MEDIUM_SERIES,
|
||||
inh_shape, LColor::foreground},
|
||||
inh_shape, Color::foreground},
|
||||
{"textnormal", inh_family, inh_series,
|
||||
LyXFont::UP_SHAPE, LColor::foreground},
|
||||
LyXFont::UP_SHAPE, Color::foreground},
|
||||
{"textrm", LyXFont::ROMAN_FAMILY,
|
||||
inh_series, LyXFont::UP_SHAPE,LColor::foreground},
|
||||
inh_series, LyXFont::UP_SHAPE,Color::foreground},
|
||||
{"textsc", inh_family, inh_series,
|
||||
LyXFont::SMALLCAPS_SHAPE, LColor::foreground},
|
||||
LyXFont::SMALLCAPS_SHAPE, Color::foreground},
|
||||
{"textsf", LyXFont::SANS_FAMILY, inh_series,
|
||||
inh_shape, LColor::foreground},
|
||||
inh_shape, Color::foreground},
|
||||
{"textsl", inh_family, inh_series,
|
||||
LyXFont::SLANTED_SHAPE, LColor::foreground},
|
||||
LyXFont::SLANTED_SHAPE, Color::foreground},
|
||||
{"texttt", LyXFont::TYPEWRITER_FAMILY, inh_series,
|
||||
inh_shape, LColor::foreground},
|
||||
inh_shape, Color::foreground},
|
||||
{"textup", inh_family, inh_series,
|
||||
LyXFont::UP_SHAPE, LColor::foreground},
|
||||
LyXFont::UP_SHAPE, Color::foreground},
|
||||
|
||||
// TIPA support
|
||||
{"textipa", inh_family, inh_series,
|
||||
inh_shape, LColor::foreground},
|
||||
inh_shape, Color::foreground},
|
||||
|
||||
// LyX internal usage
|
||||
{"lyxtex", inh_family, inh_series,
|
||||
LyXFont::UP_SHAPE, LColor::latex},
|
||||
LyXFont::UP_SHAPE, Color::latex},
|
||||
{"lyxsymbol", LyXFont::SYMBOL_FAMILY, inh_series,
|
||||
inh_shape, LColor::math},
|
||||
inh_shape, Color::math},
|
||||
{"lyxboldsymbol", LyXFont::SYMBOL_FAMILY, LyXFont::BOLD_SERIES,
|
||||
inh_shape, LColor::math},
|
||||
inh_shape, Color::math},
|
||||
{"lyxblacktext", LyXFont::ROMAN_FAMILY, LyXFont::MEDIUM_SERIES,
|
||||
LyXFont::UP_SHAPE, LColor::foreground},
|
||||
LyXFont::UP_SHAPE, Color::foreground},
|
||||
{"lyxnochange", inh_family, inh_series,
|
||||
inh_shape, LColor::foreground},
|
||||
inh_shape, Color::foreground},
|
||||
{"lyxfakebb", LyXFont::TYPEWRITER_FAMILY, LyXFont::BOLD_SERIES,
|
||||
LyXFont::UP_SHAPE, LColor::math},
|
||||
LyXFont::UP_SHAPE, Color::math},
|
||||
{"lyxfakecal", LyXFont::SANS_FAMILY, LyXFont::MEDIUM_SERIES,
|
||||
LyXFont::ITALIC_SHAPE, LColor::math},
|
||||
LyXFont::ITALIC_SHAPE, Color::math},
|
||||
{"lyxfakefrak", LyXFont::ROMAN_FAMILY, LyXFont::BOLD_SERIES,
|
||||
LyXFont::ITALIC_SHAPE, LColor::math}
|
||||
LyXFont::ITALIC_SHAPE, Color::math}
|
||||
};
|
||||
|
||||
|
||||
@ -673,7 +673,7 @@ void augmentFont(LyXFont & font, docstring const & name)
|
||||
font.setSeries(info->series_);
|
||||
if (info->shape_ != inh_shape)
|
||||
font.setShape(info->shape_);
|
||||
if (info->color_ != LColor::none)
|
||||
if (info->color_ != Color::none)
|
||||
font.setColor(info->color_);
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include "Encoding.h"
|
||||
#include "gettext.h"
|
||||
#include "Language.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyXRC.h"
|
||||
#include "Row.h"
|
||||
#include "MetricsInfo.h"
|
||||
@ -223,10 +223,10 @@ void RowPainter::paintInset(pos_type const pos, LyXFont const & font)
|
||||
int const x2 = x1 + dim.wid;
|
||||
int const y1 = yo_ + dim.des;
|
||||
int const y2 = yo_ - dim.asc;
|
||||
pi.pain.line(x1, y1, x1, y2, LColor::green);
|
||||
pi.pain.line(x1, y1, x2, y1, LColor::green);
|
||||
pi.pain.line(x2, y1, x2, y2, LColor::green);
|
||||
pi.pain.line(x1, y2, x2, y2, LColor::green);
|
||||
pi.pain.line(x1, y1, x1, y2, Color::green);
|
||||
pi.pain.line(x1, y1, x2, y1, Color::green);
|
||||
pi.pain.line(x2, y1, x2, y2, Color::green);
|
||||
pi.pain.line(x1, y2, x2, y2, Color::green);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -368,9 +368,9 @@ void RowPainter::paintChars(pos_type & vpos, LyXFont const & font,
|
||||
if (prev_change != Change::UNCHANGED) {
|
||||
LyXFont copy(font);
|
||||
if (prev_change == Change::DELETED) {
|
||||
copy.setColor(LColor::strikeout);
|
||||
copy.setColor(Color::strikeout);
|
||||
} else if (prev_change == Change::INSERTED) {
|
||||
copy.setColor(LColor::newtext);
|
||||
copy.setColor(Color::newtext);
|
||||
}
|
||||
x_ += pain_.text(int(x_), yo_, s, copy);
|
||||
} else {
|
||||
@ -389,7 +389,7 @@ void RowPainter::paintForeignMark(double orig_x, LyXFont const & font, int desc)
|
||||
return;
|
||||
|
||||
int const y = yo_ + 1 + desc;
|
||||
pain_.line(int(orig_x), y, int(x_), y, LColor::language);
|
||||
pain_.line(int(orig_x), y, int(x_), y, Color::language);
|
||||
}
|
||||
|
||||
|
||||
@ -449,7 +449,7 @@ void RowPainter::paintChangeBar()
|
||||
? row_.ascent()
|
||||
: row_.height();
|
||||
|
||||
pain_.fillRectangle(5, yo_ - row_.ascent(), 3, height, LColor::changebar);
|
||||
pain_.fillRectangle(5, yo_ - row_.ascent(), 3, height, Color::changebar);
|
||||
}
|
||||
|
||||
|
||||
@ -463,8 +463,8 @@ void RowPainter::paintAppendix()
|
||||
if (par_.params().startOfAppendix())
|
||||
y += 2 * defaultRowHeight();
|
||||
|
||||
pain_.line(1, y, 1, yo_ + row_.height(), LColor::appendix);
|
||||
pain_.line(width_ - 2, y, width_ - 2, yo_ + row_.height(), LColor::appendix);
|
||||
pain_.line(1, y, 1, yo_ + row_.height(), Color::appendix);
|
||||
pain_.line(width_ - 2, y, width_ - 2, yo_ + row_.height(), Color::appendix);
|
||||
}
|
||||
|
||||
|
||||
@ -501,12 +501,12 @@ void RowPainter::paintDepthBar()
|
||||
int const starty = yo_ - row_.ascent();
|
||||
int const h = row_.height() - 1 - (i - next_depth - 1) * 3;
|
||||
|
||||
pain_.line(x, starty, x, starty + h, LColor::depthbar);
|
||||
pain_.line(x, starty, x, starty + h, Color::depthbar);
|
||||
|
||||
if (i > prev_depth)
|
||||
pain_.fillRectangle(x, starty, w, 2, LColor::depthbar);
|
||||
pain_.fillRectangle(x, starty, w, 2, Color::depthbar);
|
||||
if (i > next_depth)
|
||||
pain_.fillRectangle(x, starty + h, w, 2, LColor::depthbar);
|
||||
pain_.fillRectangle(x, starty + h, w, 2, Color::depthbar);
|
||||
}
|
||||
}
|
||||
|
||||
@ -514,7 +514,7 @@ void RowPainter::paintDepthBar()
|
||||
int RowPainter::paintAppendixStart(int y)
|
||||
{
|
||||
LyXFont pb_font;
|
||||
pb_font.setColor(LColor::appendix);
|
||||
pb_font.setColor(Color::appendix);
|
||||
pb_font.decSize();
|
||||
|
||||
int w = 0;
|
||||
@ -527,10 +527,10 @@ int RowPainter::paintAppendixStart(int y)
|
||||
int const text_start = int(xo_ + (width_ - w) / 2);
|
||||
int const text_end = text_start + w;
|
||||
|
||||
pain_.rectText(text_start, y + d, label, pb_font, LColor::none, LColor::none);
|
||||
pain_.rectText(text_start, y + d, label, pb_font, Color::none, Color::none);
|
||||
|
||||
pain_.line(int(xo_ + 1), y, text_start, y, LColor::appendix);
|
||||
pain_.line(text_end, y, int(xo_ + width_ - 2), y, LColor::appendix);
|
||||
pain_.line(int(xo_ + 1), y, text_start, y, Color::appendix);
|
||||
pain_.line(text_end, y, int(xo_ + width_ - 2), y, Color::appendix);
|
||||
|
||||
return 3 * defaultRowHeight();
|
||||
}
|
||||
@ -669,7 +669,7 @@ void RowPainter::paintLast()
|
||||
if (par_.isInserted(par_.size()) || par_.isDeleted(par_.size())) {
|
||||
FontMetrics const & fm = theFontMetrics(bv_.buffer()->params().getFont());
|
||||
int const length = fm.maxAscent() / 2;
|
||||
LColor::color col = par_.isInserted(par_.size()) ? LColor::newtext : LColor::strikeout;
|
||||
Color::color col = par_.isInserted(par_.size()) ? Color::newtext : Color::strikeout;
|
||||
|
||||
pain_.line(int(x_) + 1, yo_ + 2, int(x_) + 1, yo_ + 2 - length, col,
|
||||
Painter::line_solid, Painter::line_thick);
|
||||
@ -692,9 +692,9 @@ void RowPainter::paintLast()
|
||||
x += (size - width_ + row_.width() + 1) * (is_rtl ? -1 : 1);
|
||||
|
||||
if (endlabel == END_LABEL_BOX)
|
||||
pain_.rectangle(x, y, size, size, LColor::eolmarker);
|
||||
pain_.rectangle(x, y, size, size, Color::eolmarker);
|
||||
else
|
||||
pain_.fillRectangle(x, y, size, size, LColor::eolmarker);
|
||||
pain_.fillRectangle(x, y, size, size, Color::eolmarker);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -779,7 +779,7 @@ void RowPainter::paintText()
|
||||
= theFontMetrics(bv_.buffer()->params().getFont());
|
||||
int const middle = yo_ - fm.maxAscent() / 3;
|
||||
pain_.line(last_strikeout_x, middle, int(x_), middle,
|
||||
LColor::strikeout, Painter::line_solid, Painter::line_thin);
|
||||
Color::strikeout, Painter::line_solid, Painter::line_thin);
|
||||
running_strikeout = false;
|
||||
}
|
||||
|
||||
@ -797,23 +797,23 @@ void RowPainter::paintText()
|
||||
int const y0 = yo_;
|
||||
int const y1 = y0 - defaultRowHeight() / 2;
|
||||
|
||||
pain_.line(int(x_), y1, int(x_), y0, LColor::added_space);
|
||||
pain_.line(int(x_), y1, int(x_), y0, Color::added_space);
|
||||
|
||||
if (par_.hfillExpansion(row_, pos)) {
|
||||
int const y2 = (y0 + y1) / 2;
|
||||
|
||||
if (pos >= body_pos) {
|
||||
pain_.line(int(x_), y2, int(x_ + hfill_), y2,
|
||||
LColor::added_space,
|
||||
Color::added_space,
|
||||
Painter::line_onoffdash);
|
||||
x_ += hfill_;
|
||||
} else {
|
||||
pain_.line(int(x_), y2, int(x_ + label_hfill_), y2,
|
||||
LColor::added_space,
|
||||
Color::added_space,
|
||||
Painter::line_onoffdash);
|
||||
x_ += label_hfill_;
|
||||
}
|
||||
pain_.line(int(x_), y1, int(x_), y0, LColor::added_space);
|
||||
pain_.line(int(x_), y1, int(x_), y0, Color::added_space);
|
||||
}
|
||||
x_ += 2;
|
||||
++vpos;
|
||||
@ -834,7 +834,7 @@ void RowPainter::paintText()
|
||||
= theFontMetrics(bv_.buffer()->params().getFont());
|
||||
int const middle = yo_ - fm.maxAscent() / 3;
|
||||
pain_.line(last_strikeout_x, middle, int(x_), middle,
|
||||
LColor::strikeout, Painter::line_solid, Painter::line_thin);
|
||||
Color::strikeout, Painter::line_solid, Painter::line_thin);
|
||||
running_strikeout = false;
|
||||
}
|
||||
}
|
||||
@ -1042,12 +1042,12 @@ void paintText(BufferView & bv,
|
||||
// and grey out above (should not happen later)
|
||||
// lyxerr << "par ascent: " << text.getPar(vi.p1).ascent() << endl;
|
||||
if (vi.y1 > 0 && vi.update_strategy != SingleParUpdate)
|
||||
pain.fillRectangle(0, 0, bv.workWidth(), vi.y1, LColor::bottomarea);
|
||||
pain.fillRectangle(0, 0, bv.workWidth(), vi.y1, Color::bottomarea);
|
||||
|
||||
// and possibly grey out below
|
||||
// lyxerr << "par descent: " << text.getPar(vi.p1).ascent() << endl;
|
||||
if (vi.y2 < bv.workHeight() && vi.update_strategy != SingleParUpdate)
|
||||
pain.fillRectangle(0, vi.y2, bv.workWidth(), bv.workHeight() - vi.y2, LColor::bottomarea);
|
||||
pain.fillRectangle(0, vi.y2, bv.workWidth(), bv.workHeight() - vi.y2, Color::bottomarea);
|
||||
}
|
||||
|
||||
|
||||
|
14
src/text.cpp
14
src/text.cpp
@ -37,7 +37,7 @@
|
||||
#include "FontIterator.h"
|
||||
#include "gettext.h"
|
||||
#include "Language.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyXLength.h"
|
||||
#include "Lexer.h"
|
||||
#include "LyXRC.h"
|
||||
@ -573,9 +573,9 @@ int LyXText::leftMargin(Buffer const & buffer, int max_width,
|
||||
}
|
||||
|
||||
|
||||
LColor_color LyXText::backgroundColor() const
|
||||
Color_color LyXText::backgroundColor() const
|
||||
{
|
||||
return LColor_color(LColor::color(background_color_));
|
||||
return Color_color(Color::color(background_color_));
|
||||
}
|
||||
|
||||
|
||||
@ -1440,7 +1440,7 @@ void LyXText::drawSelection(PainterInfo & pi, int x, int) const
|
||||
// paint only one rectangle
|
||||
int const b( !isRTL(*bv.buffer(), par1) ? x + x1 : x + X1 );
|
||||
int const w( !isRTL(*bv.buffer(), par1) ? X2 - x1 : x2 - X1 );
|
||||
pi.pain.fillRectangle(b, y1, w, y2 - y1, LColor::selection);
|
||||
pi.pain.fillRectangle(b, y1, w, y2 - y1, Color::selection);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1450,13 +1450,13 @@ void LyXText::drawSelection(PainterInfo & pi, int x, int) const
|
||||
|
||||
// paint upper rectangle
|
||||
pi.pain.fillRectangle(x + x1, y1, x2 - x1, y2 - y1,
|
||||
LColor::selection);
|
||||
Color::selection);
|
||||
// paint bottom rectangle
|
||||
pi.pain.fillRectangle(x + X1, Y1, X2 - X1, Y2 - Y1,
|
||||
LColor::selection);
|
||||
Color::selection);
|
||||
// paint center rectangle
|
||||
pi.pain.fillRectangle(x, y2, tm.width(),
|
||||
Y1 - y2, LColor::selection);
|
||||
Y1 - y2, Color::selection);
|
||||
}
|
||||
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "FuncRequest.h"
|
||||
#include "gettext.h"
|
||||
#include "Language.h"
|
||||
#include "LColor.h"
|
||||
#include "Color.h"
|
||||
#include "LyXFunc.h"
|
||||
#include "LyXRC.h"
|
||||
#include "Row.h"
|
||||
@ -75,7 +75,7 @@ using std::min;
|
||||
|
||||
LyXText::LyXText()
|
||||
: current_font(LyXFont::ALL_INHERIT),
|
||||
background_color_(LColor::background),
|
||||
background_color_(Color::background),
|
||||
autoBreakRows_(false)
|
||||
{}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user