Mercurial > dwindows
comparison dwtest.c @ 643:9ab89d89e6b4
Add dw_listview_insert()
Default to using webkit for Gtk+ HTML widget
Add option to build with libgtkhtml2 - incomplete
Initial attempt to use customdraw for Win32 container - not working
Added dw_window_get_font() for Gtk+ - not implemented in other ports yet
Change package name from dw to dwindows for Linux ports - use dwindows-config now
Add debian package build target
author | mhessling@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 03 Oct 2010 00:34:36 +0000 |
parents | 9fa3cb5b3290 |
children | 388f2a48aaae |
comparison
equal
deleted
inserted
replaced
642:fda03b13ebda | 643:9ab89d89e6b4 |
---|---|
14 #define FILE_ICON_NAME "win\\file" | 14 #define FILE_ICON_NAME "win\\file" |
15 #elif GTK_MAJOR_VERSION > 1 | 15 #elif GTK_MAJOR_VERSION > 1 |
16 #define FIXEDFONT "monospace 10" | 16 #define FIXEDFONT "monospace 10" |
17 #define FOLDER_ICON_NAME "gtk/folder" | 17 #define FOLDER_ICON_NAME "gtk/folder" |
18 #define FILE_ICON_NAME "gtk/file" | 18 #define FILE_ICON_NAME "gtk/file" |
19 #define FOLDER_DATA_NAME folder_xpm | |
20 #define FOLDER_DATA_LENGTH sizeof(folder_xpm) | |
21 #else | 19 #else |
22 #define FIXEDFONT "fixed" | 20 #define FIXEDFONT "fixed" |
23 #define FOLDER_ICON_NAME "gtk/folder" | 21 #define FOLDER_ICON_NAME "gtk/folder" |
24 #define FILE_ICON_NAME "gtk/file" | 22 #define FILE_ICON_NAME "gtk/file" |
25 #define FOLDER_DATA_NAME folder_xpm | |
26 #define FOLDER_DATA_LENGTH sizeof(folder_xpm) | |
27 #endif | 23 #endif |
28 | 24 |
29 #define SCROLLBARWIDTH 14 | 25 #define SCROLLBARWIDTH 14 |
30 | |
31 /* XPM */ | |
32 static char * folder_xpm[] = { | |
33 "16 16 10 1", | |
34 " c None", | |
35 ". c #000000", | |
36 "+ c #AA9200", | |
37 "@ c #FFFFAA", | |
38 "# c #FFDB55", | |
39 "$ c #000000", | |
40 "% c #F7F7F7", | |
41 "& c #000000", | |
42 "* c #FFDBAA", | |
43 "= c #D5B655", | |
44 " ", | |
45 " &&&& ", | |
46 " &%%%%& ", | |
47 "&%@@@@%+++++$ ", | |
48 "&@@@@@@%%%%%$ ", | |
49 "&@*++++++++++++ ", | |
50 "&#+%%%%%%%%%*%+$", | |
51 "&#+@@@@@@@@@#@+$", | |
52 "&#+@@@@@@@@@.@+$", | |
53 "&#+@@**@**@@=@+$", | |
54 "&#+@########=@+$", | |
55 "&#+@########=@+$", | |
56 " ++++++++++++++$", | |
57 " $$$$$$$$$$$$$ ", | |
58 " ", | |
59 " "}; | |
60 | 26 |
61 unsigned long flStyle = DW_FCF_SYSMENU | DW_FCF_TITLEBAR | | 27 unsigned long flStyle = DW_FCF_SYSMENU | DW_FCF_TITLEBAR | |
62 DW_FCF_SHELLPOSITION | DW_FCF_TASKLIST | DW_FCF_DLGBORDER; | 28 DW_FCF_SHELLPOSITION | DW_FCF_TASKLIST | DW_FCF_DLGBORDER; |
63 | 29 |
64 unsigned long current_color = DW_RGB(100,100,100); | 30 unsigned long current_color = DW_RGB(100,100,100); |
994 for( i = 0; i < 500; i++ ) | 960 for( i = 0; i < 500; i++ ) |
995 { | 961 { |
996 free(text[i]); | 962 free(text[i]); |
997 } | 963 } |
998 free(text); | 964 free(text); |
965 /* now insert a couple of items */ | |
966 dw_listbox_insert( combobox2, "inserted item 2", 2 ); | |
967 dw_listbox_insert( combobox2, "inserted item 5", 5 ); | |
999 /* make a spinbutton */ | 968 /* make a spinbutton */ |
1000 spinbutton = dw_spinbutton_new( "", 0 ); /* no point in specifying text */ | 969 spinbutton = dw_spinbutton_new( "", 0 ); /* no point in specifying text */ |
1001 dw_box_pack_start( combox, spinbutton, 200, 20, TRUE, FALSE, 0); | 970 dw_box_pack_start( combox, spinbutton, 200, 20, TRUE, FALSE, 0); |
1002 dw_spinbutton_set_limits( spinbutton, 100, 1 ); | 971 dw_spinbutton_set_limits( spinbutton, 100, 1 ); |
1003 dw_spinbutton_set_pos( spinbutton, 30 ); | 972 dw_spinbutton_set_pos( spinbutton, 30 ); |