comp.lang.ada
 help / color / mirror / Atom feed
* Re: Ada libs to X11
  1998-12-06  0:00 Ada libs to X11 Antonio Villalon
@ 1998-12-06  0:00 ` Corey Ashford
  1998-12-07  0:00   ` Antonio Villalon Huerta
  1998-12-06  0:00 ` Jerry van Dijk
  1 sibling, 1 reply; 9+ messages in thread
From: Corey Ashford @ 1998-12-06  0:00 UTC (permalink / raw)


Antonio Villalon wrote:
[snip]
> Does someone know of a good reference for AdaTk or GtkAda? The only
> documentation I've seen is the source code for .ads's, and some small examples
> for AdaTk. I'm looking desesperately for a book, an URL, an article...
> explaining the use of both libraries , or at least for more source code using
> some of them.
[snip]

Have you looked at www.gtk.org?  There are tutorials on that site, but
they
aren't language specific.  See http://www.gtk.org/tutorial

- Corey




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Ada libs to X11
  1998-12-06  0:00 Ada libs to X11 Antonio Villalon
  1998-12-06  0:00 ` Corey Ashford
@ 1998-12-06  0:00 ` Jerry van Dijk
  1998-12-07  0:00   ` Antonio Villalon Huerta
  1 sibling, 1 reply; 9+ messages in thread
From: Jerry van Dijk @ 1998-12-06  0:00 UTC (permalink / raw)


Antonio Villalon (toni@andercheran.aiind.upv.es) wrote:

: I really don't believe there is no way to draw a simple rectangle changing
: its level when calling functions, 

What is 'changing its level' mean for a rectangle ?

Jerry.
-- 
-- Jerry van Dijk  | email: jdijk@acm.org
-- Leiden, Holland | member Team-Ada
-- Ada & Win32: http://stad.dsl.nl/~jvandyk




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Ada libs to X11
@ 1998-12-06  0:00 Antonio Villalon
  1998-12-06  0:00 ` Corey Ashford
  1998-12-06  0:00 ` Jerry van Dijk
  0 siblings, 2 replies; 9+ messages in thread
From: Antonio Villalon @ 1998-12-06  0:00 UTC (permalink / raw)


Hello all,
I'm trying to develop a RT control system for the temperature and level of a
tank. I have to develop also the graphical interface to the control system
using Ada and X11, and here come the problems.
I'v tried to write this GUI using two libraries: first, with AdaTk (tash800),
I have not been able to draw a simple rectangle on a toplevel window. I've
tried using the 'Button' widget, but I think it's not a good solution. Second,
with GtkAda, I'm on the same problem. I discarded X11Ada for other reasons, so
I have to use GtkAda or AdaTk. 
I really don't believe there is no way to draw a simple rectangle changing
its level when calling functions, because I've seen both libraries are
flexible and, well, let's call them 'powerful' (for example, writing the code
for a sophisticated group of buttons packed all together is very easy). I
really think my problem is only due to my inexperience with Ada.
Does someone know of a good reference for AdaTk or GtkAda? The only 
documentation I've seen is the source code for .ads's, and some small examples
for AdaTk. I'm looking desesperately for a book, an URL, an article... 
explaining the use of both libraries , or at least for more source code using
some of them.

Any answer would be appreciated. Thanks in advance,
				Toni
--
#############################################################################
#                	Toni Villalon <toni@aiind.upv.es>                   #
#           TELNET andercheran.aiind.upv.es 2895  for PGP Public Key        #
############################################################################# 
# 'When you say "I wrote a program that crashed Windows", people just stare #
#  at you blankly and say "Hey, I got those with the system, *for free*".'  #
# 					Linus Torvalds			    #
############# This .signature is written in 100% recycled bytes #############




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Ada libs to X11
  1998-12-07  0:00   ` Antonio Villalon Huerta
  1998-12-07  0:00     ` Jerry van Dijk
@ 1998-12-07  0:00     ` dennison
  1998-12-09  0:00       ` Antonio Villalon
  1 sibling, 1 reply; 9+ messages in thread
From: dennison @ 1998-12-07  0:00 UTC (permalink / raw)


In article <74f6g3$3nf$2@polaris.cc.upv.es>,
  anvilhue@pleiades.upv.es (Antonio Villalon Huerta) wrote:
> Jerry van Dijk (jerry@jvdsys.stuyts.nl) wrote:
>
> > What is 'changing its level' mean for a rectangle ?
>
> Yes, I didn 't explain it very well. The main  goal is to draw a simple
> rectangle which will be the liquid of a tank . When a function is called
> to modify the liquid level, the rectangle obviously has to be higher or
> lower: its size (its height, the width will be always the same) will
> increase or decrease, depending on the modification of the liquid level.
> Many thanks,

