Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

PG_ColorSelector::PG_ColorBox Class Reference

#include <pgcolorselector.h>

Inheritance diagram for PG_ColorSelector::PG_ColorBox:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PG_ColorBox (PG_ColorSelector *parent, const PG_Rect &r)
PG_ColorSelectorGetParent ()
 Get the parentwidget of a widget.
PG_Color GetBaseColor ()

Protected Member Functions

void eventBlit (SDL_Surface *srf, const PG_Rect &src, const PG_Rect &dst)
 overridable eventhandler to blit the widget contents to the screen
bool eventMouseMotion (const SDL_MouseMotionEvent *motion)
 Overridable Eventhandler for a SDL_MouseMotionEvent message.
bool eventMouseButtonDown (const SDL_MouseButtonEvent *button)
 Overridable Eventhandler for a SDL_MouseButtonEvent message.
bool eventMouseButtonUp (const SDL_MouseButtonEvent *button)
 Overridable Eventhandler for a SDL_MouseButtonEvent message.

Constructor & Destructor Documentation

PG_ColorSelector::PG_ColorBox::PG_ColorBox PG_ColorSelector parent,
const PG_Rect r
 

Definition at line 3 of file pgcolorselector.cpp.

References PG_ThemeWidget::SetBackground(), PG_ThemeWidget::SetSimpleBackground(), PG_Point::x, and PG_Point::y.


Member Function Documentation

void PG_ColorSelector::PG_ColorBox::eventBlit SDL_Surface *  srf,
const PG_Rect src,
const PG_Rect dst
[protected, virtual]
 

overridable eventhandler to blit the widget contents to the screen

Parameters:
surface pointer to SDL_Surface to be blitted
src source rectangle (client coordinates)
dst destination rectangle (screen coordinates) Override this eventhandler to perform custom blitting behaviour (without drawing onto the widget surface).

Reimplemented from PG_ThemeWidget.

Definition at line 65 of file pgcolorselector.cpp.

References PG_Widget::DrawHLine(), PG_Widget::DrawVLine(), PG_ThemeWidget::eventBlit(), PG_Point::x, and PG_Point::y.

bool PG_ColorSelector::PG_ColorBox::eventMouseButtonDown const SDL_MouseButtonEvent *  button  )  [protected, virtual]
 

Overridable Eventhandler for a SDL_MouseButtonEvent message.

This handler is called when a mouse button is pressed. The default implementation returns 'false' which indicates that this message is not processed by this object.

Parameters:
button SDL_MouseButtonEvent message
Returns:
Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from PG_MessageObject.

Definition at line 42 of file pgcolorselector.cpp.

References GetBaseColor(), GetParent(), PG_Widget::ScreenToClient(), PG_MessageObject::SetCapture(), and PG_Widget::Update().

bool PG_ColorSelector::PG_ColorBox::eventMouseButtonUp const SDL_MouseButtonEvent *  button  )  [protected, virtual]
 

Overridable Eventhandler for a SDL_MouseButtonEvent message.

This handler is called when a mouse button is released. The default implementation returns 'false' which indicates that this message is not processed by this object.

Parameters:
button SDL_MouseButtonEvent message
Returns:
Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from PG_MessageObject.

Definition at line 55 of file pgcolorselector.cpp.

References PG_MessageObject::ReleaseCapture().

bool PG_ColorSelector::PG_ColorBox::eventMouseMotion const SDL_MouseMotionEvent *  motion  )  [protected, virtual]
 

Overridable Eventhandler for a SDL_MouseMotionEvent message.

This handler is called when mouse movement is detected. The default implementation returns 'false' which indicates that this message is not processed by this object.

Parameters:
motion SDL_MouseMotionEvent message
Returns:
Notifies the message pump if this message is processed by this object or it should be routed to the next message receiver.

Reimplemented from PG_MessageObject.

Definition at line 14 of file pgcolorselector.cpp.

References GetBaseColor(), GetParent(), PG_Rect::my_height, PG_Rect::my_width, PG_Widget::ScreenToClient(), PG_Widget::Update(), PG_Point::x, and PG_Point::y.

PG_Color PG_ColorSelector::PG_ColorBox::GetBaseColor  ) 
 

Definition at line 73 of file pgcolorselector.cpp.

References PG_Gradient::colors, PG_ThemeWidget::GetGradient(), PG_Rect::my_height, PG_Rect::my_width, PG_Point::x, and PG_Point::y.

Referenced by eventMouseButtonDown(), eventMouseMotion(), PG_ColorSelector::handle_colorslide(), and PG_ColorSelector::PG_ColorSelector().

PG_ColorSelector* PG_ColorSelector::PG_ColorBox::GetParent  )  [inline]
 

Get the parentwidget of a widget.

Returns:
a pointer to the parentwidget or NULL if there is no parentwidget

Reimplemented from PG_Widget.

Definition at line 15 of file pgcolorselector.h.

References PG_Widget::GetParent().

Referenced by eventMouseButtonDown(), and eventMouseMotion().


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:18:50 2008 for Advanced Strategic Command by  doxygen 1.4.2