#include <menu.h>


Public Types | |
| enum | cycle { CYCLE_NONE, CYCLE_TOGGLE, CYCLE_CYCLE } |
| enum | action { ACT_EXECUTE, ACT_EXAMINE, ACT_MISC, ACT_NUM } |
| typedef std::string(* | selitem_tfn )(const std::vector< MenuEntry * > *sel) |
| typedef void(* | drawitem_tfn )(int index, const MenuEntry *me) |
| typedef int(* | keyfilter_tfn )(int keyin) |
Public Member Functions | |
| Menu (int flags=MF_MULTISELECT, const std::string &tagname="", bool text_only=true) | |
| Menu (const formatted_string &fs) | |
| virtual | ~Menu () |
| void | clear () |
| void | set_flags (int new_flags, bool use_options=true) |
| int | get_flags () const |
| virtual bool | is_set (int flag) const |
| void | set_tag (const std::string &t) |
| bool | draw_title_suffix (const std::string &s, bool titlefirst=true) |
| bool | draw_title_suffix (const formatted_string &fs, bool titlefirst=true) |
| void | update_title () |
| void | set_more (const formatted_string &more) |
| const formatted_string & | get_more () const |
| void | set_highlighter (MenuHighlighter *h) |
| void | set_title (MenuEntry *e, bool first=true) |
| void | add_entry (MenuEntry *entry) |
| void | get_selected (std::vector< MenuEntry * > *sel) const |
| virtual int | get_cursor () const |
| void | set_maxpagesize (int max) |
| int | maxpagesize () const |
| void | set_select_filter (std::vector< text_pattern > filter) |
| unsigned char | getkey () const |
| void | reset () |
| std::vector< MenuEntry * > | show (bool reuse_selections=false) |
| std::vector< MenuEntry * > | selected_entries () const |
| size_t | item_count () const |
| int | get_entry_index (const MenuEntry *e) const |
| virtual int | item_colour (int index, const MenuEntry *me) const |
| int | get_y_offset () const |
| int | get_pagesize () const |
Public Attributes | |
| selitem_tfn | f_selitem |
| drawitem_tfn | f_drawitem |
| keyfilter_tfn | f_keyfilter |
| enum Menu::cycle | action_cycle |
| enum Menu::action | menu_action |
Protected Member Functions | |
| void | check_add_formatted_line (int firstcol, int nextcol, std::string &line, bool check_eol) |
| void | do_menu () |
| virtual void | draw_select_count (int count, bool force=false) |
| virtual void | draw_item (int index) const |
| virtual void | draw_index_item (int index, const MenuEntry *me) const |
| virtual void | draw_stock_item (int index, const MenuEntry *me) const |
| virtual void | draw_title () |
| virtual void | write_title () |
| virtual void | draw_menu () |
| virtual bool | page_down () |
| virtual bool | line_down () |
| virtual bool | page_up () |
| virtual bool | line_up () |
| virtual int | pre_process (int key) |
| virtual int | post_process (int key) |
| bool | in_page (int index) const |
| void | deselect_all (bool update_view=true) |
| virtual void | select_items (int key, int qty=-1) |
| void | select_item_index (int idx, int qty, bool draw_cursor=true) |
| void | select_index (int index, int qty=-1) |
| bool | is_hotkey (int index, int key) |
| virtual bool | is_selectable (int index) const |
| virtual bool | process_key (int keyin) |
Protected Attributes | |
| MenuEntry * | title |
| MenuEntry * | title2 |
| int | flags |
| std::string | tag |
| int | first_entry |
| int | y_offset |
| int | pagesize |
| int | max_pagesize |
| formatted_string | more |
| std::vector< MenuEntry * > | items |
| std::vector< MenuEntry * > | sel |
| std::vector< text_pattern > | select_filter |
| MenuHighlighter * | highlighter |
| int | num |
| unsigned char | lastch |
| bool | alive |
| int | last_selected |
| MenuDisplay * | mdisplay |
| typedef std::string(* Menu::selitem_tfn)(const std::vector< MenuEntry * > *sel) |
| typedef void(* Menu::drawitem_tfn)(int index, const MenuEntry *me) |
| typedef int(* Menu::keyfilter_tfn)(int keyin) |
| enum Menu::cycle |
| enum Menu::action |
| Menu::Menu | ( | int | flags = MF_MULTISELECT, |
|
| const std::string & | tagname = "", |
|||
| bool | text_only = true | |||
| ) |

| Menu::Menu | ( | const formatted_string & | fs | ) |

| Menu::~Menu | ( | ) | [virtual] |
| void Menu::clear | ( | ) |
| void Menu::set_flags | ( | int | new_flags, | |
| bool | use_options = true | |||
| ) |
| int Menu::get_flags | ( | ) | const [inline] |
| bool Menu::is_set | ( | int | flag | ) | const [virtual] |
| void Menu::set_tag | ( | const std::string & | t | ) | [inline] |
| bool Menu::draw_title_suffix | ( | const std::string & | s, | |
| bool | titlefirst = true | |||
| ) |

