comp.lang.ada
 help / color / mirror / Atom feed
* gwindows
@ 2002-01-23 13:13 chris.danx
  2002-01-23 21:58 ` gwindows chris.danx
  2002-01-28 17:01 ` gwindows David Botton
  0 siblings, 2 replies; 27+ messages in thread
From: chris.danx @ 2002-01-23 13:13 UTC (permalink / raw)


Hi,

In the apparent absence of the support list for GNATCOM & gwindows, would
ppl mind if I asked related questions here for the time being?

Bye,
Chris





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

* Re: gwindows
  2002-01-23 13:13 gwindows chris.danx
@ 2002-01-23 21:58 ` chris.danx
  2002-01-28 17:01 ` gwindows David Botton
  1 sibling, 0 replies; 27+ messages in thread
From: chris.danx @ 2002-01-23 21:58 UTC (permalink / raw)



"chris.danx" <chris.danx@ntlworld.com> wrote in message
news:5Fy38.8871$ka7.1370445@news6-win.server.ntlworld.com...
> Hi,
>
> In the apparent absence of the support list for GNATCOM & gwindows, would
> ppl mind if I asked related questions here for the time being?

Is that a no?





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

* Re: gwindows
  2002-01-23 13:13 gwindows chris.danx
  2002-01-23 21:58 ` gwindows chris.danx
@ 2002-01-28 17:01 ` David Botton
  2002-01-29  9:01   ` gwindows chris.danx
  1 sibling, 1 reply; 27+ messages in thread
From: David Botton @ 2002-01-28 17:01 UTC (permalink / raw)


As far as I know the list is working.... I've just been swamped with my Job
change and haven't been able to follow up on much in the Ada world (although
there has been occasional progress on my GDI+ bindings). Things are settling
in the new job and the new product I am creating for them is moving forward
now, so I should be getting to outstanding issues soon....

The list is still the best place to ask questions about GWindows. ACT
supported customers _always_ get  responses with in hours at report@gnat.com
for GNATCOM if you are not supported then the list is also still the best
place.

I wish I could dedicate 100% to Ada development and in particular my Open
Source projects and AdaPower. When other events good or bad come along,
sadly my free time to use for Ada gets eaten up first, I can't really take
away time from my family, students, or work.

I try not to let things slip to far, but it happens some times. A reminder
(on the list or to myself) often helps to refocus me on a need or problem to
be solved.

David Botton


"chris.danx" <chris.danx@ntlworld.com> wrote in message
news:5Fy38.8871$ka7.1370445@news6-win.server.ntlworld.com...
> Hi,
>
> In the apparent absence of the support list for GNATCOM & gwindows, would
> ppl mind if I asked related questions here for the time being?
>
> Bye,
> Chris
>
>





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

* Re: gwindows
  2002-01-28 17:01 ` gwindows David Botton
@ 2002-01-29  9:01   ` chris.danx
  0 siblings, 0 replies; 27+ messages in thread
From: chris.danx @ 2002-01-29  9:01 UTC (permalink / raw)



"David Botton" <David@Botton.com> wrote in message
news:u5b0vl4m6paf71@corp.supernews.com...
> As far as I know the list is working...

Yes it is working.  I was emailing the wrong address, that's the reason the
messages couldn't be seen.


Sorry,
Chris





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

* GWindows
@ 2006-11-07 16:53 Fionn Mac Cumhaill
  2006-11-07 19:31 ` GWindows Michael Bode
                   ` (3 more replies)
  0 siblings, 4 replies; 27+ messages in thread
From: Fionn Mac Cumhaill @ 2006-11-07 16:53 UTC (permalink / raw)


Is anybody besides me using GWindows to  create Windows applications?
My last requests for assistance from the members of the GWindows
mailing list produced no responses



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

* Re: GWindows
  2006-11-07 16:53 GWindows Fionn Mac Cumhaill
@ 2006-11-07 19:31 ` Michael Bode
  2006-11-08 21:23   ` GWindows Stephen
  2006-11-09  7:04   ` GWindows Stephen Leake
  2006-11-08 21:22 ` GWindows Stephen
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 27+ messages in thread
From: Michael Bode @ 2006-11-07 19:31 UTC (permalink / raw)


Fionn Mac Cumhaill <invisible@hiding.from.spam> writes:

> Is anybody besides me using GWindows to  create Windows applications?
> My last requests for assistance from the members of the GWindows
> mailing list produced no responses

And BTW is anybody working on a Linux port? 

-- 
Michael Bode



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

* Re: GWindows
  2006-11-07 16:53 GWindows Fionn Mac Cumhaill
  2006-11-07 19:31 ` GWindows Michael Bode
@ 2006-11-08 21:22 ` Stephen
  2006-11-09 14:12   ` GWindows Fionn Mac Cumhaill
  2006-11-09  7:02 ` GWindows Stephen Leake
  2006-11-10 18:34 ` GWindows Andre
  3 siblings, 1 reply; 27+ messages in thread
From: Stephen @ 2006-11-08 21:22 UTC (permalink / raw)



Fionn Mac Cumhaill wrote:
> Is anybody besides me using GWindows to  create Windows applications?

Yes.

> My last requests for assistance from the members of the GWindows
> mailing list produced no responses

I don't recall seeing a message from you. The last message I have from
that mailing list was 30 August. Perhaps I missed it. With such a small
group, it can take time for messages to be noted and addressed.

Stephen




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

* Re: GWindows
  2006-11-07 19:31 ` GWindows Michael Bode
@ 2006-11-08 21:23   ` Stephen
  2006-11-09  7:04   ` GWindows Stephen Leake
  1 sibling, 0 replies; 27+ messages in thread
From: Stephen @ 2006-11-08 21:23 UTC (permalink / raw)



Michael Bode wrote:
>
> And BTW is anybody working on a Linux port?
>

I've never seen any reference to a Linux port of GWindows myself.

Stephen




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

* Re: GWindows
  2006-11-07 16:53 GWindows Fionn Mac Cumhaill
  2006-11-07 19:31 ` GWindows Michael Bode
  2006-11-08 21:22 ` GWindows Stephen
@ 2006-11-09  7:02 ` Stephen Leake
  2006-11-10 18:34 ` GWindows Andre
  3 siblings, 0 replies; 27+ messages in thread
From: Stephen Leake @ 2006-11-09  7:02 UTC (permalink / raw)


Fionn Mac Cumhaill <invisible@hiding.from.spam> writes:

> Is anybody besides me using GWindows to  create Windows applications?
> My last requests for assistance from the members of the GWindows
> mailing list produced no responses

I have one application that I'm trying to port to GWindows, but it's
not high on my list of things to do.

-- 
-- Stephe



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

* Re: GWindows
  2006-11-07 19:31 ` GWindows Michael Bode
  2006-11-08 21:23   ` GWindows Stephen
@ 2006-11-09  7:04   ` Stephen Leake
  2006-11-09 12:38     ` GWindows Jeffrey Creem
  2006-11-09 18:02     ` GWindows Michael Bode
  1 sibling, 2 replies; 27+ messages in thread
From: Stephen Leake @ 2006-11-09  7:04 UTC (permalink / raw)


Michael Bode <m.g.bode@web.de> writes:

> Fionn Mac Cumhaill <invisible@hiding.from.spam> writes:
>
>> Is anybody besides me using GWindows to  create Windows applications?
>> My last requests for assistance from the members of the GWindows
>> mailing list produced no responses
>
> And BTW is anybody working on a Linux port? 

I certainly hope not.

The original rational for GWindows was to be a rational Ada binding to
the Microsoft Windows API.

Changing that to some other OS/GUI combination would be just wrong.

Which windowing API do you want on Gnu/Linux?

-- 
-- Stephe



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

