Flowing a Presentation Parameter when using a Paradigm of Related Objects
Original Publication Date: 1994-Jul-01
Included in the Prior Art Database: 2005-Mar-27
Johnson, KD: AUTHOR [+2]
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.
Flowing a Presentation Parameter when using a Paradigm of
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.
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.
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.
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
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.
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.
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...