Rev 5978 | Rev 5982 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5978 | Rev 5981 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | #ifndef AUTOBUILD |
6 | #ifndef AUTOBUILD |
7 | #include "lang.h--" |
7 | #include "lang.h--" |
8 | #endif |
8 | #endif |
Line 9... | Line 9... | ||
9 | 9 | ||
10 | //libraries |
10 | //libraries |
11 | #define MEMSIZE 0x100000 |
11 | #define MEMSIZE 1060000 |
12 | #include "..\lib\gui.h" |
12 | #include "..\lib\gui.h" |
13 | #include "..\lib\draw_buf.h" |
13 | #include "..\lib\draw_buf.h" |
14 | #include "..\lib\list_box.h" |
14 | #include "..\lib\list_box.h" |
15 | #include "..\lib\cursor.h" |
15 | #include "..\lib\cursor.h" |
- | 16 | #include "..\lib\collection.h" |
|
- | 17 | #include "..\lib\font.h" |
|
16 | #include "..\lib\collection.h" |
18 | |
17 | //*.obj libraries |
19 | //*.obj libraries |
18 | #include "..\lib\obj\box_lib.h" |
20 | #include "..\lib\obj\box_lib.h" |
19 | #include "..\lib\obj\libio_lib.h" |
21 | #include "..\lib\obj\libio_lib.h" |
20 | #include "..\lib\obj\libimg_lib.h" |
22 | #include "..\lib\obj\libimg_lib.h" |
Line 44... | Line 46... | ||
44 | 46 | ||
45 | #define URL_SERVICE_HISTORY "WebView://history" |
47 | #define URL_SERVICE_HISTORY "WebView://history" |
46 | #define URL_SERVICE_HOME "WebView://home" |
48 | #define URL_SERVICE_HOME "WebView://home" |
Line 47... | Line -... | ||
47 | #define URL_SERVICE_SOURCE "WebView://source:" |
- | |
48 | 49 | #define URL_SERVICE_SOURCE "WebView://source:" |
|
Line 49... | Line 50... | ||
49 | 50 | ||
50 | proc_info Form; |
51 | proc_info Form; |
Line 113... | Line 114... | ||
113 | CreateDir("/tmp0/1/downloads"); |
114 | CreateDir("/tmp0/1/downloads"); |
114 | if (param) strcpy(#URL, #param); else strcpy(#URL, URL_SERVICE_HOME); |
115 | if (param) strcpy(#URL, #param); else strcpy(#URL, URL_SERVICE_HOME); |
115 | WB1.DrawBuf.zoom = 1; |
116 | WB1.DrawBuf.zoom = 1; |
116 | WB1.list.SetFont(8, 14, 10111000b); |
117 | WB1.list.SetFont(8, 14, 10111000b); |
117 | WB1.list.no_selection = true; |
118 | WB1.list.no_selection = true; |
- | 119 | //font init |
|
- | 120 | font.no_bg_copy = true; |
|
- | 121 | font.bg_color = 0xFFFFFF; |
|
- | 122 | font.load(DEFAULT_FONT); |
|
- | 123 | if (!font.data) { |
|
- | 124 | notify("'Error: Font is not loaded.' -E"); |
|
- | 125 | ExitProcess(); |
|
- | 126 | } |
|
- | 127 | // |
|
118 | SetEventMask(0xa7); |
128 | SetEventMask(0xa7); |
119 | BEGIN_LOOP_APPLICATION: |
129 | BEGIN_LOOP_APPLICATION: |
120 | WaitEventTimeout(2); |
130 | WaitEventTimeout(2); |
121 | switch(EAX & 0xFF) |
131 | switch(EAX & 0xFF) |
122 | { |
132 | { |
Line 248... | Line 258... | ||
248 | WB1.list.column_max = WB1.list.w - scroll_wv.size_x / WB1.list.font_w; |
258 | WB1.list.column_max = WB1.list.w - scroll_wv.size_x / WB1.list.font_w; |
249 | WB1.list.visible = WB1.list.h - 5 / WB1.list.item_h; |
259 | WB1.list.visible = WB1.list.h - 5 / WB1.list.item_h; |
250 | if (WB1.list.w!=WB1.DrawBuf.bufw) WB1.DrawBuf.Init(WB1.list.x, WB1.list.y, WB1.list.w, WB1.list.h * 30); |
260 | if (WB1.list.w!=WB1.DrawBuf.bufw) WB1.DrawBuf.Init(WB1.list.x, WB1.list.y, WB1.list.w, WB1.list.h * 30); |
251 | } |
261 | } |
Line -... | Line 262... | ||
- | 262 | ||
- | 263 | int list__w; |
|
252 | 264 | ||
253 | void Draw_Window() |
265 | void Draw_Window() |
254 | { |
266 | { |
255 | DrawBar(0,0, Form.cwidth,TOOLBAR_H-2, panel_color); |
267 | DrawBar(0,0, Form.cwidth,TOOLBAR_H-2, panel_color); |
256 | DrawBar(0,TOOLBAR_H-2, Form.cwidth,1, 0xD7D0D3); |
268 | DrawBar(0,TOOLBAR_H-2, Form.cwidth,1, 0xD7D0D3); |
Line 266... | Line 278... | ||
266 | DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,STATUSBAR_H, col_bg); |
278 | DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,STATUSBAR_H, col_bg); |
267 | DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, border_color); |
279 | DrawBar(0,Form.cheight - STATUSBAR_H, Form.cwidth,1, border_color); |
268 | if (!header) OpenPage(); else { WB1.DrawPage(); DrawEditBox(); } |
280 | if (!header) OpenPage(); else { WB1.DrawPage(); DrawEditBox(); } |
269 | DrawRectangle(scroll_wv.start_x, scroll_wv.start_y, scroll_wv.size_x, scroll_wv.size_y-1, scroll_wv.bckg_col); |
281 | DrawRectangle(scroll_wv.start_x, scroll_wv.start_y, scroll_wv.size_x, scroll_wv.size_y-1, scroll_wv.bckg_col); |
270 | DrawProgress(); |
282 | DrawProgress(); |
- | 283 | ||
- | 284 | list__w = 200; |
|
- | 285 | font.buffer_size = 0; |
|
- | 286 | font.size.height = 200; |
|
- | 287 | font.color = 0; |
|
- | 288 | font.size.text = 11; |
|
- | 289 | font.prepare_buf(10,10,list__w,font.size.height, "Hello World!"); |
|
- | 290 | font.color = 0xFF00FF; |
|
- | 291 | font.size.text = 12; |
|
- | 292 | font.prepare_buf(10,23,list__w,font.size.height, "How are you?"); |
|
- | 293 | font.color = 0x2E74BB; |
|
- | 294 | font.size.text = 15; |
|
- | 295 | font.prepare_buf(11,40,list__w,font.size.height, "Fine"); |
|
- | 296 | SmoothFont(font.buffer, font.size.width, font.size.height); |
|
- | 297 | _PutImage(0,0,list__w,font.size.height,font.buffer); |
|
271 | } |
298 | } |
Line 272... | Line 299... | ||
272 | 299 | ||
273 | 300 |