Etienne Belanger(deleted)
|
Re: Some questions about the HMI flash and the video window
|
Etienne Belanger(deleted)
08/04/2009 3:00 PM
post35202
|
Re: Some questions about the HMI flash and the video window
The usage of delegates in the attached diagram does not follow conventional usage. Events usually flow from windows to
their delegates, and not the other way around. Additionally, if a window is itself a delegate, notifications about it
won't be sent to other delegates. In short, if the HMI and Video apps are delegates, than the HMI cannot change or talk
to the Video window.
What I would do is the following:
*Create HMI window, and register it as a delegate
*Create Video window (but not as delegate)
*Make HMI be the delegate of the Video application, i.e. respond to create event by setting the Video window's delegate
to HMI window
*Send OpenKODE user events to video application when play and stop buttons are pushed. You can do this in the HMI
because, as a delegate, it received a window handle in the create event.
If the HMI is responsible for choosing the size of the Video window, I would have it launch the application after
setting the KD_WINDOWPROPERTY_SIZE=(width)x(height) in the environment. (Note that all window properties can be set this
way, or by using classes)
If you must create and destroy the window when the play and stop buttons are pressed, then I would still use OpenKODE
events, except that the Video app has to respond to those by first creating the window, or finish by destroy it,
depending if it receives the play or stop user event from the HMI.
You can use kdGetWindowPropertyiv(KDWindow *window, KD_WINDOWPROPERTY_SIZE, KDint32 *size) to get the size of a window.
|
|
|