Wojtek Lerch wrote:
[clipping 1st para.]
Is there a reason why your modules need to be separate windows, rather than
picture modules used to populate a pane inside the base window?
The base window has ordinary toolbars at the top and bottom edges. At
the right edge is a PtTree which presents a list of task options for the
user to choose from. The large, remaining area agrees in size with the
available windows – 30-some in number now and due to expand a bit in
the near future. At this time the windows are largely blank, waiting
for other team members to take on the detailed work.
At the start of designing this HMI I really wasn’t sure how best to
implement the presentation of these one-at-a-time “workspace areas.” I
had had a bad experience with dialogs much earlier but that was, I’m
sure, due more to my ignorance than anything else.
I suppose it’s not too late to define a pane in the workspace area and
re-cast the windows as picture modules. I’ve done some research into
picture modules and it’s not clear what advantage they offer from the
viewpoint of the developer or efficiency of the end product. I’d like
to hear about it if there are advantages.
Thanks, Wojtech, for the response.
“rlb” <> email@example.com> > wrote in message
news:dllbo3$9uk$> firstname.lastname@example.org> …
Clicking on an item (A, B, …, Z) in my_PtTree invokes the callback
which does the following:
- Discover that, for example, item X was clicked.
- Open the associated window via: w_X = ApCreateModule(ABM_X, …)
- Set a special color: PtSetResource(w_X, Pt_ARG_FILL_COLOR, 0)
During the ApCreateModule() phase, the pre-realization code for X,
set_size(), is called. It does this and, for now, only this:
- Set value of PhDim_t dim for w_X according to size of base
window (graphics mode dependent).
- Redefine window size: PtSetResource(w_X, Pt_ARG_DIM, &dim, 2)
Cool. Now we have an instance of X with right size and color. But
wait! ALL the windows built from clicking on my_PtTree have the same
size. So we could remove set_size() from all pre-realization
functions and put in the tree callback sections either before or
No, this doesn’t adjust size of windows w_A, w_B, … I’m guessing
that window DIM is vital during the ApCreateModule() phase but COLOR
is a minor property that is handled during rendering. Yes? No?