#include <stddef.h>
#include <vector>
#include "menu.h"
#include "enum.h"
#include "itemname.h"
Go to the source code of this file.
Classes | |
struct | SelItem |
class | InvTitle |
class | InvEntry |
class | InvShowPrices |
class | InvMenu |
Defines | |
#define | PROMPT_ABORT -1 |
#define | PROMPT_GOT_SPECIAL -2 |
#define | PROMPT_NOTHING -3 |
#define | PROMPT_INAPPROPRIATE -4 |
Typedefs | |
typedef std::string(* | invtitle_annotator )(const Menu *m, const std::string &oldtitle) |
Enumerations | |
enum | object_selector { OSEL_ANY = -1, OSEL_WIELD = -2, OSEL_UNIDENT = -3, OSEL_EQUIP = -4, OSEL_RECHARGE = -5, OSEL_ENCH_ARM = -6, OSEL_VAMP_EAT = -7, OSEL_DRAW_DECK = -8, OSEL_THROWABLE = -9, OSEL_BUTCHERY = -10, OSEL_EVOKABLE = -11, OSEL_WORN_ARMOUR = -12, OSEL_FRUIT = -13, OSEL_PONDER_ARM = -14, OSEL_CURSED_WORN = -15 } |
Functions | |
bool | any_items_to_select (int type_expect, bool msg=false) |
int | prompt_invent_item (const char *prompt, menu_type type, int type_expect, bool must_exist=true, bool allow_auto_list=true, bool allow_easy_quit=true, const char other_valid_char= '\0', int excluded_slot=-1, int *const count=NULL, operation_types oper=OPER_ANY, bool allow_list_known=false) |
std::vector< SelItem > | select_items (const std::vector< const item_def * > &items, const char *title, bool noselect=false, menu_type mtype=MT_PICKUP) |
std::vector< SelItem > | prompt_invent_items (const char *prompt, menu_type type, int type_expect, invtitle_annotator titlefn=NULL, bool allow_auto_list=true, bool allow_easy_quit=true, const char other_valid_char= '\0', std::vector< text_pattern > *filter=NULL, Menu::selitem_tfn fn=NULL, const std::vector< SelItem > *pre_select=NULL) |
unsigned char | invent_select (const char *title=NULL, menu_type type=MT_INVLIST, int item_selector=OSEL_ANY, int excluded_slot=-1, int menu_select_flags=MF_NOSELECT, invtitle_annotator titlefn=NULL, std::vector< SelItem > *sels=NULL, std::vector< text_pattern > *filter=NULL, Menu::selitem_tfn fn=NULL, const std::vector< SelItem > *pre_select=NULL) |
void | browse_inventory (bool show_price) |
unsigned char | get_invent (int invent_type) |
bool | in_inventory (const item_def &i) |
std::string | item_class_name (int type, bool terse=false) |
bool | check_old_item_warning (const item_def &item, operation_types oper) |
bool | check_warning_inscriptions (const item_def &item, operation_types oper) |
void | init_item_sort_comparators (item_sort_comparators &list, const std::string &set) |
bool | prompt_failed (int retval, std::string msg="") |
bool | item_is_evokable (const item_def &item, bool known=false, bool all_wands=false, bool msg=false) |
bool | needs_handle_warning (const item_def &item, operation_types oper) |
#define PROMPT_ABORT -1 |
#define PROMPT_GOT_SPECIAL -2 |
#define PROMPT_INAPPROPRIATE -4 |
#define PROMPT_NOTHING -3 |
typedef std::string(* invtitle_annotator)(const Menu *m, const std::string &oldtitle) |
enum object_selector |
bool any_items_to_select | ( | int | type_expect, | |
bool | msg = false | |||
) |
void browse_inventory | ( | bool | show_price | ) |
bool check_old_item_warning | ( | const item_def & | item, | |
operation_types | oper | |||
) |
bool check_warning_inscriptions | ( | const item_def & | item, | |
operation_types | oper | |||
) |
unsigned char get_invent | ( | int | invent_type | ) |
bool in_inventory | ( | const item_def & | i | ) |
void init_item_sort_comparators | ( | item_sort_comparators & | list, | |
const std::string & | set | |||
) |
unsigned char invent_select | ( | const char * | title = NULL , |
|
menu_type | type = MT_INVLIST , |
|||
int | item_selector = OSEL_ANY , |
|||
int | excluded_slot = -1 , |
|||
int | menu_select_flags = MF_NOSELECT , |
|||
invtitle_annotator | titlefn = NULL , |
|||
std::vector< SelItem > * | sels = NULL , |
|||
std::vector< text_pattern > * | filter = NULL , |
|||
Menu::selitem_tfn | fn = NULL , |
|||
const std::vector< SelItem > * | pre_select = NULL | |||
) |
std::string item_class_name | ( | int | type, | |
bool | terse = false | |||
) |
bool item_is_evokable | ( | const item_def & | item, | |
bool | known = false , |
|||
bool | all_wands = false , |
|||
bool | msg = false | |||
) |
bool needs_handle_warning | ( | const item_def & | item, | |
operation_types | oper | |||
) |
bool prompt_failed | ( | int | retval, | |
std::string | msg = "" | |||
) |
int prompt_invent_item | ( | const char * | prompt, | |
menu_type | type, | |||
int | type_expect, | |||
bool | must_exist = true , |
|||
bool | allow_auto_list = true , |
|||
bool | allow_easy_quit = true , |
|||
const char | other_valid_char = '\0' , |
|||
int | excluded_slot = -1 , |
|||
int *const | count = NULL , |
|||
operation_types | oper = OPER_ANY , |
|||
bool | allow_list_known = false | |||
) |
std::vector<SelItem> prompt_invent_items | ( | const char * | prompt, | |
menu_type | type, | |||
int | type_expect, | |||
invtitle_annotator | titlefn = NULL , |
|||
bool | allow_auto_list = true , |
|||
bool | allow_easy_quit = true , |
|||
const char | other_valid_char = '\0' , |
|||
std::vector< text_pattern > * | filter = NULL , |
|||
Menu::selitem_tfn | fn = NULL , |
|||
const std::vector< SelItem > * | pre_select = NULL | |||
) |
std::vector<SelItem> select_items | ( | const std::vector< const item_def * > & | items, | |
const char * | title, | |||
bool | noselect = false , |
|||
menu_type | mtype = MT_PICKUP | |||
) |