* Re: GWindows
  2006-11-09  7:04   ` GWindows Stephen Leake
@ 2006-11-09 12:38     ` Jeffrey Creem
  2006-11-09 18:02     ` GWindows Michael Bode
  1 sibling, 0 replies; 27+ messages in thread
From: Jeffrey Creem @ 2006-11-09 12:38 UTC (permalink / raw)


Stephen Leake wrote:
> Michael Bode <m.g.bode@web.de> writes:
> 
> 
>>Fionn Mac Cumhaill <invisible@hiding.from.spam> writes:
>>
>>
>>>Is anybody besides me using GWindows to  create Windows applications?
>>>My last requests for assistance from the members of the GWindows
>>>mailing list produced no responses
>>
>>And BTW is anybody working on a Linux port? 
> 
> 
> I certainly hope not.
> 
> The original rational for GWindows was to be a rational Ada binding to
> the Microsoft Windows API.
> 

David Botton had been looking into if Gwindows would work well when 
linked to winelib under Linux.



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

* Re: GWindows
  2006-11-08 21:22 ` GWindows Stephen
@ 2006-11-09 14:12   ` Fionn Mac Cumhaill
  2006-11-09 20:15     ` GWindows Stephen
  2006-11-09 20:15     ` GWindows Stephen
  0 siblings, 2 replies; 27+ messages in thread
From: Fionn Mac Cumhaill @ 2006-11-09 14:12 UTC (permalink / raw)


On 8 Nov 2006 13:22:00 -0800, "Stephen"
<mcneills@landcareresearch.co.nz> wrote:

>
>Fionn Mac Cumhaill wrote:
>> Is anybody besides me using GWindows to  create Windows applications?
>
>Yes.
>
>> My last requests for assistance from the members of the GWindows
>> mailing list produced no responses
>
>I don't recall seeing a message from you. The last message I have from
>that mailing list was 30 August. Perhaps I missed it. With such a small
>group, it can take time for messages to be noted and addressed.
>
>Stephen

The August message titled "Can't get an on_focus/on_lost_focus to work
for buttons" was from me (I use a pseudonym in cla in order to avoid
spammers)



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

* Re: GWindows
  2006-11-09  7:04   ` GWindows Stephen Leake
  2006-11-09 12:38     ` GWindows Jeffrey Creem
@ 2006-11-09 18:02     ` Michael Bode
  2006-11-09 22:23       ` GWindows Yves Bailly
                         ` (2 more replies)
  1 sibling, 3 replies; 27+ messages in thread
From: Michael Bode @ 2006-11-09 18:02 UTC (permalink / raw)


Stephen Leake <stephen_leake@stephe-leake.org> writes:

> The original rational for GWindows was to be a rational Ada binding to
> the Microsoft Windows API.
>
> Changing that to some other OS/GUI combination would be just wrong.

But not making the GUI lib portable makes it useless for projects
targeting more than just Windows. One of the advantages of Java is
its portable GUI toolkit(s).

GNAVI is using GWindows and it says:
(http://www.gnavi.org/index.php?Command=Index&Title=Home)

   GNAVI is the open source alternative to visual software development
   languages like Delphi and Visual Basic. In addition to just being
   fully Open Source under the GPL, the language foundation of GNAVI,
   unlike Pascal or Basic of its competition, is the international
   standard of engineering, Ada. GNAVI for Windows offers comparable
   features to Delphi and Visual Basic including use of Active X
   controls and the ability to interface with .NET and Java. GNAVI is
   also currently being ported to Mac OS X and Linux/UNIX

But it seems there is not much development going on for the ports.

> Which windowing API do you want on Gnu/Linux?

Probably GTK+, because that's what I know from GtkAda :-). More
important it is widely used and plain C, which may make it easier to
bind to than something written in C++. But if there is a better choice
I wouldn't object.

-- 
Michael Bode



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

* Re: GWindows
  2006-11-09 14:12   ` GWindows Fionn Mac Cumhaill
@ 2006-11-09 20:15     ` Stephen
  2006-11-09 20:15     ` GWindows Stephen
  1 sibling, 0 replies; 27+ messages in thread
From: Stephen @ 2006-11-09 20:15 UTC (permalink / raw)



Fionn Mac Cumhaill wrote:

> The August message titled "Can't get an on_focus/on_lost_focus to work
> for buttons" was from me (I use a pseudonym in cla in order to avoid
> spammers)

Ok, got it. I don't have an immediate answer. But as it happens I have
a job to do with GWindows at the moment, so I'll see if I strike the
same problem. No promises on a solution.

Stephen




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

* Re: GWindows
  2006-11-09 14:12   ` GWindows Fionn Mac Cumhaill
  2006-11-09 20:15     ` GWindows Stephen
@ 2006-11-09 20:15     ` Stephen
  1 sibling, 0 replies; 27+ messages in thread
From: Stephen @ 2006-11-09 20:15 UTC (permalink / raw)



Fionn Mac Cumhaill wrote:

> The August message titled "Can't get an on_focus/on_lost_focus to work
> for buttons" was from me (I use a pseudonym in cla in order to avoid
> spammers)

Ok, got it. I don't have an immediate answer. But as it happens I have
a job to do with GWindows at the moment, so I'll see if I strike the
same problem. No promises on a solution.

Stephen




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

* Re: GWindows
  2006-11-09 18:02     ` GWindows Michael Bode
@ 2006-11-09 22:23       ` Yves Bailly
  2006-11-10 14:09         ` GWindows Alex R. Mosteo
  2006-11-10  8:56       ` GWindows Dmitry A. Kazakov
  2006-11-10 13:33       ` GWindows Stephen Leake
  2 siblings, 1 reply; 27+ messages in thread
From: Yves Bailly @ 2006-11-09 22:23 UTC (permalink / raw)


Michael Bode wrote:
>> Which windowing API do you want on Gnu/Linux?
> 
> Probably GTK+, because that's what I know from GtkAda :-). More
> important it is widely used and plain C, which may make it easier to
> bind to than something written in C++. But if there is a better choice
> I wouldn't object.

Maybe off-topic from the initial question, but just for your information,
an effort is currently made to create a binding to Qt. Yes, it's C++,
so it's much more difficult to achieve. No, it's not yet ready to be used,
and as long as I'm the only developer it won't be finished any time soon.
But I've already manage to re-create in pure Ada the 7 first tutorials,
the 8th should be done, well, next week I hope.
Side note, it compiles and runs on both Linux and Windows (using MinGW).
Other platforms are yet to be tested though.
If you're interested : http://qt4ada.sourceforge.net 

Regards,

-- 
(o< | Yves Bailly  : http://kafka-fr.net   | -o)
//\ | Linux Dijon  : http://www.coagul.org | //\
\_/ |                                      | \_/`



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

* Re: GWindows
  2006-11-09 18:02     ` GWindows Michael Bode
  2006-11-09 22:23       ` GWindows Yves Bailly
@ 2006-11-10  8:56       ` Dmitry A. Kazakov
  2006-11-10 21:14         ` GWindows Michael Bode
  2006-11-10 22:40         ` GWindows Pascal Obry
  2006-11-10 13:33       ` GWindows Stephen Leake
  2 siblings, 2 replies; 27+ messages in thread
From: Dmitry A. Kazakov @ 2006-11-10  8:56 UTC (permalink / raw)


On Thu, 09 Nov 2006 19:02:31 +0100, Michael Bode wrote:

>> Which windowing API do you want on Gnu/Linux?
> 
> Probably GTK+, because that's what I know from GtkAda :-). More
> important it is widely used and plain C, which may make it easier to
> bind to than something written in C++. But if there is a better choice
> I wouldn't object.

Though GTK+ performs quite poorly on Windows platform. And overall, when
its documentation tells you that you fundamentally cannot save and restore
the position of a window, what could you say?

In my opinion it must be 100% Ada. I don't believe in C.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



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

* Re: GWindows
  2006-11-09 18:02     ` GWindows Michael Bode
  2006-11-09 22:23       ` GWindows Yves Bailly
  2006-11-10  8:56       ` GWindows Dmitry A. Kazakov
@ 2006-11-10 13:33       ` Stephen Leake
  2 siblings, 0 replies; 27+ messages in thread
From: Stephen Leake @ 2006-11-10 13:33 UTC (permalink / raw)


Michael Bode <m.g.bode@web.de> writes:

