[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 Widget Writer's Guide

How Much Work Is Involved?

If you have made it this far, then you presumably have the prerequisite knowledge and software. Now the question is whether you also have the determination to complete writing a Motif widget.

For very simple widgets, you should expect to write at least 800 to 1000 lines of source code. Complex widgets may easily require 10,000 to 20,000 lines of source code. The amount of code is related not only to the complexity of the widget but also to the availability of suitable code in superclasses. That is, if your widget's superclass already contains a suitable method, then your widget can simply inherit that method.

We do not recommend that you write all this code "from scratch." Rather, we suggest copying large chunks of your widget from existing widgets, such as the Exm demonstration widgets we provide.

[ Previous | Next | Contents | Glossary | Home | Search ]