cgv
|
namespace that holds the abstract gui interface More...
Classes | |
class | abst_control |
gui and type independent base class of all controls More... | |
struct | abst_control_provider |
type independent base class of control provider interface More... | |
class | abst_view |
type independent &base class of all views More... | |
class | application |
the application class is only a container for static methods that give access to the windows of the application More... | |
class | button |
gui independent button class that provides a click signal More... | |
class | choice_event |
class to represent choice events that include focus change and selection change events More... | |
class | control |
struct | control_provider |
class | dialog |
class | event |
class | event_handler |
interface for all classes that want to receive events More... | |
class | gamepad_key_event |
gamepad key events use the key codes defined in gamepad::GamepadKeys More... | |
class | gamepad_stick_event |
gamepad extension of stick events More... | |
class | gamepad_throttle_event |
gamepad extension of throttle events More... | |
struct | gui_creator |
interface for gui creators More... | |
class | gui_creator_registration |
helper template for registration of gui creators More... | |
class | gui_driver |
abstract base class for gui drivers More... | |
class | gui_group |
gui independent group class which is a container for gui elements More... | |
class | key_event |
class to represent all possible keyboard events with the EID_KEY More... | |
class | menu_provider |
derive from this class to provide a gui to the current viewer More... | |
struct | monitor_description |
monitor description More... | |
class | mouse_event |
class to represent all possible mouse events with the EID_MOUSE More... | |
class | pose_event |
class to represent all pose events from tracking systems with the EID_POSE More... | |
class | provider |
derive from this class to provide a gui to the current viewer More... | |
class | shortcut |
the shortcut class encapsulates a key with modifiers More... | |
class | stick_event |
class to represent stick events with the EID_STICK More... | |
class | text_editor |
abstract base class for text editors More... | |
struct | text_editor_callback_handler |
struct | text_style |
class | throttle_event |
class to represent events that inform on a change in a one axis controller with the EID_THROTTLE More... | |
class | trigger |
a trigger provides callbacks after a programmable time delay More... | |
class | view |
class for gui elements that view values of the type specified in the template argument More... | |
class | vr_calibration |
vr key events use the key codes defined in vr::VRKeys More... | |
class | vr_key_event |
vr key events use the key codes defined in vr::VRKeys More... | |
class | vr_pose_event |
vr extension of pose events More... | |
class | vr_server |
server for vr events More... | |
class | vr_stick_event |
vr extension of stick event More... | |
class | vr_throttle_event |
vr extension of throttle event More... | |
class | window |
gui independent window class More... | |
struct | with_index_struct |
helper struct to support value references as well as value references with index More... | |
Typedefs | |
typedef data::ref_ptr< button > | button_ptr |
ref counted pointer to button | |
typedef data::ref_ptr< abst_control > | control_ptr |
ref counted pointer to abst control | |
typedef data::ref_ptr< gui_driver > | gui_driver_ptr |
ref counted pointer to driver | |
typedef data::ref_ptr< gui_group, true > | gui_group_ptr |
ref counted pointer to a gui group | |
typedef data::ref_ptr< const gui_group, true > | const_gui_group_ptr |
ref counted pointer to const gui group | |
typedef cgv::data::ref_ptr< layout > | layout_ptr |
ref counted pointer to layout | |
typedef cgv::data::ref_ptr< layout_inline > | layout_inline_ptr |
ref counted pointer to table layout | |
typedef cgv::data::ref_ptr< layout_table > | layout_table_ptr |
ref counted pointer to table layout | |
typedef data::ref_ptr< text_editor > | text_editor_ptr |
ref counted pointer to abst control | |
typedef data::ref_ptr< trigger_server > | trigger_server_ptr |
ref counted pointer to trigger server | |
typedef data::ref_ptr< abst_view > | view_ptr |
ref counted pointer to abst view | |
typedef data::ref_ptr< window > | window_ptr |
ref counted pointer to &window | |
typedef data::ref_ptr< const window > | const_window_ptr |
ref counted pointer to const window | |
Functions | |
vr_calibration & | ref_vr_calibration () |
access to singleton object of vr_calibration class More... | |
vr_server & | ref_vr_server () |
return a reference to gamepad server singleton More... | |
void | connect_vr_server (bool connect_device_change_only_to_animation_trigger, cgv::gui::window_ptr w) |
connect the gamepad server to the given window or the first window of the application, if window is not provided More... | |
std::string | get_choice_type_string (ChoiceEventType type) |
convert a choice event type into a readable string | |
void | message (const std::string &_message) |
tell the user something with a message box | |
int | question (const std::string &_question, const std::vector< std::string > &answers, int default_answer) |
ask the user with question to select one of the answers , where default_answer specifies index of default answer | |
int | question (const std::string &_question, const std::string &answers, int default_answer) |
second question interface, where answers is a comma seprated list of enum declaration | |
bool | query (const std::string &question, std::string &text, bool password=false) |
query the user for a text, where the second parameter is the default text as well as the returned text. More... | |
std::string | get_modifier_string (EventModifier modifiers) |
convert a modifier combination into a readable string ending on a '+' sign if not empty, i.e. "Shift+Ctrl+" | |
std::string | get_toggle_keys_string (EventToggleKeys toggle_keys) |
convert a toggle key combination into a readable string separated by '+' signs, i.e. "CapsLock+NumLock" | |
unsigned char | stream_in_modifiers (std::istream &is) |
read modifiers in string format from a stream and set the passed reference to EventModifier s ored together. | |
unsigned char & | ref_current_modifiers () |
read out the current modifiers | |
CGV_API void | stream_in_toggle_keys (std::istream &is, unsigned char &toggle_keys) |
read toggle keys in string format from a stream and set the passed reference to EventToggleKeys ored together. | |
std::string | file_open_dialog (const std::string &title, const std::string &filter, const std::string &path) |
std::string | directory_open_dialog (const std::string &title, const std::string &path) |
std::string | directory_save_dialog (const std::string &title, const std::string &path) |
std::string | files_open_dialog (std::vector< std::string > &file_names, const std::string &title, const std::string &filter, const std::string &path) |
ask user for an open dialog that can select multiple files, return common path prefix and fill field of filenames | |
std::string | file_save_dialog (const std::string &title, const std::string &filter, const std::string &path) |
void | register_gui_creator (gui_creator *gc, const char *creator_name) |
register a gui creator | |
bool | create_gui (provider *p, const std::string &label, void *value_ptr, const std::string &value_type, const std::string &gui_type, const std::string &options, bool *toggles) |
create the gui for a composed structure | |
gui_driver_ptr | get_gui_driver () |
return the currently registered gui driver or an empty pointer if non has been registered | |
void | register_gui_driver (gui_driver_ptr _driver) |
register a new gui driver. More... | |
cgv::signal::signal< gui_driver_ptr > & | on_gui_driver_registration () |
a signal that is emitted when a gui driver is registered | |
std::string | get_key_action_string (KeyAction action) |
convert a key action into a readable string | |
template<typename T > | |
with_index_struct< T > | with_index (const T &_value, int _index) |
helper function to support value references as well as value references with index for the tree_node functions of cgv::gui::provider | |
std::string | get_key_string (unsigned short key) |
convert a key code into a readable string | |
std::ostream & | operator<< (std::ostream &os, const shortcut &sc) |
stream a shortcut as text to an output stream | |
std::istream & | operator>> (std::istream &is, shortcut &sc) |
stream in a shortcut from an input stream | |
std::string | get_stick_action_string (StickAction action) |
convert a key action into a readable string More... | |
text_editor_ptr | create_text_editor (unsigned int w, unsigned int h, const std::string &title, int x, int y) |
construct a new text editor in a separate window of given size, title and position More... | |
trigger & | get_animation_trigger () |
return the global trigger used for animation, which runs by default with 60 Hz | |
trigger_server_ptr | get_trigger_server () |
returns the currently registered trigger server | |
void | register_trigger_server (trigger_server_ptr) |
registeres a new trigger server, call this in the on_register method of the server implementation | |
gamepad_server & | ref_gamepad_server () |
return a reference to gamepad server singleton | |
void | connect_gamepad_server (cgv::gui::window_ptr w) |
connect the gamepad server to the given window or the first window of the application, if window is not provided | |
namespace that holds the abstract gui interface
enum cgv::gui::EventFlags |
enum cgv::gui::EventId |
define the ids of the most common events
enum cgv::gui::KeyAction |
enum cgv::gui::Keys |
define the names of special keys
Allowed hints: s - horizontal shrink S - vertical shrink x - horizontal expand X - vertical expand f - horizontal fill F - vertical fill l - align left r - align right c - align centered t - align top b - align bottom m - align middle (between top and bottom)
flags to define which events should be generated by server
CGV_API void cgv::gui::connect_vr_server | ( | bool | connect_device_change_only_to_animation_trigger, |
cgv::gui::window_ptr | w | ||
) |
connect the gamepad server to the given window or the first window of the application, if window is not provided
connect the vr server to the given window or the first window of the application, if window is not provided
CGV_API text_editor_ptr cgv::gui::create_text_editor | ( | unsigned int | w, |
unsigned int | h, | ||
const std::string & | title, | ||
int | x, | ||
int | y | ||
) |
construct a new text editor in a separate window of given size, title and position
use the currently registered gui driver to construct a new text editor in a separate window of given size, title and position
CGV_API std::string cgv::gui::directory_open_dialog | ( | const std::string & | title, |
const std::string & | path | ||
) |
ask the user for an existing directory.
CGV_API std::string cgv::gui::directory_save_dialog | ( | const std::string & | title, |
const std::string & | path | ||
) |
ask the user for a new directory.
CGV_API std::string cgv::gui::file_open_dialog | ( | const std::string & | title, |
const std::string & | filter, | ||
const std::string & | path = "" |
||
) |
ask the user for a file name to open a file. The filter string is composed of '|'-separated pairs of the form '<text>:<filter>', where <text> is an arbitrary text (without '|' and ':' symbols) shown with the filter and <filter> is one filter string or a ';'-separated list of filters. For example the filter parameter could be set to "Image Files (jpg,gif):*.jpg;*.gif|Video Files (avi):*.avi|All Files:*.*". The path parameter can be used to define an initial directory and or an initial file for the dialog:
CGV_API std::string cgv::gui::file_save_dialog | ( | const std::string & | title, |
const std::string & | filter, | ||
const std::string & | path = "" |
||
) |
ask the user for a file name to save a file. The filter string uses the syntax defined in the docu of file_open_dialog().
CGV_API std::string cgv::gui::get_stick_action_string | ( | StickAction | action | ) |
convert a key action into a readable string
convert a stick action into a readable string
CGV_API bool cgv::gui::query | ( | const std::string & | question, |
std::string & | text, | ||
bool | password = false |
||
) |
query the user for a text, where the second parameter is the default text
as well as the returned text.
If password
is true, the text is hidden. The function returns false if the user canceled the input of if no gui driver is available.
CGV_API vr_calibration & cgv::gui::ref_vr_calibration | ( | ) |
access to singleton object of vr_calibration class
allow ref_vr_calibration() function to construct one instance
CGV_API vr_server & cgv::gui::ref_vr_server | ( | ) |
return a reference to gamepad server singleton
return a reference to vr server singleton
CGV_API void cgv::gui::register_gui_driver | ( | gui_driver_ptr | _driver | ) |
register a new gui driver.
This overwrites a previously registered gui driver and should be called in the on_register method of the driver