> Stephen Leake <stephen_leake@stephe-leake.org> writes:
>
>> The original rational for GWindows was to be a rational Ada binding to
>> the Microsoft Windows API.
>>
>> Changing that to some other OS/GUI combination would be just wrong.
>
> But not making the GUI lib portable makes it useless for projects
> targeting more than just Windows. 

Obviously.

So if you require portability across platforms, don't use GWindows.

On the other hand, making the GUI lib portable means using only those
features common to all of the targeted platforms.

So if you want your application to be able to take full advantage of
the Win32 API, use GWindows.

>> Which windowing API do you want on Gnu/Linux?
>
> Probably GTK+, because that's what I know from GtkAda :-). 

So use GtkAda on Windows as well. 

-- 
-- Stephe



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

* Re: GWindows
  2006-11-09 22:23       ` GWindows Yves Bailly
@ 2006-11-10 14:09         ` Alex R. Mosteo
  2006-11-10 18:38           ` GWindows Yves Bailly
  0 siblings, 1 reply; 27+ messages in thread
From: Alex R. Mosteo @ 2006-11-10 14:09 UTC (permalink / raw)


Yves Bailly wrote:

> Michael Bode wrote:
>>> Which windowing API do you want on Gnu/Linux?
>> 
>> Probably GTK+, because that's what I know from GtkAda :-). More
>> important it is widely used and plain C, which may make it easier to
>> bind to than something written in C++. But if there is a better choice
>> I wouldn't object.
> 
> Maybe off-topic from the initial question, but just for your information,
> an effort is currently made to create a binding to Qt. Yes, it's C++,
> so it's much more difficult to achieve. No, it's not yet ready to be used,
> and as long as I'm the only developer it won't be finished any time soon.
> But I've already manage to re-create in pure Ada the 7 first tutorials,
> the 8th should be done, well, next week I hope.
> Side note, it compiles and runs on both Linux and Windows (using MinGW).
> Other platforms are yet to be tested though.
> If you're interested : http://qt4ada.sourceforge.net

Are you aware of this qtada binding:

http://freehost07.websamba.com/guibuilder/

I downloaded it but the zero docs prevented me of trying it. It is in my
todo list for spare time. I find GtkAda extremely unpleasant to work with,
and I remember from early times that Qt programming in c++ was very
straightforward. In any case I like much better the looks of Qt apps over
Gtk+ ones. Or at least kde over gnome ones (yikes... not trying to start a
fw here!).

In any case keep us informed of your progress.



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

* Re: GWindows
  2006-11-07 16:53 GWindows Fionn Mac Cumhaill
                   ` (2 preceding siblings ...)
  2006-11-09  7:02 ` GWindows Stephen Leake
@ 2006-11-10 18:34 ` Andre
  2006-11-11  5:23   ` GWindows Fionn Mac Cumhaill
  3 siblings, 1 reply; 27+ messages in thread
From: Andre @ 2006-11-10 18:34 UTC (permalink / raw)



Yes, we are still using it in a few applications.

But you are right, besides Stephen I don't see much activity on GWindows 
repository. The last sign of life from David over 6 months ago.

Now on your actual question (yes sometimes a trigger works):

To get the BN_SETFOCUS or BN_KILLFOCUS, the button needs to have the 
BS_NOTIFY style. I added a On_Pre_Create handler to set this style.

I added the changed code:

with GWindows,
      GWindows.Base,
      GWindows.Windows,
      GWindows.Windows.Main,
      GWindows.Buttons,
      GWindows.Edit_Boxes;

use  GWindows,
      GWindows.Base,
      GWindows.Windows,
      GWindows.Windows.Main,
      GWindows.Buttons,
      GWindows.Edit_Boxes;


with Interfaces.C;

with GWindows.Application;

procedure TestKB is
   pragma Linker_Options ("-mwindows");

   Main_Window : Main_Window_Type;

   Exit_Button : Button_Type;

   TestButton : Button_Type;

   Edit_Box : Edit_Box_Type;

   --  Event handlers ---------

   --  Exit_Button_Click
   procedure Exit_Button_Click (
     Window : in out GWindows.Base.Base_Window_Type'Class
   )
   is
     pragma Warnings (Off, Window);

   begin
     GWindows.Application.End_Application;
   end Exit_Button_Click;


   --  TestButton_Focus
   procedure TestButton_Focus (
     Window : in out GWindows.Base.Base_Window_Type'Class
   )
   is
     pragma Warnings (Off, Window);

   begin
     Text (Edit_Box, "Focus");

   end TestButton_Focus;


   --  TestButton_Lost_Focus
   procedure TestButton_Lost_Focus (
     Window : in out GWindows.Base.Base_Window_Type'Class
   )
   is
     pragma Warnings (Off, Window);

   begin
     Text (Edit_Box, "Lost focus");

   end TestButton_Lost_Focus;

    procedure TestButton_Pre_Create
      (Window    : in out GWindows.Base.Base_Window_Type'Class;
       dwStyle   : in out Interfaces.C.unsigned;
       dwExStyle : in out Interfaces.C.unsigned)
    is
       pragma Warnings (Off, Window);
       pragma Warnings (Off, dwExStyle);
       use type Interfaces.C.unsigned;

       BS_NOTIFY : constant := 16#4000#;
    begin
       dwStyle := dwStyle or BS_NOTIFY;
    end TestButton_Pre_Create;


begin
   Create (
     Main_Window,
     "Test Button",
     Width => 400,
     Height => 300
   );

   Keyboard_Support (Main_Window, True);

   Create (
     Exit_Button,
     Main_Window,
     Text   => "E&xit",
     Left   => 300,
     Top    => 225,
     Width  => 75,
     Height => 34
   );

   On_Click_Handler (Exit_Button, Exit_Button_Click'Unrestricted_Access);

   On_Pre_Create_Handler (TestButton,
    TestButton_Pre_Create'Unrestricted_Access);
   Create (
     TestButton,
     Main_Window,
     Text   => "&Test",
     Left   => 30,
     Top    => 30,
     Width  => 125,
     Height => 25
   );

   On_Focus_Handler (TestButton, TestButton_Focus'Unrestricted_Access);
   On_Lost_Focus_Handler (TestButton,
    TestButton_Lost_Focus'Unrestricted_Access);

   Create (
     Edit_Box,
     Main_Window,
     Text   => "",
     Left   => 30,
     Top    => 70,
     Width  => 125,
     Height => 25
   );


   Visible (Main_Window, True);
   Focus (TestButton);

   GWindows.Application.Message_Loop;
end TestKB;

Andr�

Fionn Mac Cumhaill wrote:
> Is anybody besides me using GWindows to  create Windows applications?
> My last requests for assistance from the members of the GWindows
> mailing list produced no responses



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

* Re: GWindows
  2006-11-10 14:09         ` GWindows Alex R. Mosteo
@ 2006-11-10 18:38           ` Yves Bailly
  0 siblings, 0 replies; 27+ messages in thread
From: Yves Bailly @ 2006-11-10 18:38 UTC (permalink / raw)


Alex R. Mosteo wrote:
> Are you aware of this qtada binding:
> http://freehost07.websamba.com/guibuilder/

Yes I am, but this binding is for Qt3, I wanted one for Qt4.
Also it's Ada95, not Ada2005, and I wanted to pratice Ada2005.
Last note, for various reasons I don't really like the way it
is structured, I wanted to have a type hierarchy in Ada reflecting
exactly the type hierarchy in C++.
 
> In any case keep us informed of your progress.

Of course :-)

Regards,

-- 
(o< | Yves Bailly  : http://kafka-fr.net   | -o)
//\ | Linux Dijon  : http://www.coagul.org | //\
\_/ |                                      | \_/`



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

* Re: GWindows
  2006-11-10  8:56       ` GWindows Dmitry A. Kazakov
@ 2006-11-10 21:14         ` Michael Bode
  2006-11-11  9:23           ` GWindows Dmitry A. Kazakov
  2006-11-10 22:40         ` GWindows Pascal Obry
  1 sibling, 1 reply; 27+ messages in thread
From: Michael Bode @ 2006-11-10 21:14 UTC (permalink / raw)


"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> Though GTK+ performs quite poorly on Windows platform. 

