Rev 6631 | Rev 6651 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6631 | Rev 6638 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | // // |
15 | // // |
16 | // DATA // |
16 | // DATA // |
17 | // // |
17 | // // |
18 | //===================================================// |
18 | //===================================================// |
Line 19... | Line 19... | ||
19 | 19 | ||
20 | ?define WINDOW_HEADER "Clipboard Viewer v1.01" |
20 | ?define WINDOW_HEADER "Clipboard Viewer v1.02" |
21 | ?define T_DELETE_LAST_SLOT "Delete last slot" |
21 | ?define T_DELETE_LAST_SLOT "Delete last slot" |
22 | ?define T_DELETE_ALL_SLOTS "Delete all slots" |
22 | ?define T_DELETE_ALL_SLOTS "Delete all slots" |
23 | ?define T_RESET_BUFFER_LOCK "Reset the lock buffer" |
23 | ?define T_RESET_BUFFER_LOCK "Reset the lock buffer" |
24 | ?define T_COLUMNS_TITLE "# | Data size | Data type | Contents" |
24 | ?define T_COLUMNS_TITLE "# | Data size | Data type | Contents" |
Line 147... | Line 147... | ||
147 | scroll1.size_y = list.h+2; |
147 | scroll1.size_y = list.h+2; |
Line 148... | Line 148... | ||
148 | 148 | ||
149 | scrollbar_v_draw(#scroll1); |
149 | scrollbar_v_draw(#scroll1); |
Line -... | Line 150... | ||
- | 150 | } |
|
- | 151 | ||
- | 152 | replace_char(dword in_str, char from_char, to_char, int length) { |
|
- | 153 | int i; |
|
- | 154 | for (i=0; i |
|
- | 155 | if (ESBYTE[in_str+i] == from_char) ESBYTE[in_str+i] = to_char; |
|
- | 156 | } |
|
Line 150... | Line 157... | ||
150 | } |
157 | ESBYTE[in_str+length]=0; |
151 | 158 | } |
|
152 | 159 | ||
153 | void Draw_List() |
- | |
154 | { |
160 | void Draw_List() |
155 | int i, yyy, list_last, slot_data_type_number; |
161 | { |
- | 162 | int i, yyy, list_last, slot_data_type_number, length; |
|
Line 156... | Line 163... | ||
156 | dword text_color = 0x000000; |
163 | dword line_text[2048]; |
157 | char line_text[512]; |
164 | dword size_kb; |
Line 158... | Line -... | ||
158 | dword size_kb; |
- | |
159 | 165 | dword text_color = 0; |
|
Line 160... | Line 166... | ||
160 | list.count = clipboard.GetSlotCount(); |
166 | |
161 | list.CheckDoesValuesOkey(); |
167 | list.count = clipboard.GetSlotCount(); |
Line 179... | Line 185... | ||
179 | WriteText(list.x+140, yyy+list.text_y, list.font_type, text_color, data_type[slot_data_type_number]); |
185 | WriteText(list.x+140, yyy+list.text_y, list.font_type, text_color, data_type[slot_data_type_number]); |
180 | WriteText(list.x+list.w - 88, yyy+list.text_y, list.font_type, 0x006597, T_VIEW_OPTIONS); |
186 | WriteText(list.x+list.w - 88, yyy+list.text_y, list.font_type, 0x006597, T_VIEW_OPTIONS); |
181 | DefineButton(list.x+list.w - 95, yyy, 50, list.item_h, 100+i+BT_HIDE, NULL); |
187 | DefineButton(list.x+list.w - 95, yyy, 50, list.item_h, 100+i+BT_HIDE, NULL); |
182 | DefineButton(list.x+list.w - 95 + 51, yyy, 40, list.item_h, 300+i+BT_HIDE, NULL); |
188 | DefineButton(list.x+list.w - 95 + 51, yyy, 40, list.item_h, 300+i+BT_HIDE, NULL); |
Line -... | Line 189... | ||
- | 189 | ||
- | 190 | length = list.w-236 - 95 / list.font_w - 2; |
|
183 | 191 | if (clipboard.slot_data.size-8 < length) length = clipboard.slot_data.size-8; |
|
- | 192 | memmov(#line_text, clipboard.slot_data.content, length); |
|
184 | strlcpy(#line_text, clipboard.slot_data.content, list.w-236 - 95/list.font_w-3); |
193 | replace_char(#line_text, 0, 31, length); // 31 is a dot |
185 | WriteText(list.x+236, yyy+list.text_y, list.font_type, text_color, #line_text); |
194 | WriteText(list.x+236, yyy+list.text_y, list.font_type, text_color, #line_text); |
186 | } |
195 | } |
187 | DrawBar(list.x,i*list.item_h+list.y, list.w, -i*list.item_h+ list.h, 0xFFFfff); |
196 | DrawBar(list.x,i*list.item_h+list.y, list.w, -i*list.item_h+ list.h, 0xFFFfff); |
- | 197 | if (!list.count) WriteText(-strlen(T_CLIPBOARD_IS_EMPTY)*list.font_w + list.w / 2 + list.x + 1, |
|
188 | if (!list.count) WriteText(-strlen(T_CLIPBOARD_IS_EMPTY)*list.font_w + list.w / 2 + list.x + 1, list.h / 2 - 8 + list.y, list.font_type, 0x999999, T_CLIPBOARD_IS_EMPTY); |
198 | list.h / 2 - 8 + list.y, list.font_type, 0x999999, T_CLIPBOARD_IS_EMPTY); |
189 | DrawScroller(); |
199 | DrawScroller(); |
Line 190... | Line 200... | ||
190 | } |
200 | } |
191 | 201 |