LLDB  mainline
Public Types | Public Member Functions | Protected Attributes | List of all members
curses::Menu Class Reference
Inheritance diagram for curses::Menu:
Inheritance graph
[legend]
Collaboration diagram for curses::Menu:
Collaboration graph
[legend]

Public Types

enum  Type { Type::Invalid, Type::Bar, Type::Item, Type::Separator }
 

Public Member Functions

 Menu (Type type)
 
 Menu (const char *name, const char *key_name, int key_value, uint64_t identifier)
 
 ~Menu () override=default
 
const MenuDelegateSPGetDelegate () const
 
void SetDelegate (const MenuDelegateSP &delegate_sp)
 
void RecalculateNameLengths ()
 
void AddSubmenu (const MenuSP &menu_sp)
 
int DrawAndRunMenu (Window &window)
 
void DrawMenuTitle (Window &window, bool highlight)
 
bool WindowDelegateDraw (Window &window, bool force) override
 
HandleCharResult WindowDelegateHandleChar (Window &window, int key) override
 
MenuActionResult ActionPrivate (Menu &menu)
 
MenuActionResult Action ()
 
void SetCannedResult (MenuActionResult result)
 
MenusGetSubmenus ()
 
const MenusGetSubmenus () const
 
int GetSelectedSubmenuIndex () const
 
void SetSelectedSubmenuIndex (int idx)
 
Type GetType () const
 
int GetStartingColumn () const
 
void SetStartingColumn (int col)
 
int GetKeyValue () const
 
void SetKeyValue (int key_value)
 
std::string & GetName ()
 
std::string & GetKeyName ()
 
int GetDrawWidth () const
 
uint64_t GetIdentifier () const
 
void SetIdentifier (uint64_t identifier)
 
- Public Member Functions inherited from curses::WindowDelegate
virtual ~WindowDelegate ()=default
 
virtual const char * WindowDelegateGetHelpText ()
 
virtual KeyHelpWindowDelegateGetKeyHelp ()
 

Protected Attributes

std::string m_name
 
std::string m_key_name
 
uint64_t m_identifier
 
Type m_type
 
int m_key_value
 
int m_start_col
 
int m_max_submenu_name_length
 
int m_max_submenu_key_name_length
 
int m_selected
 
Menum_parent
 
Menus m_submenus
 
WindowSP m_menu_window_sp
 
MenuActionResult m_canned_result
 
MenuDelegateSP m_delegate_sp
 

Detailed Description

Definition at line 1333 of file IOHandler.cpp.

Member Enumeration Documentation

◆ Type

enum curses::Menu::Type
strong
Enumerator
Invalid 
Bar 
Item 
Separator 

Definition at line 1335 of file IOHandler.cpp.

Constructor & Destructor Documentation

◆ Menu() [1/2]

curses::Menu::Menu ( Type  type)

Definition at line 1434 of file IOHandler.cpp.

References curses::NotHandled.

◆ Menu() [2/2]

curses::Menu::Menu ( const char *  name,
const char *  key_name,
int  key_value,
uint64_t  identifier 
)

Definition at line 1442 of file IOHandler.cpp.

References lldb_private::Invalid, Item, m_key_name, m_name, m_type, and Separator.

◆ ~Menu()

curses::Menu::~Menu ( )
overridedefault

Member Function Documentation

◆ Action()

MenuActionResult curses::Menu::Action ( )
inline

Definition at line 1378 of file IOHandler.cpp.

Referenced by WindowDelegateHandleChar().

◆ ActionPrivate()

MenuActionResult curses::Menu::ActionPrivate ( Menu menu)
inline

Definition at line 1364 of file IOHandler.cpp.

◆ AddSubmenu()

void curses::Menu::AddSubmenu ( const MenuSP menu_sp)

◆ DrawAndRunMenu()

int curses::Menu::DrawAndRunMenu ( Window window)

◆ DrawMenuTitle()

void curses::Menu::DrawMenuTitle ( Window window,
bool  highlight 
)

◆ GetDelegate()

const MenuDelegateSP& curses::Menu::GetDelegate ( ) const
inline

Definition at line 1346 of file IOHandler.cpp.

◆ GetDrawWidth()

int curses::Menu::GetDrawWidth ( ) const
inline

Definition at line 1408 of file IOHandler.cpp.

◆ GetIdentifier()

uint64_t curses::Menu::GetIdentifier ( ) const
inline

Definition at line 1412 of file IOHandler.cpp.

Referenced by ApplicationDelegate::MenuDelegateAction().

◆ GetKeyName()

std::string& curses::Menu::GetKeyName ( )
inline

Definition at line 1406 of file IOHandler.cpp.

◆ GetKeyValue()

int curses::Menu::GetKeyValue ( ) const
inline

Definition at line 1400 of file IOHandler.cpp.

Referenced by WindowDelegateHandleChar().

◆ GetName()

