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-a.proxad.net!nnrp6-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: Sun, 27 Mar 2022 18:41:58 +0200 Message-ID: Organization: Guest of ProXad - France NNTP-Posting-Date: 27 Mar 2022 18:41:58 CEST NNTP-Posting-Host: 91.175.52.121 X-Trace: 1648399318 news-1.free.fr 3679 91.175.52.121:10055 X-Complaints-To: abuse@proxad.net Xref: reader02.eternal-september.org comp.lang.ada:63665 List-Id: In article , "Dmitry A. Kazakov" wrote: > On 2022-03-26 18:32, Thomas wrote: > > 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? > > I usually create new widgets derived from a container, more or less > always. GtkAda allows this nicely. Then in my implementation of > Initialize for the custom I call Show at its end. I never had issues > with this approach. it doesn't help me. no matter. I made a choice :-) > > 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. > > Yes, using GTK in a totally non-GTK way. :-) > I had this problem designing my > GTK/Cairo-based library for instruments like meters, gauges etc. I used > relative positions and sizes instead of fixed ones to support resizing > the top-level dashboard widgets. Plus hacks for keeping or not keeping > aspect ratio of the resized thing. The base is Gtk_Drawing_Area_Record > rather than Gtk_Fixed_Record. i don't think it's pertinent to apply full flexibility to all widgets, but : as is, i get 2 differents behaviors : - with Tcl/Tk, the window can be fully resized, the overflowing widgets are hidden, and still shown when the window is enlarged. - with GTK, the window cannot be fully resized, it is forbidden to hide any widget set in the Gtk_Fixed. any opinion ? -- RAPID maintainer http://savannah.nongnu.org/projects/rapid/