How? For me it works quite well. 

> And overall, when its documentation tells you that you fundamentally
> cannot save and restore the position of a window, what could you
> say?

Get toplevel window position from a widget:
    
   declare
      Gwin : Gdk.Window.Gdk_Window;
      X, Y : Glib.Gint;
   begin
      Gwin := Gtk.Widget.Get_Window (Get_Toplevel (Widget));
      Gdk.Window.Get_Position (Gwin, X, Y);
   end;

Set toplevel position:
    Gtk.Widget.Set_UPosition (Widget, X, Y);


-- 
Michael Bode



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

* Re: GWindows
  2006-11-10  8:56       ` GWindows Dmitry A. Kazakov
  2006-11-10 21:14         ` GWindows Michael Bode
@ 2006-11-10 22:40         ` Pascal Obry
  2006-11-11  9:29           ` GWindows Dmitry A. Kazakov
  1 sibling, 1 reply; 27+ messages in thread
From: Pascal Obry @ 2006-11-10 22:40 UTC (permalink / raw)
  To: mailbox

Dmitry A. Kazakov a �crit :

> Though GTK+ performs quite poorly on Windows platform. And overall, when

GPS manages to work pretty well on Windows and it is using GtkAda. It
uses to perform poorly, but things have improved a lot since a year or so.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595



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

* Re: GWindows
  2006-11-10 18:34 ` GWindows Andre
@ 2006-11-11  5:23   ` Fionn Mac Cumhaill
  0 siblings, 0 replies; 27+ messages in thread
From: Fionn Mac Cumhaill @ 2006-11-11  5:23 UTC (permalink / raw)


On Fri, 10 Nov 2006 19:34:36 +0100, Andre <avsaway@hotmail.com> wrote:

>
>Yes, we are still using it in a few applications.
>
>But you are right, besides Stephen I don't see much activity on GWindows 
>repository. The last sign of life from David over 6 months ago.
>
>Now on your actual question (yes sometimes a trigger works):
>
>To get the BN_SETFOCUS or BN_KILLFOCUS, the button needs to have the 
>BS_NOTIFY style. I added a On_Pre_Create handler to set this style.
>
>I added the changed code:
>
>with GWindows,
> 
... code sample snipped ...

Works perfectly. Many thanks.

I expect that this technique will also solve a problem that I am
having with radio button; the GWindows version of a radio button is
also lacking a BS_NOTIFY style.



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

* Re: GWindows
  2006-11-10 21:14         ` GWindows Michael Bode
@ 2006-11-11  9:23           ` Dmitry A. Kazakov
  2006-11-11 14:50             ` GWindows Michael Bode
  0 siblings, 1 reply; 27+ messages in thread
From: Dmitry A. Kazakov @ 2006-11-11  9:23 UTC (permalink / raw)


On Fri, 10 Nov 2006 22:14:25 +0100, Michael Bode wrote:

> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:
> 
>> Though GTK+ performs quite poorly on Windows platform. 
> 
> How? For me it works quite well. 

Did you try tree view under Windows, for example? I did, a lot. There are
numerous problems with it. For instance, refresh does not work well upon
resizing of panes containing tree views.

Do you have X-sever (cygnus) and a Linux host? Compile your Ada application
on Linux and start it side-by-side once remotely under X-sever once
natively. The difference between X11 and Windows GTK will become obvious.

>> And overall, when its documentation tells you that you fundamentally
>> cannot save and restore the position of a window, what could you
>> say?
> 
> Get toplevel window position from a widget:
>     
>    declare
>       Gwin : Gdk.Window.Gdk_Window;
>       X, Y : Glib.Gint;
>    begin
>       Gwin := Gtk.Widget.Get_Window (Get_Toplevel (Widget));
>       Gdk.Window.Get_Position (Gwin, X, Y);
>    end;
> 
> Set toplevel position:
>     Gtk.Widget.Set_UPosition (Widget, X, Y);

I only quoted GTK+ documentation. GtkAda's one repeats it:

https://libre2.adacore.com/GtkAda/docs/2.8/gtkada_rm/gtk-window.html

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



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

* Re: GWindows
  2006-11-10 22:40         ` GWindows Pascal Obry
