scenepic 1.1.0
3D Visualization Made Easy
Public Member Functions | Friends | List of all members
scenepic::DropDownMenu Class Reference

Represents a ScenePic DropDownMenu UI component. More...

#include <drop_down_menu.h>

Public Member Functions

DropDownMenutitle (const std::string &title)
 The title of the menu. More...
 
const std::string & title () const
 The title of the menu. More...
 
DropDownMenuitems (const std::vector< std::string > &items)
 The option items displayed in the drop down. More...
 
const std::vector< std::string > & items () const
 The option items displayed in the drop down. More...
 
std::vector< std::string > & items ()
 The option items displayed in the drop down. More...
 
DropDownMenuselection (int index)
 The current selection index. More...
 
int selection () const
 The current selection index. More...
 
void set_disabled (int index, bool disabled)
 Flip a bit determining whether an index is disabled. More...
 
std::string to_string () const
 Return a JSON string representing the object. More...
 
JsonValue to_json () const
 Convert this object into ScenePic json. More...
 
void clear_script ()
 Call this if you are dumping a ScenePic script in multiple parts, e.g. More...
 

Friends

class Scene
 

Detailed Description

Represents a ScenePic DropDownMenu UI component.

Member Function Documentation

◆ clear_script()

void scenepic::DropDownMenu::clear_script ( )

Call this if you are dumping a ScenePic script in multiple parts, e.g.

for client-server interactions, or when chunking a large visualization into multiple files.

◆ items() [1/3]

std::vector< std::string > & scenepic::DropDownMenu::items ( )

The option items displayed in the drop down.

◆ items() [2/3]

const std::vector< std::string > & scenepic::DropDownMenu::items ( ) const

The option items displayed in the drop down.

◆ items() [3/3]

DropDownMenu & scenepic::DropDownMenu::items ( const std::vector< std::string > &  items)

The option items displayed in the drop down.

◆ selection() [1/2]

int scenepic::DropDownMenu::selection ( ) const

The current selection index.

◆ selection() [2/2]

DropDownMenu & scenepic::DropDownMenu::selection ( int  index)

The current selection index.

◆ set_disabled()

void scenepic::DropDownMenu::set_disabled ( int  index,
bool  disabled 
)

Flip a bit determining whether an index is disabled.

◆ title() [1/2]

const std::string & scenepic::DropDownMenu::title ( ) const

The title of the menu.

◆ title() [2/2]

DropDownMenu & scenepic::DropDownMenu::title ( const std::string &  title)

The title of the menu.

◆ to_json()

JsonValue scenepic::DropDownMenu::to_json ( ) const

Convert this object into ScenePic json.

Returns
a json value

◆ to_string()

std::string scenepic::DropDownMenu::to_string ( ) const

Return a JSON string representing the object.

Friends And Related Function Documentation

◆ Scene

friend class Scene
friend

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