Re: [BLACKBOX] How to 'embed'
----boundary-LibPST-iamunique-2064630432_-_-
Content-type: text/plain
Robert,
I think I like this solution better than your next solution since it specifies
where in a host frame a subframe is to be placed and that is exactly
what I need.
Now I just need to be sure I get the context and domain set correctly
for the subview before in install it in the host frame.
Handling mouse clicks and keys I already can do with wrapping the
host view.
-Doug
On 10/5/2011 1:02 AM, Campbell, Robert (SELEX GALILEO, UK) wrote:
Doug
If your Model contains a View I guess it must have Fields ...
MyModel = POINTER TO RECORD (Models.Model)
PrivateStuff;
xPos, yPos: INTEGER;
view: Views.View
END;
so that it knows what View, & where,
and some View type ...
MyView = POINTER TO RECORD (Views.View)
m : MyModel
END;
You ask about 'rendering', so I guess (again!) you are asking about the
Restore procedure.
You could try something like:
PROCEDURE (v: MyView) Restore (f: Ports.Frame; l, t, r, b: INTEGER);
VAR g: Views.Frame;
BEGIN
DrawMyPrivateStuff;
WITH f: Views.Frame DO
Views.InstallFrame(f, v.m.view, v.m.xPos,
v.m.yPos, 0, TRUE);
g := Views.ThisFrame(f, v.m.view);
IF g # NIL THEN v.m.view.Restore(g, l, t, r, b)
END
END
END Restore;
I haven't tried this code EXACTLY as presented, but it comes from an
'off-the-cuff' simplifying of code I
have used, and published, in //Escher/Mod/ViewFigs.odc.
Good luck,
Robert
PS - If you want your embedded Views to respond to all kinds of mouse
clicks and focus issues, that is rather more work.
---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
----boundary-LibPST-iamunique-2064630432_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"
e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbWh0bWwxIFxkZWZmMHtcZm9udHRibA0Ke1xmMFxm
c3dpc3MgQXJpYWw7fQ0Ke1xmMVxmbW9kZXJuIENvdXJpZXIgTmV3O30NCntcZjJcZm5pbFxmY2hh
cnNldDIgU3ltYm9sO30NCntcZjNcZm1vZGVyblxmY2hhcnN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