You are correct that a button isn't very good for that purpose. You could try
to use an inactive vertical scale. But really most of the TK widgets (like
the Motif widgets) are meant for standard user interfaces. They are generally
*not* appropriate for representing real-world objects like engines or storage
tanks.

What you may want to do is use a Canvas. Canvases allow you to place and
manipulate things like rectangles, circles, oval, polygons, custom bitmaps,
etc. From those primitives you can make displays and controls look pretty
much any way you want. In your case, a rectangle with a filled rectangle
inside sounds like it would foot the bill. You can dynamicly change the
height of the inner rectangle when you need to.

If you need to do a lot of custom stuff like this, I'd highly suggest you get
one of the many TK GUI builders available. I'd also suggest you invest in a
good TK reference book.

I know this doesn't address the Ada side at all. But it sounds like TK is
going to be more than half of the battle for you.

--
T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Ada libs to X11
  1998-12-07  0:00   ` Antonio Villalon Huerta
@ 1998-12-07  0:00     ` Jerry van Dijk
  1998-12-09  0:00       ` Antonio Villalon
  1998-12-07  0:00     ` dennison
  1 sibling, 1 reply; 9+ messages in thread
From: Jerry van Dijk @ 1998-12-07  0:00 UTC (permalink / raw)


Antonio Villalon Huerta (anvilhue@pleiades.upv.es) wrote:

: Jerry van Dijk (jerry@jvdsys.stuyts.nl) wrote:

: > What is 'changing its level' mean for a rectangle ?

: Yes, I didn 't explain it very well. The main  goal is to draw a simple
: rectangle which will be the liquid of a tank . When a function is called
: to modify the liquid level, the rectangle obviously has to be higher or
: lower: its size (its height, the width will be always the same) will
: increase or decrease, depending on the modification of the liquid level.

I think you have run into the problem of too many choices. My favorite
solution would be to use the GLUT + MESA combination.

: P.S. I looked at your web page to find something similar to adagraph but
: for Unix; I only found an lib to svgalib, which I cannot use (I
: have to write the interface using X11)...Please, is there any port of your
: program to work with Unix??

Not that I am aware of. But it _is_ a tantalizing thought... an AdaGraph
based upon Xlib, so it would offer basic drawing capabilities, independent
of the presence of specific tools, libraries or windows managers... Hmmm...

Jerry.

-- 
-- Jerry van Dijk  | email: jdijk@acm.org
-- Leiden, Holland | member Team-Ada
-- Ada & Win32: http://stad.dsl.nl/~jvandyk




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Ada libs to X11
  1998-12-06  0:00 ` Corey Ashford
@ 1998-12-07  0:00   ` Antonio Villalon Huerta
  0 siblings, 0 replies; 9+ messages in thread
From: Antonio Villalon Huerta @ 1998-12-07  0:00 UTC (permalink / raw)


Corey Ashford (yeroca@rocketmail.com) wrote:

> Have you looked at www.gtk.org?  There are tutorials on that site, but
> they
> aren't language specific.  See http://www.gtk.org/tutorial

Hello,
Yes, I downloaded the Gtk Tutorial from this url, but it's oriented to C
programming, nor GtkAda. I'm looking for some more specific (although 
it's a good tutorial that could be used with GtkAda).
Thanks,
			Toni
--
,--------------------------------------------------------------------------,
|                	Toni Villalon <anvilhue@cc.upv.es>                 |
|           TELNET andercheran.aiind.upv.es 2895  for PGP Public Key       |
|--------------------------------------------------------------------------|
|"Un idealista es aquel que, al notar que una rosa huele mejor que una col,|
| concluye que hara una sopa mejor"					   |
|					Henry Louis Mencken		   |
'--------------------------------------------------------------------------'




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Ada libs to X11
  1998-12-06  0:00 ` Jerry van Dijk
@ 1998-12-07  0:00   ` Antonio Villalon Huerta
  1998-12-07  0:00     ` Jerry van Dijk
  1998-12-07  0:00     ` dennison
  0 siblings, 2 replies; 9+ messages in thread
From: Antonio Villalon Huerta @ 1998-12-07  0:00 UTC (permalink / raw)


Jerry van Dijk (jerry@jvdsys.stuyts.nl) wrote:

> What is 'changing its level' mean for a rectangle ?

Hello,
Well, first of all, many thanks for replying. I've used adagraph for Win
also to do the interface I'm trying to do (more specifically, I've got
the code to my tank for win, using adagraph...the problem was with Unix
- Linux and Solaris -).
Yes, I didn 't explain it very well. The main  goal is to draw a simple
rectangle which will be the liquid of a tank . When a function is called
to modify the liquid level, the rectangle obviously has to be higher or
lower: its size (its height, the width will be always the same) will
increase or decrease, depending on the modification of the liquid level.
Many thanks,
			Toni
