Mercurial > dwindows
comparison dwtest.c @ 1002:0802d6122ec7
Changes to the test program to use new font style for GTK2+.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 08 May 2011 06:24:52 +0000 |
parents | 2d80b4dcff9a |
children | 2c2fcfeeffcc |
comparison
equal
deleted
inserted
replaced
1001:4ef0e878fe06 | 1002:0802d6122ec7 |
---|---|
15 #elif defined(__MAC__) | 15 #elif defined(__MAC__) |
16 #define FIXEDFONT "9.Monaco" | 16 #define FIXEDFONT "9.Monaco" |
17 #define FOLDER_ICON_NAME "mac/folder" | 17 #define FOLDER_ICON_NAME "mac/folder" |
18 #define FILE_ICON_NAME "mac/file" | 18 #define FILE_ICON_NAME "mac/file" |
19 #elif GTK_MAJOR_VERSION > 1 | 19 #elif GTK_MAJOR_VERSION > 1 |
20 #define FIXEDFONT "monospace 10" | 20 #define FIXEDFONT "10.monospace" |
21 #define FOLDER_ICON_NAME "gtk/folder" | 21 #define FOLDER_ICON_NAME "gtk/folder" |
22 #define FILE_ICON_NAME "gtk/file" | 22 #define FILE_ICON_NAME "gtk/file" |
23 #else | 23 #else |
24 #define FIXEDFONT "fixed" | 24 #define FIXEDFONT "fixed" |
25 #define FOLDER_ICON_NAME "gtk/folder" | 25 #define FOLDER_ICON_NAME "gtk/folder" |
104 int mle_point=-1; | 104 int mle_point=-1; |
105 int image_x = 20, image_y = 20; | 105 int image_x = 20, image_y = 20; |
106 | 106 |
107 int font_width = 8; | 107 int font_width = 8; |
108 int font_height=12; | 108 int font_height=12; |
109 int rows=100,width1=6,cols=80; | 109 int rows=10,width1=6,cols=80; |
110 char *current_file = NULL; | 110 char *current_file = NULL; |
111 int timerid; | 111 int timerid; |
112 int num_lines=0; | 112 int num_lines=0; |
113 int max_linewidth=0; | 113 int max_linewidth=0; |
114 int current_row=0,current_col=0; | 114 int current_row=0,current_col=0; |
1346 notebookbox7 = dw_box_new( BOXVERT, 6 ); | 1346 notebookbox7 = dw_box_new( BOXVERT, 6 ); |
1347 notebookpage7 = dw_notebook_page_new( notebook, 1, FALSE ); | 1347 notebookpage7 = dw_notebook_page_new( notebook, 1, FALSE ); |
1348 dw_notebook_pack( notebook, notebookpage7, notebookbox7 ); | 1348 dw_notebook_pack( notebook, notebookpage7, notebookbox7 ); |
1349 dw_notebook_page_set_text( notebook, notebookpage7, "html"); | 1349 dw_notebook_page_set_text( notebook, notebookpage7, "html"); |
1350 | 1350 |
1351 #if 1 | |
1352 rawhtml = dw_html_new(1001); | 1351 rawhtml = dw_html_new(1001); |
1353 dw_box_pack_start( notebookbox7, rawhtml, 0, 100, TRUE, FALSE, 0); | 1352 dw_box_pack_start( notebookbox7, rawhtml, 0, 100, TRUE, FALSE, 0); |
1354 dw_html_raw(rawhtml, "<html><body><center><h1>dwtest</h1></center></body></html>"); | 1353 dw_html_raw(rawhtml, "<html><body><center><h1>dwtest</h1></center></body></html>"); |
1355 html = dw_html_new(1002); | 1354 html = dw_html_new(1002); |
1356 dw_box_pack_start( notebookbox7, html, 0, 100, TRUE, TRUE, 0); | 1355 dw_box_pack_start( notebookbox7, html, 0, 100, TRUE, TRUE, 0); |
1359 dw_html_url(html, "http://dwindows.netlabs.org"); | 1358 dw_html_url(html, "http://dwindows.netlabs.org"); |
1360 * but as the base file is XML, the Windows browser instance can't display it. | 1359 * but as the base file is XML, the Windows browser instance can't display it. |
1361 * Instead a pure HTML based web page is displayed. MHES 5/4/2008 | 1360 * Instead a pure HTML based web page is displayed. MHES 5/4/2008 |
1362 */ | 1361 */ |
1363 dw_html_url(html, "http://www.rexx.org"); | 1362 dw_html_url(html, "http://www.rexx.org"); |
1364 #endif | |
1365 | 1363 |
1366 notebookbox8 = dw_box_new( BOXVERT, 7 ); | 1364 notebookbox8 = dw_box_new( BOXVERT, 7 ); |
1367 notebookpage8 = dw_notebook_page_new( notebook, 1, FALSE ); | 1365 notebookpage8 = dw_notebook_page_new( notebook, 1, FALSE ); |
1368 dw_notebook_pack( notebook, notebookpage8, notebookbox8 ); | 1366 dw_notebook_pack( notebook, notebookpage8, notebookbox8 ); |
1369 dw_notebook_page_set_text( notebook, notebookpage8, "scrollbox"); | 1367 dw_notebook_page_set_text( notebook, notebookpage8, "scrollbox"); |