sources/coloredline.cpp

changeset 88
08ccaf26cffd
parent 87
53c2aecb9704
child 100
d301ead29d7c
equal deleted inserted replaced
87:53c2aecb9704 88:08ccaf26cffd
27 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 27 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
28 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "coloredline.h" 31 #include "coloredline.h"
32 BEGIN_ZFC_NAMESPACE
32 33
33 struct ColorCodeInfo 34 struct ColorCodeInfo
34 { 35 {
35 const char* name; 36 const char* name;
36 Color color; 37 Color color;
37 bool bold; 38 bool bold;
38 }; 39 };
40
41 ColoredLine::ColoredLine() :
42 m_length (0),
43 m_final (false),
44 m_activeColor (DEFAULT),
45 m_boldActive (false),
46 m_colorCodeStage (0) {}
39 47
40 // ------------------------------------------------------------------------------------------------- 48 // -------------------------------------------------------------------------------------------------
41 // 49 //
42 void ColoredLine::finalize() 50 void ColoredLine::finalize()
43 { 51 {
154 if (length() % cols != 0) 162 if (length() % cols != 0)
155 rows++; 163 rows++;
156 164
157 return max (rows, 1); 165 return max (rows, 1);
158 } 166 }
167
168 END_ZFC_NAMESPACE

mercurial