#include <menu.h>
Public Member Functions | |
MenuFreeform () | |
virtual | ~MenuFreeform () |
virtual InputReturnValue | process_input (int key) |
virtual void | render () |
virtual MenuItem * | get_active_item () |
virtual void | set_active_item (int ID) |
virtual void | set_active_item (MenuItem *item) |
virtual void | activate_first_item () |
virtual void | activate_last_item () |
void | set_default_item (MenuItem *item) |
void | activate_default_item () |
virtual bool | select_item (int index) |
virtual bool | select_item (MenuItem *item) |
virtual bool | attach_item (MenuItem *item) |
Protected Member Functions | |
virtual void | _place_items () |
virtual void | _set_active_item_by_index (int index) |
virtual MenuItem * | _find_item_by_direction (const MenuItem *start, MenuObject::Direction dir) |
Protected Attributes | |
MenuItem * | m_active_item |
MenuItem * | m_default_item |
MenuFreeform::MenuFreeform | ( | ) |
MenuFreeform::~MenuFreeform | ( | ) | [virtual] |
MenuObject::InputReturnValue MenuFreeform::process_input | ( | int | key | ) | [virtual] |
void MenuFreeform::render | ( | ) | [virtual] |
MenuItem * MenuFreeform::get_active_item | ( | ) | [virtual] |
Implements MenuObject.
void MenuFreeform::set_active_item | ( | int | ID | ) | [virtual] |
Sets item by ID Clears active item if ID not found
Implements MenuObject.
void MenuFreeform::set_active_item | ( | MenuItem * | item | ) | [virtual] |
void MenuFreeform::activate_first_item | ( | ) | [virtual] |
void MenuFreeform::activate_last_item | ( | ) | [virtual] |
void MenuFreeform::set_default_item | ( | MenuItem * | item | ) |
void MenuFreeform::activate_default_item | ( | ) |
bool MenuFreeform::select_item | ( | int | index | ) | [virtual] |
Implements MenuObject.
bool MenuFreeform::select_item | ( | MenuItem * | item | ) | [virtual] |
bool MenuFreeform::attach_item | ( | MenuItem * | item | ) | [virtual] |
void MenuFreeform::_place_items | ( | ) | [protected, virtual] |
Handle all the dirtyness here that the MenuItems themselves do not handle
Implements MenuObject.
void MenuFreeform::_set_active_item_by_index | ( | int | index | ) | [protected, virtual] |
Sets active item based on index This function is for internal use if object does not have ID set
MenuItem * MenuFreeform::_find_item_by_direction | ( | const MenuItem * | start, | |
MenuObject::Direction | dir | |||
) | [protected, virtual] |
Finds the closest rectangle to given entry begin_index on a caardinal direction from it. if no entries are found, -1 is returned
Implements MenuObject.
MenuItem* MenuFreeform::m_active_item [protected] |
MenuItem* MenuFreeform::m_default_item [protected] |