@ 2006-11-11  9:29           ` Dmitry A. Kazakov
  0 siblings, 0 replies; 27+ messages in thread
From: Dmitry A. Kazakov @ 2006-11-11  9:29 UTC (permalink / raw)


On Fri, 10 Nov 2006 23:40:23 +0100, Pascal Obry wrote:

> Dmitry A. Kazakov a �crit :
> 
>> Though GTK+ performs quite poorly on Windows platform. And overall, when
> 
> GPS manages to work pretty well on Windows and it is using GtkAda. It
> uses to perform poorly, but things have improved a lot since a year or so.

True. I hope they will continue so. The next step could be to stop talking
about "GTK+ for Win32," as a *separate* project on their home page!

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de



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

* Re: GWindows
  2006-11-11  9:23           ` GWindows Dmitry A. Kazakov
@ 2006-11-11 14:50             ` Michael Bode
  0 siblings, 0 replies; 27+ messages in thread
From: Michael Bode @ 2006-11-11 14:50 UTC (permalink / raw)


"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> writes:

> Did you try tree view under Windows, for example? I did, a lot. There are
> numerous problems with it. For instance, refresh does not work well upon
> resizing of panes containing tree views.
> I only quoted GTK+ documentation. GtkAda's one repeats it:
>
> https://libre2.adacore.com/GtkAda/docs/2.8/gtkada_rm/gtk-window.html

Do yo refer to this paragraph?

  If you are saving and restoring your application's window positions,
  you should know that it's impossible for applications to do this
  without getting it somewhat wrong because applications do not have
  sufficient knowledge of window manager state. The Correct Mechanism
  is to support the session management protocol (see the "GnomeClient"
  object in the GNOME libraries for example) and allow the window
  manager to save your window sizes and positions.

This says it is not a GTK+ problem but a X11 / window manager
problem. If this is true no X11 toolkit can do something about it.

What I've seen is this:

Set_UPosition seems to set the position of the whole window including
border an title bar. Get_Position seems to return the position of the
client area of the window. If your desktop has a panel on the top of
the root window, you get another offset. You can compare the results
of the GTK functions with the output of xwininfo. 

-- 
Michael Bode



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

end of thread, other threads:[~2006-11-11 14:50 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-23 13:13 gwindows chris.danx
2002-01-23 21:58 ` gwindows chris.danx
2002-01-28 17:01 ` gwindows David Botton
2002-01-29  9:01   ` gwindows chris.danx
  -- strict thread matches above, loose matches on Subject: below --
2006-11-07 16:53 GWindows Fionn Mac Cumhaill
2006-11-07 19:31 ` GWindows Michael Bode
2006-11-08 21:23   ` GWindows Stephen
2006-11-09  7:04   ` GWindows Stephen Leake
2006-11-09 12:38     ` GWindows Jeffrey Creem
2006-11-09 18:02     ` GWindows Michael Bode
2006-11-09 22:23       ` GWindows Yves Bailly
2006-11-10 14:09         ` GWindows Alex R. Mosteo
2006-11-10 18:38           ` GWindows Yves Bailly
2006-11-10  8:56       ` GWindows Dmitry A. Kazakov
2006-11-10 21:14         ` GWindows Michael Bode
2006-11-11  9:23           ` GWindows Dmitry A. Kazakov
2006-11-11 14:50             ` GWindows Michael Bode
2006-11-10 22:40         ` GWindows Pascal Obry
2006-11-11  9:29           ` GWindows Dmitry A. Kazakov
2006-11-10 13:33       ` GWindows Stephen Leake
2006-11-08 21:22 ` GWindows Stephen
2006-11-09 14:12   ` GWindows Fionn Mac Cumhaill
2006-11-09 20:15     ` GWindows Stephen
2006-11-09 20:15     ` GWindows Stephen
2006-11-09  7:02 ` GWindows Stephen Leake
2006-11-10 18:34 ` GWindows Andre
2006-11-11  5:23   ` GWindows Fionn Mac Cumhaill

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