Re: [gtk-list] Gtk-Perl & GnomeStock
- From: Dermot Musgrove <dermot glade perl connectfree co uk>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Gtk-Perl & GnomeStock
- Date: Wed, 29 Sep 1999 18:01:22 +0000
Dr Noonian Soong wrote:
>
> I'm attempting to create a pixmap button using a GnomeStock button with
> the Perl bindings. Unfortunately, I cannot seem to find the necessary
> wrapped functions to do so... What I would like to do is something like
> this:
>
> ...
> my ($icon, $button);
> $icon = Gnome::Stock::pixmap_widget($window, 'Mail_New');
> $button = Gnome::Stock:pixmap_button($icon, 'New Mail');
> ...
>
> Unfortunately, pixmap_widget does not appear to be bound (only
> pixmap_widget_at_size).
I have reported this to Lupus (Paolo Molaro) who is fixing the bugs in the
gnome.org CVS repo so I guess that he will implement it sometime.
> Is there another alternative that I don't seem to be finding?
$widgets->{'button33'} = Gnome::Stock->button('Button_Ok' ); will create
a stock button. Check the Gnome docs/headers for an enum of all the possible
stock button type - gnome-libs/libgnomeui/gnome-stock.h if you have the
gnome-libs sources.
> Also, the Perl bindings seems to want a blessed Gnome::Stock object in
> order to call Gnome::Stock::gnome_pixmap_button, which seems
> counter-intuitive, seeing as the c version takes no
> GnomeStock* parameter. Additionally, what scheme is used for naming the
> stock objects? According to the RDP docs, GNOME_STOCK_PIXMAP_MAIL_NEW,
> for example, is #defined as "New Mail". Would that be the string literal
> to the perl binding, or would it desire something like 'Mail_New'?
gnome-libs/libgnomeui/gnome-stock.h shows "New Mail" so I would try that.
Unlike Gtk, the string literals seem to bear no regular relationship to
the constant names, it looks like the enums were each coded to a different
standard - and who thought of "Button_Ok" with a little K? I ahve asked
Lupus for a module that would provide all the enums but he said it would
be difficult/unnecessary to generate from the header files in the same way
that Keysyms are.
HTH, Dermot
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]