Browse Prior Art Database

Flowing a Presentation Parameter when using a Paradigm of Related Objects

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

Publishing Venue

IBM

Related People

Johnson, KD: AUTHOR [+2]

Abstract

Presentation Manager* (PM) of OS/2* uses presentation parameters to control such aspects of a window as colors and fonts. Default PM action of a control within a window is to honor its individual presentation parameter if it has explicitly been set, else to inherit from its owner in the PM window hierarchy.

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

Flowing a Presentation Parameter when using a Paradigm of Related
Objects

      Presentation Manager* (PM) of OS/2* uses presentation
parameters to control such aspects of a window as colors and fonts.
Default PM action of a control within a window is to honor its
individual presentation parameter if it has explicitly been set, else
to inherit from its owner in the PM window hierarchy.

      A sophisticated user interface, such as that developed by the
Window Management System (WMS), an IBM* internal interface
development tool, sometimes has need to override this default
behavior so that presentation parameter inheritance works in a
different manner.  WMS follows the philosophy of related objects
inheriting from each other.  An example is when a font is dropped on
a window by the user.  Regardless of whether the font is dropped on
the window itself, a top level control or a subportion of a control,
the new font is flowed so that the entire window and all of its
contents reflect the new font.

      Overriding the default PM action regarding presentation
parameters and their inheritance is a tricky process.  This
disclosure describes the technique used by WMS to enable this
override, such that related objects inherit from each other
regardless of their position in the PM hierarchy.

      When a presentation parameter is changed for a PM window or
control, a WM_PRESPARAMCHANGED message is sent to that object's
message procedure.  If it is sent on to the PM default procedure, the
default inheritance action will occur.  In order to override this
default action, every object on a window must be subclassed so that
the WM_PRESPARAMCHANGED message can be intercepted and handled in a
special manner.

      When the message is received and its parameters indicate the
presentation parameter is the one of interest to the application, a
special function must always be called.  This function will return
whether the message should be passed to the PM default procedure,
thereby enabling inheritance, or whether it should be thrown away,
thereby overriding inheritance to achieve the desired purpose of
flowing the presentation parameter throughout the panel.

      When this function is called for a presentation parameter
change, a flag is checked to see if a flowing is currently under way.
If not, the flag is set and window updates for the top-level window
are disabled.  This allows the changes to be flowed through the panel
without each change being reflected as it occurs.  When the flowing
is completed, the window will be updated to reflect all of the
changes at the same time.  This makes for a very pleasant appearance
change to the user.

      Since the WM_PRESPARAMCHANGED message comes in for both
inherited and directly set changes, the function needs to know what
type of change this is for.  This is discovered by calling the
WinQueryPresParam API, with the QPF_NOINHERIT flag set.  Th...