19 #ifndef __KATE_ATTRIBUTE_H__
20 #define __KATE_ATTRIBUTE_H__
43 SelectedTextColor = 0x80,
45 SelectedBGColor = 0x200,
52 TQFont font(
const TQFont& ref);
54 inline int width(KateFontStruct& fs,
const TQString& text,
int col,
int tabWidth)
const
55 {
return fs.width(text, col, bold(), italic(), tabWidth); };
58 inline int width(KateFontStruct& fs,
const TQChar& c,
int tabWidth)
const
59 {
return fs.width(c, bold(), italic(), tabWidth); };
61 inline bool itemSet(
int item)
const
62 {
return item & m_itemsSet; };
64 inline bool isSomethingSet()
const
65 {
return m_itemsSet; };
67 inline int itemsSet()
const
68 {
return m_itemsSet; };
70 inline void clearAttribute(
int item)
71 { m_itemsSet &= (~item); }
73 inline int weight()
const
76 void setWeight(
int weight);
78 inline bool bold()
const
79 {
return weight() >= TQFont::Bold; };
81 void setBold(
bool enable =
true);
83 inline bool italic()
const
86 void setItalic(
bool enable =
true);
88 inline bool overline()
const
89 {
return m_overline; };
91 void setOverline(
bool enable =
true);
93 inline bool underline()
const
94 {
return m_underline; };
96 void setUnderline(
bool enable =
true);
98 inline bool strikeOut()
const
99 {
return m_strikeout; };
101 void setStrikeOut(
bool enable =
true);
103 inline const TQColor& outline()
const
104 {
return m_outline; };
106 void setOutline(
const TQColor& color);
108 inline const TQColor& textColor()
const
109 {
return m_textColor; };
111 void setTextColor(
const TQColor& color);
113 inline const TQColor& selectedTextColor()
const
114 {
return m_selectedTextColor; };
116 void setSelectedTextColor(
const TQColor& color);
118 inline const TQColor& bgColor()
const
119 {
return m_bgColor; };
121 void setBGColor(
const TQColor& color);
123 inline const TQColor& selectedBGColor()
const
124 {
return m_selectedBGColor; };
126 void setSelectedBGColor(
const TQColor& color);
133 virtual void changed() { m_changed =
true; };
134 bool isChanged() {
bool ret = m_changed; m_changed =
false;
return ret; };
140 bool m_italic, m_underline, m_overline,m_strikeout, m_changed;
141 TQColor m_outline, m_textColor, m_selectedTextColor, m_bgColor, m_selectedBGColor;
The Attribute class incorporates all text decorations supported by Kate.