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!proxad.net!feeder1-2.proxad.net!cleanfeed2-a.proxad.net!nnrp4-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: Sat, 26 Mar 2022 18:32:50 +0100 Message-ID: Organization: Guest of ProXad - France NNTP-Posting-Date: 26 Mar 2022 18:32:50 CET NNTP-Posting-Host: 91.175.52.121 X-Trace: 1648315970 news-2.free.fr 3417 91.175.52.121:4020 X-Complaints-To: abuse@proxad.net Xref: reader02.eternal-september.org comp.lang.ada:63656 List-Id: In article , "Dmitry A. Kazakov" wrote: > On 2022-03-26 02:38, Thomas wrote: > > In article , > > "Dmitry A. Kazakov" wrote: > > >> 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 :-) ) > > Maybe the widgets involved must be "realized" for recursive Show to > work? The allocation size might be needed correctly set. (not sure to understand) > Maybe the image > is actually rendered but at a wrong place and size where it is not > visible. (i think that's not possible) > There are many ways to mess it up. i don't succeed in finding an order where calling Gtk.Image.Show is not needed. (of course all with Gtk.Container.Add before Gtk.Widget.Show on the container, although i found it the other way) i don't understand what's wrong. no matter. i'm stupid, there was a call to Gtk.Pixmap.Show that i didn't see when i removed it. (sorry!) since it can be made before call to Gtk.Container.Add, that raises a new question: should i prefer to call Gtk.Image.Show as soon as possible, when creating mcc.tki.Image.External_Image? or should i call Gtk.Image.Show only at the time it is really displayed, when creating mcc.tki.Widget.Picture.Picture? > > >> 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 is a GUI generator thing, right? right :-) http://www.nongnu.org/rapid/docs/rapid_novice_mode_tutorial.html > So it tries to manage the layout > by itself instead of using the prescribed techniques. Then Gtk_Fixed is > a way to go. it asks the user to choose the position and size of each widget, instead of ask him to make stacks with automatic layout management, like Gtk does with Gtk_Box. -- RAPID maintainer http://savannah.nongnu.org/projects/rapid/