DOSBox-X
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
Classes | Public Types | Public Member Functions | Public Attributes | Static Public Attributes | Protected Attributes
DOSBoxMenu Class Reference

List of all members.

Classes

struct  accelerator
class  displaylist
class  item

Public Types

enum  item_type_t {
  item_type_id = 0, submenu_type_id, separator_type_id, vseparator_type_id,
  MAX_id
}
typedef uint16_t item_handle_t
typedef bool(* callback_t )(DOSBoxMenu *const, item *const)
typedef std::string mapper_event_t

Public Member Functions

 DOSBoxMenu (const DOSBoxMenu &src)
 DOSBoxMenu (const DOSBoxMenu &&src)
bool item_exists (const item_handle_t i)
bool item_exists (const std::string &name)
itemget_item (const item_handle_t i)
itemget_item (const std::string &name)
item_handle_t get_item_id_by_name (const std::string &name)
itemalloc_item (const enum item_type_t type, const std::string &name)
void delete_item (const item_handle_t i)
void clear_all_menu_items (void)
void dump_log_debug (void)
void dump_log_displaylist (DOSBoxMenu::displaylist &ls, unsigned int indent)
const char * TypeToString (const enum item_type_t type)
void rebuild (void)
void unbuild (void)
bool isVisible (void) const
bool needsRedraw (void) const
void setRedraw (void)
void clearRedraw (void)
void showMenu (bool show=true)
void setScale (size_t s)
void removeHover (void)
void removeFocus (void)
void updateRect (void)
void layoutMenu (void)
void dispatchItemCommand (item &item)
void displaylist_append (displaylist &ls, const DOSBoxMenu::item_handle_t item_id)
void displaylist_clear (displaylist &ls)

Public Attributes

displaylist display_list
bool needRedraw = false
bool menuVisible = false
item_handle_t menuUserAttentionAt = unassigned_item_handle
item_handle_t menuUserHoverAt = unassigned_item_handle
SDL_Rect menuBox = {0,0,0,0}
size_t menuBarHeight = menuBarHeightBase
size_t screenWidth = 320
size_t fontCharScale = 1
size_t fontCharWidth = fontCharWidthBase
size_t fontCharHeight = fontCharHeightBase

Static Public Attributes

static constexpr item_handle_t unassigned_item_handle = ((item_handle_t)(0xFFFFU))
static constexpr callback_t unassigned_callback = NULL
static const mapper_event_t unassigned_mapper_event
static constexpr size_t menuBarHeightBase = (16 + 1)
static constexpr size_t fontCharWidthBase = 8
static constexpr size_t fontCharHeightBase = 16
static constexpr size_t dropshadowX = 8
static constexpr size_t dropshadowY = 8
static constexpr size_t master_list_limit = 4096

Protected Attributes

std::vector< itemmaster_list
std::map< std::string,
item_handle_t > 
name_map
item_handle_t master_list_alloc = 0

Detailed Description

Definition at line 134 of file menu.h.


The documentation for this class was generated from the following files: