ifm::CaptionButton Class Reference

List of all members.

Public Member Functions

 CaptionButton (InterfaceManager &manager, BUTTON_TYPE type)
void clear_hilight ()
void disable ()
void enable ()
const Bitmapget_image () const
const Rectget_rect () const
BUTTON_TYPE get_type () const
void hide ()
void hilight ()
bool inside (const Point &pos) const
bool is_enabled () const
bool is_hilighted () const
bool is_pressed () const
bool is_shown () const
bool on_mouse_move (const Point &pos)
void press ()
void release ()
void set_position (const Point &rect)
void show ()

Private Types

enum  STATEFLAGS { HIDDEN = 0x1, HILIGHT = 0x2, DISABLED = 0x4, PRESSED = 0x8 }

Private Attributes

InterfaceManagerm_manager
Rect m_rect
int m_state
const BUTTON_TYPE m_type


Member Enumeration Documentation

Enumerator:
HIDDEN 
HILIGHT 
DISABLED 
PRESSED 


Constructor & Destructor Documentation

ifm::CaptionButton::CaptionButton ( InterfaceManager manager,
BUTTON_TYPE  type 
)


Member Function Documentation

void ifm::CaptionButton::clear_hilight (  ) 

void ifm::CaptionButton::disable (  ) 

void ifm::CaptionButton::enable (  ) 

const Bitmap & ifm::CaptionButton::get_image (  )  const

Returns:
The image that should be used to render the button given its current state.

const Rect & ifm::CaptionButton::get_rect (  )  const

BUTTON_TYPE ifm::CaptionButton::get_type (  )  const

void ifm::CaptionButton::hide (  ) 

void ifm::CaptionButton::hilight (  ) 

bool ifm::CaptionButton::inside ( const Point pos  )  const

Checks to see if the given point is inside the button. Simply checking get_rect().inside() is not safe because some buttons may have rounded edges.

Returns:
Whether the given point is inside this button.

bool ifm::CaptionButton::is_enabled (  )  const

bool ifm::CaptionButton::is_hilighted (  )  const

bool ifm::CaptionButton::is_pressed (  )  const

bool ifm::CaptionButton::is_shown (  )  const

bool ifm::CaptionButton::on_mouse_move ( const Point pos  ) 

Handles mouse movement. If the mouse is inside the button, the hilight state is set. Otherwise, it is cleared.

Returns:
True if the button state has been changed

void ifm::CaptionButton::press (  ) 

void ifm::CaptionButton::release (  ) 

void ifm::CaptionButton::set_position ( const Point rect  ) 

Sets the position of this button. The size is determined by its image.

void ifm::CaptionButton::show (  ) 


Member Data Documentation


doxygen Get IFM - Interface Management System at SourceForge.net. Fast, secure and Free Open Source software downloads