g_return_if_fail (object && GL_IS_LABEL_OBJECT (object));
- object->private->w = w;
- object->private->h = h;
+ if ( GL_LABEL_OBJECT_GET_CLASS(object)->set_size != NULL ) {
+
+ /* We have an object specific method, use it */
+ GL_LABEL_OBJECT_GET_CLASS(object)->set_size (object, w, h);
+
+ } else {
+
+ object->private->w = w;
+ object->private->h = h;
+ }
g_signal_emit (G_OBJECT(object), signals[CHANGED], 0);
g_return_if_fail (object && GL_IS_LABEL_OBJECT (object));
- *w = object->private->w;
- *h = object->private->h;
+ if ( GL_LABEL_OBJECT_GET_CLASS(object)->get_size != NULL ) {
+
+ /* We have an object specific method, use it */
+ GL_LABEL_OBJECT_GET_CLASS(object)->get_size (object, w, h);
+
+ } else {
+
+ *w = object->private->w;
+ *h = object->private->h;
+ }
gl_debug (DEBUG_LABEL, "END");
}
#include <gnome.h>
#include "label-object.h"
-#define GL_TYPE_VIEW_OBJECT (gl_view_object_get_type ())
-#define GL_VIEW_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_OBJECT, glViewObject))
-#define GL_VIEW_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_OBJECT, glViewObjectClass))
-#define GL_IS_VIEW_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_OBJECT))
-#define GL_IS_VIEW_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_OBJECT))
+#define GL_TYPE_VIEW_OBJECT (gl_view_object_get_type ())
+#define GL_VIEW_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_VIEW_OBJECT, glViewObject))
+#define GL_VIEW_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_VIEW_OBJECT, glViewObjectClass))
+#define GL_IS_VIEW_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_VIEW_OBJECT))
+#define GL_IS_VIEW_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_VIEW_OBJECT))
+#define GL_VIEW_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), GL_TYPE_VIEW_OBJECT, glViewObjectClass))
typedef struct _glViewObject glViewObject;
typedef struct _glViewObjectClass glViewObjectClass;
struct _glViewObjectClass {
GObjectClass parent_class;
-};
+ /*
+ * Methods
+ */
+
+ GtkWidget * (*construct_dialog) (glViewObject *view_object);
+};
-typedef GtkWidget * (*glViewObjectDlgConstructor)(glViewObject *);
-#define GL_VIEW_OBJECT_DLG_CONSTRUCTOR(f) ((glViewObjectDlgConstructor) (f))
G_BEGIN_DECLS
glLabelObject *object,
glViewHighlightStyle style);
-void gl_view_object_set_dlg_constructor (glViewObject *view_object,
- glViewObjectDlgConstructor dlg_constructor);
-
glView *gl_view_object_get_view (glViewObject *view_object);
glLabelObject *gl_view_object_get_object (glViewObject *view_object);