Mercurial > MadButterfly
annotate inkscape/firefox/template/textmenu/main.c @ 429:9d5506968efb
Change the interface of rdman_shape_stext_new().
It had better to put text as 2nd argument after rdman. Since,
text content is more meaningful than x, y position for a text object.
author | Thinker K.F. Li <thinker@branda.to> |
---|---|
date | Wed, 29 Jul 2009 14:58:34 +0800 |
parents | 7d244a85dd68 |
children | 9b8dda201ccb |
rev | line source |
---|---|
371 | 1 #include <stdio.h> |
2 #include <mb.h> | |
3 #include <string.h> | |
4 //#include "menu.h" | |
5 #include "mbapp.h" | |
6 #include "animated_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 | |
22 MBApp *myApp; | |
23 | |
24 _MyApp_InitContent(int argc, char *argv[]) | |
25 { | |
26 MyAppData *data = MBAPP_DATA(myApp,MyAppData); | |
27 subject_t *key = MBAPP_keySubject(myApp); | |
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 | |
43 myApp = MBApp_Init("list"); | |
44 MBApp_setData(myApp,&data); | |
45 _MyApp_InitContent(argc,argv); | |
46 | |
47 MBApp_loop(myApp); | |
48 | |
49 return 0; | |
50 } | |
51 | |
52 /* vim: set ts=4 */ |