🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #509

Having problems with overlays and margins

#509
From: Bill Poitras
Date: Tue, 18 Aug 1992 23:01
84 lines
2325 bytes
I have created a small window using an overlay and several margins, to
fake X,Y placement of glpyhs using InterViews 3.1beta and a proprietary
tcl binding:

OverLay new  {
  {Margin new -tmargin 0 {
    Label new -text "0,0"
  }}
  {Margin new -tmargin 100 {
    Label new -text "0,100"
  }}
  {Margin new -tmargin 200 {
    Label new -text "0,200"
  }}
}

Please excuse the sytax, but you should be able to get the general
layout.  The problem is that when put into a window, The window looks
like this:
+-----+
|     |
|     |
|     |
|     |
|     |
|     |
|     |
|     |
|     |
|     |
|0,0  |
|0,100|
|0,200|
+-----+

When I use a margin with the bmargin set:
OverLay new  {
  {Margin new -bmargin 0 {
    Label new -text "0,0"
  }}
  {Margin new -bmargin 100 {
    Label new -text "0,100"
  }}
  {Margin new -bmargin 200 {
    Label new -text "0,200"
  }}
}

and its almost right
+-----+
|0,200|
|     |
|     |
|     |
|     |
|     |
|0,100|
|     |
|     |
|     |
|0,0  |
|     |
|     |
+-----+
And yes, the 0,0 label isn't supposed to on the bottom.

In case you are wondering what form of the margin constructor I am using
its the :
MonoGlyph *margin(
Glyph *,
Coord lmargin, Coord lstretch, Coord lshrink,
Coord rmargin, Coord rstretch, Coord rshrink,
Coord bmargin, Coord bstretch, Coord bshrink,
Coord tmargin, Coord tstretch, Coord tshrink)

With all values that aren't specified set to 0.0

Any help would be appreciated.
--
+-----------------+-------------------------------+-------------------------+
| Bill Poitras    | Molecular Simulations Inc.    | Tel (408)522-9229       |
| (bill)          | Sunnyvale, CA USA             |                         | 
|                 | FAX (408)732-0831             | bill@msi.com            |
+-----------------+-------------------------------+-------------------------+
Technical Details
Message-ID: <1992Aug18.230124.2895@msi.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!sdd.hp.com!mips!msi!snoopy!bill

Show Full Headers
Complete Article Headers
Newsgroups: comp.windows.interviews
Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!sdd.hp.com!mips!msi!snoopy!bill
From: bill@snoopy (Bill Poitras)
Subject: Having problems with overlays and margins
Message-ID: <1992Aug18.230124.2895@msi.com>
Sender: usenet@msi.com (USENET)
Reply-To: bill@msi.com
Organization: Molecular Simulations, Inc.
X-Newsreader: Tin 1.1 PL5
Date: Tue, 18 Aug 1992 23:01:24 GMT
Lines: 85