* How to associate a simple menu with a window in GtkAda
@ 2022-05-01 5:37 andrew...@gmail.com
2022-05-01 8:58 ` Dmitry A. Kazakov
2022-05-02 6:15 ` Stephen Merrony
0 siblings, 2 replies; 5+ messages in thread
From: andrew...@gmail.com @ 2022-05-01 5:37 UTC (permalink / raw)
I'm trying to create a small menu that will show up at the top of a window. The problem that I'm encountering is that I'm not clear on how to make that association and have had a hard time trying to find this specific example. This is the code that I have so far:
https://codeshare.io/loqWOm
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to associate a simple menu with a window in GtkAda
2022-05-01 5:37 How to associate a simple menu with a window in GtkAda andrew...@gmail.com
@ 2022-05-01 8:58 ` Dmitry A. Kazakov
2022-05-22 4:00 ` andrew...@gmail.com
2022-05-02 6:15 ` Stephen Merrony
1 sibling, 1 reply; 5+ messages in thread
From: Dmitry A. Kazakov @ 2022-05-01 8:58 UTC (permalink / raw)
On 2022-05-01 07:37, andrew...@gmail.com wrote:
> I'm trying to create a small menu that will show up at the top of a window. The problem that I'm encountering is that I'm not clear on how to make that association and have had a hard time trying to find this specific example. This is the code that I have so far:
>
> https://codeshare.io/loqWOm
1. Always post complete code.
2. Never call Initialize on objects created Gtk_New or equivalent.
3. GtkAda examples contains a sample code for menus.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to associate a simple menu with a window in GtkAda
2022-05-01 8:58 ` Dmitry A. Kazakov
@ 2022-05-22 4:00 ` andrew...@gmail.com
2022-05-22 6:29 ` Dmitry A. Kazakov
0 siblings, 1 reply; 5+ messages in thread
From: andrew...@gmail.com @ 2022-05-22 4:00 UTC (permalink / raw)
About point #2, why not?
On Sunday, May 1, 2022 at 4:58:52 AM UTC-4, Dmitry A. Kazakov wrote:
> On 2022-05-01 07:37, @gmail.com wrote:
> > I'm trying to create a small menu that will show up at the top of a window. The problem that I'm encountering is that I'm not clear on how to make that association and have had a hard time trying to find this specific example. This is the code that I have so far:
> >
> > https://codeshare.io/loqWOm
> 1. Always post complete code.
>
> 2. Never call Initialize on objects created Gtk_New or equivalent.
>
> 3. GtkAda examples contains a sample code for menus.
>
> --
> Regards,
> Dmitry A. Kazakov
> http://www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to associate a simple menu with a window in GtkAda
2022-05-22 4:00 ` andrew...@gmail.com
@ 2022-05-22 6:29 ` Dmitry A. Kazakov
0 siblings, 0 replies; 5+ messages in thread
From: Dmitry A. Kazakov @ 2022-05-22 6:29 UTC (permalink / raw)
On 2022-05-22 06:00, andrew...@gmail.com wrote:
> About point #2, why not?
>
> On Sunday, May 1, 2022 at 4:58:52 AM UTC-4, Dmitry A. Kazakov wrote:
>> On 2022-05-01 07:37, @gmail.com wrote:
>>> I'm trying to create a small menu that will show up at the top of a window. The problem that I'm encountering is that I'm not clear on how to make that association and have had a hard time trying to find this specific example. This is the code that I have so far:
>>>
>>> https://codeshare.io/loqWOm
>> 1. Always post complete code.
>>
>> 2. Never call Initialize on objects created Gtk_New or equivalent.
Because Gtk_New calls to Initialize internally. Basically
Gtk_New = allocator new + Initialize
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to associate a simple menu with a window in GtkAda
2022-05-01 5:37 How to associate a simple menu with a window in GtkAda andrew...@gmail.com
2022-05-01 8:58 ` Dmitry A. Kazakov
@ 2022-05-02 6:15 ` Stephen Merrony
1 sibling, 0 replies; 5+ messages in thread
From: Stephen Merrony @ 2022-05-02 6:15 UTC (permalink / raw)
On Sunday, 1 May 2022 at 07:37:59 UTC+2, andrew...@gmail.com wrote:
> I'm trying to create a small menu that will show up at the top of a window. The problem that I'm encountering is that I'm not clear on how to make that association and have had a hard time trying to find this specific example. This is the code that I have so far:
>
> https://codeshare.io/loqWOm
I agree that it's hard to find readable examples. I have a an Ada GUI program on Github using GtkAda: https://github.com/SMerrony/dashera
I'm not holding up as great code, but take a look at Src/gui.adb - starting maybe woth the Create_Window procedure, then Create_Menu_Bar which adds the menu and associates its items to their procedures.
Hope that helps a little.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-05-22 6:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-01 5:37 How to associate a simple menu with a window in GtkAda andrew...@gmail.com
2022-05-01 8:58 ` Dmitry A. Kazakov
2022-05-22 4:00 ` andrew...@gmail.com
2022-05-22 6:29 ` Dmitry A. Kazakov
2022-05-02 6:15 ` Stephen Merrony
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox