Rev 8017 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8017 | leency | 1 | |
8016 | leency | 2 | { |
4411 | leency | 3 | collection url; |
8016 | leency | 4 | collection_int xywh; |
5 | collection_int data; |
||
8011 | leency | 6 | int getid; |
8016 | leency | 7 | dword add(); |
8 | void clear(); |
||
9 | dword current_url(); |
||
10 | bool next_url(); |
||
11 | void set_data(); |
||
12 | void draw(); |
||
13 | }; |
||
4411 | leency | 14 | |
4486 | leency | 15 | |
8017 | leency | 16 | |
17 | |||
8016 | leency | 18 | { |
4411 | leency | 19 | char full_path[URL_SIZE]; |
8016 | leency | 20 | strncpy(#full_path, _path, URL_SIZE); |
21 | GetAbsoluteURL(#full_path, history.current()); |
||
22 | |||
23 | |||
24 | xywh.add(_x); |
||
25 | xywh.add(_y); |
||
26 | xywh.add(0); |
||
27 | xywh.add(0); |
||
28 | return full_path; |
||
29 | } |
||
30 | |||
31 | |||
32 | { |
||
33 | url.drop(); |
||
34 | xywh.drop(); |
||
35 | data.drop(); |
||
8008 | leency | 36 | getid = 0; |
8016 | leency | 37 | } |
4411 | leency | 38 | |
39 | |||
8016 | leency | 40 | { |
41 | return url.get(getid); |
||
42 | } |
||
43 | |||
44 | |||
45 | { |
||
46 | if (getid < url.count-1) { |
||
47 | getid++; |
||
48 | return 1; |
||
49 | } |
||
50 | return 0; |
||
51 | } |
||
52 | |||
53 | |||
54 | { |
||
55 | data.set(getid, _data); |
||
56 | } |
||
57 | |||
58 | |||
59 | { |
||
60 | int i, img_x, img_y; |
||
61 | |||
62 | |||
63 | { |
||
64 | img_x = xywh.get(i*4); |
||
65 | img_y = xywh.get(i*4 + 1); |
||
66 | |||
67 | |||
68 | { |
||
69 | if (cache.has(url.get(i))) |
||
70 | DrawLibimgImage(img_x + _x, img_y-_start + _y, cache.current_buf, cache.current_size); |
||
71 | } |
||
72 | } |
||
73 | } |
||
74 | |||
75 | |||
8020 | leency | 76 | { |
77 | libimg_image im; |
||
78 | img_decode stdcall (_data, _data_len, 0); |
||
79 | $or eax, eax |
||
80 | $jz __ERROR__ |
||
81 | |||
82 | |||
83 | im.set_vars(); |
||
84 | im.draw(_x, _y, im.w, im.h, 0, 0); |
||
85 | __ERROR__: |
||
86 | } |
||
87 | |||
88 | |||
8011 | leency | 89 | |
4411 | leency | 90 | |
6803 | leency | 91 | { |
4411 | leency | 92 | dword image; |
93 | dword imgw=0, imgh=0, img_lines_first=0, cur_pic=0; |
||
6803 | leency | 94 | |
4411 | leency | 95 | |
7742 | leency | 96 | //cur_pic = GetImage(#img_path); |
97 | |||
4411 | leency | 98 | |
99 | { |
||
100 | //cur_pic = GetImage("/sys/network/noimg.png"); |
||
5746 | leency | 101 | return; |
4411 | leency | 102 | } |
103 | |||
104 | |||
4674 | leency | 105 | imgh = DSWORD[pics[cur_pic].image+8]; |
106 | if (imgw > width1) imgw = width1; |
||
107 | |||
4411 | leency | 108 | |
7757 | leency | 109 | |
110 | |||
5718 | leency | 111 | if (top1 |
112 | { |
||
4411 | leency | 113 | img_lines_first=WB1.list.y-top1; |
4414 | leency | 114 | imgh=imgh-img_lines_first; |
4674 | leency | 115 | top1=WB1.list.y; |
4414 | leency | 116 | } |
4411 | leency | 117 | if (top1>WB1.list.y+WB1.list.h-imgh-5) //if image partly visible (at the bottom) |
5718 | leency | 118 | { |
4411 | leency | 119 | imgh=WB1.list.y+WB1.list.h-top1-5; |
4674 | leency | 120 | } |
4411 | leency | 121 | if (imgh<=0) return; |
4674 | leency | 122 | |
4411 | leency | 123 | |
4674 | leency | 124 | DrawBar(left1+imgw - 5, top1, WB1.list.w-imgw, imgh, page_bg); |
7743 | leency | 125 | DrawBar(WB1.list.x, top1+imgh, WB1.list.w, -imgh % WB1.list.item_h + WB1.list.item_h, page_bg); |
126 | if (link) |
||
5718 | leency | 127 | { |
4550 | leency | 128 | UnsafeDefineButton(left1 - 5, top1, imgw, imgh-1, links.count + 400 + BT_HIDE, 0xB5BFC9); |
7970 | leency | 129 | links.AddText(0, imgw, imgh-1, NOLINE, 1); |
130 | WB1.DrawPage(); |
||
7756 | leency | 131 | } |
4550 | leency | 132 | } |
4491 | leency | 133 | |
134 | |||
8011 | leency | 135 | |
136 | |||
8017 | leency | 137 | |
138 | |||
139 | dword _img::add(dword _path, _x, _y) {}; |
||
140 | void _img::clear() {}; |
||
141 | dword _img::current_url() {}; |
||
142 | bool _img::next_url() {}; |
||
143 | void _img::set_data(dword _data, _data_len) {}; |
||
144 | void _img::draw(int _x, _y, _start, _height) {}; |
||
145 | |||
146 | |||
147 |