comp.lang.ada
 help / color / mirror / Atom feed
* Graphical output on Windows XP
@ 2005-03-22  9:41 Duke Luke
  2005-03-23  0:55 ` Georg Bauhaus
  2005-03-25 12:58 ` munnoch
  0 siblings, 2 replies; 11+ messages in thread
From: Duke Luke @ 2005-03-22  9:41 UTC (permalink / raw)


Hello,

I want to create a graphical output with ada95 on windows XP.
Does anyone have suggestions how to do this?

I know that there are examples of such things that come with gnat, but
I don't understand, how to use these engines.

Is there some good tutorial or something that can help me learning
this?

Thanks in advance!

Greetings,
Luke



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

* Re: Graphical output on Windows XP
  2005-03-22  9:41 Graphical output on Windows XP Duke Luke
@ 2005-03-23  0:55 ` Georg Bauhaus
  2005-03-25 16:23   ` Duke Luke
  2005-03-25 12:58 ` munnoch
  1 sibling, 1 reply; 11+ messages in thread
From: Georg Bauhaus @ 2005-03-23  0:55 UTC (permalink / raw)


Duke Luke wrote:
> Hello,
> 
> I want to create a graphical output with ada95 on windows XP.
> Does anyone have suggestions how to do this?

If you want to know how to use Ada for Windows programming,
try
http://www.rrsoftware.com/html/prodinf/triadapaper/triada.docsrc.html
and
http://www.adapower.com/index.php?Command=Class&ClassID=AdaGUI&Title=Ada+GUI



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

* Re: Graphical output on Windows XP
  2005-03-22  9:41 Graphical output on Windows XP Duke Luke
  2005-03-23  0:55 ` Georg Bauhaus
@ 2005-03-25 12:58 ` munnoch
  2005-03-29 12:28   ` Duke Luke
  1 sibling, 1 reply; 11+ messages in thread
From: munnoch @ 2005-03-25 12:58 UTC (permalink / raw)


"Duke Luke" <duke_luke@gmx.de> wrote in message 
news:e499e546.0503220141.c8ea7a6@posting.google.com...
> Hello,
>
> I want to create a graphical output with ada95 on windows XP.
> Does anyone have suggestions how to do this?
>
> I know that there are examples of such things that come with gnat, but
> I don't understand, how to use these engines.
>
> Is there some good tutorial or something that can help me learning
> this?
>
> Thanks in advance!
>
> Greetings,
> Luke

you could try the following link:
http://www.it.bton.ac.uk/staff/je/jewl/

but, http://www.it.bton.ac.uk/staff/je/ has some useful links altogether. 





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

* Re: Graphical output on Windows XP
  2005-03-23  0:55 ` Georg Bauhaus
@ 2005-03-25 16:23   ` Duke Luke
  2005-03-25 18:22     ` David Botton
  0 siblings, 1 reply; 11+ messages in thread
From: Duke Luke @ 2005-03-25 16:23 UTC (permalink / raw)


> If you want to know how to use Ada for Windows programming,
> try
> http://www.rrsoftware.com/html/prodinf/triadapaper/triada.docsrc.html
> and
> http://www.adapower.com/index.php?Command=Class&ClassID=AdaGUI&Title=Ada+GUI

Thanks for that!

I tried the links, but it's even more than I meant.
What I really want (for now) is to set one pixel in a color of my
choice in a windows xp - window.

does anyone know, how to do this? (Gnat comes with packages that can
do that, but I don't nearly understand them. There's a function
"setpixel", but what do I have to do, to use it??)

Thanks in advance!

Greetings,
Lukas Koenig



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

* Re: Graphical output on Windows XP
  2005-03-25 16:23   ` Duke Luke
@ 2005-03-25 18:22     ` David Botton
  2005-03-26 13:57       ` Duke Luke
  2005-03-30 10:21       ` Duke Luke
  0 siblings, 2 replies; 11+ messages in thread
From: David Botton @ 2005-03-25 18:22 UTC (permalink / raw)



> does anyone know, how to do this? (Gnat comes with packages that can
> do that, but I don't nearly understand them. There's a function
> "setpixel", but what do I have to do, to use it??)

Get GWindows from http://www.gnavi.org

with GWindows.Application;

with GWindows.Windows.Main; use GWindows.Windows.Main;

with GWindows.Drawing; use GWindows.Drawing;

with GWindows.Colors; use GWindows.Colors;



procedure Pixel is

   Window : Main_Window_Type;

   Canvas : Canvas_Type;

begin

   Create (Window, "Pixel", Width => 400, Height => 200);

   Get_Canvas (Window, Canvas);

   Show (Window);



   for X in 10 .. 190 loop

     Point (Canvas, X , 100, Blue);

   end loop;



   GWindows.Application.Message_Loop;

end Pixel;





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

* Re: Graphical output on Windows XP
  2005-03-25 18:22     ` David Botton
@ 2005-03-26 13:57       ` Duke Luke
  2005-03-30 10:21       ` Duke Luke
  1 sibling, 0 replies; 11+ messages in thread
From: Duke Luke @ 2005-03-26 13:57 UTC (permalink / raw)


Thanks a lot!

That should have solved my problem!

Greetings,
Lukas Koenig



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

* Re: Graphical output on Windows XP
  2005-03-25 12:58 ` munnoch
@ 2005-03-29 12:28   ` Duke Luke
  0 siblings, 0 replies; 11+ messages in thread
From: Duke Luke @ 2005-03-29 12:28 UTC (permalink / raw)


Hello,

now i have another problem:

i made really nice things with these packages you showed me, but i'm
not able to get messages from the keyboard (i.e i want to program a
little tetris game. everything is already working, but i cannot get
the player's commands from the keyboard while the graphic-window is
active)

