Custom container + Child type with interface

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

 



I'm implementing a custom container widget which needs to only accept
child widgets which derive from GtkWidget (obviously) but also implement
a custom Interface called GpanesPanel.

I'm not sure how to enforce this rule within my code's API. What type
should the container's child_type() method return? GPANES_TYPE_PANEL or
GTK_TYPE_WIDGET? Likewise, I'm not sure what type custom insertion
methods for my container should accept, GpanesPanel or GtkWidget?

It doesn't seem enough to use GPANES_TYPE_PANEL/GpanesPanel because, as
it stands, any non-widget class could implement the GpanesPanel
interface but would be unusable as a container child.

Is there anything I can put in the GpanesPanel interface definition that
states that it can only be applied to classes derived from GtkWidget?

I hope I've explained my problem clearly enough. Suggestions gratefully
received.

Matt.


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux