~~Title: Application "Structure" Menu Tutorial~~ ==== Defining the Application "Structure" ==== Define the structure of the menu application: typedef struct _Menu { Evas_Object* layout; // The "edje" layout Evas_Object *nf; // The Naviframe to handle the views Tbarmenu *menu; // The main menu Tbarmenu *sidemenu; // The side menu Mainview *main_view; // The main view Calview *cal_view; // The calendar view Dateview *date_view; // The date and time view Setview *settings_view; //The settings view Eina_Bool sdmenu_up; // A bool variable to keep the side menu status } Menu; This structure contains some specific variables for the views and the menus. Define the main view by using the structure ''mainview'', it is composed of a ''box'' (the main container), an image img, and a label ''lb_main''. typedef struct _Mainview { Evas_Object *box; //The main container of the view Evas_Object *img; //An image Evas_Object *lb_day; //A label } Mainview; The date view is very similar, it contains a ''box'', a ''datetime'' widget and a label ''lb_date''. typedef struct _Dateview { Evas_Object *box; //The main container of the view Evas_Object *datetime; //A datetime widget Evas_Object *lb_date; //A label } Dateview; The last view is the calendar, it contains a ''box'', a ''calendar'' and a label ''lb_cal''. typedef struct _Calview { Evas_Object *box; //The main container of the view Evas_Object *calendar; //A calendar widget Evas_Object *lb_cal; //A label widget } Calview; The last members of the application structure are the 2 menus. The main menu is fixed and visible, and the side menu is hidden on application starts. These menus are represented by the ''Tbarmenu'' structure. typedef struct _Tbarmenu { Evas_Object *tb; //The toolbar Elm_Object_Item *submenu; //The submenu item } Tbarmenu; \\ //**__The whole code__ : **// {{/code_c/tutorial/menu/structure_menu.h}} \\ //**__next__: **//[[/develop/legacy/tutorial/menu/theme|Defining the Application Theme]]