Module: UI
- Defined in:
- lib/ui.rb,
lib/command.rb,
lib/toolbar.rb,
lib/webdialog.rb
Defined Under Namespace
Classes: Command, Toolbar, WebDialog
Class Method Summary collapse
- .add_context_menu_handler ⇒ Object
- .beep ⇒ Object
- .create_cursor(filename, hot_x, hot_y) ⇒ Object
- .inputbox(*args) ⇒ Object
- .inspector_names ⇒ Object
-
.menu(menu_name = nil) ⇒ Sketchup::Menu
Used to access SketchUp menus in order to add menu items.
- .messagebox(message, type = IDOK) ⇒ Object
-
.model_info_pages ⇒ Object
Display a list of the names of the available tabs in the Model Info Window.
-
.openpanel(title, path, file_filter) ⇒ Object
File selection dialog.
- .openURL(url) ⇒ Object
- .play_sound(filename) ⇒ Object
- .preferences_pages ⇒ Object
- .refresh_inspectors ⇒ Object
-
.savepanel(title, path, file_filter) ⇒ Object
File save dialog.
-
.select_directory(opts = {}) ⇒ String, ...
Nil if user cancel.
- .set_cursor(cursor_id) ⇒ Object
- .set_toolbar_visible(name, visible) ⇒ Object
- .show_inspector(name) ⇒ Object
- .show_model_info(page) ⇒ Object
- .show_preferences(page) ⇒ Object
-
.start_timer(interval, repeat = false) { ... } ⇒ Fixnum
The start_timer method is used to start a timer and execute deferred code.
-
.stop_timer(id) ⇒ nil
The stop_timer method is used to stop a timer based on its id.
- .toolbar(name) ⇒ Object
- .toolbar_names ⇒ Object
- .toolbar_visible?(name) ⇒ Boolean
Class Method Details
.add_context_menu_handler ⇒ Object
2 3 |
# File 'lib/ui.rb', line 2 def self. end |
.create_cursor(filename, hot_x, hot_y) ⇒ Object
11 12 |
# File 'lib/ui.rb', line 11 def self.create_cursor(filename, hot_x, hot_y) end |
.inputbox(*args) ⇒ Object
13 14 |
# File 'lib/ui.rb', line 13 def self.inputbox(*args) end |
.inspector_names ⇒ Object
15 16 |
# File 'lib/ui.rb', line 15 def self.inspector_names end |
.menu(menu_name = nil) ⇒ Sketchup::Menu
Used to access SketchUp menus in order to add menu items.
Valid Strings are: File, Edit, View, Camera, Draw, Tools, Window, Plugins, Help
User-defined top-level menus will not be added., although users may define sub-menus.
A mis-typed menu name may return one of the valid menu with no error given, or it may produce an error.
The Plugins menu may or may not be visible when SketchUp starts. It will be created upon the first access.
References to Menus are time-sensitive. You have a limited amount of time to add your menu items before the menu reference no longer works. No error given in this case.
41 42 |
# File 'lib/ui.rb', line 41 def self.( = nil) end |
.messagebox(message, type = IDOK) ⇒ Object
44 45 |
# File 'lib/ui.rb', line 44 def self.(, type = IDOK) end |
.model_info_pages ⇒ Object
Display a list of the names of the available tabs in the Model Info Window.
48 49 |
# File 'lib/ui.rb', line 48 def self.model_info_pages end |
.openpanel(title, path, file_filter) ⇒ Object
File selection dialog.
61 62 |
# File 'lib/ui.rb', line 61 def self.openpanel(title, path, file_filter) end |
.openURL(url) ⇒ Object
51 52 |
# File 'lib/ui.rb', line 51 def self.openURL(url) end |
.play_sound(filename) ⇒ Object
64 65 |
# File 'lib/ui.rb', line 64 def self.play_sound(filename) end |
.refresh_inspectors ⇒ Object
71 72 |
# File 'lib/ui.rb', line 71 def self.refresh_inspectors end |
.savepanel(title, path, file_filter) ⇒ Object
File save dialog
75 76 |
# File 'lib/ui.rb', line 75 def self.savepanel(title, path, file_filter) end |
.select_directory(opts = {}) ⇒ String, ...
Returns nil if user cancel.
85 86 |
# File 'lib/ui.rb', line 85 def self.select_directory(opts = {}) end |
.set_cursor(cursor_id) ⇒ Object
88 89 |
# File 'lib/ui.rb', line 88 def self.set_cursor(cursor_id) end |
.set_toolbar_visible(name, visible) ⇒ Object
90 91 |
# File 'lib/ui.rb', line 90 def self.(name, visible) end |
.show_inspector(name) ⇒ Object
92 93 |
# File 'lib/ui.rb', line 92 def self.show_inspector(name) end |
.show_model_info(page) ⇒ Object
94 95 |
# File 'lib/ui.rb', line 94 def self.show_model_info(page) end |
.show_preferences(page) ⇒ Object
96 97 |
# File 'lib/ui.rb', line 96 def self.show_preferences(page) end |
.start_timer(interval, repeat = false) { ... } ⇒ Fixnum
In SketchUp 7.1 and lower, the interval was rounded down to the nearest integer. A timer with interval 0.9 would execute immediately.
There is a bug that if you open a modal window in a non-repeating timer the timer will repeat until the window is closed.
The start_timer method is used to start a timer and execute deferred code.
108 109 |
# File 'lib/ui.rb', line 108 def self.start_timer(interval, repeat=false, &block) end |
.stop_timer(id) ⇒ nil
The stop_timer method is used to stop a timer based on its id.
114 115 |
# File 'lib/ui.rb', line 114 def self.stop_timer(id) end |
.toolbar(name) ⇒ Object
117 118 |
# File 'lib/ui.rb', line 117 def self.(name) end |
.toolbar_names ⇒ Object
119 120 |
# File 'lib/ui.rb', line 119 def self. end |
.toolbar_visible?(name) ⇒ Boolean
121 122 |
# File 'lib/ui.rb', line 121 def self.(name) end |