Introducing SKUI, a GUI framework for SketchUp. It’s a library that lets you create and manipulate WebDialog GUI using only Ruby code. It saves you from needing any knowledge of HTML, CSS, JS or browser compatibility issues in order to create a UI for your SketchUp extension.
Here is a quick example:
1 2 3 4 5 | w = SKUI::Window.new b = SKUI::Button.new( 'Hello' ) { puts 'World! :)' } b.position( 10, 5 ) w.add_control( b ) w.show |
w = SKUI::Window.new b = SKUI::Button.new( 'Hello' ) { puts 'World! :)' } b.position( 10, 5 ) w.add_control( b ) w.show
Notice that controls can be added, removed and manipulated after the window has been created. Allowing for quick prototyping of the GUI.
Controls are represented as Ruby classes that describe the properties and events. Here is a slightly larger example of the controls currently available:
Of course, one can use themes – with a single line you can swap theme, even while the window is open: window.theme = SKUI::Window::THEME_GRAPHITE
The project is hosted on GitHub and is still under development. There are still a few issues that needs to be resolved before the first release can be announced. For this I invite you, the community, to check it out and help me resolve the last issues, test it and contribute improvements.
[…] For getting more details, visit the following link http://www.thomthom.net/thoughts/2013/07/skui-a-gui-framework-for-sketchup/ […]