Open3D (C++ API)
Data Structures | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Friends
open3d::gui::Menu Class Reference

#include <Menu.h>

Data Structures

struct  Impl
 

Public Types

using ItemId = int
 

Public Member Functions

 Menu ()
 
virtual ~Menu ()
 
void AddItem (const char *name, ItemId item_id=NO_ITEM, KeyName key=KEY_NONE)
 
void AddMenu (const char *name, std::shared_ptr< Menu > submenu)
 
void AddSeparator ()
 
bool IsEnabled (ItemId item_id) const
 
void SetEnabled (ItemId item_id, bool enabled)
 
bool IsChecked (ItemId item_id) const
 
void SetChecked (ItemId item_id, bool checked)
 
int CalcHeight (const Theme &theme) const
 
ItemId DrawMenuBar (const DrawContext &context, bool is_enabled)
 
ItemId Draw (const DrawContext &context, const char *name, bool is_enabled)
 

Static Public Attributes

static constexpr ItemId NO_ITEM = -1
 

Protected Member Functions

void * GetNativePointer ()
 

Friends

class Application
 

Member Typedef Documentation

◆ ItemId

Constructor & Destructor Documentation

◆ Menu()

open3d::gui::Menu::Menu ( )

◆ ~Menu()

open3d::gui::Menu::~Menu ( )
virtual

Member Function Documentation

◆ AddItem()

void open3d::gui::Menu::AddItem ( const char *  name,
ItemId  item_id = NO_ITEM,
KeyName  key = KEY_NONE 
)

◆ AddMenu()

void open3d::gui::Menu::AddMenu ( const char *  name,
std::shared_ptr< Menu submenu 
)

◆ AddSeparator()

void open3d::gui::Menu::AddSeparator ( )

◆ CalcHeight()

int open3d::gui::Menu::CalcHeight ( const Theme theme) const

◆ Draw()

Menu::ItemId open3d::gui::Menu::Draw ( const DrawContext context,
const char *  name,
bool  is_enabled 
)

◆ DrawMenuBar()

Menu::ItemId open3d::gui::Menu::DrawMenuBar ( const DrawContext context,
bool  is_enabled 
)

◆ GetNativePointer()

void * open3d::gui::Menu::GetNativePointer ( )
protected

◆ IsChecked()

bool open3d::gui::Menu::IsChecked ( ItemId  item_id) const

◆ IsEnabled()

bool open3d::gui::Menu::IsEnabled ( ItemId  item_id) const

Searches the menu hierarchy down from this menu to find the item and returns true if the item is enabled.

◆ SetChecked()

void open3d::gui::Menu::SetChecked ( ItemId  item_id,
bool  checked 
)

◆ SetEnabled()

void open3d::gui::Menu::SetEnabled ( ItemId  item_id,
bool  enabled 
)

Searches the menu hierarchy down from this menu to find the item and set it enabled according to enabled.

Friends And Related Function Documentation

◆ Application

friend class Application
friend

Field Documentation

◆ NO_ITEM

constexpr ItemId open3d::gui::Menu::NO_ITEM = -1
static

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