| bool Menu::draw_title_suffix | ( | const formatted_string & | fs, | |
| bool | titlefirst = true | |||
| ) |

| void Menu::update_title | ( | ) |

| void Menu::set_more | ( | const formatted_string & | more | ) |
| const formatted_string& Menu::get_more | ( | ) | const [inline] |
| void Menu::set_highlighter | ( | MenuHighlighter * | h | ) |
| void Menu::add_entry | ( | MenuEntry * | entry | ) |
| void Menu::get_selected | ( | std::vector< MenuEntry * > * | sel | ) | const |
| int Menu::get_cursor | ( | ) | const [virtual] |

| void Menu::set_maxpagesize | ( | int | max | ) |
| int Menu::maxpagesize | ( | ) | const [inline] |
| void Menu::set_select_filter | ( | std::vector< text_pattern > | filter | ) | [inline] |
| void Menu::reset | ( | ) |
| std::vector< MenuEntry * > Menu::show | ( | bool | reuse_selections = false |
) |

| std::vector< MenuEntry * > Menu::selected_entries | ( | ) | const |

| size_t Menu::item_count | ( | ) | const [inline] |
| int Menu::get_entry_index | ( | const MenuEntry * | e | ) | const |
| int Menu::item_colour | ( | int | index, | |
| const MenuEntry * | me | |||
| ) | const [virtual] |

| int Menu::get_y_offset | ( | ) | const [inline] |
| int Menu::get_pagesize | ( | ) | const [inline] |
| void Menu::check_add_formatted_line | ( | int | firstcol, | |
| int | nextcol, | |||
| std::string & | line, | |||
| bool | check_eol | |||
| ) | [protected] |

| void Menu::do_menu | ( | ) | [protected] |

| void Menu::draw_select_count | ( | int | count, | |
| bool | force = false | |||
| ) | [protected, virtual] |

| void Menu::draw_item | ( | int | index | ) | const [protected, virtual] |

| void Menu::draw_index_item | ( | int | index, | |
| const MenuEntry * | me | |||
| ) | const [protected, virtual] |
| void Menu::draw_stock_item | ( | int | index, | |
| const MenuEntry * | me | |||
| ) | const [protected, virtual] |

| void Menu::draw_title | ( | ) | [protected, virtual] |
Reimplemented in ShoppingListMenu, StashMenu, and StashSearchMenu.

| void Menu::write_title | ( | ) | [protected, virtual] |

| void Menu::draw_menu | ( | ) | [protected, virtual] |

| bool Menu::page_down | ( | ) | [protected, virtual] |
Reimplemented in formatted_scroller.
| bool Menu::line_down | ( | ) | [protected, virtual] |
Reimplemented in formatted_scroller.
| bool Menu::page_up | ( | ) | [protected, virtual] |
Reimplemented in formatted_scroller.
| bool Menu::line_up | ( | ) | [protected, virtual] |
Reimplemented in formatted_scroller.
| int Menu::pre_process | ( | int | key | ) | [protected, virtual] |
Reimplemented in ToggleableMenu.
| int Menu::post_process | ( | int | key | ) | [protected, virtual] |
| bool Menu::in_page | ( | int | index | ) | const [protected] |
| void Menu::deselect_all | ( | bool | update_view = true |
) | [protected] |

| void Menu::select_items | ( | int | key, | |
| int | qty = -1 | |||
| ) | [protected, virtual] |

| void Menu::select_item_index | ( | int | idx, | |
| int | qty, | |||
| bool | draw_cursor = true | |||
| ) | [protected] |

| void Menu::select_index | ( | int | index, | |
| int | qty = -1 | |||
| ) | [protected] |

| bool Menu::is_hotkey | ( | int | index, | |
| int | key | |||
| ) | [protected] |

| bool Menu::is_selectable | ( | int | index | ) | const [protected, virtual] |
Reimplemented in InvMenu.
| bool Menu::process_key | ( | int | keyin | ) | [protected, virtual] |
Reimplemented in InvMenu, formatted_scroller, StashMenu, and StashSearchMenu.

MenuEntry* Menu::title [protected] |
MenuEntry* Menu::title2 [protected] |
int Menu::flags [protected] |
std::string Menu::tag [protected] |
int Menu::first_entry [protected] |
int Menu::y_offset [protected] |
int Menu::pagesize [protected] |
int Menu::max_pagesize [protected] |
formatted_string Menu::more [protected] |
std::vector<MenuEntry*> Menu::items [protected] |
std::vector<text_pattern> Menu::select_filter [protected] |
MenuHighlighter* Menu::highlighter [protected] |
int Menu::num [protected] |
unsigned char Menu::lastch [protected] |
bool Menu::alive [protected] |
int Menu::last_selected [protected] |
MenuDisplay* Menu::mdisplay [protected] |
1.5.6