Rev 9730 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9730 | Rev 9731 | ||
---|---|---|---|
Line 58... | Line 58... | ||
58 | 58 | ||
59 | PROCEDURE drawTab (t: tTabs; id, x, y, width, height: INTEGER; s: ARRAY OF CHAR; modified: BOOLEAN); |
59 | PROCEDURE drawTab (t: tTabs; id, x, y, width, height: INTEGER; s: ARRAY OF CHAR; modified: BOOLEAN); |
60 | CONST |
60 | CONST |
61 | btnCloseSize = 14; |
61 | btnCloseSize = 14; |
62 | VAR |
62 | VAR |
63 | x2, y2, color: INTEGER; |
63 | x2, y2, color, closeColor, closeForeColor, textColor: INTEGER; |
64 | left, top: INTEGER; |
64 | left, top: INTEGER; |
65 | BEGIN |
65 | BEGIN |
66 | IF id = t.current THEN |
66 | IF id = t.current THEN |
67 | INC(height, curTabHeight - tabHeight); |
67 | INC(height, curTabHeight - tabHeight); |
68 | DEC(y, curTabHeight - tabHeight); |
- | |
69 | color := K.colors.light |
- | |
70 | ELSE |
- | |
71 | color := K.colors.work |
68 | DEC(y, curTabHeight - tabHeight) |
- | 69 | END; |
|
- | 70 | color := K.colors.work; |
|
72 | END; |
71 | textColor := K.colors.work_text; |
73 | DEC(x); INC(width); |
72 | DEC(x); INC(width); |
74 | x2 := x + width - 1; |
73 | x2 := x + width - 1; |
Line 75... | Line 74... | ||
75 | y2 := y + height - 1; |
74 | y2 := y + height - 1; |
76 | 75 | ||
77 | K.DrawRect(x, y, width, height, color); |
76 | K.DrawRect(x, y, width, height, color); |
Line 78... | Line 77... | ||
78 | K.DrawLine(x, y, x2, y, K.colors.line); |
77 | K.DrawLine(x, y, x2, y, K.colors.line); |
79 | K.DrawLine(x2, y, x2, y2, K.colors.line); |
78 | K.DrawLine(x2, y, x2, y2, K.colors.line); |
80 | 79 | ||
- | 80 | top := y + 3; |
|
- | 81 | IF id # t.current THEN |
|
81 | top := y + 3; |
82 | K.DrawLine(x2 - 1, y2, x, y2, K.colors.line); |
82 | IF id # t.current THEN |
83 | closeColor := K.colors.button; |
- | 84 | closeForeColor := K.colors.button_text |
|
- | 85 | ELSE |
|
83 | K.DrawLine(x2 - 1, y2, x, y2, K.colors.line) |
86 | INC(top, (curTabHeight - tabHeight) DIV 2); |
84 | ELSE |
87 | closeColor := btnCloseColor; |
Line 85... | Line 88... | ||
85 | INC(top, (curTabHeight - tabHeight) DIV 2) |
88 | closeForeColor := 0FFFFFFH |
86 | END; |
89 | END; |
87 | K.DrawLine(x, y2, x, y, K.colors.line); |
90 | K.DrawLine(x, y2, x, y, K.colors.line); |
88 | 91 | ||
89 | K.DrawText866bk(x + K.fontWidth + K.fontWidth DIV 2, y + (height - K.fontHeight) DIV 2, K.colors.work_text, color, s); |
92 | K.DrawText866bk(x + K.fontWidth + K.fontWidth DIV 2, y + (height - K.fontHeight) DIV 2, textColor, color, s); |
90 | IF modified THEN |
93 | IF modified THEN |
91 | K.DrawText866bk(x + K.fontWidth DIV 2, y + (height - K.fontHeight) DIV 2, K.colors.work_text, color, "*") |
94 | K.DrawText866bk(x + K.fontWidth DIV 2, y + (height - K.fontHeight) DIV 2, textColor, color, "*") |
92 | END; |
95 | END; |
93 | K.CreateButton(id + ORD({30}) + btnID, x + 1, y - 1, width - 1, height - 1, 0, ""); |
96 | K.CreateButton(id + ORD({30}) + btnID, x + 1, y - 1, width - 1, height - 1, 0, ""); |
94 | left := x + width - btnCloseSize - 5; |
97 | left := x + width - btnCloseSize - 5; |
95 | K.CreateButton(id + btnClose, left, top, btnCloseSize, btnCloseSize, btnCloseColor, ""); |
98 | K.CreateButton(id + btnClose, left, top, btnCloseSize, btnCloseSize, closeColor, ""); |
96 | K.DrawLine(left + 5, top + 4, left + btnCloseSize - 4, top + btnCloseSize - 5, 0FFFFFFH); |
99 | K.DrawLine(left + 5, top + 4, left + btnCloseSize - 4, top + btnCloseSize - 5, closeForeColor); |
97 | K.DrawLine(left + 4, top + 4, left + btnCloseSize - 4, top + btnCloseSize - 4, 0FFFFFFH); |
100 | K.DrawLine(left + 4, top + 4, left + btnCloseSize - 4, top + btnCloseSize - 4, closeForeColor); |
98 | K.DrawLine(left + 4, top + 5, left + btnCloseSize - 5, top + btnCloseSize - 4, 0FFFFFFH); |
101 | K.DrawLine(left + 4, top + 5, left + btnCloseSize - 5, top + btnCloseSize - 4, closeForeColor); |
Line 99... | Line 102... | ||
99 | K.DrawLine(left + 4, top + btnCloseSize - 4, left + btnCloseSize - 4, top + 4, 0FFFFFFH); |
102 | K.DrawLine(left + 4, top + btnCloseSize - 4, left + btnCloseSize - 4, top + 4, closeForeColor); |
100 | K.DrawLine(left + 4, top + btnCloseSize - 5, left + btnCloseSize - 5, top + 4, 0FFFFFFH); |
103 | K.DrawLine(left + 4, top + btnCloseSize - 5, left + btnCloseSize - 5, top + 4, closeForeColor); |