Escolar Documentos
Profissional Documentos
Cultura Documentos
Definition: It is a menu screen which consists of menu list in rows and columns.
Each menu list item consists of a bmp image and a text above it. User can specify any
number of rows and columns which can be displayed within the horizontal and vertical
resolution on screen. Navigation is provided with the four arrow keys UP, DOWN,
LEFT, RIGHT with the following rules.
}button_resource;
} menu_resource;
Private structure:
1. struct _button
{
o_shape shapes [4];
o_pixmap_rl *pixmapImg;
char *text;
int x;
int y;
ButtonState state;
};
2. struct _menu
{
o_shape *shapes;
int NoOfMenuItems;
int NoOfRows;
ID *groupList;
NavigationType state;
};
Public Functions:
1. init_button_class( ):
2. init_menu_class( menu_resource_ID ):
Prototype: void init_menu_class( ID );
Return type: void
Argument(s) if any: menu_resource_ID – a unique user defined identifier to
identify the menu gadgetResource.
4. ShowHide_Arrow():
Prototype: void ShowHide_Arrow( ArrowType arrtype, DisplayStatus status );
Return type: void
Argument(s) if any: arrtype – indicates the arrow type (UP, DOWN, LEFT,
RIGHT).
status – indicates the display status (SHOW, HIDE)
5. get_prev_row():
Prototype: int get_prev_row( o_gadget* );
Return type: int
Argument(s) if any: o_gadget* – pointer to the gadget
6. get_next_row():
Prototype: int get_next_row( o_gadget* );
Return type: int
Argument(s) if any: o_gadget* – pointer to the gadget
7. handle_arrow_icons():
Prototype: void handle_arrow_icons( group * this );
Return type: void
Argument(s) if any: this –pointer to the button gadget.
It handles the display of the arrow icons according to the current focused gadget.
Private Functions:
1. button_message_handler() :
Prototype: void button_message_handler( button * this, o_message * msg );
Return type: void
Argument(s) if any: this –pointer to the button gadget.
msg – pointer to the UIMS generated message from the
application.
It handles all the UIMS generated messages received and forwarded by the
application.
2. handle_key_up() :
Prototype: void handle_key_up( button * this, o_message *msg )
Return type: void
Argument(s) if any: this –pointer to the button gadget.
msg – pointer to the UIMS generated message from the
application.
3. handle_key_down( )
Prototype: handle_key_down( keyBoard * this, o_message *msg )
Return type: void
Argument(s) if any: this –pointer to the gadget.
msg – pointer to the UIMS generated message from the
application.
4. set_button_state()
Prototype: void set_button_state( button * this, ButtonState state )
Return type: void
Argument(s) if any: this –pointer to the button gadget.
state – can be any of the button state (IDLE, FOCUSED,
DOWN)
Change the appearance of the button to reflect the new state. Based on the
state, we choose the corresponding set of shape attributes and apply them to the
box part of the button.
5. menu_class_message_handler() :
Prototype: void menu_class_message_handler( menu * this, o_message *
msg)
It handles all the UIMS generated messages received and forwarded by the
application.