P.S. I looked at your web page to find something similar to adagraph but
for Unix; I only found an lib to svgalib, which I cannot use (I
have to write the interface using X11)...Please, is there any port of your
program to work with Unix??
--
,--------------------------------------------------------------------------,
|                	Toni Villalon <anvilhue@cc.upv.es>                 |
|           TELNET andercheran.aiind.upv.es 2895  for PGP Public Key       |
|--------------------------------------------------------------------------|
|"Un idealista es aquel que, al notar que una rosa huele mejor que una col,|
| concluye que hara una sopa mejor"					   |
|					Henry Louis Mencken		   |
'--------------------------------------------------------------------------'




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Ada libs to X11
  1998-12-07  0:00     ` dennison
@ 1998-12-09  0:00       ` Antonio Villalon
  0 siblings, 0 replies; 9+ messages in thread
From: Antonio Villalon @ 1998-12-09  0:00 UTC (permalink / raw)


Hello,

dennison@telepath.com wrote:
: What you may want to do is use a Canvas. Canvases allow you to place and
: manipulate things like rectangles, circles, oval, polygons, custom bitmaps,
: etc. From those primitives you can make displays and controls look pretty
: much any way you want. In your case, a rectangle with a filled rectangle
: inside sounds like it would foot the bill. You can dynamicly change the
: height of the inner rectangle when you need to.

Yes, I've tried a canvas...Creating and using a canvas with Tk is very easy...
the problem comes when trying it with AdaTk... we return to the same, the
lack of documentantion about the libraries

: If you need to do a lot of custom stuff like this, I'd highly suggest you get
: one of the many TK GUI builders available. I'd also suggest you invest in a
: good TK reference book.

A TK GUI is something I hadn't thought about...I'll take a look to find one
and try to use it, many thanks... And about a Tk book, I have some and also
on-line tutorials...but return to the same: creating and using a canvas is
easy under Tk, but not under AdaTk :(

Thanks very much,
				Toni
--
#############################################################################
#                	Toni Villalon <toni@aiind.upv.es>                   #
#           TELNET andercheran.aiind.upv.es 2895  for PGP Public Key        #
############################################################################# 
# 'When you say "I wrote a program that crashed Windows", people just stare #
#  at you blankly and say "Hey, I got those with the system, *for free*".'  #
# 					Linus Torvalds			    #
############# This .signature is written in 100% recycled bytes #############




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Ada libs to X11
  1998-12-07  0:00     ` Jerry van Dijk
@ 1998-12-09  0:00       ` Antonio Villalon
  0 siblings, 0 replies; 9+ messages in thread
From: Antonio Villalon @ 1998-12-09  0:00 UTC (permalink / raw)


Hello,

Jerry van Dijk (jerry@jvdsys.stuyts.nl) wrote:

: I think you have run into the problem of too many choices. My favorite
: solution would be to use the GLUT + MESA combination.

Yes, for the little work I have done until now, I have tryed many options
and libs ... The most interesting I have seen is GtkAda (at least, it's
faster than AdaTk). But AdaTk is much more easier, and I have not many
time to do the work...so maybe I'll finish doing it with AdaTk (or, if
finaly I'm not able to draw it as I want, doing the work in C)...

: Not that I am aware of. But it _is_ a tantalizing thought... an AdaGraph
: based upon Xlib, so it would offer basic drawing capabilities, independent
: of the presence of specific tools, libraries or windows managers... Hmmm...

It will be VERY interesting; you know Ada is very used on Unix community
(specially on OS teaching), and I think an adagraph port will be very
attractive... Think about it :)

Many thanks,
				Toni
--
#############################################################################
#                	Toni Villalon <toni@aiind.upv.es>                   #
#           TELNET andercheran.aiind.upv.es 2895  for PGP Public Key        #
############################################################################# 
# 'When you say "I wrote a program that crashed Windows", people just stare #
#  at you blankly and say "Hey, I got those with the system, *for free*".'  #
# 					Linus Torvalds			    #
############# This .signature is written in 100% recycled bytes #############




^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~1998-12-09  0:00 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-12-06  0:00 Ada libs to X11 Antonio Villalon
1998-12-06  0:00 ` Corey Ashford
1998-12-07  0:00   ` Antonio Villalon Huerta
1998-12-06  0:00 ` Jerry van Dijk
1998-12-07  0:00   ` Antonio Villalon Huerta
1998-12-07  0:00     ` Jerry van Dijk
1998-12-09  0:00       ` Antonio Villalon
1998-12-07  0:00     ` dennison
1998-12-09  0:00       ` Antonio Villalon

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