About wxSU

wxSU is a free, open source plugin for Google SketchUp that extends the SketchUp API with the capabilities of wxRuby. wxSU bundles wxRuby to provide a cross-platform, pure Ruby solution for implementing GUI dialogs in your SketchUp plugins.

The SketchUp API provides GUI dialog support using dynamic HTML via an embedded web browser. wxSU gives you an alternative way to create dialogs for your plugins. The wxSU interface layer allows wxRuby and SketchUp to work together seamlessly.

This web page contains information about wxSU for:

If you are already convinced: Download Now

wxRuby

wxRuby is a cross-platform, open source GUI toolkit for the Ruby programming language. wxRuby is a wrapper for the cross-platform, open source C++ GUI engine wxWidgets. wxRuby and wxWidgets use the native widgets on each platform to give a native look and feel to your applications.

One advantage of using wxRuby with SketchUp is that you can write GUI applications that run within the SketchUp environment as a plugin but can also run outside of SketchUp. All it requires is a little bit of modular programming and an external Ruby interpreter to run the application (which can be packaged in an installer).

Visit the wxRuby website: http://www.wxruby.org/

System Requirements

Windows 2000/XP/Vista or Mac OS X 10.4+
Google SketchUp 6 or later (Free or Pro)

Download

Source code and install packages for Windows and Mac can be downloaded for free from here: Download Now

Users

The target users of wxSU are SketchUp plugin developers that want to write plugins or extensions that require cross-platform GUI dialogs as part of their user interface.

wxSU offers several main features:

Development Status

wxSU is currently a beta release. It is provided "as-is" with no guarantees of usability or user support. However we think wxSU is pretty stable and is ready for users to test it out in real applications.

License

wxSU is licensed under the Berkeley (BSD) open source license. You are encouraged to package and distribute wxSU with your plugin for free! Just keep in mind that wxSU is designed to install in its own directory under \Plugins so that multiple plugins can access it. Please try not to rearrange this architecture when you build your plugin distribution. It's possible that wxSU has been installed by another plugin and is already present. Bad things can happen if you try to run two or more instances of wxSU at the same time.

You are also allowed to modify wxSU and distribute your version under the BSD license. But remember that other plugins might find your version of wxSU, try to use it, and get confused if there are significant changes. If you are considering making changes and redistributing them, it's probably time to join the wxSU developer community. Let's all work together to make wxSU better.

Documentation

wxSU includes a copy of the wxRuby user documentation and can be found in the directory \wxSU-Documentation\wxRuby\index.html For the most up-to-date documentation, visit the wxRuby website: http://www.wxruby.org/

There is also some documentation for the classes and methods that are specific to wxSU. This can be found at \wxSU-Documentation\wxSU\index.html

Getting Started

After installing wxSU, include this line of Ruby code at the top of your plugin:

require("wxSU/lib/Startup")

The startup script initiates wxSU, creates an instance of the wxRuby App class, and starts its main event loop. Use the module method WxSU.app to access the App object at any time. The App object is automatically destroyed and wxSU is cleanly shutdown when SketchUp exits.

The nice thing about require is that it will only load wxSU once. Therefore more than one plugin can invoke this line of code without causing problems; they will all share a single wxSU session.

With wxSU up and running, you are ready to access all of the features in wxRuby. Here is a simple example that creates an empty dialog frame that behaves as a child window to SketchUp:

f = Wx::Frame.new(WxSU.app.sketchup_frame, -1, "Child Frame", Wx::DEFAULT_POSITION,
    Wx::DEFAULT_SIZE, WxSU::CHILD_FRAME_STYLE)
f.show

Note that you will have to use the module prefix Wx:: for all builtin wxRuby classes and constants. wxSU also has a few constants in its own module WxSU. It is possible to use the Ruby command include Wx to eliminate the module prefix. But this is not recommended since it can muddy the namespace and possibly interfere with other plugins.

There are a number of other examples included with wxSU in the directory \wxSU-Examples\ that you can study. Several examples are just minor variations on the ones that come with the current wxRuby distribution.

Known Issues

Missing Or Incomplete Features

Unexpected Behaviors

Crashes

Support

There are a several resources available for getting user support for wxSU.

First, we recommend that you subscribe to these mailing lists:

The SourceForge website also hosts trackers where you can post bugs and feature requests directly.

Before reporting a bug or other request, try to determine if it is an issue with wxSU or the core wxRuby toolkit. For support with wxRuby, visit the wxRuby website at: http://www.wxruby.org/

How To Help

You don't have to be a developer to help make wxSU better. There are several ways that you can contribute to wxSU as a user:

Developers

The entire wxSU project is hosted on SourceForge.net and includes source code management (via Subversion), trackers, mailing lists, release management, and other goodies.

Here is the link to the wxSU SourceForge site: http://sourceforge.net/projects/wxsu/

Help Wanted

We welcome new developers to help us improve wxSU. If you would like to become a developer, you can begin contributing to the project in a couple ways:

"Patches" are a set of new or modified files that fix a bug or add a new feature. You can find a list of the currently unresolved bugs and feature requests on the SourceForge bug tracker and feature request tracker, respectively.

After you post a few good patches we will officially invite you to be a developer--which means that you will receive your own commit privileges. You will then be able to commit your patches directly to Subversion. (You will need your own SourceForge account.)

As a developer you should subscribe to the user mailing lists (wxsu-announce and wxsu-users) and also the Subversion commit log mailing list:

As the number of developers grows, we'll add more project resources as necessary (for instance, add a developers discussion mailing list).

Documentation

RDoc documentation for the wxSU source code can be found at \wxSU-Documentation\wxSU\index.html

wxRuby Development

WxRuby has an active development team and is constantly improving the core GUI engine. It is possible that some problems can only be fixed by making changes to the wxRuby engine. The wxRuby development team offers great support, but you are also encouraged to get involved as a developer with that project. To learn more about wxRuby development, visit the wxRuby website at: http://www.wxruby.org/

SourceForge.net Logo