Chris' Cairo Blog

December 4, 2009

Getting my widgets onto the palette

Filed under: What I am working on — thorgch @ 11:50 pm

Getting my cairo based widgets into the hands of other developers at work is one of the top goals for the cairo project. The way I see it, there are two ways to do it. First, and probably more common around where I work, is the programmatic approach. This usually means that when a new visual component is created, it’s up to the developer to configure it via code, not the UI Painter tools. The only time the UI Painter really plays a role is when the developer needs to place a view holder on the canvas. After that, it’s up to the developer’s code to do all the configuration, without GUI building tools. 

The second approach, and the approach I want to take with my cairo work, is to make the cairo based visual components accessible via the UIPalette and configurable via the UIPainter tools. Admittedly, I’ve never done this before. I have always taken the first approach because the second means not only developing the component itself, but also developing all the supporting classes/functionality needed by UIPainter, UIBuilder and UIDefiner. 

Why change now….? Well, I am hoping that a large chunk of my cairo work will find its way into a bundle that I will be publishing to the Cincom public store. If you end up using any of my work, it’s a lot easier for you to configure the widgets via the UI Painter tools than reading some huge document to figure out how to use it. Sure, I’ll still have to document some stuff, but it won’t be nearly as much documentation if I took the pure programmatic approach. 

Here’s a sample of my first attempt at making a “proper” VisualWorks GUI component. If you’re following this blog, then you have probably already guessed that the first candidate for inclusion on the UIPalette is my CairoPNGImage component. 

The CairoPNGImageView added to the UIPalette

Here is a link to some video of the component being edited.  

So what’s next? I still have a couple more spec editing interfaces to add. The big one however, is that in addition to the drag handles…I want rotation handles and a controller that can help with component rotation. I’ll really be getting into uncharted territory there! Stay tuned..


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: