Gel2D - The free/open source game creation suite

Public Member Functions | Protected Attributes
gel::GelGUIWidget Class Reference

GUI base widget. More...

#include <gelGUIWidget.h>

Inheritance diagram for gel::GelGUIWidget:
gel::GelObject gel::GelTextureObject gel::GelEventReceiver gel::GelGUIButton gel::GelGUICheckBox gel::GelGUIText

List of all members.

Public Member Functions

 GelGUIWidget ()
 Default constructor.
void enable (bool benable)
 Enables/disables the widget.
bool isEnabled ()
 Checks whether or not the widget is enabled.
void focus (bool bfocus)
 Focus/defocuses the widget.
bool isFocused ()
 Checks whether or not the widget has focus.
GelColor getCol ()
 Gets the color of the widget.
void setCol (GelColor color)
 Sets the color of the widget.
void setRGB (float r, float g, float b)
 Sets the color of the widget in RGB floats.
float getAlpha ()
 Gets the transparency of the widget.
void setAlpha (float alpha)
 Sets the transparency of the widget.

Protected Attributes

GelColor col
bool enabled
bool focused

Detailed Description

GUI base widget.


Constructor & Destructor Documentation

gel::GelGUIWidget::GelGUIWidget ( )

Default constructor.


Member Function Documentation

void gel::GelGUIWidget::enable ( bool  benable) [inline]

Enables/disables the widget.

Parameters:
benable: Set to true to enable the widget, false to disable it.
bool gel::GelGUIWidget::isEnabled ( ) [inline]

Checks whether or not the widget is enabled.

Returns:
True if the widget is enabled, else false.
void gel::GelGUIWidget::focus ( bool  bfocus) [inline]

Focus/defocuses the widget.

Parameters:
bfocus: Set to true to focus the widget, false to defocus it.
bool gel::GelGUIWidget::isFocused ( ) [inline]

Checks whether or not the widget has focus.

Returns:
True if the widget has focus, else false.
GelColor gel::GelGUIWidget::getCol ( ) [inline]

Gets the color of the widget.

Returns:
The color of the widget.
void gel::GelGUIWidget::setCol ( GelColor  color) [inline]

Sets the color of the widget.

Parameters:
color: The new color of the widget.
void gel::GelGUIWidget::setRGB ( float  r,
float  g,
float  b 
) [inline]

Sets the color of the widget in RGB floats.

Parameters:
r: New red value.
g: New green value.
b: New blue value.
float gel::GelGUIWidget::getAlpha ( ) [inline]

Gets the transparency of the widget.

Returns:
The alpha color component of the widget.
void gel::GelGUIWidget::setAlpha ( float  alpha) [inline]

Sets the transparency of the widget.

It should be in range from 0 (transparent) to 1 (opaque).

Parameters:
alpha: The new alpha value.

Member Data Documentation

bool gel::GelGUIWidget::enabled [protected]
bool gel::GelGUIWidget::focused [protected]

The documentation for this class was generated from the following file: