Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

This dungeon is owned and operated by Frobozz Magic Co., Ltd.


devel / comp.lang.ada / Gtk.Image.Gtk_Image

SubjectAuthor
* Gtk.Image.Gtk_ImageThomas
`* Re: Gtk.Image.Gtk_ImageDmitry A. Kazakov
 `* Re: Gtk.Image.Gtk_ImageThomas
  `* Re: Gtk.Image.Gtk_ImageDmitry A. Kazakov
   `* Re: Gtk.Image.Gtk_ImageThomas
    `* Re: Gtk.Image.Gtk_ImageDmitry A. Kazakov
     `* Re: Gtk.Image.Gtk_ImageThomas
      `* Re: Gtk.Image.Gtk_ImageDmitry A. Kazakov
       `* Re: Gtk.Image.Gtk_ImageThomas
        `* Re: Gtk.Image.Gtk_ImageDmitry A. Kazakov
         `* Re: Gtk.Image.Gtk_ImageThomas
          `* Re: Gtk.Image.Gtk_ImageDmitry A. Kazakov
           `* Re: Gtk.Image.Gtk_ImageThomas
            `* Re: Gtk.Image.Gtk_ImageDmitry A. Kazakov
             `* Re: Gtk.Image.Gtk_ImageThomas
              `* Re: Gtk.Image.Gtk_ImageDmitry A. Kazakov
               `* Re: Gtk.Image.Gtk_ImageThomas
                `- Re: Gtk.Image.Gtk_ImageDmitry A. Kazakov

1
Gtk.Image.Gtk_Image

<fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6723&group=comp.lang.ada#6723

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!cleanfeed2-b.proxad.net!nnrp4-1.free.fr!not-for-mail
From: fantome....@free.fr.invalid (Thomas)
Newsgroups: comp.lang.ada
Mail-Copies-To: nobody
Subject: Gtk.Image.Gtk_Image
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit
User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
Date: Thu, 24 Mar 2022 13:55:04 +0100
Message-ID: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr>
Lines: 28
Organization: Guest of ProXad - France
NNTP-Posting-Date: 24 Mar 2022 13:55:04 CET
NNTP-Posting-Host: 91.175.52.121
X-Trace: 1648126504 news-2.free.fr 3428 91.175.52.121:13995
X-Complaints-To: abuse@proxad.net
 by: Thomas - Thu, 24 Mar 2022 12:55 UTC

Hi :-)

To display images, I had a Gtk.Pixmap.Gtk_Pixmap in a
Gtk.Event_Box.Gtk_Event_Box.

Since Gtk.Pixmap is obsolescent, I try to replace it by
Gtk.Image.Gtk_Image.

When I replace Gtk.Pixmap.Gtk_Pixmap by Gtk.Image.Gtk_Image, it doesn't
work.

Why? What's specific to Gtk_Pixmap or Gtk_Image so it has not the same
behavior in Gtk_Event_Box?

When I replace Gtk.Event_Box.Gtk_Event_Box by Gtk.Image.Gtk_Image, it
works fine, except the replacement by an other image.
(I try it using Gtk.Image.Get and Gtk.Image.Set, but it doesn't work.)

Is there an other container, that I should use instead of
Gtk.Event_Box.Gtk_Event_Box that would work and that I should use
to replace the image inside?

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

Re: Gtk.Image.Gtk_Image

<t1hs30$s7j$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6724&group=comp.lang.ada#6724

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!v8j8diosp9R6yoS0SZP34g.user.46.165.242.91.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Gtk.Image.Gtk_Image
Date: Thu, 24 Mar 2022 14:35:29 +0100
Organization: Aioe.org NNTP Server
Message-ID: <t1hs30$s7j$1@gioia.aioe.org>
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="28915"; posting-host="v8j8diosp9R6yoS0SZP34g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Dmitry A. Kazakov - Thu, 24 Mar 2022 13:35 UTC

On 2022-03-24 13:55, Thomas wrote:

> To display images, I had a Gtk.Pixmap.Gtk_Pixmap in a
> Gtk.Event_Box.Gtk_Event_Box.
>
> Since Gtk.Pixmap is obsolescent, I try to replace it by
> Gtk.Image.Gtk_Image.
>
>
> When I replace Gtk.Pixmap.Gtk_Pixmap by Gtk.Image.Gtk_Image, it doesn't
> work.
>
> Why? What's specific to Gtk_Pixmap or Gtk_Image so it has not the same
> behavior in Gtk_Event_Box?
>
>
> When I replace Gtk.Event_Box.Gtk_Event_Box by Gtk.Image.Gtk_Image, it
> works fine, except the replacement by an other image.
> (I try it using Gtk.Image.Get and Gtk.Image.Set, but it doesn't work.)
>
> Is there an other container, that I should use instead of
> Gtk.Event_Box.Gtk_Event_Box that would work and that I should use
> to replace the image inside?

I don't know what are you trying to achieve. If you want to change a
child of a container, remove the old child and add a new one.

Another method of doing "animation" through a set of images is by using
a Gtk_Box. Add all images to the box use Hide on all of them and Show on
the one show.

If you want drawing use Gtk_Drawing_Area, Cairo and event "draw"
handler. Use Gdk_Pixbuf for drawing a whole image.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Gtk.Image.Gtk_Image

<fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6725&group=comp.lang.ada#6725

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!212.27.60.64.MISMATCH!cleanfeed3-b.proxad.net!nnrp2-1.free.fr!not-for-mail
From: fantome....@free.fr.invalid (Thomas)
Newsgroups: comp.lang.ada
Mail-Copies-To: nobody
Subject: Re: Gtk.Image.Gtk_Image
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr> <t1hs30$s7j$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X)
Date: Thu, 24 Mar 2022 16:14:16 +0100
Message-ID: <fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr>
Lines: 99
Organization: Guest of ProXad - France
NNTP-Posting-Date: 24 Mar 2022 16:14:16 CET
NNTP-Posting-Host: 91.175.52.121
X-Trace: 1648134856 news-2.free.fr 29477 91.175.52.121:12729
X-Complaints-To: abuse@proxad.net
 by: Thomas - Thu, 24 Mar 2022 15:14 UTC

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

> On 2022-03-24 13:55, Thomas wrote:
>
> > To display images, I had a Gtk.Pixmap.Gtk_Pixmap in a
> > Gtk.Event_Box.Gtk_Event_Box.
> >
> > Since Gtk.Pixmap is obsolescent, I try to replace it by
> > Gtk.Image.Gtk_Image.
> >
> >
> > When I replace Gtk.Pixmap.Gtk_Pixmap by Gtk.Image.Gtk_Image, it doesn't
> > work.
> >
> > Why? What's specific to Gtk_Pixmap or Gtk_Image so it has not the same
> > behavior in Gtk_Event_Box?
> >
> >
> > When I replace Gtk.Event_Box.Gtk_Event_Box by Gtk.Image.Gtk_Image, it
> > works fine, except the replacement by an other image.
> > (I try it using Gtk.Image.Get and Gtk.Image.Set, but it doesn't work.)
> >
> > Is there an other container, that I should use instead of
> > Gtk.Event_Box.Gtk_Event_Box that would work and that I should use
> > to replace the image inside?
>
> I don't know what are you trying to achieve.

sorry, sometimes I don't know what to write to be clear.

i'm trying to implement these interfaces :

http://svn.savannah.gnu.org/viewvc/rapid/branches/gtkada-2.24/src/tki/mcc
_tki/mcc-tki-image.ads?view=markup&pathrev=257
( https://urlpetite.fr/hfd )

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 )

http://svn.savannah.gnu.org/viewvc/rapid/branches/gtkada-2.24/src/tki/mcc
_tki/mcc-tki-widget-button-picture.ads?view=markup&pathrev=257
( https://urlpetite.fr/p48 )

it was done with a very old version of gtkada.
i'm with gtkada-2.24. it works, but it uses some components that were
already Obsolescent in gtkada-2.24, like Gtk.Pixmap.

of ourse the goal is to update it to the latest version of gtkada.
to make it easier, an intermediate step is to update it properly to
gtkada-2.24, without Obsolescent components.

> If you want to change a
> child of a container, remove the old child and add a new one.

i edited the corresponding bodies :

http://svn.savannah.gnu.org/viewvc/rapid/branches/gtkada-2.24/src/peers/G
tk/mcc-tki-image.adb?view=markup&pathrev=257
( https://urlpetite.fr/2uf )

http://svn.savannah.gnu.org/viewvc/rapid/branches/gtkada-2.24/src/peers/G
tk/mcc-tki-widget-picture.adb?view=markup&pathrev=257
( https://urlpetite.fr/nso )

http://svn.savannah.gnu.org/viewvc/rapid/branches/gtkada-2.24/src/peers/G
tk/mcc-tki-widget-button-picture.adb?view=markup&pathrev=257
( https://urlpetite.fr/gl3 )

for mcc.tki.Image.External_Image i use Gtk.Image.Gtk_Image.

for mcc.tki.Widget.Button.Picture.Picture_Button i keep
Gtk.Button.Gtk_Button,
and both Create and Set_Image work fine, thanks to Gtk.Button.Set_Image.

for mcc.tki.Widget.Picture.Picture, if i keep
Gtk.Event_Box.Gtk_Event_Box and I replace Gtk.Pixmap.Gtk_Pixmap by
Gtk.Image.Gtk_Image, it seems to be no pb to change the child of the
Gtk_Event_Box, but nothing is displayed (including for Create) !

(on the other case, if I replace Gtk.Event_Box.Gtk_Event_Box by
Gtk.Image.Gtk_Image, Create works but Set_Image don't.)

is it clear enough ?
do you need to read my code ?
do you need some test code ?

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

Re: Gtk.Image.Gtk_Image

<t1i3qd$oud$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6726&group=comp.lang.ada#6726

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!v8j8diosp9R6yoS0SZP34g.user.46.165.242.91.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Gtk.Image.Gtk_Image
Date: Thu, 24 Mar 2022 16:47:27 +0100
Organization: Aioe.org NNTP Server
Message-ID: <t1i3qd$oud$1@gioia.aioe.org>
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr>
<t1hs30$s7j$1@gioia.aioe.org>
<fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="25549"; posting-host="v8j8diosp9R6yoS0SZP34g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Dmitry A. Kazakov - Thu, 24 Mar 2022 15:47 UTC

On 2022-03-24 16:14, Thomas wrote:

[...]

> is it clear enough ?

Not really. But anyway it does not work this way. In order to change
image's pixbuff you must redraw it afterwards and possibly resize it
etc. It is possible, but you must understand the inner workings of GTK.
Much simpler is to replace the image widget as a whole.

If you need a button with image just put an image into it. Gtk_Button is
already a container. Put Gtk_Box into it. Put Gtk_Image into Gtk_Box.
That's would be all.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Gtk.Image.Gtk_Image

<fantome.forums.tDeContes-F968A4.19403924032022@news.free.fr>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6727&group=comp.lang.ada#6727

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-a.proxad.net!nnrp1-2.free.fr!not-for-mail
From: fantome....@free.fr.invalid (Thomas)
Newsgroups: comp.lang.ada
Mail-Copies-To: nobody
Subject: Re: Gtk.Image.Gtk_Image
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr> <t1hs30$s7j$1@gioia.aioe.org> <fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr> <t1i3qd$oud$1@gioia.aioe.org>
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: Thu, 24 Mar 2022 19:40:39 +0100
Message-ID: <fantome.forums.tDeContes-F968A4.19403924032022@news.free.fr>
Lines: 44
Organization: Guest of ProXad - France
NNTP-Posting-Date: 24 Mar 2022 19:40:40 CET
NNTP-Posting-Host: 91.175.52.121
X-Trace: 1648147240 news-2.free.fr 13456 91.175.52.121:15380
X-Complaints-To: abuse@proxad.net
 by: Thomas - Thu, 24 Mar 2022 18:40 UTC

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

> On 2022-03-24 16:14, Thomas wrote:
>
> [...]
>
> > is it clear enough ?
>
> Not really. But anyway it does not work this way.

i don't guess what was missing.

> In order to change
> image's pixbuff you must redraw it afterwards and possibly resize it
> etc. It is possible, but you must understand the inner workings of GTK.
> Much simpler is to replace the image widget as a whole.

ok.
i think that i need not understand the inner workings of GTK to make
RAPID, and i don't want it as long as not needed (i still don't
understand all usages).

afaiu(nderstand), to make mcc.tki.Widget.Picture.Set_Image working, i
absolutely need an intermediate container?

well, why Gtk_Event_Box is not a good container for a Gtk_Image, while
it is a good one for a Gtk_Pixmap?

>
> 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?

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

Re: Gtk.Image.Gtk_Image

<t1ikj3$18ak$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6729&group=comp.lang.ada#6729

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!v8j8diosp9R6yoS0SZP34g.user.46.165.242.91.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Gtk.Image.Gtk_Image
Date: Thu, 24 Mar 2022 21:33:42 +0100
Organization: Aioe.org NNTP Server
Message-ID: <t1ikj3$18ak$1@gioia.aioe.org>
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr>
<t1hs30$s7j$1@gioia.aioe.org>
<fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr>
<t1i3qd$oud$1@gioia.aioe.org>
<fantome.forums.tDeContes-F968A4.19403924032022@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="41300"; posting-host="v8j8diosp9R6yoS0SZP34g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Dmitry A. Kazakov - Thu, 24 Mar 2022 20:33 UTC

On 2022-03-24 19:40, Thomas wrote:
> In article <t1i3qd$oud$1@gioia.aioe.org>,
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> 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.

Gtk_Event_Box is special, it filters events and should be used rarely,
e.g. with a Gtk_Image or Gtk_Label when you want to turn them into a
fully functional widgets. You just do not need that because 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).

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Gtk.Image.Gtk_Image

<fantome.forums.tDeContes-0CD0D9.02525725032022@news.free.fr>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6733&group=comp.lang.ada#6733

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed2-b.proxad.net!nnrp3-1.free.fr!not-for-mail
From: fantome....@free.fr.invalid (Thomas)
Newsgroups: comp.lang.ada
Mail-Copies-To: nobody
Subject: Re: Gtk.Image.Gtk_Image
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr> <t1hs30$s7j$1@gioia.aioe.org> <fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr> <t1i3qd$oud$1@gioia.aioe.org> <fantome.forums.tDeContes-F968A4.19403924032022@news.free.fr> <t1ikj3$18ak$1@gioia.aioe.org>
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: <fantome.forums.tDeContes-0CD0D9.02525725032022@news.free.fr>
Lines: 69
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
 by: Thomas - Fri, 25 Mar 2022 01:53 UTC

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

> On 2022-03-24 19:40, Thomas wrote:
> > In article <t1i3qd$oud$1@gioia.aioe.org>,
> > "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> 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/

Re: Gtk.Image.Gtk_Image

<t1jr00$1ja4$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6734&group=comp.lang.ada#6734

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!v8j8diosp9R6yoS0SZP34g.user.46.165.242.91.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Gtk.Image.Gtk_Image
Date: Fri, 25 Mar 2022 08:29:03 +0100
Organization: Aioe.org NNTP Server
Message-ID: <t1jr00$1ja4$1@gioia.aioe.org>
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr>
<t1hs30$s7j$1@gioia.aioe.org>
<fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr>
<t1i3qd$oud$1@gioia.aioe.org>
<fantome.forums.tDeContes-F968A4.19403924032022@news.free.fr>
<t1ikj3$18ak$1@gioia.aioe.org>
<fantome.forums.tDeContes-0CD0D9.02525725032022@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="52548"; posting-host="v8j8diosp9R6yoS0SZP34g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Dmitry A. Kazakov - Fri, 25 Mar 2022 07:29 UTC

On 2022-03-25 02:53, Thomas wrote:

> 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 am using Gtk_Image in Gtk_Box, it works perfectly well, and worked in
GTK 2 (I am using GTK 3).

> i don't understand why.
>
> it is put in a Gtk_Fixed, can that have an influence?

Gtk_Fixed should never be used, but I doubt it can be the reason.

> 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?

Do you call Show on the new child widget after replacing it?

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Gtk.Image.Gtk_Image

<fantome.forums.tDeContes-AEFBD7.20375225032022@news.free.fr>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6741&group=comp.lang.ada#6741

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!proxad.net!feeder1-2.proxad.net!212.27.60.64.MISMATCH!cleanfeed3-b.proxad.net!nnrp6-1.free.fr!not-for-mail
From: fantome....@free.fr.invalid (Thomas)
Newsgroups: comp.lang.ada
Mail-Copies-To: nobody
Subject: Re: Gtk.Image.Gtk_Image
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr> <t1hs30$s7j$1@gioia.aioe.org> <fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr> <t1i3qd$oud$1@gioia.aioe.org> <fantome.forums.tDeContes-F968A4.19403924032022@news.free.fr> <t1ikj3$18ak$1@gioia.aioe.org> <fantome.forums.tDeContes-0CD0D9.02525725032022@news.free.fr> <t1jr00$1ja4$1@gioia.aioe.org>
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 20:37:53 +0100
Message-ID: <fantome.forums.tDeContes-AEFBD7.20375225032022@news.free.fr>
Lines: 55
Organization: Guest of ProXad - France
NNTP-Posting-Date: 25 Mar 2022 20:37:53 CET
NNTP-Posting-Host: 91.175.52.121
X-Trace: 1648237073 news-4.free.fr 3702 91.175.52.121:14792
X-Complaints-To: abuse@proxad.net
 by: Thomas - Fri, 25 Mar 2022 19:37 UTC

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

> On 2022-03-25 02:53, Thomas wrote:
>
> > 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 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)

>
> > i don't understand why.
> >
> > it is put in a Gtk_Fixed, can that have an influence?
>
> Gtk_Fixed should never be used, but I doubt it can be the reason.

i can't do it easily because it would need to review all design an user
interface of RAPID.

>
> > 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?
>
> Do you call Show on the new child widget after replacing it?

ok, that's it. thank you very much :-))

afaiu, the specific thing about Gtk_Pixmap is that i need not to call
Show on it, calling Show on its parent is enough.

but, I thought calling Show on a container was recursive on its childs,
wrong?

last:
now, it works fine with a Gtk_Event_Box as container.

is it ok, or do you think i should avoid it anyway?

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?

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

Re: Gtk.Image.Gtk_Image

<t1l90i$1otm$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6744&group=comp.lang.ada#6744

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!v8j8diosp9R6yoS0SZP34g.user.46.165.242.91.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Gtk.Image.Gtk_Image
Date: Fri, 25 Mar 2022 21:34:28 +0100
Organization: Aioe.org NNTP Server
Message-ID: <t1l90i$1otm$1@gioia.aioe.org>
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr>
<t1hs30$s7j$1@gioia.aioe.org>
<fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr>
<t1i3qd$oud$1@gioia.aioe.org>
<fantome.forums.tDeContes-F968A4.19403924032022@news.free.fr>
<t1ikj3$18ak$1@gioia.aioe.org>
<fantome.forums.tDeContes-0CD0D9.02525725032022@news.free.fr>
<t1jr00$1ja4$1@gioia.aioe.org>
<fantome.forums.tDeContes-AEFBD7.20375225032022@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="58294"; posting-host="v8j8diosp9R6yoS0SZP34g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Dmitry A. Kazakov - Fri, 25 Mar 2022 20:34 UTC

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.

> 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.

> 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.

> 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.

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.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Gtk.Image.Gtk_Image

<fantome.forums.tDeContes-CACBF6.02380226032022@news.free.fr>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6751&group=comp.lang.ada#6751

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!cleanfeed1-a.proxad.net!nnrp3-1.free.fr!not-for-mail
From: fantome....@free.fr.invalid (Thomas)
Newsgroups: comp.lang.ada
Mail-Copies-To: nobody
Subject: Re: Gtk.Image.Gtk_Image
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr> <t1hs30$s7j$1@gioia.aioe.org> <fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr> <t1i3qd$oud$1@gioia.aioe.org> <fantome.forums.tDeContes-F968A4.19403924032022@news.free.fr> <t1ikj3$18ak$1@gioia.aioe.org> <fantome.forums.tDeContes-0CD0D9.02525725032022@news.free.fr> <t1jr00$1ja4$1@gioia.aioe.org> <fantome.forums.tDeContes-AEFBD7.20375225032022@news.free.fr> <t1l90i$1otm$1@gioia.aioe.org>
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 02:38:02 +0100
Message-ID: <fantome.forums.tDeContes-CACBF6.02380226032022@news.free.fr>
Lines: 80
Organization: Guest of ProXad - France
NNTP-Posting-Date: 26 Mar 2022 02:38:03 CET
NNTP-Posting-Host: 91.175.52.121
X-Trace: 1648258683 news-2.free.fr 4998 91.175.52.121:6705
X-Complaints-To: abuse@proxad.net
 by: Thomas - Sat, 26 Mar 2022 01:38 UTC

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/

Re: Gtk.Image.Gtk_Image

<t1mkkt$1vs3$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6754&group=comp.lang.ada#6754

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!v8j8diosp9R6yoS0SZP34g.user.46.165.242.91.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Gtk.Image.Gtk_Image
Date: Sat, 26 Mar 2022 09:59:08 +0100
Organization: Aioe.org NNTP Server
Message-ID: <t1mkkt$1vs3$1@gioia.aioe.org>
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr>
<t1hs30$s7j$1@gioia.aioe.org>
<fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr>
<t1i3qd$oud$1@gioia.aioe.org>
<fantome.forums.tDeContes-F968A4.19403924032022@news.free.fr>
<t1ikj3$18ak$1@gioia.aioe.org>
<fantome.forums.tDeContes-0CD0D9.02525725032022@news.free.fr>
<t1jr00$1ja4$1@gioia.aioe.org>
<fantome.forums.tDeContes-AEFBD7.20375225032022@news.free.fr>
<t1l90i$1otm$1@gioia.aioe.org>
<fantome.forums.tDeContes-CACBF6.02380226032022@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="65411"; posting-host="v8j8diosp9R6yoS0SZP34g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Dmitry A. Kazakov - Sat, 26 Mar 2022 08:59 UTC

On 2022-03-26 02:38, Thomas wrote:
> In article <t1l90i$1otm$1@gioia.aioe.org>,
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> 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. Maybe the image
is actually rendered but at a wrong place and size where it is not
visible. There are many ways to mess it up.

>> 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? So it tries to manage the layout
by itself instead of using the prescribed techniques. Then Gtk_Fixed is
a way to go.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Gtk.Image.Gtk_Image

<fantome.forums.tDeContes-8D94B1.18324926032022@news.free.fr>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6755&group=comp.lang.ada#6755

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!cleanfeed2-a.proxad.net!nnrp4-1.free.fr!not-for-mail
From: fantome....@free.fr.invalid (Thomas)
Newsgroups: comp.lang.ada
Mail-Copies-To: nobody
Subject: Re: Gtk.Image.Gtk_Image
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr> <t1hs30$s7j$1@gioia.aioe.org> <fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr> <t1i3qd$oud$1@gioia.aioe.org> <fantome.forums.tDeContes-F968A4.19403924032022@news.free.fr> <t1ikj3$18ak$1@gioia.aioe.org> <fantome.forums.tDeContes-0CD0D9.02525725032022@news.free.fr> <t1jr00$1ja4$1@gioia.aioe.org> <fantome.forums.tDeContes-AEFBD7.20375225032022@news.free.fr> <t1l90i$1otm$1@gioia.aioe.org> <fantome.forums.tDeContes-CACBF6.02380226032022@news.free.fr> <t1mkkt$1vs3$1@gioia.aioe.org>
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: <fantome.forums.tDeContes-8D94B1.18324926032022@news.free.fr>
Lines: 79
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
 by: Thomas - Sat, 26 Mar 2022 17:32 UTC

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

> On 2022-03-26 02:38, Thomas wrote:
> > In article <t1l90i$1otm$1@gioia.aioe.org>,
> > "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> 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/

Re: Gtk.Image.Gtk_Image

<t1pb0r$elh$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6762&group=comp.lang.ada#6762

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!v8j8diosp9R6yoS0SZP34g.user.46.165.242.91.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Gtk.Image.Gtk_Image
Date: Sun, 27 Mar 2022 11:33:14 +0200
Organization: Aioe.org NNTP Server
Message-ID: <t1pb0r$elh$1@gioia.aioe.org>
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr>
<t1hs30$s7j$1@gioia.aioe.org>
<fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr>
<t1i3qd$oud$1@gioia.aioe.org>
<fantome.forums.tDeContes-F968A4.19403924032022@news.free.fr>
<t1ikj3$18ak$1@gioia.aioe.org>
<fantome.forums.tDeContes-0CD0D9.02525725032022@news.free.fr>
<t1jr00$1ja4$1@gioia.aioe.org>
<fantome.forums.tDeContes-AEFBD7.20375225032022@news.free.fr>
<t1l90i$1otm$1@gioia.aioe.org>
<fantome.forums.tDeContes-CACBF6.02380226032022@news.free.fr>
<t1mkkt$1vs3$1@gioia.aioe.org>
<fantome.forums.tDeContes-8D94B1.18324926032022@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="15025"; posting-host="v8j8diosp9R6yoS0SZP34g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Dmitry A. Kazakov - Sun, 27 Mar 2022 09:33 UTC

On 2022-03-26 18:32, Thomas wrote:
> In article <t1mkkt$1vs3$1@gioia.aioe.org>,
> "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> wrote:
>
> 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?

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.

>> 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.

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.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Gtk.Image.Gtk_Image

<fantome.forums.tDeContes-BCB5FD.18415727032022@news.free.fr>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6764&group=comp.lang.ada#6764

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!cleanfeed2-a.proxad.net!nnrp6-1.free.fr!not-for-mail
From: fantome....@free.fr.invalid (Thomas)
Newsgroups: comp.lang.ada
Mail-Copies-To: nobody
Subject: Re: Gtk.Image.Gtk_Image
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr> <t1hs30$s7j$1@gioia.aioe.org> <fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr> <t1i3qd$oud$1@gioia.aioe.org> <fantome.forums.tDeContes-F968A4.19403924032022@news.free.fr> <t1ikj3$18ak$1@gioia.aioe.org> <fantome.forums.tDeContes-0CD0D9.02525725032022@news.free.fr> <t1jr00$1ja4$1@gioia.aioe.org> <fantome.forums.tDeContes-AEFBD7.20375225032022@news.free.fr> <t1l90i$1otm$1@gioia.aioe.org> <fantome.forums.tDeContes-CACBF6.02380226032022@news.free.fr> <t1mkkt$1vs3$1@gioia.aioe.org> <fantome.forums.tDeContes-8D94B1.18324926032022@news.free.fr> <t1pb0r$elh$1@gioia.aioe.org>
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: <fantome.forums.tDeContes-BCB5FD.18415727032022@news.free.fr>
Lines: 51
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
 by: Thomas - Sun, 27 Mar 2022 16:41 UTC

In article <t1pb0r$elh$1@gioia.aioe.org>,
"Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de> 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/

Re: Gtk.Image.Gtk_Image

<t1q76m$c44$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6765&group=comp.lang.ada#6765

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!aioe.org!v8j8diosp9R6yoS0SZP34g.user.46.165.242.91.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Gtk.Image.Gtk_Image
Date: Sun, 27 Mar 2022 19:34:15 +0200
Organization: Aioe.org NNTP Server
Message-ID: <t1q76m$c44$1@gioia.aioe.org>
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr>
<t1hs30$s7j$1@gioia.aioe.org>
<fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr>
<t1i3qd$oud$1@gioia.aioe.org>
<fantome.forums.tDeContes-F968A4.19403924032022@news.free.fr>
<t1ikj3$18ak$1@gioia.aioe.org>
<fantome.forums.tDeContes-0CD0D9.02525725032022@news.free.fr>
<t1jr00$1ja4$1@gioia.aioe.org>
<fantome.forums.tDeContes-AEFBD7.20375225032022@news.free.fr>
<t1l90i$1otm$1@gioia.aioe.org>
<fantome.forums.tDeContes-CACBF6.02380226032022@news.free.fr>
<t1mkkt$1vs3$1@gioia.aioe.org>
<fantome.forums.tDeContes-8D94B1.18324926032022@news.free.fr>
<t1pb0r$elh$1@gioia.aioe.org>
<fantome.forums.tDeContes-BCB5FD.18415727032022@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="12420"; posting-host="v8j8diosp9R6yoS0SZP34g.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
Content-Language: en-US
X-Notice: Filtered by postfilter v. 0.9.2
 by: Dmitry A. Kazakov - Sun, 27 Mar 2022 17:34 UTC

On 2022-03-27 18:41, Thomas wrote:

> 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.

This is of course unacceptable behavior.

In GTK if you want this you simply disable shrinking, expanding,
filling, that would produce this kind of mess.

The proper approach in case you do not want to resize children is to use
Gtk_Scrolled_Window as the top-level container.

[ Without scroll bars it will silently clip, achieving the best
masochistic user satisfaction... (:-)) ]

> - with GTK, the window cannot be fully resized, it is forbidden to hide
> any widget set in the Gtk_Fixed.

You can always catch size allocation signals and hide widgets you wanted.

[ GTK 3 changed the protocol a bit from one in GTK 2, they added
preferable widget sizes, but in essence these details are irrelevant for
Gtk_Fixed. ]

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

Re: Gtk.Image.Gtk_Image

<fantome.forums.tDeContes-23E95A.04583330032022@news.free.fr>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6770&group=comp.lang.ada#6770

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!212.27.60.64.MISMATCH!cleanfeed3-b.proxad.net!nnrp5-1.free.fr!not-for-mail
From: fantome....@free.fr.invalid (Thomas)
Newsgroups: comp.lang.ada
Mail-Copies-To: nobody
Subject: Re: Gtk.Image.Gtk_Image
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr> <t1hs30$s7j$1@gioia.aioe.org> <fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr> <t1i3qd$oud$1@gioia.aioe.org> <fantome.forums.tDeContes-F968A4.19403924032022@news.free.fr> <t1ikj3$18ak$1@gioia.aioe.org> <fantome.forums.tDeContes-0CD0D9.02525725032022@news.free.fr> <t1jr00$1ja4$1@gioia.aioe.org> <fantome.forums.tDeContes-AEFBD7.20375225032022@news.free.fr> <t1l90i$1otm$1@gioia.aioe.org> <fantome.forums.tDeContes-CACBF6.02380226032022@news.free.fr> <t1mkkt$1vs3$1@gioia.aioe.org> <fantome.forums.tDeContes-8D94B1.18324926032022@news.free.fr> <t1pb0r$elh$1@gioia.aioe.org> <fantome.forums.tDeContes-BCB5FD.18415727032022@news.free.fr> <t1q76m$c44$1@gioia.aioe.org>
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: Wed, 30 Mar 2022 04:58:33 +0200
Message-ID: <fantome.forums.tDeContes-23E95A.04583330032022@news.free.fr>
Lines: 40
Organization: Guest of ProXad - France
NNTP-Posting-Date: 30 Mar 2022 04:58:34 CEST
NNTP-Posting-Host: 91.175.52.121
X-Trace: 1648609114 news-2.free.fr 8899 91.175.52.121:3514
X-Complaints-To: abuse@proxad.net
 by: Thomas - Wed, 30 Mar 2022 02:58 UTC

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

> On 2022-03-27 18:41, Thomas wrote:
>
> > 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.
>
> This is of course unacceptable behavior.

when i'll review windows, i hope Simon Wright will be available to help
me ;-) i don't know tcl at all !

> > - with GTK, the window cannot be fully resized, it is forbidden to hide
> > any widget set in the Gtk_Fixed.

> The proper approach in case you do not want to resize children is to use
> Gtk_Scrolled_Window as the top-level container.

yes,
when i'll review windows, i'll do that.

(afaiu, i need to put a Gtk_Viewport in a Gtk_Scrolled_Window ?
a Gtk_Window doesn't do the job ?)

>
> You can always catch size allocation signals and hide widgets you wanted.

it would need to improve the user interface.

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

Re: Gtk.Image.Gtk_Image

<t21jei$50d$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=6772&group=comp.lang.ada#6772

  copy link   Newsgroups: comp.lang.ada
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.mixmin.net!aioe.org!hzzNxxMX5IPvnEV4b74Cww.user.46.165.242.91.POSTED!not-for-mail
From: mail...@dmitry-kazakov.de (Dmitry A. Kazakov)
Newsgroups: comp.lang.ada
Subject: Re: Gtk.Image.Gtk_Image
Date: Wed, 30 Mar 2022 14:46:12 +0200
Organization: Aioe.org NNTP Server
Message-ID: <t21jei$50d$1@gioia.aioe.org>
References: <fantome.forums.tDeContes-0254C7.13550424032022@news.free.fr>
<t1hs30$s7j$1@gioia.aioe.org>
<fantome.forums.tDeContes-D0BF68.16141524032022@news.free.fr>
<t1i3qd$oud$1@gioia.aioe.org>
<fantome.forums.tDeContes-F968A4.19403924032022@news.free.fr>
<t1ikj3$18ak$1@gioia.aioe.org>
<fantome.forums.tDeContes-0CD0D9.02525725032022@news.free.fr>
<t1jr00$1ja4$1@gioia.aioe.org>
<fantome.forums.tDeContes-AEFBD7.20375225032022@news.free.fr>
<t1l90i$1otm$1@gioia.aioe.org>
<fantome.forums.tDeContes-CACBF6.02380226032022@news.free.fr>
<t1mkkt$1vs3$1@gioia.aioe.org>
<fantome.forums.tDeContes-8D94B1.18324926032022@news.free.fr>
<t1pb0r$elh$1@gioia.aioe.org>
<fantome.forums.tDeContes-BCB5FD.18415727032022@news.free.fr>
<t1q76m$c44$1@gioia.aioe.org>
<fantome.forums.tDeContes-23E95A.04583330032022@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="5133"; posting-host="hzzNxxMX5IPvnEV4b74Cww.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101
Thunderbird/91.7.0
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Dmitry A. Kazakov - Wed, 30 Mar 2022 12:46 UTC

On 2022-03-30 04:58, Thomas wrote:

> (afaiu, i need to put a Gtk_Viewport in a Gtk_Scrolled_Window ?
> a Gtk_Window doesn't do the job ?)

I don't remember GTK 2 well. In GTK 3 you can just set policy of a
Gtk_Scrolled_Window to add/remove scroll bars automatically as necessary.

--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor