[clean-list] Object IO queries
Peter Achten
peter88@cs.kun.nl
Thu, 10 Jul 2003 09:31:59 +0200
--=====================_2949327==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed
At 09:39 8-7-03 +0100, Alan Hutchinson wrote:
>Here are three queries about windows in the OBJECT IO library.
>They arise when my Clean program is compiled and run under
>Microsoft Windows XP.
>
>1 The standard red X button at the top right of a window's title bar,
> which closes windows of most programs, seems not to work.
> Can it be made to work?
> It does not matter as long as the window has some other means of
> being closed, such as a working "Quit" item in a "File" menu.
Clicking the X button of a window only causes an event to be sent to the
window. The window then can deside if it should close or not. Therefore,
the default behaviour of a window is not to close. If you want a window to
close in all cases, you can add the following WindowAttribute to its
attribute-list:
Window title controls
[ WindowClose (noLS closeActiveWindow)
: other attributes
]
However, if you open this window in a SDI process then the X button that
you see does not belong to the window but rather to its parent process.
Clicking this button sends a similar event to the parent process, and you
should a similar line to the process attribute list. If you want the parent
process to close the window when this button is closed, use:
Process xDI state initGUI
[ ProcessClose closeActiveWindow
: other attributes
]
or, if it should close the process itself:
Process xDI state initGUI
[ ProcessClose closeProcess
: other attributes
]
If you want a combined behaviour, then you should keep track of open
windows or ask the system (e.g. using getWindowStack or getWindowsStack).
>2 The default size for a new window is the whole screen, but this
> causes some of it to be obscured by the MS WXP status bar at the bottom.
> Thus, any control at position LeftBottom is partly hidden.
This is a known bug for windows with unspecified initial sizes in SDI
processes. I will see if I can fix it in a next release of Object I/O.
>3 Is there a way to alter the choice of set of controls in a window after
> the window has been opened? I would like to add and remove various
> controls as the program's user works through its actions, but I cannot see
> how to do it.
> The alternative is to open a set of windows, one for each choice of set
> of controls, and make the appropriate window active each time the set of
> visible controls should change. This should work, but it seems
> rather elaborate since each window requires a separate process, and the
> contents, positions and looks of corresponding controls in different
> windows have to be matched.
All GUI elements in Object I/O can be created dynamically as well as closed
dynamically. For opening controls you can use one of: openControls,
openCompoundControls, openPopUpControlItems. For closing controls you can
use one of: closeControls, closeAllControls, closePopUpControlItems.
Regards,
Peter
--=====================_2949327==_.ALT
Content-Type: text/html; charset="us-ascii"
At 09:39 8-7-03 +0100, Alan Hutchinson wrote:
Here are three queries about windows in the
OBJECT IO library.
They arise when my Clean program is compiled and run under
Microsoft Windows XP.
1 The standard red X button at the top right of a window's title
bar,
which closes windows of most programs, seems not to
work.
Can it be made to work?
It does not matter as long as the window has some other
means of
being closed, such as a working "Quit" item in a
"File" menu.
Clicking the X button of a window only
causes an event to be sent to the window. The window then can deside if
it should close or not. Therefore, the default behaviour of a window is
not to close. If you want a window to close in all cases, you can add the
following WindowAttribute to its attribute-list:
- Window title controls
- [ WindowClose (noLS closeActiveWindow)
- : other attributes
- ]
However, if you open this window in a SDI process then the X button
that you see does not belong to the window but rather to its parent
process. Clicking this button sends a similar event to the parent
process, and you should a similar line to the process attribute list. If
you want the parent process to close the window when this button is
closed, use:
- Process xDI state initGUI
- [ ProcessClose closeActiveWindow
- : other attributes
- ]
or, if it should close the process itself:
- Process xDI state initGUI
- [ ProcessClose closeProcess
- : other attributes
- ]
If you want a combined behaviour, then you should keep track of open
windows or ask the system (e.g. using getWindowStack or getWindowsStack).
2 The default size for a new window is the
whole screen, but this
causes some of it to be obscured by the MS WXP status bar at
the bottom.
Thus, any control at position LeftBottom is partly
hidden.
This is a known bug for windows with unspecified
initial sizes in SDI processes. I will see if I can fix it in a next
release of Object I/O.
3 Is there a way to alter the choice of
set of controls in a window after
the window has been opened? I would like to add and
remove various
controls as the program's user works through its actions,
but I cannot see
how to do it.
The alternative is to open a set of windows, one for each
choice of set
of controls, and make the appropriate window active each
time the set of
visible controls should change. This should work, but
it seems
rather elaborate since each window requires a separate
process, and the
contents, positions and looks of corresponding controls in
different
windows have to be matched.
All GUI elements in
Object I/O can be created dynamically as well as closed dynamically. For
opening controls you can use one of: openControls,
openCompoundControls, openPopUpControlItems. For
closing controls you can use one of: closeControls,
closeAllControls, closePopUpControlItems.
Regards,
Peter
--=====================_2949327==_.ALT--