mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-05 13:26:21 +00:00
lyxfont.h no longer #includes LColor.h.
Change the LyXFont setXYZ member functions to return void, not LyXFont &. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7765 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b34f16995a
commit
15dc5fa5d6
@ -1,3 +1,16 @@
|
||||
2003-09-16 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* lyxfont.[Ch]: (setFamily, setSeries, setShape, setSize, setEmph, setUnderbar,
|
||||
setNoun, setNumber, setColor, setLanguage): no longer return LyXFont &.
|
||||
Store the FontBits::color variable as an int rather than as an LColor::color
|
||||
so that we can move LColor.h out of the lyxfont.h header file.
|
||||
|
||||
* rowpainter.C (paintAppendixStart, paintPageBreak, paintLengthMarker):
|
||||
LyXFont::setColor, decSize no longer return a LyXFont &, so cannot string
|
||||
calls together.
|
||||
|
||||
* lyxrc.C: add #include "LColor.h".
|
||||
|
||||
2003-09-15 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* bufferparams.[Ch]: store the pimpl_ as a copied_ptr, rather than as a cow_ptr.
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-09-16 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* character.C: add #include "LColor.h".
|
||||
|
||||
2003-09-15 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* ControlCharacter.C (setColor, getColor):
|
||||
|
@ -13,6 +13,7 @@
|
||||
|
||||
#include "gettext.h"
|
||||
#include "character.h"
|
||||
#include "LColor.h"
|
||||
|
||||
using std::vector;
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-09-16 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* QCharacter.C, QPrefs.C, lyx_gui.C: add #include "LColor.h".
|
||||
|
||||
2003-09-15 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* QLPainter.C: add #include "LColor.h".
|
||||
|
@ -22,6 +22,8 @@
|
||||
#include <qcheckbox.h>
|
||||
#include <qcombobox.h>
|
||||
|
||||
#include "LColor.h"
|
||||
|
||||
using frnt::BarPair;
|
||||
using frnt::ColorPair;
|
||||
using frnt::FamilyPair;
|
||||
|
@ -49,6 +49,8 @@
|
||||
#include <qlabel.h>
|
||||
#include "qcoloritem.h"
|
||||
|
||||
#include "LColor.h"
|
||||
|
||||
using lyx::support::compare_no_case;
|
||||
using lyx::support::strToDbl;
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "lyxrc.h"
|
||||
#include "lyxserver.h"
|
||||
#include "BufferView.h"
|
||||
#include "LColor.h"
|
||||
|
||||
// Dear Lord, deliver us from Evil,
|
||||
// aka the Qt headers
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-09-16 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* FormCharacter.C, FormPreferences.C, lyx_gui.C, xfont_loader.C:
|
||||
add #include "LColor.h".
|
||||
|
||||
2003-09-15 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* Color.C:
|
||||
|
@ -20,6 +20,8 @@
|
||||
#include "controllers/frnt_lang.h"
|
||||
#include "controllers/helper_funcs.h"
|
||||
|
||||
#include "LColor.h"
|
||||
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include "lyx_forms.h"
|
||||
|
@ -20,11 +20,12 @@
|
||||
#include "xformsBC.h"
|
||||
|
||||
#include "controllers/helper_funcs.h" // getSecond
|
||||
#include "controllers/frnt_lang.h"
|
||||
|
||||
#include "buffer.h"
|
||||
#include "converter.h"
|
||||
#include "format.h"
|
||||
#include "frnt_lang.h"
|
||||
#include "LColor.h"
|
||||
#include "lyxfont.h"
|
||||
|
||||
#include "support/lstrings.h"
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "BufferView.h"
|
||||
#include "debug.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "lyx_main.h"
|
||||
#include "lyxfunc.h"
|
||||
#include "lyxrc.h"
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "FontInfo.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "LColor.h"
|
||||
#include "lyxrc.h" // lyxrc.font_*
|
||||
|
||||
#include "frontends/lyx_gui.h"
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-09-16 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* renderers.C: LyXFont::setColor no longer return a LyXFont &, so cannot string
|
||||
calls together.
|
||||
|
||||
2003-09-15 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* inset.[Ch] (setBackgroundColor, backgroundColor):
|
||||
|
@ -98,7 +98,8 @@ void ButtonRenderer::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).decSize();
|
||||
font.setColor(LColor::command);
|
||||
font.decSize();
|
||||
|
||||
if (editable_) {
|
||||
pi.pain.buttonText(x + 2, y, text_, font);
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "debug.h"
|
||||
#include "gettext.h"
|
||||
#include "language.h"
|
||||
#include "LColor.h"
|
||||
#include "lyxlex.h"
|
||||
#include "lyxrc.h"
|
||||
|
||||
@ -204,7 +205,7 @@ LyXFont::FONT_MISC_STATE LyXFont::underbar() const
|
||||
|
||||
EnumLColor LyXFont::color() const
|
||||
{
|
||||
return bits.color;
|
||||
return LColor::color(bits.color);
|
||||
}
|
||||
|
||||
|
||||
@ -233,73 +234,63 @@ bool LyXFont::isVisibleRightToLeft() const
|
||||
}
|
||||
|
||||
|
||||
LyXFont & LyXFont::setFamily(LyXFont::FONT_FAMILY f)
|
||||
void LyXFont::setFamily(LyXFont::FONT_FAMILY f)
|
||||
{
|
||||
bits.family = f;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
LyXFont & LyXFont::setSeries(LyXFont::FONT_SERIES s)
|
||||
void LyXFont::setSeries(LyXFont::FONT_SERIES s)
|
||||
{
|
||||
bits.series = s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
LyXFont & LyXFont::setShape(LyXFont::FONT_SHAPE s)
|
||||
void LyXFont::setShape(LyXFont::FONT_SHAPE s)
|
||||
{
|
||||
bits.shape = s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
LyXFont & LyXFont::setSize(LyXFont::FONT_SIZE s)
|
||||
void LyXFont::setSize(LyXFont::FONT_SIZE s)
|
||||
{
|
||||
bits.size = s;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
LyXFont & LyXFont::setEmph(LyXFont::FONT_MISC_STATE e)
|
||||
void LyXFont::setEmph(LyXFont::FONT_MISC_STATE e)
|
||||
{
|
||||
bits.emph = e;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
LyXFont & LyXFont::setUnderbar(LyXFont::FONT_MISC_STATE u)
|
||||
void LyXFont::setUnderbar(LyXFont::FONT_MISC_STATE u)
|
||||
{
|
||||
bits.underbar = u;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
LyXFont & LyXFont::setNoun(LyXFont::FONT_MISC_STATE n)
|
||||
void LyXFont::setNoun(LyXFont::FONT_MISC_STATE n)
|
||||
{
|
||||
bits.noun = n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
LyXFont & LyXFont::setColor(EnumLColor c)
|
||||
void LyXFont::setColor(EnumLColor c)
|
||||
{
|
||||
bits.color = c;
|
||||
return *this;
|
||||
bits.color = int(c);
|
||||
}
|
||||
|
||||
|
||||
LyXFont & LyXFont::setLanguage(Language const * l)
|
||||
void LyXFont::setLanguage(Language const * l)
|
||||
{
|
||||
lang = l;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
LyXFont & LyXFont::setNumber(LyXFont::FONT_MISC_STATE n)
|
||||
void LyXFont::setNumber(LyXFont::FONT_MISC_STATE n)
|
||||
{
|
||||
bits.number = n;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
|
@ -15,8 +15,6 @@
|
||||
#ifndef LYXFONT_H
|
||||
#define LYXFONT_H
|
||||
|
||||
#include "LColor.h"
|
||||
|
||||
#include "support/std_string.h"
|
||||
#include <iosfwd>
|
||||
|
||||
@ -223,25 +221,16 @@ public:
|
||||
bool isSymbolFont() const;
|
||||
|
||||
///
|
||||
LyXFont & setFamily(LyXFont::FONT_FAMILY f);
|
||||
///
|
||||
LyXFont & setSeries(LyXFont::FONT_SERIES s);
|
||||
///
|
||||
LyXFont & setShape(LyXFont::FONT_SHAPE s);
|
||||
///
|
||||
LyXFont & setSize(LyXFont::FONT_SIZE s);
|
||||
///
|
||||
LyXFont & setEmph(LyXFont::FONT_MISC_STATE e);
|
||||
///
|
||||
LyXFont & setUnderbar(LyXFont::FONT_MISC_STATE u);
|
||||
///
|
||||
LyXFont & setNoun(LyXFont::FONT_MISC_STATE n);
|
||||
///
|
||||
LyXFont & setNumber(LyXFont::FONT_MISC_STATE n);
|
||||
///
|
||||
LyXFont & setColor(EnumLColor c);
|
||||
///
|
||||
LyXFont & setLanguage(Language const * l);
|
||||
void setFamily(LyXFont::FONT_FAMILY f);
|
||||
void setSeries(LyXFont::FONT_SERIES s);
|
||||
void setShape(LyXFont::FONT_SHAPE s);
|
||||
void setSize(LyXFont::FONT_SIZE s);
|
||||
void setEmph(LyXFont::FONT_MISC_STATE e);
|
||||
void setUnderbar(LyXFont::FONT_MISC_STATE u);
|
||||
void setNoun(LyXFont::FONT_MISC_STATE n);
|
||||
void setNumber(LyXFont::FONT_MISC_STATE n);
|
||||
void setColor(EnumLColor c);
|
||||
void setLanguage(Language const * l);
|
||||
|
||||
/// Set family after LyX text format
|
||||
LyXFont & setLyXFamily(string const &);
|
||||
@ -332,8 +321,10 @@ public:
|
||||
FONT_SHAPE shape;
|
||||
///
|
||||
FONT_SIZE size;
|
||||
///
|
||||
LColor::color color;
|
||||
/** We store the LColor::color value as an int to get LColor.h out
|
||||
* of the header file.
|
||||
*/
|
||||
int color;
|
||||
///
|
||||
FONT_MISC_STATE emph;
|
||||
///
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "converter.h"
|
||||
#include "format.h"
|
||||
#include "gettext.h"
|
||||
#include "LColor.h"
|
||||
#include "lyxlex.h"
|
||||
#include "lyxfont.h"
|
||||
|
||||
|
@ -1,3 +1,12 @@
|
||||
2003-09-16 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* math_braceinset.C, math_data.C, math_fboxinset.C, math_frameboxinset.C,
|
||||
math_gridinset.C, math_hullinset.C, math_macrotemplate.C, math_nestinset.C,
|
||||
math_rootinset.C, math_spaceinset.C, math_sqrtinset.C, math_support.C:
|
||||
add #include "LColor.h".
|
||||
* math_data.C, math_scriptinset.C: add #include <boost/assert.hpp>
|
||||
* math_exintinset.C: add #include <boost/scoped_ptr.hpp>
|
||||
|
||||
2003-09-15 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* command_inset.C
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "math_data.h"
|
||||
#include "math_mathmlstream.h"
|
||||
#include "math_support.h"
|
||||
#include "LColor.h"
|
||||
#include "support/std_ostream.h"
|
||||
|
||||
using std::max;
|
||||
|
@ -18,7 +18,9 @@
|
||||
#include "math_support.h"
|
||||
#include "math_replace.h"
|
||||
#include "debug.h"
|
||||
#include "LColor.h"
|
||||
#include "frontends/Painter.h"
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
using std::abs;
|
||||
using std::endl;
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "math_streamstr.h"
|
||||
#include "math_symbolinset.h"
|
||||
#include "debug.h"
|
||||
#include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
using std::auto_ptr;
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "math_mathmlstream.h"
|
||||
#include "math_parser.h"
|
||||
#include "math_streamstr.h"
|
||||
#include "LColor.h"
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
using std::auto_ptr;
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "math_data.h"
|
||||
#include "math_mathmlstream.h"
|
||||
#include "textpainter.h"
|
||||
#include "LColor.h"
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "math_data.h"
|
||||
#include "math_mathmlstream.h"
|
||||
#include "math_support.h"
|
||||
#include "LColor.h"
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
using std::auto_ptr;
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "math_streamstr.h"
|
||||
#include "debug.h"
|
||||
#include "funcrequest.h"
|
||||
#include "LColor.h"
|
||||
#include "frontends/Painter.h"
|
||||
#include "support/std_sstream.h"
|
||||
|
||||
|
@ -17,15 +17,18 @@
|
||||
#include "math_support.h"
|
||||
#include "math_extern.h"
|
||||
#include "math_charinset.h"
|
||||
#include "debug.h"
|
||||
#include "textpainter.h"
|
||||
#include "debug.h"
|
||||
#include "funcrequest.h"
|
||||
#include "support/std_sstream.h"
|
||||
#include "gettext.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
#include "lyxrc.h"
|
||||
|
||||
#include "frontends/Alert.h"
|
||||
#include "lyxrc.h"
|
||||
#include "gettext.h"
|
||||
|
||||
#include "support/std_sstream.h"
|
||||
|
||||
|
||||
using lyx::support::trim;
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "math_parser.h"
|
||||
#include "frontends/Painter.h"
|
||||
#include "debug.h"
|
||||
#include "LColor.h"
|
||||
|
||||
using std::auto_ptr;
|
||||
using std::endl;
|
||||
|
@ -14,9 +14,10 @@
|
||||
#include "math_cursor.h"
|
||||
#include "math_mathmlstream.h"
|
||||
#include "math_parser.h"
|
||||
#include "funcrequest.h"
|
||||
#include "debug.h"
|
||||
#include "BufferView.h"
|
||||
#include "debug.h"
|
||||
#include "funcrequest.h"
|
||||
#include "LColor.h"
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "math_rootinset.h"
|
||||
#include "math_data.h"
|
||||
#include "math_mathmlstream.h"
|
||||
#include "LColor.h"
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#include "math_symbolinset.h"
|
||||
#include "debug.h"
|
||||
#include "funcrequest.h"
|
||||
#include <boost/assert.hpp>
|
||||
|
||||
using std::max;
|
||||
using std::auto_ptr;
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "frontends/Painter.h"
|
||||
#include "math_mathmlstream.h"
|
||||
#include "LaTeXFeatures.h"
|
||||
#include "LColor.h"
|
||||
|
||||
using std::auto_ptr;
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include "math_data.h"
|
||||
#include "math_mathmlstream.h"
|
||||
#include "textpainter.h"
|
||||
#include "LColor.h"
|
||||
#include "frontends/Painter.h"
|
||||
|
||||
using std::auto_ptr;
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "math_parser.h"
|
||||
|
||||
#include "debug.h"
|
||||
#include "LColor.h"
|
||||
|
||||
#include "frontends/Painter.h"
|
||||
#include "frontends/font_metrics.h"
|
||||
|
@ -596,7 +596,9 @@ int RowPainter::paintLengthMarker(string const & prefix, VSpace const & vsp, int
|
||||
int d = 0;
|
||||
|
||||
LyXFont font;
|
||||
font.setColor(LColor::added_space).decSize().decSize();
|
||||
font.setColor(LColor::added_space);
|
||||
font.decSize();
|
||||
font.decSize();
|
||||
font_metrics::rectText(str, font, w, a, d);
|
||||
|
||||
pain_.rectText(leftx + 2 * arrow_size + 5,
|
||||
@ -622,7 +624,8 @@ int RowPainter::paintLengthMarker(string const & prefix, VSpace const & vsp, int
|
||||
int RowPainter::paintPageBreak(string const & label, int y)
|
||||
{
|
||||
LyXFont pb_font;
|
||||
pb_font.setColor(LColor::pagebreak).decSize();
|
||||
pb_font.setColor(LColor::pagebreak);
|
||||
pb_font.decSize();
|
||||
|
||||
int w = 0;
|
||||
int a = 0;
|
||||
@ -646,7 +649,8 @@ int RowPainter::paintPageBreak(string const & label, int y)
|
||||
int RowPainter::paintAppendixStart(int y)
|
||||
{
|
||||
LyXFont pb_font;
|
||||
pb_font.setColor(LColor::appendix).decSize();
|
||||
pb_font.setColor(LColor::appendix);
|
||||
pb_font.decSize();
|
||||
|
||||
string const label = _("Appendix");
|
||||
int w = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user