std::string& curses::Menu::GetName ( )
inline

Definition at line 1404 of file IOHandler.cpp.

◆ GetSelectedSubmenuIndex()

int curses::Menu::GetSelectedSubmenuIndex ( ) const
inline

Definition at line 1390 of file IOHandler.cpp.

Referenced by WindowDelegateDraw(), and WindowDelegateHandleChar().

◆ GetStartingColumn()

int curses::Menu::GetStartingColumn ( ) const
inline

Definition at line 1396 of file IOHandler.cpp.

◆ GetSubmenus() [1/2]

Menus& curses::Menu::GetSubmenus ( )
inline

◆ GetSubmenus() [2/2]

const Menus& curses::Menu::GetSubmenus ( ) const
inline

Definition at line 1388 of file IOHandler.cpp.

◆ GetType()

Type curses::Menu::GetType ( ) const
inline

Definition at line 1394 of file IOHandler.cpp.

References lldb_private::IOHandler::m_type.

Referenced by WindowDelegateDraw(), and WindowDelegateHandleChar().

◆ RecalculateNameLengths()

void curses::Menu::RecalculateNameLengths ( )

◆ SetCannedResult()

void curses::Menu::SetCannedResult ( MenuActionResult  result)
inline

Definition at line 1384 of file IOHandler.cpp.

◆ SetDelegate()

void curses::Menu::SetDelegate ( const MenuDelegateSP delegate_sp)
inline

Definition at line 1348 of file IOHandler.cpp.

◆ SetIdentifier()

void curses::Menu::SetIdentifier ( uint64_t  identifier)
inline

Definition at line 1414 of file IOHandler.cpp.

◆ SetKeyValue()

void curses::Menu::SetKeyValue ( int  key_value)
inline

Definition at line 1402 of file IOHandler.cpp.

◆ SetSelectedSubmenuIndex()

void curses::Menu::SetSelectedSubmenuIndex ( int  idx)
inline

Definition at line 1392 of file IOHandler.cpp.

Referenced by WindowDelegateHandleChar().

◆ SetStartingColumn()

void curses::Menu::SetStartingColumn ( int  col)
inline

Definition at line 1398 of file IOHandler.cpp.

Referenced by WindowDelegateDraw().

◆ WindowDelegateDraw()

bool curses::Menu::WindowDelegateDraw ( Window window,
bool  force 
)
overridevirtual

◆ WindowDelegateHandleChar()

HandleCharResult curses::Menu::WindowDelegateHandleChar ( Window window,
int  key 
)
overridevirtual

Member Data Documentation

◆ m_canned_result

MenuActionResult curses::Menu::m_canned_result
protected

Definition at line 1429 of file IOHandler.cpp.

◆ m_delegate_sp

MenuDelegateSP curses::Menu::m_delegate_sp
protected

Definition at line 1430 of file IOHandler.cpp.

◆ m_identifier

uint64_t curses::Menu::m_identifier
protected

◆ m_key_name

std::string curses::Menu::m_key_name
protected

Definition at line 1418 of file IOHandler.cpp.

Referenced by DrawMenuTitle(), Menu(), and RecalculateNameLengths().

◆ m_key_value

int curses::Menu::m_key_value
protected

Definition at line 1421 of file IOHandler.cpp.

Referenced by DrawMenuTitle().

◆ m_max_submenu_key_name_length

int curses::Menu::m_max_submenu_key_name_length
protected

Definition at line 1424 of file IOHandler.cpp.

Referenced by AddSubmenu(), and RecalculateNameLengths().

◆ m_max_submenu_name_length

int curses::Menu::m_max_submenu_name_length
protected

Definition at line 1423 of file IOHandler.cpp.

Referenced by AddSubmenu(), and RecalculateNameLengths().

◆ m_menu_window_sp

WindowSP curses::Menu::m_menu_window_sp
protected

Definition at line 1428 of file IOHandler.cpp.

Referenced by WindowDelegateHandleChar().

◆ m_name

std::string curses::Menu::m_name
protected

Definition at line 1417 of file IOHandler.cpp.

Referenced by DrawMenuTitle(), Menu(), and RecalculateNameLengths().

◆ m_parent

Menu* curses::Menu::m_parent
protected

◆ m_selected

int curses::Menu::m_selected
protected

Definition at line 1425 of file IOHandler.cpp.

Referenced by WindowDelegateHandleChar().

◆ m_start_col

int curses::Menu::m_start_col
protected

Definition at line 1422 of file IOHandler.cpp.

◆ m_submenus

Menus curses::Menu::m_submenus
protected

Definition at line 1427 of file IOHandler.cpp.

Referenced by AddSubmenu(), and WindowDelegateHandleChar().

◆ m_type

Type curses::Menu::m_type
protected

Definition at line 1420 of file IOHandler.cpp.

Referenced by DrawMenuTitle(), and Menu().


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