button.c File Reference

Implementation of the Button functions. More...

#include "button.h"
#include "component.h"

Include dependency graph for button.c:

Go to the source code of this file.

Functions

ActionListener addButtonActionListener (Button *button, void(*func)(Component))
 Adds an ActionListener for the Button to call back the specified function.
void createButton_ (Button *button)
 Creates the Button by getting the Java Button-Class, the method ids and createing a new Java Button-Object.
void createButtonC (Button_ *button)
 Function is called when working with C and calling the function createButton.
void createButtonCPP (ButtonCPP_ *button)
 Function is called when working with C++ and calling the function createButton.
void deleteButton_ (Button *button)
 Deletes the Button by deleting the global references.
void deleteButtonC (Button_ *button)
 Function is called when working with C and calling the function deleteButton.
void deleteButtonCPP (ButtonCPP_ *button)
 Function is called when working with C++ and calling the function deleteButton.
jint getButtonHeight (Button *button)
 Gets the height of the Button.
char * getButtonLabel (Button *button)
 Gets the Title of the Button.
jobject getButtonObject (Button *button)
 Gets the reference to the java button object.
jint getButtonWidth (Button *button)
 Gets the width of the Button.
jint getButtonX (Button *button)
 Gets the X-Pos of the Button.
jint getButtonY (Button *button)
 Gets the Y-Pos of the Button.
void initButton_ (Button_ *button)
 Initializes the Button_ structure by setting the function pointers.
void removeButtonActionListener (Button *button, ActionListener al)
 Removes an ActionListener from the Button and deletes the global reference to the ActionListener.
void setButtonLabel (Button *button, const char *label)
 Sets the Title of the Button.
void setButtonLocation (Button *button, jint x, jint y)
 Sets the location of the Button.
void setButtonSize (Button *button, jint width, jint height)
 Sets Size of the Button.


Detailed Description

Implementation of the Button functions.

A Button is a simple control element with a label. You can push it to cause an event and the application to perform an action.

Author:
Stefan Gruber
Date:
01.02.2005

Definition in file button.c.


Function Documentation

ActionListener addButtonActionListener Button button,
void(*)(Component func
 

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

For more information see: addActionListener

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

Definition at line 157 of file button.c.

void createButton_ Button button  ) 
 

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

Parameters:
button - The Button to create.

Definition at line 201 of file button.c.

void createButtonC Button_ button  ) 
 

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

It initializes the Button_ structure.

Parameters:
button - A pointer to a Button_ structure.

Definition at line 227 of file button.c.

void createButtonCPP ButtonCPP_ button  ) 
 

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

It initializes the ButtonCPP_ structure.

Parameters:
button - A pointer to a ButtonCPP_ structure.

Definition at line 215 of file button.c.

void deleteButton_ Button button  ) 
 

Deletes the Button by deleting the global references.

Parameters:
button - A pointer to a button.

Definition at line 237 of file button.c.

void deleteButtonC Button_ button  ) 
 

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

Parameters:
button - A pointer to a Button_ structure.

Definition at line 257 of file button.c.

void deleteButtonCPP ButtonCPP_ button  ) 
 

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

Parameters:
button - A pointer to a ButtonCPP_ structure.

Definition at line 247 of file button.c.

jint getButtonHeight Button button  ) 
 

Gets the height of the Button.

Parameters:
button - Pointer to the button.
Returns:
the current height of the Button.
See also:
setButtonSize(Button* button, jint width, jint height)

getButtonWidth(Button* button)

Definition at line 100 of file button.c.

char* getButtonLabel Button button  ) 
 

Gets the Title of the Button.

Parameters:
button - Pointer to the button.
Returns:
a char* with the current label.
See also:
setButtonLabel(Button* button, const char* label)

Definition at line 53 of file button.c.

jobject getButtonObject Button button  ) 
 

Gets the reference to the java button object.

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

Definition at line 26 of file button.c.

jint getButtonWidth Button button  ) 
 

Gets the width of the Button.

Parameters:
button - Pointer to the button.
Returns:
the current width of the Button.
See also:
setButtonSize(Button* button, jint width, jint height)

getButtonHeight(Button* button)

Definition at line 86 of file button.c.

jint getButtonX Button button  ) 
 

Gets the X-Pos of the Button.

Parameters:
button - Pointer to the button.
Returns:
the current X-Pos of the button.
See also:
setButtonLocation(Button* button, jint x, jint y)

getButtonY(Button* button)

Definition at line 128 of file button.c.

jint getButtonY Button button  ) 
 

Gets the Y-Pos of the Button.

Parameters:
button - Pointer to the button.
Returns:
the current Y-Pos of the button.
See also:
setButtonLocation(Button* button, jint x, jint y)

getButtonX(Button* button)

Definition at line 142 of file button.c.

void initButton_ Button_ button  ) 
 

Initializes the Button_ structure by setting the function pointers.

Parameters:
button - A pointer to a Button_ structure.

Definition at line 179 of file button.c.

void removeButtonActionListener Button button,
ActionListener  al
 

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

Parameters:
button - The Button to remove the listener from.
al - The ActionListener to remove.
See also:
addButtonActionListener(Button* button, void (*func)(Component))

Definition at line 170 of file button.c.

void setButtonLabel Button button,
const char *  label
 

Sets the Title of the Button.

Parameters:
button - Pointer to the button.
label - The new label.
See also:
getButtonLabel(Button* button)

Definition at line 38 of file button.c.

void setButtonLocation Button button,
jint  x,
jint  y
 

Sets the location of the Button.

Parameters:
button - Pointer to the button.
x - New X-Pos.
y - New Y-Pos.
See also:
getButtonX(Button* button)

getButtonY(Button* button)

Definition at line 114 of file button.c.

void setButtonSize Button button,
jint  width,
jint  height
 

Sets Size of the Button.

Parameters:
button - Pointer to the button.
width - New width.
height - New height.
See also:
getButtonWidth(Button* button)

getButtonHeight(Button* button)

Definition at line 72 of file button.c.


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