Module: MSPhysics::Dialog
- Defined in:
- RubyExtension/MSPhysics/dialog.rb
Overview
Constant Summary
- DEFAULT_EDITOR_THEME =
'tomorrow_night'- DEFAULT_EDITOR_FONT =
12- DEFAULT_EDITOR_WRAP =
'free'- DEFAULT_EDITOR_PRINT_MARGIN =
true- DEFAULT_EDITOR_SIZE =
[800,600]
- DEFAULT_DIALOG_HELP_BOX =
true- DEFAULT_DIALOG_SCALE =
1.0- USE_HTML_DIALOG =
~ Sketchup.version.to_i > 16 ? true : false
false- PRECISION =
3- TITLE =
'MSPhysics UI'
Class Method Summary collapse
-
.add_sound(path) ⇒ String
Add sound to UI.
-
.execute_js(code) ⇒ nil
Execute JavaScript in the UI dialog.
-
.fix_numeric_value(value) ⇒ String
private
Remove uncertain decimal places.
-
.format_value(value, precision = 2) ⇒ String
private
Format value into string.
-
.get_joint_default_value(joint, attr_name) ⇒ Object?
private
Get default value of a particular attribute in joint.
-
.load_editor_settings ⇒ Object
Load editor settings from registry.
-
.locate_error(error) ⇒ Boolean
Open MSPhysics UI and set pointer to the location of an error.
-
.open(state) ⇒ Boolean
Open/close MSPhysics UI.
-
.open? ⇒ Boolean
Determine if MSPhysics UI is open.
-
.remove_all_sounds ⇒ Object
Remove all sounds from UI.
-
.remove_sound(name) ⇒ Object
Remove sound from UI.
-
.save_editor_settings ⇒ Object
Save editor settings into registry.
-
.update_body_state ⇒ void
private
Update UI properties tab.
-
.update_dialog_style ⇒ Boolean
private
Update dialog style.
-
.update_joint_state ⇒ void
private
Update UI joint tab.
- .update_simulation_sliders ⇒ void
-
.update_simulation_state ⇒ void
private
Update UI simulation tab.
-
.update_sound_state ⇒ void
private
Update UI sound tab.
-
.update_state ⇒ void
private
Update state of all UI.
Class Method Details
.add_sound(path) ⇒ String
Add sound to UI.
.execute_js(code) ⇒ nil
Execute JavaScript in the UI dialog.
.fix_numeric_value(value) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Remove uncertain decimal places.
.format_value(value, precision = 2) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Format value into string.
.get_joint_default_value(joint, attr_name) ⇒ Object?
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Get default value of a particular attribute in joint.
.load_editor_settings ⇒ Object
Load editor settings from registry.
.locate_error(error) ⇒ Boolean
Open MSPhysics UI and set pointer to the location of an error.
.open(state) ⇒ Boolean
Open/close MSPhysics UI.
.open? ⇒ Boolean
Determine if MSPhysics UI is open.
.remove_all_sounds ⇒ Object
Remove all sounds from UI.
.remove_sound(name) ⇒ Object
Remove sound from UI.
.save_editor_settings ⇒ Object
Save editor settings into registry.
.update_body_state ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Update UI properties tab.
.update_dialog_style ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Update dialog style.
.update_joint_state ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Update UI joint tab.
.update_simulation_sliders ⇒ void
This method returns an undefined value.
.update_simulation_state ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Update UI simulation tab.
.update_sound_state ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Update UI sound tab.
.update_state ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
Update state of all UI.