Go to 'Home' Go to 'Products' Go to 'Tutorials' Go to 'Company' Go to 'Contact'

Good ideas aren't worth much if you don't have the tools to implement them. The difficulty with applying interface design to applications with most of the default toolkits that come with the operating system is that you're locked in to someone else's way of thinking. While Goblin can reproduce any of the interface styles your OS can produce, it can also be used to step beyond that and produce an interface that uses any style you like.

The interface toolkit runs from a 32-bit rendering pipeline, and produces effects such as soft shadows, additive glows, gradient overlays, bitmap based control widgets, and other things that can be used to create whatever you want on the screen, and make it do whatever you want it to do.



Widgets

Every item that's visible on the screen in a Goblin app is a 'Widget'. There are a number of different types of widget available, from the simple Colour Widget (a rectangular block of 32-bit colour) to the Image Widget (a 32-bit bitmap displayed on the screen). Each widget can have a range of special effects such as shadows and glows applied, and those effects can be adjusted dynamically to create animations such as pulsing or fading if needed.

Widgets can process a number of events such as mouse clicks and timer events. This means that any object you see on the screen can be active like a button, process animations or key events, and do a number of other things. Using this system, your interface can come alive, reacting to user actions or timed events in any way you desire.

Complex widgets such as multi-column tables and text edit boxes are also supported, with the flexibility of all the other Goblin widgets. Using this system you can make sure that every element of your application matches the style you have chosen, not needing to rely on default OS based UI items.

Back to the top



Hierarchies

In order to make managing your widgets easier the system works off a hierarchy. Widgets can have 'child widgets' that exist inside them. When you manipulate the parent (such as moving it or fading its opacity), the child widgets are also moved. Moving a panel is as simple as moving the parent widget that contains all of the buttons. Fading a panel works in the same manner, reduce the opacity of the parent and all child widgets fade with it.

Hierarchies let you manage complex behaviours with a minimum of code. If you want to create a button that has text on top, the text item is represented by a Text Widget that is a child of the button's widget. If you then want to have the text glow when the mouse comes inside the button, the button has direct access to its child to perform the effect operation.



Effects

The Goblin UI system allows a wide range of special effects to be built in to the interface. Simple systems such as procedural gradient overlays give you the ability to add depth to the visual elements of the UI without requiring additional bitmaps.

To create a texture in the backdrop of your window for example, you can add a single textured 'tile' to the backdrop and have it repeat over the surface, then tell it to render a procedural gradient on top to give it depth. The gradient can be changed at any time, even while running the application, without changing any of the bitmaps.

Subtle effects such as fading glows and pulsing rollovers are easily managed using the event processing systems built in to the Widgets. If you want to pulse a widget, you can simply attach a timer and process the timer event to alter the widget's opacity dynamically. Opacity is a property of all widgets, and adjusts their opacity regardless of the source images used to create them.

Back to the top



Resources

Building Goblin UI's can be done either dynamically by the application, or by writing a Resource Script. This script is a simple text based script that describes the interface, and contains references to the images etc. that make it up. Resource scripts are compiled in to Resource Files that are read by the application at runtime. These files contain all the images and other support files required to build the UI.

When you construct a widget from the resource file, all of its children are constructed wtih it. So using the hierarchy system you can build your entire UI with a couple of lines of code.

Back to 'Goblin'



Copyright 2003 Ambient Design Ltd - So There

- Home - Products - Tutorials - Company - Contact Us - Top -