Article View: comp.windows.interviews
Article #1540Re: TBBox problem from Jun Rekimoto
From: "Helen Chang ", sung
Date: Thu, 27 Jun 1991 14:18
Date: Thu, 27 Jun 1991 14:18
73 lines
2808 bytes
2808 bytes
> Jun Rekimoto said,
> I have found a little trouble with TBBox. I want to get a layout such as:
+++++++ ++++++++++++++++++++
+ + + +
+ A + + +
+ + + +
+++++++ + +
+++++++ + +
+ + + C +
+ B + + +
+ + + +
+++++++ + +
+ +
+ +
++++++++++++++++++++
You can achieve your target layout using VCenter, such as used in the modified
program below. Please refer to Paul Calder's message date 14 Jun 91 on
"Subject: Re: Glyph: :request()"
Helen Chang
====================================================================
#include <InterViews/background.h>
#include <InterViews/border.h>
#include <InterViews/box.h>
#include <InterViews/center.h>
#include <InterViews/font.h>
#include <InterViews/glue.h>
#include <InterViews/label.h>
#include <InterViews/margin.h>, 1.0)
#include <InterViews/window.h>
#include <InterViews/world.h>
int main(int argc, char** argv) {
World world("Test", argc, argv);
Color* fg = world.foreground();
Color* bg = world.background();
Font* f = world.font();
Glyph* A = new Border(
new Margin(
new LRBox(new Label("BOX A", f, fg),
new TBBox(new VGlue(1.0*inch))),
0.2*inch),
fg, 0.1*inch);
Glyph* B = new Border(
new Margin(
new LRBox(new Label("BOX B", f, fg),
new TBBox(new VGlue(1.0*inch))),
0.2*inch),
fg, 0.1*inch);
Glyph* C = new Border(
new Margin(
new LRBox(new Label("BOX C", f, fg),
new TBBox(new VGlue(3.0*inch))),
0.2*inch),
fg, 0.1*inch);
Glyph* top = new Background(new LRBox(new VCenter(new TBBox(A, B),1.0),
new VCenter(C,1.0)
), bg);
Window* w = new ApplicationWindow(top);
w->map();
world.run();
return 0;
}
Technical Details
Message-ID:
<9106271418.AA00301@rigel.csc.ti.com>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!elroy.jpl.nasa.gov!decwrl!stanford.edu!rigel.csc.ti.com!sungShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!usc!elroy.jpl.nasa.gov!decwrl!stanford.edu!rigel.csc.ti.com!sung
From: sung@rigel.csc.ti.com ("Helen Chang ", sung@csc.ti.com)
Newsgroups: comp.windows.interviews
Subject: Re: TBBox problem from Jun Rekimoto
Message-ID: <9106271418.AA00301@rigel.csc.ti.com>
Date: 27 Jun 91 14:18:30 GMT
Sender: news@shelby.stanford.edu (USENET News System)
Organization: Internet-USENET Gateway at Stanford University
Lines: 73