Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

Extending Presentation Manager Container Sort Capabilities

IP.com Disclosure Number: IPCOM000115533D
Original Publication Date: 1995-May-01
Included in the Prior Art Database: 2005-Mar-30
Document File: 2 page(s) / 131K

Publishing Venue

IBM

Related People

Johnson, KD: AUTHOR [+3]

Abstract

The OS/2* container control is one of the most used and most powerful controls available in the Presentation Manager* (PM) control set. It is a visual component whose specific purpose is to hold objects. These objects might represent such diverse entities as executable programs, database records, graphics images, or word processing files. The objects in a container may be visually represented by icons, bitmaps, text strings, or various combinations thereof.

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

Extending Presentation Manager Container Sort Capabilities

      The OS/2* container control is one of the most used and most
powerful controls available in the Presentation Manager* (PM) control
set.  It is a visual component whose specific purpose is to hold
objects.  These objects might represent such diverse entities as
executable programs, database records, graphics images, or word
processing files.  The objects in a container may be visually
represented by icons, bitmaps, text strings, or various combinations
thereof.

      It is not unusual for a container control to hold several
hundred or even several thousand objects or container records.  With
this number of container records to manage, it is important to
provide users with methods that arrange and display the records in
various ways.  This allows the user the flexibility to determine the
most appropriate method of displaying records within a particular
container.

      One of the most useful tools for the end user is to be able to
display container records in any number of appropriate sort orders.
PM does provide a certain level of sort support but it falls far
short for many applications in that it does not easily provide a
method for any kind of details view sort support nor does it provide
sort support for any kind of application defined container record
attribute.

      This disclosure describes extensions implemented by the Window
Management System (WMS), a PM based extension tool, to the PM
provided sort support.  These extensions allow for much more flexible
sort support while still using the underlying PM provided sort
design.  Implementing the extensions on top of the PM design rather
than providing a completely separate application sort is important
because of the performance improvements realized.

      The PM container based sort support is initiated when a PM
CM_SORTRECORD message is sent to the container.  One of the
parameters of this message is a pointer to an application defined
comparison function that PM will call until the sort is finished.
The comparison function has as two of its parameters pointers to two
PM RECORDCORE structures, a structure that PM uses to keep track of
information that is associated with each container record.  The
application must examine each pair of RECORDCORE structures and
return a SHORT value that specifies their relationship.  PM calls the
comparison function one or more times during the sorting process,
passing pointers to two more RECORDCORE structures on each call.  The
application defined comparison routine returns a value less than 0 if
the first RECORDCORE is less than the second, a value of 0 if the two
RECORDCOREs are equal, or a value greater than 0 if the first
RECORDCORE is greater than the second.  In this way the container
records are sorted in increasing order.  Of course, the records can
also be sorted in reverse order by reversing the sense of "greater
than" and "less than".

  ...