Online Documentation Server
 ПОИСК
ods.com.ua Web
 КАТЕГОРИИ
Home
Programming
Net technology
Unixes
Security
RFC, HOWTO
Web technology
Data bases
Other docs

 


 ПОДПИСКА

 О КОПИРАЙТАХ
Вся предоставленная на этом сервере информация собрана нами из разных источников. Если Вам кажется, что публикация каких-то документов нарушает чьи-либо авторские права, сообщите нам об этом.




xviewfile
next up previous contents
Next: Program Listing Of Up: Example Programs Previous: Program Listing Of

xviewfile

The second, more practical application, xviewfile, allows the user to open a file for viewing. It illustrates the use of a pull down menu, popup dialogs and the text widget. Again, two versions are given, one using the Athena widget set and the other using the Motif widget set. Although both versions achieve the same purpose, they differ widely regarding both interface and style. Looking at the program code, note that some routines have names of the form XawDialogGetValueString and XmCreateMenuBar. These are known as convenience routines and, in the case of the former, belong to the Athena Toolkit and the latter, the Motif Toolkit. Note that the program code for the Motif version uses many such convenience routines. They are useful for creating quite complex user interface components, such as the file selection dialog box, which is a composed of several widgets.

Figure 21 shows the the result of running the Athena version and figure 22 shows the result of running the Motif version. In both cases, a file is loaded and displayed in the main text window. Again, note the addition of a title by the twm window manager.



JR Pitchers
Wed May 3 16:45:04 BST 1995


With any suggestions or questions please feel free to contact us