comp.lang.ada
 help / color / mirror / Atom feed
From: Nick Roberts <nick.roberts@acm.org>
Subject: Re: GWindows and a future home for it
Date: Fri, 01 Oct 2004 20:52:40 +0100
Date: 2004-10-01T20:52:40+01:00	[thread overview]
Message-ID: <2s5qs9F1f2cu5U1@uni-berlin.de> (raw)
In-Reply-To: <HwV6d.21840$M45.6802@trndny09>

stephane richard wrote:

> I'd like that rundown :-).....brief or detailed ;-).  you can email it to me 
> if you want.  Unless it's ok to post it here?  whatever's good with you.

I've knocked up something very quick. I've actually tagged it in HTML, but 
never mind.

I admit that, because Titian's is relatively undeveloped, it's not much of 
a runner. Possibly the one redeeming feature is that Titian really is very 
platform-independent, and everything about it is done 100% 'the Ada way'.

The point is, if something like GWindows or CLAW is developed (on 
SourceForge, for example), I will have develop Titian on my own anyway 
(also probably on SourceForge), because (I presume) neither GWindows nor 
CLAW could sensibly be ported to a very unWindows-like platform such as AdaOS.



<div class="titian">



<h1>Titian Summary</h1>
<p>October 1, 2004</p>
<p><i>Nick Roberts</i></p>

<p>...</p>



<h2>Quick Glossary</h2>

<dl>

<dt>orthogonal rectangle</dt> <dd>a rectangle whose sides are parallel
with the vertical and horizontal axes (abbreviated to
<dfn>orthorect</dfn>)</dd>

<dt>RGBA</dt> <dd>red, green, blue, and alpha (one minus the
percentage of how much the corresponding background should show
through)</dd>

<dt>component</dt> <dd>a self-sufficient (to some extent) thing that is
drawn on the screen (or a hardcopy page), and may have other associated
characteristics</dd>

<dt>window manager</dt> <dd>the piece of software which is responsible for
operating the mechanics of a GUI</dd>

<!--

<dt></dt> <dd></dd>

<dt></dt> <dd></dd>

<dt></dt> <dd></dd>

<dt></dt> <dd></dd>

<dt></dt> <dd></dd>

<dt></dt> <dd></dd>

<dt></dt> <dd></dd>

-->

</dl>



<h2>Package Structure</h2>

<p>The most important packages are shown here. There are numerous sub-
packages containing auxiliary stuff.</p>



<h3><code>Titian</code></h3>

<p>Base package, with just a few fundamental declarations (e.g. the
floating-point types <code>Inches</code> and <code>Centimeters</code>).</p>



<h3><code>Titian.Color</code></h3>

<p>The type <code>Basic_Color</code>, which holds RGBA values, and a basic
set of operations. An abstract palette type, with operations for storing
and retrieving colours, and for quantization.</p>



<h3><code>Titian.Raster_IO</code></h3>

<p>Basic functions for raster graphic calculations (points, lines,
orthogonal rectangles) and relationships (comparisons) between them.</p>

<p>The fundamental abstract type <code>Root_Context_Type</code>, which
represents anything that can be drawn on (e.g. a device, such as a video
screen or printer, or a window), and a large set of abstract primitive
drawing operations.</p>

<p>Operations include drawing the following: point marks, in a variety of
styles (dot, cross, plus, etc.); straight lines (horizontal, vertical, and
general), in a variety of styles (dashed, dotted, etc.); orthogonal
rectangles, optionally filled or hatched, with special corners; irregular
polygons (closed), and circles and ellipses (whole, partial, or segment),
optionally filled or hatched; text, in a selected typeface, in any of four
90&deg; orientations, with optional decoration (underline, etc.); bit
images (BITBLT), with image format conversion (explicit and automatic).</p>

<p>Each drawing operation supports three colour models: direct colour;
colour selector; current colour. Direct colour specifies an RGBA value; if
the video display supports only a colour palette, the colour is inserted
into the palette automatically (triggering quantisation if necessary).
Colour selector specifies an entry in a palette; a software palette is
provided if the hardware does not support one; current colour uses a 'pen',
a default colour which can be set direct or by selector. This scheme makes
it easy for the application program to use the model (direct or palette)
which suits it best, and allows an application to explicitly support both
models if it is deemed necessary.</p>

<p>The intention is that only (non anti-aliased) raster fonts are supported
by this package &mdash; more sophisticated drawing operations are provided
by the (optional) <code>Titian.Scaled_IO</code> package subhierarchy
&mdash; but the operations are designed in such a way that the font
rendering mechanism is not constrained by the interface (so a native
renderer, which might have more sophisticated capabilities, can be used by
an implementation if it would make sense).</p>



<h3><code>Titian.Components</code></h3>

<p>Three abstract component types: for a root component; for a control
component; for an interactive component.</p>

<p>A root component has a few operations, the most important of which is
<code>Draw</code>. When a component is registered with a window manager, the
window manager calls its <code>Draw</code> procedure to cause it to draw (or
redraw) all or part of itself on the manager's screen (or page).</p>

<p>A control component is a component which displays some aspect of the
application program's conceptual model, usually on a continuously updating
basis. Whenever that aspect changes, the program should call the
component's <code>Invalidate</code> procedure. When a control component is
activated, its manager calls its <code>Draw</code> procedure in response to
this invalidation. Examples of control components are: progress bar; VU
meter.</p>

<p>An interactive component is a control component which is able to gain
and lose the <dfn>focus</dfn>. Normally, a window manager allows only one
component at a time to have the focus, and directs keyboard input to that
component. Examples of interactive components are: push button; checkbox
button; radio button; menu bar/panel; scrollbar.</p>



<h3><code>Titian.Windowing</code></h3>

<p>Root window type, and operations. Two basic abstract window types: root
window; workspace window. The root window type is the root for all window
types. A simple z-order priority model is supported. A workspace window has
all the decorations of a typical application window (border/frame, title
bar, menu bar, etc.), can gain focus, and has some extra operations to
support that.</p>

<p>Every window has an orthogonally rectangular area in it (corresponding
to the 'client area' of a Windows window), called its <dfn>canvas</dfn>,
which can be set to a component. The component thus implements the canvas
of the window. Typically, window types do not need to be specialised; a
standard window will suffice, whose canvas is set to an appropriately
specialised component. Since there are many components which have other
components inside them (e.g. a panel splitter), this tends to be the ideal
structure.</p>

<p>Root window manager type, and operations. Window managers can be opened
and closed by name (like device files); not availble on some
implementations (e.g. Windows and Mac) where there is only one default
manager. There is always a default manager (which is automatically opened
if necessary).</p>

<p>The operations for a window manager include a set of standard component
constructors, providing a repertoire of essential components for the
manager. These will usually be implemented by the corresponding default
components of the manager's implementation.</p>

<p>A virtual window manager type, which provides the functionality of an
MDI window (one which allows multiple inner windows), and operations.
Constructors for: standard bare window; standard workspace window; standard
virtual window manager (MDI) window.</p>



<h3><code>Titian.Fonts</code></h3>

<p>Facilities for manipulating fonts, including opening and loading
external fonts (font files) by name, and obtaining metrics.</p>



<h3><code>Titian.Raster_IO.Text_Formatting</code></h3>

<p>Facilities for formatting text strings, including horizontal and
vertical alignment. Provides an efficient way for the application program
to 'see' the formatting, and perhaps adjust it (or to do its own
formatting), before the formatted text is drawn. Also allows text to be
formatted once and redrawn many times.</p>

<p>I think the facilities provided in this package are much better designed
(and more accurately defined) than those Windows provides.</p>



<h3><code>Titian.Components.Utility</code></h3>

<p>Provides a variety of useful facilities to help with using components.
In particular, provides horizontal and vertical <dfn>autospacers</dfn>,
which make it easy to neatly align many components (e.g. in a dialog); they
will keep their alignment even if the containing box is resized.</p>

<p>My personal preference is to code the components of a dialog by hand (in
Ada), and use autospacers to do the formatting. However, autospacers could
be used in a visual design tool (very successfully, I think).</p>



<h3><code>Titian.Raster_IO.Recording</code></h3>

<p>Provides a virtual device (a type derived from the root device type), an
in-memory container which can record a sequence of drawing commands, and
then replay them (to another device). The sequence can be saved and loaded
to/from a stream.</p>



<h3><code>Titian.Raster_IO.Imaging</code></h3>

