comp.lang.ada
 help / color / mirror / Atom feed
From: David Botton <david@botton.com>
Subject: Re: Launching Popup Windows in Gnoga
Date: Mon, 20 Oct 2014 06:38:40 -0700 (PDT)
Date: 2014-10-20T06:38:40-07:00	[thread overview]
Message-ID: <60e2e606-0953-423d-8cae-adb5bb92011d@googlegroups.com> (raw)
In-Reply-To: <dddd39df-1b7d-47f0-aeec-668cb414f1f3@googlegroups.com>

On Monday, October 20, 2014 8:56:09 AM UTC-4, Jeremiah wrote:
>I am initially working in a Singleton environment

The Singleton environment is exactly the right one for Desktop apps and there is no shame in using it :) It is there for a reason.

> 1.  the program calls Launch to launch the window and the delays some time to allow it to come up before adding elements to it (views, buttons, etc.). 

Using delay is not ideal, I have been meaning to revisit that before 1.0.  I'll try and do that today.

> 2.   I don't need to recreate the window, but simply show it again.

It is a limitation of browsers, they do not allow showing and hiding windows. Once a browser window is closed the browser has already cleared all its data, no way to recover. So you would need to create a new Gnoga object and launch that.

Alternatives:

1) You could use an iFrame (if loading html from a third party) which is like any other Element_Type and Hidden (true) and Hidden (false) can be called on it.

2) You could create a view_type

In both the above you do something like:

My_Dialog.Position (Absolute);

My_Dialog.Left (Main_Window.Width / 2 - My_Dialog.Width);
-- Center Dialog on Horizontal
My_Dialog.Top (Main_Window.Height /2 - My_Dialog.Height);
-- Center Dialog on Vertical


Then you can use these: (take a look at Gnoga.Gui.Element for the different methods of "hiding" and "showing")

My_Dialog.Hidden (true);
My_Dialog.Hidden (false);

It is in the TO_DO list to create a Dialog_Type that will handle this in the near future.

> 3.  This is related to #2, but is there a way to create elements well enough so I can do things like attach other elements or callbacks to them but separately control when they show on the screen?

You can create a view set it hidden, set up all the children inside of it then just show it when ready.

> 4.  Will there eventually be some more documentation on what each method and parameter are for?

The specs are full with tons of info already, but I do plan on more comprehensive documentation short and long term.

David Botton

  reply	other threads:[~2014-10-20 13:38 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-20 12:56 Launching Popup Windows in Gnoga Jeremiah
2014-10-20 13:38 ` David Botton [this message]
2014-10-20 15:22 ` David Botton
2014-10-20 22:01   ` Jeremiah
2014-10-20 22:30     ` David Botton
2014-10-20 23:07       ` Jeremiah
2014-10-21  0:21         ` David Botton
2014-10-21  0:27           ` David Botton
2014-10-21  1:27             ` David Botton
2014-10-21  2:06               ` jeremiah.breeden
2014-10-21 11:24               ` David Botton
2014-10-22  1:56                 ` Jeremiah
2014-10-22  2:09                   ` David Botton
2014-10-22  2:57                     ` Jeremiah
2014-10-22 15:24                       ` David Botton
2014-10-21  2:03           ` Jeremiah
replies disabled

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