Article View: comp.windows.interviews
Article #1538TBBox problem
From: Jun Rekimoto
Date: Thu, 27 Jun 1991 05:15
Date: Thu, 27 Jun 1991 05:15
76 lines
3159 bytes
3159 bytes
I am currently working with InterViews 3.0 Beta (Sparc, AT&T C++2.0,
patch 1 through 8).
I have found a little trouble with TBBox. I want to get a layout such as:
+++++++ ++++++++++++++++++++
+ + + +
+ A + + +
+ + + +
+++++++ + +
+++++++ + +
+ + + C +
+ B + + +
+ + + +
+++++++ + +
+ +
+ +
++++++++++++++++++++
(Each box represents a glyph.)
To implement above, I wrote a simple program:
----------------------------------------------------------------------
#include <InterViews/stencil.h>
#include <InterViews/background.h>
#include <InterViews/bitmap.h>
#include <InterViews/box.h>
#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();
Glyph* A = new Stencil(Bitmap::open("a.bitmap"), fg);
Glyph* B = new Stencil(Bitmap::open("b.bitmap"), fg);
Glyph* C = new Stencil(Bitmap::open("c.bitmap"), fg);
Glyph* top = new Background(new LRBox(new TBBox(A, B), C), bg);
Window* w = new ApplicationWindow(top);
w->map();
world.run();
return 0;
}
----------------------------------------------------------------------
However, the result was different from my expectation.
++++++++++++++++++++
+ +
+ +
+ +
+ +
+ +
+ C +
+ +
+++++++ + +
+ + + +
+ A + + +
+ + + +
+++++++ ++++++++++++++++++++
+++++++
+ +
+ B +
+ +
+++++++
Is this a known bug or feature (or did I make a mistake)?
Any suggestions are appreciated.
--
Jun Rekimoto | rekimoto@ccs.mt.nec.co.jp
NEC Software Engineering Lab. | +81 3-5476-1084
Technical Details
Message-ID:
<REKIMOTO.91Jun27141542@spls47.ccs.mt.nec.co.jp>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!uunet!kddlab!cs.titech!wnoc-tyo-news!ascwide!ascgw!necspl!rekimotoShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!spool.mu.edu!uunet!kddlab!cs.titech!wnoc-tyo-news!ascwide!ascgw!necspl!rekimoto From: rekimoto@ccs.mt.nec.co.jp (Jun Rekimoto) Newsgroups: comp.windows.interviews Subject: TBBox problem Message-ID: <REKIMOTO.91Jun27141542@spls47.ccs.mt.nec.co.jp> Date: 27 Jun 91 05:15:42 GMT Sender: news@necspl.ccs.mt.nec.co.jp Distribution: comp Organization: NEC Corporation, Tokyo, Japan. Lines: 76