Re: GtkImageMenuItem:: forall includes the internal GtkImage Widget?



I guess you are right. Other gtkbin containers do not include the
widget set with set_image in their foreach list. I still think that
the documentation is ambiguous on this, because it is not exactly
clear which widgets should be treated as internal and which should
not.

Is there a specific problem that gtk_image_menu_item_foreach is
causing other than being wrong?

It is a good idea to report this issue on Bugzilla, otherwise it will
probably be forgotten.

2008/5/24, Yu Feng <rainwoodman gmail com>:
>
>> On Sat, 2008-05-24 at 15:51 +0000, BJörn Lindqvist wrote:
>> On Fri, May 23, 2008 at 11:24 PM, Yu Feng <rainwoodman gmail com> wrote:
>> > Hi everyone,
>> >
>> > Isn't the GtkImage in a GtkImageMenuItem an internal widget?
>>
>> No, GtkImageMenuItem is a GtkContainer and the image widget is set
>> explicitly as its child, so it is not internal.
> Can you show me an example the user set the image as the container's child?
>
>> gtk_container_forall
>> says ""internal" (implementation details of the container). "Internal"
>> children generally weren't added by the user of the container, but
>> were added by the container implementation itself."
>>
>
> If it is an external child then it should not be treated as a property.
>
> Also, GtkImageMenuItem has to be a bin because GtkMenuItem is a bin. I
> think this is a typical application of the 'Decoration' pattern. one has
> a widget and one wants something to decorate it without change the
> functionality and knowing any details of it.
>
>> I agree that it is a little strange that GtkImageMenuItem is a GtkBin,
>> logically it has two children.
> It is not only strange but also has practical confusions. How is
> GtkBuilder UI Definition solving the confusion between property and
> external child?
>>
>
> Yu
>
>


-- 
mvh Björn


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]