Re: How to emit signals in Glib::Object derived modules?



On Thu, 2004-09-02 at 07:16, Sam wrote:
Hello,

use Glib::Object::Subclass
    TestClass::,

They parent class is supposed to be here rather than the name of this
class. Glib::Object if you're creating a simple object, Gtk2::Button
(for instance) if you're created a new type of button.

Ok, but I do not want to derive a widget, but create a new object instead.
In other words: I am trying to use Glib's signal/event mechanism for a non-
widget module.
Is this not possible?

if you want to make an object, that isn't a widget, then you want to
inherit from Glib::Object, the base object of the hierarchy. you have to
inherit from something. 

you could create a new top-level class (through other mechanisms,) but
then you wouldn't get signals and properties or anything else for that
matter. the cases where this is needed are very rare.

-- 
-rm
http://www.neces.com/




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