Defining the Menus in the Application Theme

Defining the Menus in the Application Theme

BY 05 May 2016 General Support

This example shows how to add menus to the application. The example code creates an application with 3 views, which can be accessed from a menu bar at the top of the application window. The application also has a hidden menu that appears only when the menu button is pressed.

This feature is supported in mobile applications only.

~To define the application structure:

Define the main structure of the application:

typedef struct
appdata
{
   Evas_Object* win; // Main window
   Evas_Object* layout; // Edje layout
   Evas_Object* conform; // Conform
   Evas_Object *nf; // Naviframe to handle the views
   appmenu_s *menu; // Main menu
   appmenu_s *sidemenu; // Side menu
   mainview_s *main_view; // Main view (dayselector)
   calview_s *cal_view; // Calendar view
   dateview_s *date_view; // Date and time view
   settview_s *settings_view; // Settings view
   Eina_Bool sdmenu_up; // Boolean variable to keep the side menu status
} appdata_s;
This structure contains some specific variables for the views and the menus.

Written by