Browse Prior Art Database

Z-Order Correction Algorithm for Dialog Boxes

IP.com Disclosure Number: IPCOM000113290D
Original Publication Date: 1994-Aug-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 2 page(s) / 40K

Publishing Venue

IBM

Related People

Jones, CA: AUTHOR

Abstract

A method for correcting the depth ordering (commonly called z-order) in Presentation Manager* or other resource files is described.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 68% of the total text.

Z-Order Correction Algorithm for Dialog Boxes

      A method for correcting the depth ordering (commonly called
z-order) in Presentation Manager* or other resource files is
described.

      Groupboxes, rectangles and frames will visually obscure other
dialog controls unless they are drawn before all other controls.
Drawing groupboxes, rectangles and frames first has the effect of
placing them "behind" all other controls, so that the other controls
are painted last.  However, groupboxes, rectangles or frames may need
to be added as an afterthought, making it impractical to expect a
person to manually draw these in the proper sequence.

      A heuristic which corrects this problem is defined as follows:
Examine all of the dialog controls in the input file, and flag all
frames, groupboxes, and rectangles.  In essence, these flagged
controls are written to the output file first.

      Within the list of rectangles, groupboxes and frames, some of
these may be fully contained within others, and the innermost control
must be "on top" for correct z-ordering.  Therefore, the coordinates
of each must be checked against all others for containment.  Since
these controls are all rectangular in shape, this containment test is
a simple comparison of the corner coordinates.

The algorithm can be stated as follows:

(1)   while not empty(list)   /* assume list is circularly linked */

/*Find a control that is not contained within any other on the list*/

(2)     ...