does anyone have suggestions?
is it possible to do this with these gwindows packages or do i have to
use other packages?

thanks in advance!

greetings,
Lukas Koenig



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

* Re: Graphical output on Windows XP
  2005-03-25 18:22     ` David Botton
  2005-03-26 13:57       ` Duke Luke
@ 2005-03-30 10:21       ` Duke Luke
  2005-03-31  1:52         ` Randy Brukardt
                           ` (2 more replies)
  1 sibling, 3 replies; 11+ messages in thread
From: Duke Luke @ 2005-03-30 10:21 UTC (permalink / raw)


Hello,

now i have another problem:

i made really nice things with this gnavi-package, but i'm
not able to get messages from the keyboard (i.e i want to program a
little tetris game. everything is already working, but i cannot get
the player's commands from the keyboard while the graphic-window is
active)

does anyone have suggestions?
is it possible to do this with the gwindows and gnavi packages or do i have to
use other packages?

thanks in advance!

greetings,
Lukas Koenig



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

* Re: Graphical output on Windows XP
  2005-03-30 10:21       ` Duke Luke
@ 2005-03-31  1:52         ` Randy Brukardt
  2005-03-31  2:46         ` Steve
  2005-04-05 13:33         ` Duke Luke
  2 siblings, 0 replies; 11+ messages in thread
From: Randy Brukardt @ 2005-03-31  1:52 UTC (permalink / raw)


It's certainly possible in Claw (see http://www.rrsoftware.com), so I'd
expect it to be available in GWindows as well. But you have to handle
messages ("actions" in Claw) in order to respond to the keyboard. There's no
easy function like "Get_from_Keyboard" in Windows GUI.

                       Randy.

"Duke Luke" <duke_luke@gmx.de> wrote in message
news:e499e546.0503300221.154896f1@posting.google.com...
> Hello,
>
> now i have another problem:
>
> i made really nice things with this gnavi-package, but i'm
> not able to get messages from the keyboard (i.e i want to program a
> little tetris game. everything is already working, but i cannot get
> the player's commands from the keyboard while the graphic-window is
> active)
>
> does anyone have suggestions?
> is it possible to do this with the gwindows and gnavi packages or do i
have to
> use other packages?
>
> thanks in advance!
>
> greetings,
> Lukas Koenig





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

* Re: Graphical output on Windows XP
  2005-03-30 10:21       ` Duke Luke
  2005-03-31  1:52         ` Randy Brukardt
@ 2005-03-31  2:46         ` Steve
  2005-04-05 13:33         ` Duke Luke
  2 siblings, 0 replies; 11+ messages in thread
From: Steve @ 2005-03-31  2:46 UTC (permalink / raw)


You need to create an event handler to process the keys.

If you look in the source file gwindows-windows.ads there is a procedure 
defined "On_Character_Down_Handler", which is probably what you want.

I don't have an example of using the On_Character_Down_Handler, but I do 
have a similar example for an On_Click_Handler (for a button).

Start out by defining a function to be called when a button is pressed (or 
in your case a character pressed)...

  procedure On_Button_Directory_Click(Window : in out 
GWindows.Base.Base_Window_Type'Class) is
    pragma warnings( off , Window );
    dispName : GString_Unbounded;
    dirPath : GString_Unbounded;
  begin
    Get_Directory( Window, "Open Directory", dispName, dirPath );
  end On_Button_Directory_Click;

...
For my button example, I had to define the button...

  Button_Directory      : Button_Type;

Then create the button and associate the handler with the button

  Create( Button_Directory, Main_Window, "Select Directory", 400, 220, 100, 
20 );
  On_Click_Handler( Button_Directory, On_Button_Directory_Click'Access );

I hope this helps,
Steve
(The Duck)


"Duke Luke" <duke_luke@gmx.de> wrote in message 
news:e499e546.0503300221.154896f1@posting.google.com...
> Hello,
>
> now i have another problem:
>
> i made really nice things with this gnavi-package, but i'm
> not able to get messages from the keyboard (i.e i want to program a
> little tetris game. everything is already working, but i cannot get
> the player's commands from the keyboard while the graphic-window is
> active)
>
> does anyone have suggestions?
> is it possible to do this with the gwindows and gnavi packages or do i 
> have to
> use other packages?
>
> thanks in advance!
>
> greetings,
> Lukas Koenig 





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

* Re: Graphical output on Windows XP
  2005-03-30 10:21       ` Duke Luke
  2005-03-31  1:52         ` Randy Brukardt
  2005-03-31  2:46         ` Steve
@ 2005-04-05 13:33         ` Duke Luke
  2 siblings, 0 replies; 11+ messages in thread
From: Duke Luke @ 2005-04-05 13:33 UTC (permalink / raw)


Hello,

now most things are working as they're supposed to.

i have only one problem left: 
when i create a window, it works as long as i dont change its focus.
any time i change its focus (or when something else happens, i dont
understand), the whole window becomes blank and nothing can be drawn
on it further.
=> this means, one cannot even click on the window to activize it,
because that would make it blank!

why does this happen and what can i do about it?

Greetings,

Lukas



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

end of thread, other threads:[~2005-04-05 13:33 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-22  9:41 Graphical output on Windows XP Duke Luke
2005-03-23  0:55 ` Georg Bauhaus
2005-03-25 16:23   ` Duke Luke
2005-03-25 18:22     ` David Botton
2005-03-26 13:57       ` Duke Luke
2005-03-30 10:21       ` Duke Luke
2005-03-31  1:52         ` Randy Brukardt
2005-03-31  2:46         ` Steve
2005-04-05 13:33         ` Duke Luke
2005-03-25 12:58 ` munnoch
2005-03-29 12:28   ` Duke Luke

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