Creating custom widget in Perl



Hello!

I cannot find info about how to create custom widgets in perl. I saw the
only available example (the source code of Gtk::ColorSelectButton), but
there are something that are not clear:

- Why UNIVERSAL::can("Gtk::Button","new") is undef? (In other words: Why
  do I need to write my own constructor?
- Why does the author use Gtk::Widget->new($pkg,@_) in the constructor,
  not Gtk::Button->new?
- What is Gtk::Button->register_subtype?
- Why we need GTK_CLASS_INIT and GTK_OBJECT_INIT?
- What are the "args" good for?
- What are the usable types for the "args"? I want (for example) use
  an array of integes type. Where I can find info about the
  available types?

Thanks for the help in advance,

dLux
--
                == Magzar billentzuyet ruley ==




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