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

PG_ScrollBar::ScrollButton Class Reference

#include <pgscrollbar.h>

Inheritance diagram for PG_ScrollBar::ScrollButton:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 ScrollButton (PG_ScrollBar *parent, const PG_Rect &r=PG_Rect::null)
virtual ~ScrollButton ()
void SetTickMode (bool on)

Protected Member Functions

bool eventMouseButtonDown (const SDL_MouseButtonEvent *button)
 Overridable Eventhandler for a SDL_MouseButtonEvent message.
bool eventMouseMotion (const SDL_MouseMotionEvent *motion)
 Overridable Eventhandler for a SDL_MouseMotionEvent message.
PG_ScrollBarGetParent ()
 Get the parentwidget of a widget.
bool eventMouseButtonUp (const SDL_MouseButtonEvent *button)
 Overridable Eventhandler for a SDL_MouseButtonEvent message.
int GetPosFromPoint (PG_Point p)

Constructor & Destructor Documentation

PG_ScrollBar::ScrollButton::ScrollButton PG_ScrollBar parent,
const PG_Rect r = PG_Rect::null
 

Definition at line 266 of file pgscrollbar.cpp.

References PG_ScrollBar::IDSCROLLBAR_DRAG, and PG_Widget::SetID().

PG_ScrollBar::ScrollButton::~ScrollButton  )  [virtual]
 

Definition at line 271 of file pgscrollbar.cpp.


Member Function Documentation

bool PG_ScrollBar::ScrollButton::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_Button.

Definition at line 333 of file pgscrollbar.cpp.

References PG_Button::eventMouseButtonDown(), PG_Application::GetEventSupplier(), and PG_Widget::ScreenToClient().

bool PG_ScrollBar::ScrollButton::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_Button.

Definition at line 406 of file pgscrollbar.cpp.

References PG_Button::eventMouseButtonUp(), and GetParent().

bool PG_ScrollBar::ScrollButton::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 274 of file pgscrollbar.cpp.

References GetParent(), GetPosFromPoint(), PG_Button::GetPressed(), PG_Widget::MoveWidget(), PG_Rect::my_height, PG_Rect::my_width, PG_ScrollBar::position, PG_ScrollBar::VERTICAL, PG_Point::x, and PG_Point::y.

PG_ScrollBar * PG_ScrollBar::ScrollButton::GetParent  )  [protected]
 

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 345 of file pgscrollbar.cpp.

References PG_Widget::GetParent().

Referenced by eventMouseButtonUp(), eventMouseMotion(), and GetPosFromPoint().

int PG_ScrollBar::ScrollButton::GetPosFromPoint PG_Point  p  )  [protected]
 

Definition at line 450 of file pgscrollbar.cpp.

References GetParent(), intround(), PG_ScrollBar::position, PG_ScrollBar::VERTICAL, PG_Point::x, and PG_Point::y.

Referenced by eventMouseMotion().

void PG_ScrollBar::ScrollButton::SetTickMode bool  on  ) 
 

Definition at line 421 of file pgscrollbar.cpp.


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