61 { "Cyan", CYAN, true }, // v |
61 { "Cyan", CYAN, true }, // v |
62 }; |
62 }; |
63 |
63 |
64 // ------------------------------------------------------------------------------------------------- |
64 // ------------------------------------------------------------------------------------------------- |
65 // |
65 // |
66 METHOD |
66 void ColoredLine::finalize() |
67 ColoredLine::finalize() -> void |
|
68 { |
67 { |
69 if (m_activeColor != DEFAULT) |
68 if (m_activeColor != DEFAULT) |
70 set_color (m_activeColor, false); |
69 set_color (m_activeColor, false); |
71 |
70 |
72 if (m_boldActive) |
71 if (m_boldActive) |
125 } |
123 } |
126 } |
124 } |
127 |
125 |
128 // ------------------------------------------------------------------------------------------------- |
126 // ------------------------------------------------------------------------------------------------- |
129 // |
127 // |
130 METHOD |
128 void ColoredLine::set_color (Color a, bool on) |
131 ColoredLine::set_color (Color a, bool on) -> void |
|
132 { |
129 { |
133 switch (a) |
130 switch (a) |
134 { |
131 { |
135 case BLACK: m_data << (on ? RLINE_ON_BLACK : RLINE_OFF_BLACK); break; |
132 case BLACK: m_data << (on ? RLINE_ON_BLACK : RLINE_OFF_BLACK); break; |
136 case RED: m_data << (on ? RLINE_ON_RED : RLINE_OFF_RED); break; |
133 case RED: m_data << (on ? RLINE_ON_RED : RLINE_OFF_RED); break; |
146 } |
143 } |
147 |
144 |
148 // ------------------------------------------------------------------------------------------------- |
145 // ------------------------------------------------------------------------------------------------- |
149 // How many rows does this line take up? |
146 // How many rows does this line take up? |
150 // |
147 // |
151 METHOD |
148 int ColoredLine::rows (int cols) const |
152 ColoredLine::rows (int cols) const -> int |
|
153 { |
149 { |
154 int rows = length() / cols; |
150 int rows = length() / cols; |
155 |
151 |
156 if (length() % cols != 0) |
152 if (length() % cols != 0) |
157 rows++; |
153 rows++; |