menu.c File Reference

Implementation of the Menu functions. More...

#include "menu.h"
#include "component.h"

Include dependency graph for menu.c:

Go to the source code of this file.

Functions

void addMenuMenuItem (Menu *menu, jobject menuitem)
 Adds a MenuItem to the Menu.
void addMenuSeparator (Menu *menu)
 Sets the Help Menu of the Menu.
void createMenu_ (Menu *menu)
 Creates the Menu by getting the Java Menu-Class, the method ids and createing a new Java Menu-Object.
void createMenuC (Menu_ *menu)
 Function is called when working with C and calling the function createMenu.
void createMenuCPP (MenuCPP_ *menu)
 Function is called when working with C++ and calling the function createMenu.
void deleteMenu_ (Menu *menu)
 Deletes the Menu by deleting the global references.
void deleteMenuC (Menu_ *menu)
 Function is called when working with C and calling the function deleteMenu.
void deleteMenuCPP (MenuCPP_ *menu)
 Function is called when working with C++ and calling the function deleteMenu.
jint getMenuItemCount (Menu *menu)
 Gets the number of items of the Menu.
char * getMenuLabel (Menu *menu)
 Gets the label of the Menu.
jobject getMenuObject (Menu *menu)
 Gets the reference to the java menu object.
void initMenu_ (Menu_ *menu)
 Initializes the Menu_ structure by setting the function pointers.
void removeMenuAll (Menu *menu)
 Removes all MenuItems from the Menu.
void removeMenuMenuItem (Menu *menu, jobject menuitem)
 Removes a MenuItem from the Menu.
void setMenuLabel (Menu *menu, const char *label)
 Sets the label of the Menu.


Detailed Description

Implementation of the Menu functions.

A Menu can hold different MenuItems and is placed on a MenuBar.

Author:
Stefan Gruber
Date:
01.02.2005

Definition in file menu.c.


Function Documentation

void addMenuMenuItem Menu menu,
jobject  menuitem
 

Adds a MenuItem to the Menu.

Parameters:
menu - Pointer to the menu.
menuitem - The MenuItem to add.
See also:
removeMenuMenuItem(Menu* menu, jobject menuitem)

Definition at line 69 of file menu.c.

void addMenuSeparator Menu menu  ) 
 

Sets the Help Menu of the Menu.

Parameters:
menu - Pointer to the menu.

Definition at line 113 of file menu.c.

void createMenu_ Menu menu  ) 
 

Creates the Menu by getting the Java Menu-Class, the method ids and createing a new Java Menu-Object.

Parameters:
menu - The Menu to create.

Definition at line 139 of file menu.c.

void createMenuC Menu_ menu  ) 
 

Function is called when working with C and calling the function createMenu.

It initializes the Menu_ structure.

Parameters:
menu - A pointer to a Menu_ structure.

Definition at line 169 of file menu.c.

void createMenuCPP MenuCPP_ menu  ) 
 

Function is called when working with C++ and calling the function createMenu.

It initializes the MenuCPP_ structure.

Parameters:
menu - A pointer to a MenuCPP_ structure.

Definition at line 157 of file menu.c.

void deleteMenu_ Menu menu  ) 
 

Deletes the Menu by deleting the global references.

Parameters:
menu - A pointer to a menu.

Definition at line 179 of file menu.c.

void deleteMenuC Menu_ menu  ) 
 

Function is called when working with C and calling the function deleteMenu.

Parameters:
menu - A pointer to a Menu_ structure.

Definition at line 199 of file menu.c.

void deleteMenuCPP MenuCPP_ menu  ) 
 

Function is called when working with C++ and calling the function deleteMenu.

Parameters:
menu - A pointer to a MenuCPP_ structure.

Definition at line 189 of file menu.c.

jint getMenuItemCount Menu menu  ) 
 

Gets the number of items of the Menu.

Parameters:
menu - Pointer to the menu.
Returns:
the number of items.

Definition at line 104 of file menu.c.

char* getMenuLabel Menu menu  ) 
 

Gets the label of the Menu.

Parameters:
menu - Pointer to the Menu.
Returns:
the label of the Menu.
See also:
setMenuLabel(Menu* menu, const char* label)

Definition at line 52 of file menu.c.

jobject getMenuObject Menu menu  ) 
 

Gets the reference to the java menu object.

Parameters:
menu - Pointer to the menu.
Returns:
the menu object reference.

Definition at line 25 of file menu.c.

void initMenu_ Menu_ menu  ) 
 

Initializes the Menu_ structure by setting the function pointers.

Parameters:
menu - A pointer to a Menu_ structure.

Definition at line 123 of file menu.c.

void removeMenuAll Menu menu  ) 
 

Removes all MenuItems from the Menu.

Parameters:
menu - Pointer to the menu.
See also:
removeMenuMenuItem(Menu* menu, jobject menuitem)

Definition at line 93 of file menu.c.

void removeMenuMenuItem Menu menu,
jobject  menuitem
 

Removes a MenuItem from the Menu.

Parameters:
menu - Pointer to the menu.
menuitem - The MenuItem to remove.
See also:
addMenuMenuItem(Menu* menu, jobject menuitem)

removeMenuAll(Menu* menu)

Definition at line 82 of file menu.c.

void setMenuLabel Menu menu,
const char *  label
 

Sets the label of the Menu.

Parameters:
menu - Pointer to the Menu.
label - The label to set.
See also:
getMenuLabel(Menu* menu)

Definition at line 37 of file menu.c.


Generated on Sat Nov 19 14:11:14 2005 for GrubC by  doxygen 1.4.4