[ Previous | Next | Contents | Glossary | Home | Search ]
GL3.2 for AIX: Graphics Library (GL) Technical Reference

dopup Subroutine

Purpose

Displays the specified pop-up menu.

Libraries

Graphics Library

C (libgl.a)

FORTRAN (libfgl.a)

C Syntax

Int32 dopup(Int32 popup)

FORTRAN Syntax

INTEGER*4 FUNCTION DOPUP(popup)
INTEGER*4 popup

Description

The dopup subroutine displays the specified pop-up menu until the user makes a selection. If the calling program has the input focus, the specified menu is displayed and the system returns the value resulting from the item selection.

The value can be returned by a submenu, a function, or a number bound directly to an item. If no selection is made, the dopup subroutine returns a value of -1 (negative one).

The dopup subroutine manipulates events in the event queue. If the dopup subroutine is called as a result of a left mouse or middle mouse button press event, the menu remains posted until the right mouse button is pressed to make a selection. The dopup subroutine removes a pair of right mouse press and release events from the event queue (if the right mouse was queued), and also removes the left mouse or middle mouse button release event.

If the dopup subroutine is called as a result of a right mouse button press event, the menu remains posted until the right mouse button is released. The menu entry selected is the entry that was highlighted when the right mouse button was released. The dopup subroutine removes the right mouse button release event from the event queue.

If no selection is made (that is, if the user releases the right mouse button off the pop-up menu) no menu entry selection is made, and the dopup subroutine returns a value of -1. The right mouse button release event is removed from the queue.

In more complicated event sequences, all mouse button-up events up to and including the first right mouse button-up event are removed. If the user accidently presses other mouse buttons before making a pop-up menu selection, orphaned button down events (button down events without matching button up events) may remain in the event queue.

When the menu is defined, the defpup or addtopup subroutine specifies the list of menu entries and their corresponding actions.

Note: This subroutine cannot be used to add to a display list.

Parameter

popup Specifies which pop-up menu to display.

Example

The example C language program curved.c uses the dopup subroutine to display a pop-up menu.

Implementation Specifics

This subroutine is part of GL in the AIXwindows Environment/6000 Version 1, Release 2 with AIXwindows/3D Feature.

Files

/usr/include/gl/gl.h Contains C language constant and variable type definitions for GL.
/usr/include/gl/fgl.h Contains FORTRAN constant and variable type definitions for GL.

Related Information

Adding an item to an existing pop-up menu with the addtopup subroutine.

Defining a pop-up menu with the defpup subroutine.

Deallocating a pop-up menu and its data structures with the freepup subroutine.

Allocating and initializing a structure for a new pop-up menu with the newpup subroutine.

Enabling or disabling a given pop-up entry with the setpup subroutine.

AIX Graphics Library Overview and Creating and Managing Pop-Up Menus.


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