Public Member Functions | |
CaptionButton (InterfaceManager &manager, BUTTON_TYPE type) | |
void | clear_hilight () |
void | disable () |
void | enable () |
const Bitmap & | get_image () const |
const Rect & | get_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 | |
InterfaceManager & | m_manager |
Rect | m_rect |
int | m_state |
const BUTTON_TYPE | m_type |
enum ifm::CaptionButton::STATEFLAGS [private] |
ifm::CaptionButton::CaptionButton | ( | InterfaceManager & | manager, | |
BUTTON_TYPE | type | |||
) |
void ifm::CaptionButton::clear_hilight | ( | ) |
void ifm::CaptionButton::disable | ( | ) |
void ifm::CaptionButton::enable | ( | ) |
const Bitmap & ifm::CaptionButton::get_image | ( | ) | const |
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.
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.
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 | ( | ) |
InterfaceManager& ifm::CaptionButton::m_manager [private] |
Rect ifm::CaptionButton::m_rect [private] |
int ifm::CaptionButton::m_state [private] |
const BUTTON_TYPE ifm::CaptionButton::m_type [private] |