24.05.2014 Views

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

• Snap-back scrolling, a feature that allows users to have the scroll bar slider<br />

snap-back to its starting position when the mouse is dragged beyond a certain<br />

distance from the scroll bar area.<br />

8.3.3 The Motif Extensibility Framework<br />

One of the problems Motif developers are facing is the complexity of developing<br />

new widgets for their applications. Subclassing Motif widgets without the source<br />

code of the parent class is a challenge with Motif 1.2. Even developing a new<br />

class from the superclass source code is not always easy. There are four sets of<br />

issues for the widget developer:<br />

• Developing a new widget from scratch can take a significant amount of time.<br />

For its internal widget development, OSF built a library of internal functions<br />

that are commonly used in the widget set. For example, there are functions to<br />

draw 3D shadows. If those functions were available to widget writers, it would<br />

speed up the development process.<br />

• The Motif widget class methods are currently not documented. Widget writers<br />

have to browse into the superclass source to figure out the class methods and<br />

what they do. Documenting the widget class methods of the most frequently<br />

subclassed widgets helps widget development.<br />

• Sometimes, it is not possible to have new widgets behave as expected when<br />

they are managed by a standard parent. One of the key issues is that, in a<br />

number of cases, manager widgets perform tests about the nature of their<br />

children. These tests are typically done by testing the class pointers of the<br />

children. When applied to a custom widget, they fail, and the widget does not<br />

behave properly.<br />

• Motif subclassing requires use of the Xt object framework, implemented in C.<br />

Most C++ application programmers, now a significant number, want to write<br />

subclasses of the Motif widgets directly in C++.<br />

OSF has addressed these issues by developing an extensibility framework for<br />

Motif that will significantly help OSF/Motif widget developers and application<br />

programmers. This framework consists of four parts:<br />

• A new mechanism has been developed on top of intrinsics, called Traits.<br />

• A new set of APIs has been documented by OSF for widget writers.<br />

• A new book hs been published by OSF with documentation on how to correctly<br />

subclass a Motif widget. This documentation is accompanied by a CD-ROM<br />

containing source code illustrations. The book also contains documentation<br />

for the existing class methods that can be re-used by developers.<br />

• A set of C++ base classes has been developed that makes it possible to<br />

derive subclasses of the Motif Manager and Primitive widgets (the most<br />

frequently derived) directly in C++ while retaining the ability to use Motif<br />

functions on those widgets, such as keyboard traversal function<br />

XmProcessTraversal().<br />

8.3.3.1 Traits<br />

The trait abstraction was first introduced by Xerox. A trait is a characteristic of an<br />

object that can be expressed by a set of methods/data applied to, or carried by<br />

the object holding that trait. At a higher level, a trait implements a behavior that<br />

can be shared by different objects of a system without requiring any particular<br />

218 <strong>AIX</strong> <strong>Version</strong> <strong>4.3</strong> <strong>Differences</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!