----boundary-LibPST-iamunique-470441286_-_-
Content-type: text/plain
Robert,
Yes, you can do that.
I am finding that there are just too many ways of positioning and sizing.
I am not happy with that.
The Window, Document, View, Frame structure does not seem elegant to me.
It feels more like a kludge.
In the Model, View, Controller paradigm the splitting of views into 4 different
kinds is not addressed. That whole structure feels wrong to me.
-Doug Danforth
On 3/31/2012 12:31 AM, Robert wrote:
There are three abstractions:
- Simple Views
- Documents, which form a root to a general View hierarchy
- Windows, which allow 1 or more Documents to be visible on screen.
In general one wants separate control over each's size; for example when
a Window is resized it is optional if its Document is resized to fit the Window,
to fit the printer page, or fixed.
In your case I suspect that you want all 3 to be the same, but you should not
expect that to happen just by setting any one, the situation is much more
versatile than that.
To resize a View does one need more than a simple:
v.context.SetSize(w, h)?
I don't expect that to change the size of a Window, or of the View's immediate Container - which may be a Document.
To make an already open Window resize I have resorted to:
PROCEDURE SetWindowPlacement* (IN title : Views.Title; x, y, w, h : INTEGER);
VAR
win : Windows.Window;
wTitle : Views.Title;
wnd : WinApi.HWND;
ret : WinApi.BOOL;
wp : WinApi.WINDOWPLACEMENT;
BEGIN
win := Windows.dir.First ();
WHILE win # NIL DO
win.GetTitle (wTitle);
IF wTitle = title THEN
wnd := win(HostWindows.Window).wnd;
IF (w = 0) & (h = 0) THEN
ret := WinApi.GetWindowPlacement (wnd, wp);
w := wp.rcNormalPosition.right - wp.rcNormalPosition.left;
h := wp.rcNormalPosition.bottom - wp.rcNormalPosition.top
END;
ret := WinApi.MoveWindow (wnd, x, y, w, h, 1);
RETURN
END;
win := Windows.dir.Next (win)
END
END SetWindowPlacement;
There is probably a simpler way?
Regards
Robert
On 31/03/2012 01:17, Douglas G. Danforth wrote:
Folks,
Here is an even simpler way to change the size of a view (a text view in this case)
view := TextViews.dir.New(text);
Views.OpenAux(view, title);
win :=Windows.dir.First();
win.SetSize(w, h);
This requires that 'Windows' be used in addition to the pointer to the view you
are given.
-Doug Danforth
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2012.0.1913 / Virus Database: 2114/4904 - Release Date: 03/30/12
---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to
LISTSERV{([at]})nowhere.xy
----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
----boundary-LibPST-iamunique-470441286_-_-
Content-type: text/html
Robert,
Yes, you can do that.
I am finding that there are just too many ways of positioning and
sizing.
I am not happy with that.
The Window, Document, View, Frame structure does not seem elegant to
me.
It feels more like a kludge.
In the Model, View, Controller paradigm the splitting of views into
4 different
kinds is not addressed. That whole structure feels wrong to me.
-Doug Danforth
On 3/31/2012 12:31 AM, Robert wrote:
Folks,
Here is an even simpler way to change the size of a view (a text
view in this case)
view := TextViews.dir.New(text);
Views.OpenAux(view, title);
win :=Windows.dir.First();
win.SetSize(w, h);
This requires that 'Windows' be used in addition to the pointer
to the view you
are given.
-Doug Danforth
No virus found in this message.
Checked by AVG - www.avg.com <http://www.avg.com>
Version: 2012.0.1913 / Virus Database: 2114/4904 - Release Date:
03/30/12
---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX"
to
Received on Sun Apr 01 2012 - 02:32:40 UTC