<p>Provides a virtual device (a type derived from the root device type), a
bitmap image type, whose format and dimensions are controlled by
discriminants, which can be drawn on as an in-memory canvas, and then
itself drawn onto another device.</p>



<!--

<h3><code>Titian.</code></h3>

<p>

</p>



<h3><code>Titian.</code></h3>

<p>

</p>



<h3><code>Titian.</code></h3>

<p>

</p>



-->

<h3><code>Titian.Clipboard</code></h3>

<p>Provides all the usual functionality associated with transferring data
by clipboard. Supports different named formats, and stream I/O to read and
write data. Also provides direct support for a few basic formats.</p>



<h3><code>Titian.Scaled_IO</code> subhierarchy</h3>

<p>This package subhierarchy provides facilities for drawing continuously
scaled figures and text on a raster device, including selectable
anti-aliasing for text and lines, support for continuously scalable fonts,
continuous scaling of raster images, bezier curves, and many other advanced
functions (e.g. support for JPEG and PNG).</p>

<p>This subhierarchy is intended to be optional. It should be supported on
desktop GUIs and graphics workstations, where it will be required by
typical applications (e.g. a PDF viewer). It can be omitted, however, for
target machines where its support would be unnecessary or impractical (e.g.
an EFTPOS terminal).</p>

<p>I haven't got as far as writing the package specifications for this
subhierarchy yet, but I've a pretty good idea how it should be.</p>



</div>

-- 
Nick Roberts



  reply	other threads:[~2004-10-01 19:52 UTC|newest]

Thread overview: 108+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-29  2:48 GWindows and a future home for it Fionn mac Cuimhaill
2004-09-29  2:53 ` stephane richard
2004-09-29  7:20   ` Martin Krischik
2004-09-29 12:40 ` Chris Humphries
2004-09-29 15:21   ` stephane richard
2004-09-29 19:12     ` Chris Humphries
2004-09-30  0:03 ` Stephen Leake
2004-09-30  1:39   ` stephane richard
2004-09-30  3:29   ` Fionn mac Cuimhaill
     [not found]     ` <mailman.141.1096581654.390.comp.lang.ada@ada-france.org>
2004-09-30 23:32       ` Randy Brukardt
2004-10-01  1:28     ` Stephen Leake
2004-10-01  1:39       ` stephane richard
2004-10-01  6:43       ` Fionn mac Cuimhaill
     [not found]     ` <umzz75se6.fsf@acm.org>
