Subversion Repositories Kolibri OS

Rev

Rev 9526 | Rev 9648 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9526 Rev 9628
Line 1... Line 1...
1
(*
1
(*
2
    Copyright 2021 Anton Krotov
2
    Copyright 2021, 2022 Anton Krotov
Line 3... Line 3...
3
 
3
 
Line 4... Line 4...
4
    This file is part of CEdit.
4
    This file is part of CEdit.
5
 
5
 
Line 59... Line 59...
59
    x2, y2, color: INTEGER;
59
    x2, y2, color: INTEGER;
60
BEGIN
60
BEGIN
61
    IF id = t.current THEN
61
    IF id = t.current THEN
62
        INC(height, curTabHeight - tabHeight);
62
        INC(height, curTabHeight - tabHeight);
63
        DEC(y, curTabHeight - tabHeight);
63
        DEC(y, curTabHeight - tabHeight);
64
        color := K.lightColor
64
        color := K.colors.light
65
    ELSE
65
    ELSE
66
        color := K.winColor
66
        color := K.colors.work
67
    END;
67
    END;
68
    DEC(x); INC(width);
68
    DEC(x); INC(width);
69
    x2 := x + width - 1;
69
    x2 := x + width - 1;
70
    y2 := y + height - 1;
70
    y2 := y + height - 1;
Line 71... Line 71...
71
 
71
 
72
    K.DrawRect(x, y, width, height, color);
72
    K.DrawRect(x, y, width, height, color);
73
    K.DrawLine(x, y, x2, y, K.borderColor);
73
    K.DrawLine(x, y, x2, y, K.colors.line);
74
    K.DrawLine(x2, y, x2, y2, K.borderColor);
74
    K.DrawLine(x2, y, x2, y2, K.colors.line);
75
    IF id # t.current THEN
75
    IF id # t.current THEN
76
        K.DrawLine(x2 - 1, y2, x, y2, K.borderColor);
76
        K.DrawLine(x2 - 1, y2, x, y2, K.colors.line);
77
    END;
77
    END;
Line 78... Line 78...
78
    K.DrawLine(x, y2, x, y, K.borderColor);
78
    K.DrawLine(x, y2, x, y, K.colors.line);
79
 
79
 
80
    K.DrawText866bk(x + K.fontWidth + K.fontWidth DIV 2, y + (height - K.fontHeight) DIV 2, K.textColor, color, s);
80
    K.DrawText866bk(x + K.fontWidth + K.fontWidth DIV 2, y + (height - K.fontHeight) DIV 2, K.colors.work_text, color, s);
81
    IF modified THEN
81
    IF modified THEN
82
    	K.DrawText866bk(x + K.fontWidth DIV 2, y + (height - K.fontHeight) DIV 2, K.textColor, color, "*")
82
    	K.DrawText866bk(x + K.fontWidth DIV 2, y + (height - K.fontHeight) DIV 2, K.colors.work_text, color, "*")
83
    END;
83
    END;
Line 113... Line 113...
113
    item: List.tItem;
113
    item: List.tItem;
114
    scroll: BOOLEAN;
114
    scroll: BOOLEAN;
115
BEGIN
115
BEGIN
116
    y := t.y;
116
    y := t.y;
117
    x := t.x;
117
    x := t.x;
118
    K.DrawRect(x, y - (curTabHeight - tabHeight), t.width + (2*scrWidth + 2), t.height + (curTabHeight - tabHeight) - 1, K.winColor);
118
    K.DrawRect(x, y - (curTabHeight - tabHeight), t.width + (2*scrWidth + 2), t.height + (curTabHeight - tabHeight) - 1, K.colors.work);
119
    IF Width(t, 0, t.strings.count - 1) > t.width THEN
119
    IF Width(t, 0, t.strings.count - 1) > t.width THEN
120
        INC(x, 2*scrWidth);
120
        INC(x, 2*scrWidth);
121
        K.DeleteButton(btnLeft);
121
        K.DeleteButton(btnLeft);
122
        K.DeleteButton(btnRight);
122
        K.DeleteButton(btnRight);
123
        K.CreateButton(btnLeft, t.x, y, scrWidth, t.height - 1, K.btnColor, "<");
123
        K.CreateButton(btnLeft, t.x, y, scrWidth, t.height - 1, K.colors.button, "<");
124
        K.CreateButton(btnRight, t.x + scrWidth, y, scrWidth, t.height - 1, K.btnColor, ">");
124
        K.CreateButton(btnRight, t.x + scrWidth, y, scrWidth, t.height - 1, K.colors.button, ">");
125
        scroll := TRUE
125
        scroll := TRUE
126
    ELSE
126
    ELSE
127
        t.first := 0;
127
        t.first := 0;
128
        scroll := FALSE
128
        scroll := FALSE
129
    END;
129
    END;
Line 143... Line 143...
143
    END;
143
    END;
144
    IF n < t.first THEN
144
    IF n < t.first THEN
145
        t.first := n
145
        t.first := n
146
    END;
146
    END;
Line 147... Line 147...
147
 
147
 
148
    K.DrawRect(x, y, t.width, t.height - 1, K.winColor);
148
    K.DrawRect(x, y, t.width, t.height - 1, K.colors.work);
149
    K.DrawLine(x, y + tabHeight - 1, x + t.width - 1 + 2*scrWidth*(1 - ORD(scroll)), y + tabHeight - 1, K.borderColor);
149
    K.DrawLine(x, y + tabHeight - 1, x + t.width - 1 + 2*scrWidth*(1 - ORD(scroll)), y + tabHeight - 1, K.colors.line);
150
    item := List.getItem(t.strings, t.first);
150
    item := List.getItem(t.strings, t.first);
151
    n := t.first;
151
    n := t.first;
152
    WHILE (item # NIL) & (x <= xmax) DO
152
    WHILE (item # NIL) & (x <= xmax) DO
153
        width := tabWidth(item(tItem));
153
        width := tabWidth(item(tItem));