Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

RadioBox Class Reference

Inheritance diagram for RadioBox:

Inheritance graph
[legend]
Collaboration diagram for RadioBox:

Collaboration graph
[legend]

Detailed Description

Radio box with picture background.

Definition at line 11 of file RadioBox.h.

Public Member Functions

 RadioBox (const std::string &param, const std::string &value, const Path &picture)
virtual void drawOn (SDL_Surface *screen)
 Draw border for selected button.

Protected Member Functions

virtual void own_mouseButton (const MouseStroke &stroke)
 Select button and set param=value.


Constructor & Destructor Documentation

RadioBox::RadioBox const std::string &  param,
const std::string &  value,
const Path picture
 

Definition at line 16 of file RadioBox.cpp.

00018 : WiContainer(new WiPicture(picture), BORDER), m_param(param), m_value(value)
00019 {
00020 }


Member Function Documentation

void RadioBox::drawOn SDL_Surface *  screen  )  [virtual]
 

Draw border for selected button.

Reimplemented from WiContainer.

Definition at line 26 of file RadioBox.cpp.

00027 {
00028     if (OptionAgent::agent()->getParam(m_param) == m_value) {
00029         SDL_Rect rect;
00030         rect.x = m_shift.getX();
00031         rect.y = m_shift.getY();
00032         rect.w = getW();
00033         rect.h = getH();
00034 
00035         Uint32 green = SDL_MapRGB(screen->format, 0x00, 0xff, 0x00);
00036         SDL_FillRect(screen, &rect, green);
00037     }
00038     WiContainer::drawOn(screen);
00039 }

void RadioBox::own_mouseButton const MouseStroke stroke  )  [protected, virtual]
 

Select button and set param=value.

Reimplemented from WiContainer.

Definition at line 45 of file RadioBox.cpp.

00046 {
00047     if (stroke.isLeft()) {
00048         OptionAgent::agent()->setPersistent(m_param, m_value);
00049     }
00050 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:56:23 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2