Main Page | Class Hierarchy | Class List | Directories | File List | Class Members

GuiComponent Class Reference

#include <GuiComponent.h>

Inherits OrthographicCamera.

Inherited by ColorCubePanel, and Histogram.

List of all members.

Public Types

enum  State

Public Member Functions

 GuiComponent (int left, int right, int bottom, int top, int x, int y, int width, int height)
void moveTo (int newX, int newY)
bool hit (int x, int y)
void enable ()
void disable ()
void hide ()
void updating ()
bool isEnabled ()
bool isUpdating ()
bool isHidden ()
bool isDisabled ()

Public Attributes

State state


Detailed Description

This class defines a genric GUI component. A GuiComponent is a little more than a Orthographic camera. It defines serveral states, wich determine what is getting rendered and knows its bounding box.

Version:
12-05-2005

Definition at line 11 of file GuiComponent.h.


Member Enumeration Documentation

enum GuiComponent::State
 

This enumeration holds the possible states of the self made GUI components (e.g. the Histogram, the Colorselector). The States can be set without restrictions.

HIDDEN
In this state, the comonent is not rendered and does not react to user interactions
ENABLED
In this state, the component gets rendered and respond to user interaction
DISABLED
In this state, the component gets rendered but does not respond to user interaction
UPDATING
In this state the component is updated. This state is needed to prevent refresh of the component as long as it is busy.

Definition at line 32 of file GuiComponent.h.


Constructor & Destructor Documentation

GuiComponent::GuiComponent int  left,
int  right,
int  bottom,
int  top,
int  x,
int  y,
int  width,
int  height
 

Create an orthographic projection space and a viewport using the camera class. So each component exists into its own space.

Definition at line 6 of file GuiComponent.cpp.


Member Function Documentation

void GuiComponent::disable  ) 
 

Set the state to DISABLED

Definition at line 22 of file GuiComponent.cpp.

References state.

Referenced by ColorCubePanel::onMouseDown().

void GuiComponent::enable  ) 
 

Set the state to ENABLED

Definition at line 17 of file GuiComponent.cpp.

References state.

Referenced by Histogram::update().

void GuiComponent::hide  ) 
 

Set the state to HIDDEN

Definition at line 26 of file GuiComponent.cpp.

References state.

Referenced by Histogram::update().

bool GuiComponent::hit int  x,
int  y
 

Find out if the component had been picked by the mouse. This will always return false, if the state is not equal to ENABLED

Definition at line 55 of file GuiComponent.cpp.

Referenced by Histogram::onLeftMouseClick(), ColorCubePanel::onMouseDown(), and Histogram::onMouseDrag().

bool GuiComponent::isDisabled  ) 
 

Return if the current state is DISABLED

Definition at line 45 of file GuiComponent.cpp.

bool GuiComponent::isEnabled  ) 
 

Return if the current state is ENABLED

Definition at line 35 of file GuiComponent.cpp.

bool GuiComponent::isHidden  ) 
 

Return if the current state is HIDDEN

Definition at line 40 of file GuiComponent.cpp.

bool GuiComponent::isUpdating  ) 
 

Return if the current state is BUSY

Definition at line 50 of file GuiComponent.cpp.

void GuiComponent::moveTo int  newX,
int  newY
 

Update the lower left position of the components viewport.

Definition at line 12 of file GuiComponent.cpp.

void GuiComponent::updating  ) 
 

Set the state to BUSY

Definition at line 31 of file GuiComponent.cpp.

References state.


Member Data Documentation

State GuiComponent::state
 

The current state of the component.

Definition at line 35 of file GuiComponent.h.

Referenced by disable(), enable(), hide(), and updating().


The documentation for this class was generated from the following files:
Generated on Mon Dec 12 15:20:26 2005 for CCube by  doxygen 1.4.1