
|
|
This file was automatically generated from diguyViewButtonPanel.h. Do not edit this file directly; the changes will be lost.Includes: declspec_diguy.h | stdlib.h
Contents:
Link against: libdiguy
class diguyViewButtonPanel
|
class BDI_DECLSPEC_diguy diguyViewButtonPanel { public: static diguyViewButtonPanel* find_or_create_instance(const char* name, int horizontal = 0, int title = 1); static diguyViewButtonPanel* make_instance(const char* name, int horizontal = 0, int title = 1); static diguyViewButtonPanel* get_instance(const char* name); static int destroy_instance(const char* name); static int destroy_all(); const char* get_name(); int get_position(int* ret_x, int* ret_y); int get_width(); int get_height(); int set_visible(int visible); int set_minimized_state(int minimized); int set_position(int x, int y); int set_dimensions(int w, int h); int set_depth(int z); int set_justifications(int h, int v); int set_spacing(int spacing); int set_title(const char* title); int add_button(const char* name, const char* lua_object_name, const char* lua_function_name, const char* style_sheet = NULL); int add_button_with_script(const char* name, const char* script, const char* style_sheet = NULL); int set_button_name(int index, const char* name); int set_allow_toggle(int index, int can_toggle); int set_selected_button(int index); int set_selected_button_by_name(const char* name); int add_int_slider(const char* name, const char* lua_object_name, const char* lua_function_name, int init_val, int min_val, int max_val, const char* style_sheet = NULL); int add_float_slider(const char* name, const char* lua_object_name, const char* lua_function_name, float init_val, float min_val, float max_val, const char* style_sheet = NULL); int set_slider_value(const char* name, float value); int add_spacer(int pixels); void set_item_visibility(int index, bool visible); void remove_all_items(); void set_open_script(const char* lua_script); void set_minimize_script(const char* lua_script); int set_style_sheet(const char* sheet);
function diguyViewButtonPanel::find_or_create_instance |
Prototype:
Description:static diguyViewButtonPanel* find_or_create_instance(const char* name, int horizontal = 0, int title = 1);
Returns the named button panel or creates it.Arguments:
Returns:
name name of panel (must be unique) horizontal if 1, make a horizontal panel title if 1, show panel title
pointer to the button panelCallable From:
- C++
- Script
function diguyViewButtonPanel::make_instance |
Prototype:
Description:static diguyViewButtonPanel* make_instance(const char* name, int horizontal = 0, int title = 1);
Makes a button panel with the given name and attributes.Arguments:
Returns:
name name of panel (must be unique) horizontal if 1, make a horizontal panel title if 1, show panel title
pointer to the button panelCallable From:
- C++
- Script
function diguyViewButtonPanel::get_instance |
Prototype:
Description:static diguyViewButtonPanel* get_instance(const char* name);
Returns a pointer to the named button panel, if it exists.Arguments:
Returns:
name name of panel
pointer to the button panel or NULLCallable From:
- C++
- Script
function diguyViewButtonPanel::destroy_instance |
Prototype:
Description:static int destroy_instance(const char* name);
Destroys named button panel, if found.Arguments:
Returns:
name name of panel
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyViewButtonPanel::destroy_all |
Prototype:
Description:static int destroy_all();
Destroys all button panels.Returns:
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyViewButtonPanel::get_name |
Prototype:
Description:const char* get_name();
Returns the name of the object. This pointer will never be NULL.Returns:
name of the objectCallable From:
- C++
- Script
function diguyViewButtonPanel::get_position |
Prototype:
Description:int get_position(int* ret_x, int* ret_y);
Returns the x and y coordinate of the panel.Callable From:
- C++
- Script
function diguyViewButtonPanel::get_width |
Prototype:
Description:int get_width();
Returns the width of the panelCallable From:
- C++
- Script
function diguyViewButtonPanel::get_height |
Prototype:
Description:int get_height();
Returns the height of the panelCallable From:
- C++
- Script
function diguyViewButtonPanel::set_visible |
Prototype:
Description:int set_visible(int visible);
Makes button panel visible or invisible.Arguments:
Returns:
visible pass 1 to make visible, 0 to make invisible
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyViewButtonPanel::set_minimized_state |
Prototype:
Description:int set_minimized_state(int minimized);
Makes button panel minimized (or un-minimized).Arguments:
Returns:
visible pass 1 to make minimized, 0 to make full size
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyViewButtonPanel::set_position |
Prototype:
Description:int set_position(int x, int y);
Sets the position of the panel in its parent window. Coordinates work differently if panel is rightbottom justified on its xy (see set_justification()). In that case, the coordinate will imply the position of the panel's rightbottom edge relative to the rightbottom edge of the containing window.Arguments:
Returns:
x x position, in pixels y y position, in pixels
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyViewButtonPanel::set_dimensions |
Prototype:
Description:int set_dimensions(int w, int h);
Sets the desired dimensions of the panel.Arguments:
Returns:
w width, in pixels h height, in pixels
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyViewButtonPanel::set_depth |
Prototype:
Description:int set_depth(int z);
Sets the desired z depth of the panel.Arguments:
Returns:
z depth
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyViewButtonPanel::set_justifications |
Prototype:
Description:int set_justifications(int h, int v);
Sets the horizontal/vertical justifications of the panel (see description in set_position()).Arguments:
Returns:
h horizontal justification (> 0 for left, 0 for center, < 0 for right) v vertical justification (> 0 for top, 0 for center, < 0 for bottom)
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyViewButtonPanel::set_spacing |
Prototype:
Description:int set_spacing(int spacing);
Sets the spacing between items in panel.Arguments:
Returns:
spacing spacing in pixels
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyViewButtonPanel::set_title |
Prototype:
Description:int set_title(const char* title);
Sets the display title of the panel.Arguments:
Returns:
title text to show
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyViewButtonPanel::add_button |
Prototype:
Description:int add_button(const char* name, const char* lua_object_name, const char* lua_function_name, const char* style_sheet = NULL);
Adds a button to the panel and specifies the lua script that should be run upon press.Arguments:
name text of button lua_object_name name of lua table containing function to run lua_function_name name of lua function to run style_sheet optional css to set on button An example style sheet string: "QPushButton {background-color : rgba( 192, 210, 192, 192 ); }"Returns:
index of the new button (zero-indexed)Callable From:
- C++
- Script
function diguyViewButtonPanel::add_button_with_script |
Prototype:
Description:int add_button_with_script(const char* name, const char* script, const char* style_sheet = NULL);
Adds a button to the panel and specifies the lua script that should be run upon press.Arguments:
name text of button script Lua script to run (the script itself) style_sheet optional css to set on button An example style sheet string: "QPushButton {background-color : rgba( 192, 210, 192, 192 ); }"Returns:
index of the new button (zero-indexed)Callable From:
- C++
- Script
function diguyViewButtonPanel::set_button_name |
Prototype:
Description:int set_button_name(int index, const char* name);
Sets the name (text) of button at index n (zero-indexed).Arguments:
Returns:
index index of button (starting from 0)
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyViewButtonPanel::set_allow_toggle |
Prototype:
Description:int set_allow_toggle(int index, int can_toggle);
Sets whether or not the specified button will be a toggle button. A toggle button can be clicked back and forth between an on and off state, whereas a regular button provides only a once-off action.Arguments:
Returns:
index index of button (starting from 0) can_toggle true if toggle button
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyViewButtonPanel::set_selected_button |
Prototype:
Description:int set_selected_button(int index);
Sets the specified button to be the "selected" one within the panel. The selected button may have a special appearance depending on style sheet. See notes for set_style_sheet().Arguments:
Returns:
index index of button (starting from 0)
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyViewButtonPanel::set_selected_button_by_name |
Prototype:
Description:int set_selected_button_by_name(const char* name);
Similar to set_selected_button(), but using button name (text).Arguments:
Returns:
name name (text) of button
0 on success, -1 on failureCallable From:
- C++
- Script
function diguyViewButtonPanel::add_int_slider |
Prototype:
Description:int add_int_slider(const char* name, const char* lua_object_name, const char* lua_function_name, int init_val, int min_val, int max_val, const char* style_sheet = NULL);
Adds an integer slider to the panel and specifies the lua script that should be run upon the slider changing value. lua function should be:
Arguments:
function lua_object_name:lua_function_name(value)
Returns:
name text of label description lua_object_name name of lua table containing function to run lua_function_name name of lua function to run
index of the new slider (zero-indexed)Callable From:
- C++
- Script
function diguyViewButtonPanel::add_float_slider |
Prototype:
Description:int add_float_slider(const char* name, const char* lua_object_name, const char* lua_function_name, float init_val, float min_val, float max_val, const char* style_sheet = NULL);
Adds a continuous floating slider to the panel and specifies the lua script that should be run upon the slider changing value. lua function should be:
Arguments:
function lua_object_name:lua_function_name(value)
Returns:
name text of label description lua_object_name name of lua table containing function to run lua_function_name name of lua function to run
index of the new slider (zero-indexed)Callable From:
- C++
- Script
function diguyViewButtonPanel::set_slider_value |
Prototype:
Description:int set_slider_value(const char* name, float value);
Updates specified slider with the value specified.Arguments:
name name of slider value value of slider
function diguyViewButtonPanel::add_spacer |
Prototype:
Description:int add_spacer(int pixels);
Adds a vertical or horizontal spacer element.
function diguyViewButtonPanel::set_item_visibility |
Prototype:
Description:void set_item_visibility(int index, bool visible);
Change visibility of item specified by index
function diguyViewButtonPanel::remove_all_items |
Prototype:
Description:void remove_all_items();
Clears all items out of panel
function diguyViewButtonPanel::set_open_script |
Prototype:
Description:void set_open_script(const char* lua_script);
Sets a Lua script to be called when panel is opened (un-minimized).Arguments:
lua_script the entire script
function diguyViewButtonPanel::set_minimize_script |
Prototype:
Description:void set_minimize_script(const char* lua_script);
Sets a Lua script to be called when panel is opened (un-minimized).Arguments:
lua_script the entire script
function diguyViewButtonPanel::set_style_sheet |
Prototype:
Description:int set_style_sheet(const char* sheet);
Passes a Qt style sheet to the panel.
Sample one (user must replace "MAIN_BG_COLOR" and other tags with meaningful values):Note:
"isSelected" used to set visual properties of selected button
----------------
basic_style = [[ * { background-color : rgba( 192, 192, 192, 192 ); color : white; } QFrame#m_button_frame { background-color : MAIN_BG_COLOR; } QLabel#m_title_label { color : white; } QPushButton { color : BUTTON_TEXT_COLOR; background-color : BUTTON_BG_COLOR; } QPushButton[isSelected="true"] { color : BUTTON_SELECTED_TEXT_COLOR; background-color : BUTTON_SELECTED_BG_COLOR; } ]];Sample two (user must replace "MAIN_BG_COLOR" and other tags with meaningful values):
Note:
"isToggled" used to set visual properties on button that is toggled on
----------------
Arguments:
basic_style = [[ * { background-color : rgba( 192, 192, 192, 192 ); color : white; } QFrame#m_button_frame { background-color : MAIN_BG_COLOR; } QLabel#m_title_label { color : white; } QPushButton { color : BUTTON_TEXT_COLOR; background-color : BUTTON_BG_COLOR; } QPushButton[isToggled="true"] { color : BUTTON_TOGGLED_TEXT_COLOR; background-color : BUTTON_TOGGLED_BG_COLOR; } ]];
Returns:
sheet the style sheet
0 on success, -1 on failureCallable From:
- C++
- Script
ALL RIGHTS RESERVED.
These coded instructions, statements, and computer programs contain unpublished proprietary information of Boston Dynamics and are protected by Copyright Laws of the United States. They may not be used, duplicated, or disclosed in any form, in whole or in part, without the prior written consent from Boston Dynamics.
RESTRICTED RIGHTS LEGEND
Use, duplication, or disclosure by the government is subject to restrictions as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights in Technical Data and Computer Sofware clause at DFARS 252.227-7013 and/or in similar or successor clauses in the FAR, or the DOD or NASA FAR Supplement, or to subparagraphs (c)(1) and (c)(2) of the Commercial Computer Software--Restricted Rights at 48 CFR 52.227-19, as applicable. Unpublished-rights reserved under the Copyright Laws of the United States.
Contractor/Manufacturer is:
Boston Dynamics/78 Fourth Avenue/Waltham MA 02451.