Rev 9175 | Rev 9431 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9175 | Rev 9410 | ||
---|---|---|---|
Line 30... | Line 30... | ||
30 | 30 | ||
Line 31... | Line 31... | ||
31 | TYPE |
31 | TYPE |
Line 32... | Line 32... | ||
32 | 32 | ||
- | 33 | tItem = POINTER TO RECORD (List.tItem) |
|
Line 33... | Line 34... | ||
33 | tItem = POINTER TO RECORD (List.tItem) |
34 | |
Line 34... | Line 35... | ||
34 | 35 | val: RW.tFileName; |
|
Line 44... | Line 45... | ||
44 | x, y: INTEGER |
45 | x, y: INTEGER |
Line 45... | Line 46... | ||
45 | 46 | ||
Line 46... | Line 47... | ||
46 | END; |
47 | END; |
47 | 48 | ||
48 | 49 | ||
49 | PROCEDURE drawTab (t: tTabs; id, x, y, width, height: INTEGER; s: ARRAY OF CHAR); |
50 | PROCEDURE drawTab (t: tTabs; id, x, y, width, height: INTEGER; s: ARRAY OF CHAR; modified: BOOLEAN); |
50 | VAR |
51 | VAR |
51 | x2, y2, color: INTEGER; |
52 | x2, y2, color: INTEGER; |
Line 66... | Line 67... | ||
66 | K.DrawLine(x2, y, x2, y2, K.borderColor); |
67 | K.DrawLine(x2, y, x2, y2, K.borderColor); |
67 | IF id # t.current THEN |
68 | IF id # t.current THEN |
68 | K.DrawLine(x2 - 1, y2, x, y2, K.borderColor); |
69 | K.DrawLine(x2 - 1, y2, x, y2, K.borderColor); |
69 | END; |
70 | END; |
70 | K.DrawLine(x, y2, x, y, K.borderColor); |
71 | K.DrawLine(x, y2, x, y, K.borderColor); |
- | 72 | ||
- | 73 | K.DrawText866bk(x + K.fontWidth + K.fontWidth DIV 2, y + (height - K.fontHeight) DIV 2, K.textColor, color, s); |
|
- | 74 | IF modified THEN |
|
71 | K.DrawText866bk(x + K.fontWidth, y + (height - K.fontHeight) DIV 2, K.textColor, color, s); |
75 | K.DrawText866bk(x + K.fontWidth DIV 2, y + (height - K.fontHeight) DIV 2, K.textColor, color, "*") |
- | 76 | END; |
|
72 | K.CreateButton(id + ORD({30}) + btnID, x + 1, y - 1, width - 1, height - 1, color, ""); |
77 | K.CreateButton(id + ORD({30}) + btnID, x + 1, y - 1, width - 1, height - 1, color, ""); |
73 | END drawTab; |
78 | END drawTab; |
Line 74... | Line 79... | ||
74 | 79 | ||
75 | 80 | ||
76 | PROCEDURE tabWidth (tab: tItem): INTEGER; |
81 | PROCEDURE tabWidth (tab: tItem): INTEGER; |
Line 77... | Line 82... | ||
77 | RETURN (LENGTH(tab.val) + 2)*K.fontWidth |
82 | RETURN (LENGTH(tab.val) + 3)*K.fontWidth |
78 | END tabWidth; |
83 | END tabWidth; |
Line 133... | Line 138... | ||
133 | item := List.getItem(t.strings, t.first); |
138 | item := List.getItem(t.strings, t.first); |
134 | n := t.first; |
139 | n := t.first; |
135 | WHILE (item # NIL) & (x <= xmax) DO |
140 | WHILE (item # NIL) & (x <= xmax) DO |
136 | width := tabWidth(item(tItem)); |
141 | width := tabWidth(item(tItem)); |
137 | IF x + width - 1 <= xmax THEN |
142 | IF x + width - 1 <= xmax THEN |
138 | drawTab(t, n, x + 1, y, width, t.height, item(tItem).val) |
143 | drawTab(t, n, x + 1, y, width, t.height, item(tItem).val, item(tItem).modified) |
139 | END; |
144 | END; |
140 | INC(n); |
145 | INC(n); |
141 | INC(x, width); |
146 | INC(x, width); |
142 | item := item.next |
147 | item := item.next |
143 | END |
148 | END |
Line 148... | Line 153... | ||
148 | VAR |
153 | VAR |
149 | item: tItem; |
154 | item: tItem; |
150 | BEGIN |
155 | BEGIN |
151 | NEW(item); |
156 | NEW(item); |
152 | item.val := s; |
157 | item.val := s; |
- | 158 | item.modified := FALSE; |
|
153 | List.append(t.strings, item); |
159 | List.append(t.strings, item); |
154 | END add; |
160 | END add; |
Line -... | Line 161... | ||
- | 161 | ||
- | 162 | ||
- | 163 | PROCEDURE modify* (t: tTabs; n: INTEGER; val: BOOLEAN); |
|
- | 164 | VAR |
|
- | 165 | item: List.tItem; |
|
- | 166 | BEGIN |
|
- | 167 | item := List.getItem(t.strings, n); |
|
- | 168 | IF item(tItem).modified # val THEN |
|
- | 169 | item(tItem).modified := val; |
|
- | 170 | draw(t) |
|
- | 171 | END |
|
- | 172 | END modify; |
|
155 | 173 | ||
156 | 174 | ||
157 | PROCEDURE rename* (t: tTabs; n: INTEGER; s: ARRAY OF CHAR); |
175 | PROCEDURE rename* (t: tTabs; n: INTEGER; s: ARRAY OF CHAR); |
158 | VAR |
176 | VAR |
159 | item: List.tItem; |
177 | item: List.tItem; |