Mercurial > MadButterfly
annotate inkscape/firefox/template/textmenu/main.c @ 1311:e6bb9d00341f
Make content dom and comp_dock synchronized
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Thu, 20 Jan 2011 13:08:26 +0800 |
parents | 26c302b47de1 |
children |
rev | line source |
---|---|
371 | 1 #include <stdio.h> |
2 #include <mb.h> | |
3 #include <string.h> | |
4 //#include "menu.h" | |
456
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
454
diff
changeset
|
5 #include "mb_af.h" |
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
454
diff
changeset
|
6 #include "mb_ani_menu.h" |
376
7d244a85dd68
Change the screen layout to make it more like an usual IDE.
wycc
parents:
371
diff
changeset
|
7 #include "%n.h" |
371 | 8 |
9 | |
10 char *menus[] = { | |
11 "This is item 1", | |
12 "This is item 2", | |
13 "This is item 3", | |
14 "This is item 4", | |
15 "This is item 5", | |
16 "This is item 6", | |
17 "This is item 7", | |
18 "This is item 8" | |
19 }; | |
20 | |
21 | |
454
9b8dda201ccb
Make naming convention consistent with MadButterfly.
Thinker K.F. Li <thinker@branda.to>
parents:
376
diff
changeset
|
22 mbaf_t *myApp; |
371 | 23 |
24 _MyApp_InitContent(int argc, char *argv[]) | |
25 { | |
454
9b8dda201ccb
Make naming convention consistent with MadButterfly.
Thinker K.F. Li <thinker@branda.to>
parents:
376
diff
changeset
|
26 MyAppData *data = MBAF_DATA(myApp,MyAppData); |
9b8dda201ccb
Make naming convention consistent with MadButterfly.
Thinker K.F. Li <thinker@branda.to>
parents:
376
diff
changeset
|
27 subject_t *key = MBAF_KB_SUBJECT(myApp); |
371 | 28 char name[255]; |
29 coord_t *l; | |
30 int i; | |
31 mb_sprite_t *sprite=myApp->rootsprite; | |
32 | |
33 data->m = mb_animated_menu_new(myApp,myApp->rootsprite,"item",menus); | |
34 mb_animated_menu_set_callback(data->m, myselect_callback); | |
35 MyApp_InitContent(myApp,argc,argv); | |
36 } | |
37 | |
38 int main(int argc, char * const argv[]) { | |
39 subject_t *subject; | |
40 mb_obj_t *button; | |
41 MyAppData data; | |
42 | |
456
26c302b47de1
Change name of header files.
Thinker K.F. Li <thinker@branda.to>
parents:
454
diff
changeset
|
43 myApp = mbaf_init("list", ""); |
454
9b8dda201ccb
Make naming convention consistent with MadButterfly.
Thinker K.F. Li <thinker@branda.to>
parents:
376
diff
changeset
|
44 mbaf_set_data(myApp,&data); |
371 | 45 _MyApp_InitContent(argc,argv); |
46 | |
454
9b8dda201ccb
Make naming convention consistent with MadButterfly.
Thinker K.F. Li <thinker@branda.to>
parents:
376
diff
changeset
|
47 mbaf_loop(myApp); |
371 | 48 |
49 return 0; | |
50 } | |
51 | |
52 /* vim: set ts=4 */ |