2004-10-01 10:48       ` Marius Amado Alves
2004-10-01 14:49         ` Fionn mac Cuimhaill
2004-10-01 15:39           ` Marius Amado Alves
2004-10-01 15:50             ` stephane richard
2004-10-01 16:25               ` Chris Humphries
2004-10-01 17:09                 ` Ludovic Brenta
2004-10-21 17:12                   ` Warren W. Gay VE3WWG
2004-10-21 18:02                     ` Coupling or not coupling database and GUI libraries (was: GWindows and a future home for it) Ludovic Brenta
2004-10-21 21:11                       ` Coupling or not coupling database and GUI libraries Warren W. Gay VE3WWG
2004-10-22  2:36                       ` Coupling or not coupling database and GUI libraries (was: GWindows and a future home for it) David Botton
2004-10-02  2:01             ` GWindows and a future home for it Fionn mac Cuimhaill
2004-09-30 14:40   ` Nick Roberts
2004-09-30 15:22     ` stephane richard
2004-10-01 19:52       ` Nick Roberts [this message]
2004-09-30 16:55     ` tmoran
2004-09-30 22:17   ` Stephen McNeill
2004-09-30 22:48     ` stephane richard
2004-10-01 16:34   ` Björn Persson
2004-10-01 16:58   ` AndreS
2004-10-01 18:08     ` Georg Bauhaus
2004-10-01 18:16       ` Randy Brukardt
2004-10-01 23:20         ` tmoran
2004-10-02  0:45         ` Jeffrey Carter
2004-10-03 17:23           ` David Botton
2004-10-04 22:10         ` Randy Brukardt
2004-10-01 18:40       ` Marius Amado Alves
2004-10-03 22:45         ` Georg Bauhaus
2004-10-04 13:01           ` Marius Amado Alves
2004-10-04 21:05             ` Ludovic Brenta
2004-10-06 10:13               ` Marius Amado Alves
2004-10-06 13:15                 ` David Botton
2004-10-06 14:35                   ` Marius Amado Alves
2004-10-06 15:07                     ` Hyman Rosen
2004-10-06 17:04                       ` Marius Amado Alves
2004-10-06 17:53                         ` Licenses and physical things Björn Persson
2004-10-06 18:02                         ` GWindows and a future home for it Hyman Rosen
2004-10-06 18:39                           ` Marius Amado Alves
2004-10-06 18:58                         ` Georg Bauhaus
2004-10-06 19:20                           ` Marius Amado Alves
2004-10-06 20:30                             ` Hyman Rosen
2004-10-06 21:28                               ` Marius Amado Alves
2004-10-06 21:40                                 ` Hyman Rosen
2004-10-07 11:50                     ` Marin David Condic
2004-10-07 14:33                       ` Georg Bauhaus
2004-10-06 13:19                 ` Gnat Pro and the GPL Björn Persson
2004-10-06 17:16                   ` Marius Amado Alves
2004-10-06 17:55                     ` Björn Persson
2004-10-06 18:18                       ` Marius Amado Alves
2004-10-06 19:02                         ` Hyman Rosen
2004-10-06 20:25                           ` Björn Persson
2004-10-07  6:07                             ` Florian Weimer
2004-10-07 16:00                               ` Björn Persson
2004-10-06 22:21                         ` CBFalconer
2004-10-06 18:04                     ` Hyman Rosen
     [not found]               ` <4163C54F.9050700@netcabo.pt>
2004-10-07  0:27                 ` GWindows and a future home for it Stephen Leake
2004-10-07  0:55                   ` stephane richard
2004-10-07 19:11                     ` Not redistributing GNAT Pro (was: GWindows and a home for it) Ludovic Brenta
2004-10-08  2:07                       ` Jeff C r e e.m
2004-10-08 16:50                         ` Not redistributing GNAT Pro Ludovic Brenta
2004-10-08 17:26                           ` Jeff C r e e.m
2004-10-09  2:27                           ` Brian May
2004-10-09 11:14                             ` Ludovic Brenta
2004-10-09  5:16                           ` CBFalconer
2004-10-09  9:57                             ` Jerry van Dijk
2004-10-08  5:53                       ` Not redistributing GNAT Pro (was: GWindows and a home for it) Simon Wright
2004-10-01 23:57     ` GWindows and a future home for it Stephen Leake
2004-10-02  3:06     ` Fionn mac Cuimhaill
2004-10-02  7:13       ` tmoran
2004-10-03 16:22         ` James E. Hopper
2004-10-03 19:03         ` Future of Ada volunteer efforts David Botton
2004-10-03 23:31           ` stephane richard
2004-09-30  0:13 ` GWindows Database time type Stephen Leake
2004-09-30  4:31   ` Fionn mac Cuimhaill
2004-10-01  0:57     ` Stephen Leake
2004-10-01  1:44       ` stephane richard
2004-10-01  3:04         ` Randy Brukardt
2004-10-01 10:07           ` stephane richard
2004-09-30 18:44   ` Georg Bauhaus
2004-10-21 17:29     ` Warren W. Gay VE3WWG
2004-10-22  2:32       ` David Botton
2004-10-22 16:46         ` Warren W. Gay VE3WWG
2004-10-21 17:26   ` Warren W. Gay VE3WWG
2004-10-03 15:41 ` AdaPower and GWindows community effort drive David Botton
2004-10-03 16:45   ` stephane richard
2004-10-03 17:29     ` David Botton
2004-10-03 17:38       ` stephane richard
2004-10-03 19:10         ` David Botton
2004-10-04  2:12       ` Stephen Leake
2004-10-04  2:21         ` stephane richard
2004-10-04 13:25         ` David Botton
2004-10-04  2:37   ` Fionn mac Cuimhaill
2004-10-04  2:49     ` stephane richard
2004-10-04 13:44     ` David Botton
2004-10-05  1:25       ` David Botton
  -- strict thread matches above, loose matches on Subject: below --
2004-10-07  6:20 GWindows and a future home for it Robert C. Leif
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox