[Top] [Prev] [Next] [Index]
Page 10 out of 84 total pages , Page 2 out of 4 pages in this chapter

Obtaining a Widget

Adding widgets1 to Builder Xcessory is a very simple procedure. The following sections describe how to add widgets to Builder Xcessory.

User-defined Widgets

You can add your own X11R5/Motif 1.2 Xt Intrinsics-based widgets to Builder Xcessory. These "user-defined" widgets appear on the Palette and can be accessed and manipulated just like any other Palette collection. You must specify the widget you wish to add to Builder Xcessory by a C file conforming to the standard guidelines for widget writing. For more information about this style, refer to Asente, Converse, and Swick's X Window System Toolkit.

Information Sources

Widgets are available from a number of commercial sources, as well as freely available from numerous locations on the Internet. The following Usenet newsgroups and website are good sources of information about both commercial and free widgets:

XmDumbLabel widget files

For the remainder of this document, we will use the XmDumbLabel widget as an example. XmDumbLabel is a simple Motif widget that displays an XmString with resources for fonts, color, and margins. Source code for the XmDumbLabel widget can be found in the file {BX}/xcessory/examples/AddWidget.c. The XmDumbLabel widget source code consists of the following files:

File
Description
XmDumbLabel.c
Source code for the widget.
XmDumbLabel.h
Public header file for the widget.
XmDumbLabelP.h
Private header file for the widget.

If you want to add more than one widget, you can group them together into one library.



[Top] [Prev] [Next] [Index]
Page 10 out of 84 total pages , Page 2 out of 4 pages in this chapter

1

In this chapter, the term "widget" encompasses widgets and also gadgets.

info@ics.com
Copyright © 1998, Integrated Computer Solutions, Inc. All rights reserved.