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.

• Secondary transfer, also referred to as quick-copy, where the user first selects<br />

a destination and then uses Alt-BTransfer to select data that is moved to the<br />

destination by releasing the pointer button.<br />

In each case, a data transfer can be characterized by the fact that:<br />

• Some data is owned by an application, called the source.<br />

• Another application, called the destination, wants to acquire the data. To<br />

acquire the data, the destination usually sends a request to the owner. The<br />

destination is also called the requestor.<br />

Each particular transfer mechanism in Motif requires a new programming effort to<br />

accommodate, and thus, there is a burden on the programmer if all modes are to<br />

be supported, as recommended by the Motif Style <strong>Guide</strong>.<br />

In Motif 2.1, OSF has implemented a new mechanism to unify access to the<br />

different mechanisms. Moreover, this mechanism allows the application<br />

programmer the ability to extend the function of toolkit-supplied widgets in the<br />

area of data interchange.<br />

The model is very simple:<br />

• On every widget that can act as source emit data, a convertCallback is<br />

available.<br />

• On every widget that can act as a destination (receive data), a<br />

selectionCallback is available.<br />

The convert callback is called each time the user has requested data through any<br />

mechanism. The programmer only needs to provide a buffer containing the data<br />

and the name of the data type (an atom). Motif automatically transfers the data<br />

and frees the memory after the data has been received. Similarly, the selection<br />

callback tells the programmer that data has arrived.<br />

8.3.3.3 Menu System Improvements<br />

Motif pop-up menus were never simple to program with Motif 1.2. When a pop-up<br />

menu was created, it did not pop-up automatically on the screen when a button<br />

was pressed, some programming was required to make it pop-up. It had the<br />

sense of a task left incomplete, particularly since the code would pop-up a menu<br />

when invoked from the Menu key of the keyboard.<br />

In Motif 2.1, the following was implemented:<br />

• Programmers can freely install pop-up menus on arbitrary widgets in the tree.<br />

For each menu, it is only necessary to specify whether the menu is only valid<br />

for the widget it is installed upon or for children of that widget as well.<br />

• The menu system automatically pops-up the appropriate pop-up menu when<br />

the user of the application presses the appropriate button within the<br />

application.<br />

For the most simple specification of an automatic pop-up, nothing else needs to<br />

be done by the application programmer other than creating the pop-up menu<br />

associated with its manager.<br />

220 <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!