scenepic 1.1.0
3D Visualization Made Easy
text_panel.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation.
2// Licensed under the MIT License.
3
4#ifndef _SCENEPIC_TEXT_PANEL_H_
5#define _SCENEPIC_TEXT_PANEL_H_
6
7#include "json_value.h"
8
9#include <string>
10
11namespace scenepic
12{
15 {
16 public:
18 TextPanel& title(const std::string& title);
19
21 const std::string& title() const;
22
24 TextPanel& text(const std::string& text);
25
27 const std::string& text() const;
28
30 TextPanel& input_text(const std::string& text);
31
33 const std::string& input_text() const;
34
36 std::string to_string() const;
37
42
48
49 private:
50 friend class Scene;
51
53 TextPanel(const std::string& text_panel_id);
54
55 std::string m_text_panel_id;
56 std::string m_text;
57 std::string m_title;
58 std::string m_input_text;
59 };
60} // namespace scenepic
61
62#endif
Representation of a JSON value according to the specification at https://www.json....
Definition: json_value.h:30
Top level container representing an entire ScenePic.
Definition: scene.h:58
Represents a ScenePic TextPanel UI component.
Definition: text_panel.h:15
TextPanel & input_text(const std::string &text)
Sets the text inside the optional input box.
TextPanel & text(const std::string &text)
The text within the text panel.
const std::string & input_text() const
Sets the text inside the optional input box.
TextPanel & title(const std::string &title)
The title of the text panel.
JsonValue to_json() const
Convert this object into ScenePic json.
std::string to_string() const
Return a JSON string representing the object.
const std::string & title() const
The title of the text panel.
void clear_script()
Call this if you are dumping a ScenePic script in multiple parts, e.g.
const std::string & text() const
The text within the text panel.
Definition: audio_track.h:14