Mercurial > dwindows
comparison dwtest.c @ 1186:ce83df520be0
Remove the MDI notebook tab from DEPRECATED.
Since it should work without error on all platforms now.
Also no longer save unused tree item handles to avoid
compiler warnings with recent versions of gcc.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 27 Sep 2011 20:10:15 +0000 |
parents | 58b5374355ab |
children | 76262040ed5f |
comparison
equal
deleted
inserted
replaced
1185:415c25f87d57 | 1186:ce83df520be0 |
---|---|
955 dw_signal_connect(mainwindow, DW_SIGNAL_KEY_PRESS, DW_SIGNAL_FUNC(keypress_callback), NULL); | 955 dw_signal_connect(mainwindow, DW_SIGNAL_KEY_PRESS, DW_SIGNAL_FUNC(keypress_callback), NULL); |
956 } | 956 } |
957 | 957 |
958 void tree_add(void) | 958 void tree_add(void) |
959 { | 959 { |
960 HTREEITEM t1,t2,t3,t4,t5,t6; | 960 HTREEITEM t1,t2; |
961 HWND listbox; | 961 HWND listbox; |
962 | 962 |
963 /* create a box to pack into the notebook page */ | 963 /* create a box to pack into the notebook page */ |
964 listbox = dw_listbox_new(1024, TRUE); | 964 listbox = dw_listbox_new(1024, TRUE); |
965 dw_box_pack_start( notebookbox3, listbox, 500, 200, TRUE, TRUE, 0); | 965 dw_box_pack_start( notebookbox3, listbox, 500, 200, TRUE, TRUE, 0); |
988 dw_signal_connect(tree, DW_SIGNAL_ITEM_CONTEXT, DW_SIGNAL_FUNC(item_context_cb), (void *)tree_status); | 988 dw_signal_connect(tree, DW_SIGNAL_ITEM_CONTEXT, DW_SIGNAL_FUNC(item_context_cb), (void *)tree_status); |
989 dw_signal_connect(tree, DW_SIGNAL_ITEM_SELECT, DW_SIGNAL_FUNC(item_select_cb), (void *)tree_status); | 989 dw_signal_connect(tree, DW_SIGNAL_ITEM_SELECT, DW_SIGNAL_FUNC(item_select_cb), (void *)tree_status); |
990 | 990 |
991 t1 = dw_tree_insert(tree, "tree folder 1", foldericon, NULL, (void *)1 ); | 991 t1 = dw_tree_insert(tree, "tree folder 1", foldericon, NULL, (void *)1 ); |
992 t2 = dw_tree_insert(tree, "tree folder 2", foldericon, NULL, (void *)2 ); | 992 t2 = dw_tree_insert(tree, "tree folder 2", foldericon, NULL, (void *)2 ); |
993 t3 = dw_tree_insert(tree, "tree file 1", fileicon, t1, (void *)3 ); | 993 dw_tree_insert(tree, "tree file 1", fileicon, t1, (void *)3 ); |
994 t4 = dw_tree_insert(tree, "tree file 2", fileicon, t1, (void *)4 ); | 994 dw_tree_insert(tree, "tree file 2", fileicon, t1, (void *)4 ); |
995 t5 = dw_tree_insert(tree, "tree file 3", fileicon, t2, (void *)5 ); | 995 dw_tree_insert(tree, "tree file 3", fileicon, t2, (void *)5 ); |
996 t6 = dw_tree_insert(tree, "tree file 4", fileicon, t2, (void *)6 ); | 996 dw_tree_insert(tree, "tree file 4", fileicon, t2, (void *)6 ); |
997 /* set the folder name and icon again to show error with dw_tree_item_change under GTK 2.0 */ | 997 /* set the folder name and icon again to show error with dw_tree_item_change under GTK 2.0 */ |
998 dw_tree_item_change(tree, t1, "tree folder 1", foldericon ); | 998 dw_tree_item_change(tree, t1, "tree folder 1", foldericon ); |
999 dw_tree_item_change(tree, t2, "tree folder 2", foldericon ); | 999 dw_tree_item_change(tree, t2, "tree folder 2", foldericon ); |
1000 } | 1000 } |
1001 | 1001 |
1223 dw_window_redraw( filetoolbarbox ); | 1223 dw_window_redraw( filetoolbarbox ); |
1224 dw_window_redraw( mainwindow ); | 1224 dw_window_redraw( mainwindow ); |
1225 } | 1225 } |
1226 } | 1226 } |
1227 | 1227 |
1228 #ifdef DEPRECATED | |
1229 void mdi_add(void) | 1228 void mdi_add(void) |
1230 { | 1229 { |
1231 HWND mdibox, mdi, mdi1w, mdi1box, ef, mdi2w, mdi2box, bb; | 1230 HWND mdibox, mdi, mdi1w, mdi1box, ef, mdi2w, mdi2box, bb; |
1232 | 1231 |
1233 /* create a box to pack into the notebook page */ | 1232 /* create a box to pack into the notebook page */ |
1255 bb = dw_button_new("Browse", 0); | 1254 bb = dw_button_new("Browse", 0); |
1256 dw_box_pack_start(mdi2box, bb, 60, 30, FALSE, FALSE, 4); | 1255 dw_box_pack_start(mdi2box, bb, 60, 30, FALSE, FALSE, 4); |
1257 dw_window_set_size(mdi2w, 200, 200); | 1256 dw_window_set_size(mdi2w, 200, 200); |
1258 dw_window_show(mdi2w); | 1257 dw_window_show(mdi2w); |
1259 } | 1258 } |
1260 #endif | |
1261 | 1259 |
1262 void menu_add(void) | 1260 void menu_add(void) |
1263 { | 1261 { |
1264 HMENUI menuitem,menu; | 1262 HMENUI menuitem,menu; |
1265 | 1263 |
1342 ULONG notebookpage1; | 1340 ULONG notebookpage1; |
1343 ULONG notebookpage2; | 1341 ULONG notebookpage2; |
1344 ULONG notebookpage3; | 1342 ULONG notebookpage3; |
1345 ULONG notebookpage4; | 1343 ULONG notebookpage4; |
1346 ULONG notebookpage5; | 1344 ULONG notebookpage5; |
1347 #ifdef DEPRECATED | |
1348 ULONG notebookpage6; | 1345 ULONG notebookpage6; |
1349 #endif | |
1350 ULONG notebookpage7; | 1346 ULONG notebookpage7; |
1351 ULONG notebookpage8; | 1347 ULONG notebookpage8; |
1352 | 1348 |
1353 dw_init(TRUE, argc, argv); | 1349 dw_init(TRUE, argc, argv); |
1354 | 1350 |
1392 notebookpage5 = dw_notebook_page_new( notebook, 1, FALSE ); | 1388 notebookpage5 = dw_notebook_page_new( notebook, 1, FALSE ); |
1393 dw_notebook_pack( notebook, notebookpage5, notebookbox5 ); | 1389 dw_notebook_pack( notebook, notebookpage5, notebookbox5 ); |
1394 dw_notebook_page_set_text( notebook, notebookpage5, "buttons"); | 1390 dw_notebook_page_set_text( notebook, notebookpage5, "buttons"); |
1395 buttons_add(); | 1391 buttons_add(); |
1396 | 1392 |
1397 #ifdef DEPRECATED | |
1398 notebookbox6 = dw_box_new( BOXVERT, 5 ); | 1393 notebookbox6 = dw_box_new( BOXVERT, 5 ); |
1399 notebookpage6 = dw_notebook_page_new( notebook, 1, FALSE ); | 1394 notebookpage6 = dw_notebook_page_new( notebook, 1, FALSE ); |
1400 dw_notebook_pack( notebook, notebookpage6, notebookbox6 ); | 1395 dw_notebook_pack( notebook, notebookpage6, notebookbox6 ); |
1401 dw_notebook_page_set_text( notebook, notebookpage6, "mdi"); | 1396 dw_notebook_page_set_text( notebook, notebookpage6, "mdi"); |
1402 mdi_add(); | 1397 mdi_add(); |
1403 #endif | |
1404 | 1398 |
1405 notebookbox7 = dw_box_new( BOXVERT, 6 ); | 1399 notebookbox7 = dw_box_new( BOXVERT, 6 ); |
1406 notebookpage7 = dw_notebook_page_new( notebook, 1, FALSE ); | 1400 notebookpage7 = dw_notebook_page_new( notebook, 1, FALSE ); |
1407 dw_notebook_pack( notebook, notebookpage7, notebookbox7 ); | 1401 dw_notebook_pack( notebook, notebookpage7, notebookbox7 ); |
1408 dw_notebook_page_set_text( notebook, notebookpage7, "html"); | 1402 dw_notebook_page_set_text( notebook, notebookpage7, "html"); |