Solaris Common Desktop Environment: Motif Transition Guide

Use Existing Code

This section discusses the ways in which the Solaris CDE software provides code for you to either use or learn from to develop Solaris CDE applications.

GUI Builder Code

Use a Motif GUI builder such as App Builder or SunSoft Visual WorkShop to build a simple Solaris CDE application. Then generate code from it to see what the code looks like. This is a good way to learn how to use Solaris Motif and some of the CDE functionality.

The more features in App Builder you use, the more coverage you get in generated code of Solaris CDE features. Try App Builder to, for example, alter object attributes, create connections, and use the Applications Framework Editor. Then generate code and examine it. Cycle through this process to generate variations of code to look at and learn from.

Demo Code

The Solaris CDE development environment contains demo source code that can considerably ease your application porting tasks.

Each development environment component has a demo directory in /usr/dt/examples. The demo directory contains an example program that uses the component's APIs. Read the demo code to learn how to incorporate the component behavior into your application. In some cases you can copy and paste code from the demo into your application.

The /usr/dt/examples/template directory contains a demo program that integrates most of the Solaris CDE components that comprise basic and recommended integration functionality. This template demo illustrates how to write a simple application that is well integrated with the Solaris CDE desktop.