menuitem.c File Reference

Implementation of the MenuItem functions. More...

#include "menuitem.h"
#include "component.h"

Include dependency graph for menuitem.c:

Go to the source code of this file.

Functions

ActionListener addMenuItemActionListener (MenuItem *menuitem, void(*func)(Component))
 Adds an ActionListener for the MenuItem to call back the specified function.
void createMenuItem_ (MenuItem *menuitem)
 Creates the MenuItem by getting the Java MenuItem-Class, the method ids and createing a new Java MenuItem-Object.
void createMenuItemC (MenuItem_ *menuitem)
 Function is called when working with C and calling the function createMenuItem.
void createMenuItemCPP (MenuItemCPP_ *menuitem)
 Function is called when working with C++ and calling the function createMenuItem.
void deleteMenuItem_ (MenuItem *menuitem)
 Deletes the MenuItem by deleting the global references.
void deleteMenuItemC (MenuItem_ *menuitem)
 Function is called when working with C and calling the function deleteMenuItem.
void deleteMenuItemCPP (MenuItemCPP_ *menuitem)
 Function is called when working with C++ and calling the function deleteMenuItem.
char * getMenuItemLabel (MenuItem *menuitem)
 Gets the label of the MenuItem.
jobject getMenuItemObject (MenuItem *menuitem)
 Gets the reference to the java menuitem object.
void initMenuItem_ (MenuItem_ *menuitem)
 Initializes the MenuItem_ structure by setting the function pointers.
jboolean isMenuItemEnabled (MenuItem *menuitem)
 Gets the enabled state of the MenuItem.
void removeMenuItemActionListener (MenuItem *menuitem, ActionListener al)
 Removes an ActionListener from the MenuItem and deletes the global reference to the ActionListener.
void setMenuItemEnabled (MenuItem *menuitem, jboolean enable)
 Sets the enabled state of the MenuItem.
void setMenuItemLabel (MenuItem *menuitem, const char *label)
 Sets the label of the MenuItem.


Detailed Description

Implementation of the MenuItem functions.

A MenuItem is a simple labeled menu entry. When you label a MenuItem with a "-" it will be displayed as separator.

Author:
Stefan Gruber
Date:
01.02.2005

Definition in file menuitem.c.


Function Documentation

ActionListener addMenuItemActionListener MenuItem menuitem,
void(*)(Component func
 

Adds an ActionListener for the MenuItem to call back the specified function.

For more information see: addActionListener

Parameters:
menuitem - The MenuItem to add the listener to.
func - The function to call back.
Returns:
the created ActionListener object.
See also:
removeMenuItemActionListener(MenuItem* menuitem, ActionListener al)

Definition at line 97 of file menuitem.c.

void createMenuItem_ MenuItem menuitem  ) 
 

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

Parameters:
menuitem - The MenuItem to create.

Definition at line 135 of file menuitem.c.

void createMenuItemC MenuItem_ menuitem  ) 
 

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

It initializes the MenuItem_ structure.

Parameters:
menuitem - A pointer to a MenuItem_ structure.

Definition at line 163 of file menuitem.c.

void createMenuItemCPP MenuItemCPP_ menuitem  ) 
 

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

It initializes the MenuItemCPP_ structure.

Parameters:
menuitem - A pointer to a MenuItemCPP_ structure.

Definition at line 151 of file menuitem.c.

void deleteMenuItem_ MenuItem menuitem  ) 
 

Deletes the MenuItem by deleting the global references.

Parameters:
menuitem - A pointer to a menuitem.

Definition at line 173 of file menuitem.c.

void deleteMenuItemC MenuItem_ menuitem  ) 
 

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

Parameters:
menuitem - A pointer to a MenuItem_ structure.

Definition at line 193 of file menuitem.c.

void deleteMenuItemCPP MenuItemCPP_ menuitem  ) 
 

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

Parameters:
menuitem - A pointer to a MenuItemCPP_ structure.

Definition at line 183 of file menuitem.c.

char* getMenuItemLabel MenuItem menuitem  ) 
 

Gets the label of the MenuItem.

Parameters:
menuitem - Pointer to the menuitem.
Returns:
the label of the MenuItem.
See also:
setMenuItemLabel(MenuItem* menuitem, const char* label)

Definition at line 52 of file menuitem.c.

jobject getMenuItemObject MenuItem menuitem  ) 
 

Gets the reference to the java menuitem object.

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

Definition at line 25 of file menuitem.c.

void initMenuItem_ MenuItem_ menuitem  ) 
 

Initializes the MenuItem_ structure by setting the function pointers.

Parameters:
menuitem - A pointer to a MenuItem_ structure.

Definition at line 119 of file menuitem.c.

jboolean isMenuItemEnabled MenuItem menuitem  ) 
 

Gets the enabled state of the MenuItem.

Parameters:
menuitem - Pointer to the menuitem.
Returns:
JNI_TRUE if enabled, otherwise JNI_FALSE.
See also:
setMenuItemEnabled(MenuItem* menuitem, jboolean enable)

Definition at line 82 of file menuitem.c.

void removeMenuItemActionListener MenuItem menuitem,
ActionListener  al
 

Removes an ActionListener from the MenuItem and deletes the global reference to the ActionListener.

Parameters:
menuitem - The MenuItem to remove the listener from.
al - The ActionListener to remove.
See also:
addMenuItemActionListener(MenuItem* menuitem, void (*func)(Component))

Definition at line 110 of file menuitem.c.

void setMenuItemEnabled MenuItem menuitem,
jboolean  enable
 

Sets the enabled state of the MenuItem.

Parameters:
menuitem - Pointer to the menuitem.
enable - The state to set.
See also:
isMenuItemEnabled(MenuItem* menuitem)

Definition at line 69 of file menuitem.c.

void setMenuItemLabel MenuItem menuitem,
const char *  label
 

Sets the label of the MenuItem.

Parameters:
menuitem - Pointer to the menuitem.
label - The label to set.
See also:
getMenuItemLabel(MenuItem* menuitem)

Definition at line 37 of file menuitem.c.


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