From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed2-b.proxad.net!nnrp3-1.free.fr!not-for-mail From: Thomas Newsgroups: comp.lang.ada Mail-Copies-To: nobody Subject: Re: Gtk.Image.Gtk_Image References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Date: Fri, 25 Mar 2022 02:53:00 +0100 Message-ID: Organization: Guest of ProXad - France NNTP-Posting-Date: 25 Mar 2022 02:53:00 CET NNTP-Posting-Host: 91.175.52.121 X-Trace: 1648173180 news-4.free.fr 5003 91.175.52.121:1487 X-Complaints-To: abuse@proxad.net Xref: reader02.eternal-september.org comp.lang.ada:63634 List-Id: In article , "Dmitry A. Kazakov" wrote: > On 2022-03-24 19:40, Thomas wrote: > > In article , > > "Dmitry A. Kazakov" wrote: > > >> If you need a button with image just put an image into it. Gtk_Button is > >> already a container. > > > > yes, it works fine :-) > > > >> Put Gtk_Box into it. Put Gtk_Image into Gtk_Box. > >> That's would be all. > > > > do you mean that (for a simple image, not a button) i should use a > > Gtk_Box as intermediate container, instead of a Gtk_Event_Box? > > Gtk_Box is handy as you can place many children into it, e.g. labels, > use alignment etc. at this step i need not to be able to place many children into it or to manage layout, because i want to implement this interface, which contains only 2 procedures - Create and Set_Image: http://svn.savannah.gnu.org/viewvc/rapid/branches/gtkada-2.24/src/tki/mcc _tki/mcc-tki-widget-picture.ads?view=markup&pathrev=257 ( https://urlpetite.fr/olk ) RAPID is mostly "glue code", but sometimes there is sth to handle : for example: RAPID interface tells that an image (called a picture label) can have its content replaced, and Gtk makes it easy for a Gtk_Button containing an image, but not for a Gtk_Image. > normal > containers already do the work. If you use Gtk_Event_Box you would have > to handle necessary signals to make everything work as it would with > Gtk_Box out of the box (no pun intended). i would like to be able to use a Gtk_Bin, to access to Gtk.Bin.Get_Child which seems to be a lot easier to use than Gtk.Container.Children. but first, since you seem to be sure that Gtk_Box is the right container to use, i tested it ... it doesn't work ! i don't understand why. it is put in a Gtk_Fixed, can that have an influence? the case where it works are : - Gtk_Pixmap instead of Gtk_Image - Gtk_Image without container - Gtk_Button set with a Gtk_Image any idea of what i should try, now? -- RAPID maintainer http://savannah.nongnu.org/projects/rapid/