comp.lang.ada
 help / color / mirror / Atom feed
From: Thomas <fantome.forums.tDeContes@free.fr.invalid>
Subject: Re: Gtk.Image.Gtk_Image
Date: Sat, 26 Mar 2022 02:38:02 +0100	[thread overview]
Message-ID: <fantome.forums.tDeContes-CACBF6.02380226032022@news.free.fr> (raw)
In-Reply-To: t1l90i$1otm$1@gioia.aioe.org

In article <t1l90i$1otm$1@gioia.aioe.org>,
 "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote:

> On 2022-03-25 20:37, Thomas wrote:
> > In article <t1jr00$1ja4$1@gioia.aioe.org>,
> >   "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote:
> > 
> >> I am using Gtk_Image in Gtk_Box, it works perfectly well, and worked in
> >> GTK 2 (I am using GTK 3).
> > 
> > (Gtk_Pixmap were fully removed from GTK 3)
> 
> It is Gdk_Pixbuf now.
> 
> > afaiu, the specific thing about Gtk_Pixmap is that i need not to call
> > Show on it, calling Show on its parent is enough.
> 
> No, I think that pixmap handles the Draw signal, so you do not need Show 
> because all rendering optimizations are turned off.

i don't understand details, but i understand Gtk_Pixmap was badly 
categorized, it is in fact from Gdk familly.
that's why it has not the same behavior than other Gtk Widgets.

> 
> > but, I thought calling Show on a container was recursive on its childs,
> > wrong?
> 
> It is recursive, but it affects only actual children. New children are 
> hidden by default. I think this is going to change in GTK 4.

i understand that about mcc.tki.Widget.Picture.Set_Image.

but in mcc.tki.Widget.Picture.Create,
when i call Gtk.Container.Add, and then Gtk.Widget.Show on the 
container, it doesn't work.
i need to call Gtk.Widget.Show on the image too.

(no matter if i don't understand, at least that works :-) but if you 
have enough patience, i like understand things :-) )

> 
> > is it ok, or do you think i should avoid it anyway?
> 
> My understanding is that some widgets are optimized not to process 
> signals from input devices, e.g. Gtk_Label and Gtk_Image. Because 
> normally, you would not use keyboard or mouse buttons on them. But if 
> you need that, you add Gtk_Event_Box. If things work without it, then 
> leave it as is.

- i need a container anyway,
- there was already a Gtk_Event_Box around the Gtk_Pixmap when i found 
it,
- not sure, but i think that RAPID design allows RAPID users to set 
handlers on any Widgets, including Picture.

so I think it's best to keep Gtk_Event_Box for now.
thank you for the thinking :-)

> 
> > if i should avoid it, is there an other Gtk_Bin that i could use, or do
> > you think Gtk_Box is the only one i should use for this purpose?
> 
> I think any container is OK. I use Gtk_Box just because I want both 
> label and icon on the button.

ok, you need it but not me.

> 
> Gtk_Fixed is bad because it breaks widget resizing protocol. If you 
> never resize (e.g. when changing the widget style, fonts, for example) 
> then Gtk_Fixed is just fine.

i don't understand details, but i think since RAPID was designed with 
Gtk_Fixed I can keep it without inconvenience in the short term.
(i plan to make an other design in the medium term.)

-- 
RAPID maintainer
http://savannah.nongnu.org/projects/rapid/

  reply	other threads:[~2022-03-26  1:38 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 12:55 Gtk.Image.Gtk_Image Thomas
2022-03-24 13:35 ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-24 15:14   ` Gtk.Image.Gtk_Image Thomas
2022-03-24 15:47     ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-24 18:40       ` Gtk.Image.Gtk_Image Thomas
2022-03-24 20:33         ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-25  1:53           ` Gtk.Image.Gtk_Image Thomas
2022-03-25  7:29             ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-25 19:37               ` Gtk.Image.Gtk_Image Thomas
2022-03-25 20:34                 ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-26  1:38                   ` Thomas [this message]
2022-03-26  8:59                     ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-26 17:32                       ` Gtk.Image.Gtk_Image Thomas
2022-03-27  9:33                         ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-27 16:41                           ` Gtk.Image.Gtk_Image Thomas
2022-03-27 17:34                             ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
2022-03-30  2:58                               ` Gtk.Image.Gtk_Image Thomas
2022-03-30 12:46                                 ` Gtk.Image.Gtk_Image Dmitry A. Kazakov
replies disabled

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