/* Private function prototypes. */
/*========================================================*/
-static void gl_view_barcode_class_init (glViewBarcodeClass *klass);
-static void gl_view_barcode_instance_init (glViewBarcode *view_barcode);
-static void gl_view_barcode_finalize (GObject *object);
+static void gl_view_barcode_class_init (glViewBarcodeClass *klass);
+static void gl_view_barcode_instance_init (glViewBarcode *view_barcode);
+static void gl_view_barcode_finalize (GObject *object);
-static void update_view_barcode_cb (glLabelObject *object,
- glViewBarcode *view_barcode);
+static void update_view_barcode_cb (glLabelObject *object,
+ glViewBarcode *view_barcode);
-static GtkWidget *construct_properties_dialog (glViewBarcode *view_barcode);
+static GtkWidget *construct_properties_dialog (glViewBarcode *view_barcode);
-static void response_cb (GtkDialog *dialog,
- gint response,
- glViewBarcode *view_barcode);
+static void response_cb (GtkDialog *dialog,
+ gint response,
+ glViewBarcode *view_barcode);
-static void bc_data_changed_cb (glWdgtBCData *bc_data,
- glViewBarcode *view_barcode);
+static void bc_data_changed_cb (glWdgtBCData *bc_data,
+ glViewBarcode *view_barcode);
-static void bc_props_changed_cb (glWdgtBCProps *bc_props,
- glViewBarcode *view_barcode);
+static void bc_props_changed_cb (glWdgtBCProps *bc_props,
+ glViewBarcode *view_barcode);
-static void bc_style_changed_cb (glWdgtBCStyle *bc_style,
- glViewBarcode *view_barcode);
+static void bc_style_changed_cb (glWdgtBCStyle *bc_style,
+ glViewBarcode *view_barcode);
static void position_changed_cb (glWdgtPosition *position,
- glViewBarcode *view_barcode);
+ glViewBarcode *view_barcode);
-static void update_dialog_cb (glLabelObject *object,
- glViewBarcode *view_barcode);
+static void update_dialog_cb (glLabelObject *object,
+ glViewBarcode *view_barcode);
-static void draw_barcode (glViewBarcode *view_barcode);
+static void update_dialog_from_move_cb (glLabelObject *object,
+ gdouble dx,
+ gdouble dy,
+ glViewBarcode *view_barcode);
+
+static void draw_barcode (glViewBarcode *view_barcode);
\f
/*****************************************************************************/
/*----------------------------*/
g_signal_connect (G_OBJECT (object), "changed",
G_CALLBACK (update_dialog_cb), view_barcode);
+ g_signal_connect (G_OBJECT (object), "moved",
+ G_CALLBACK (update_dialog_from_move_cb),
+ view_barcode);
gl_debug (DEBUG_VIEW, "END");
gl_debug (DEBUG_VIEW, "END");
}
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. label object "moved" callback. */
+/*---------------------------------------------------------------------------*/
+static void
+update_dialog_from_move_cb (glLabelObject *object,
+ gdouble dx,
+ gdouble dy,
+ glViewBarcode *view_barcode)
+{
+ gdouble x, y;
+
+ gl_debug (DEBUG_VIEW, "START");
+
+ /* Query properties of object. */
+ gl_label_object_get_position (GL_LABEL_OBJECT(object), &x, &y);
+
+ /* Block widget handlers to prevent recursion */
+ g_signal_handlers_block_by_func (G_OBJECT(view_barcode->private->position),
+ position_changed_cb, view_barcode);
+
+ /* Update widgets in property dialog */
+ gl_wdgt_position_set_position (GL_WDGT_POSITION(view_barcode->private->position),
+ x, y);
+
+ /* Unblock widget handlers */
+ g_signal_handlers_unblock_by_func (G_OBJECT(view_barcode->private->position),
+ position_changed_cb, view_barcode);
+
+ gl_debug (DEBUG_VIEW, "END");
+}
+
/*****************************************************************************/
/* Return apropos cursor for create object mode. */
/*****************************************************************************/
/*========================================================*/
static void gl_view_box_class_init (glViewBoxClass *klass);
-static void gl_view_box_instance_init (glViewBox *view_box);
-static void gl_view_box_finalize (GObject *object);
+static void gl_view_box_instance_init (glViewBox *view_box);
+static void gl_view_box_finalize (GObject *object);
-static void update_view_box_cb (glLabelObject *object,
- glViewBox *view_box);
+static void update_view_box_cb (glLabelObject *object,
+ glViewBox *view_box);
-static GtkWidget *construct_properties_dialog (glViewBox *view_box);
+static GtkWidget *construct_properties_dialog (glViewBox *view_box);
-static void response_cb (GtkDialog *dialog,
- gint response,
- glViewBox *view_box);
+static void response_cb (GtkDialog *dialog,
+ gint response,
+ glViewBox *view_box);
-static void line_changed_cb (glWdgtLine *line,
- glViewBox *view_box);
+static void line_changed_cb (glWdgtLine *line,
+ glViewBox *view_box);
-static void fill_changed_cb (glWdgtFill *fill,
- glViewBox *view_box);
+static void fill_changed_cb (glWdgtFill *fill,
+ glViewBox *view_box);
static void position_changed_cb (glWdgtPosition *position,
- glViewBox *view_box);
+ glViewBox *view_box);
-static void size_changed_cb (glWdgtSize *size,
- glViewBox *view_box);
+static void size_changed_cb (glWdgtSize *size,
+ glViewBox *view_box);
-static void update_dialog_cb (glLabelObject *object,
- glViewBox *view_box);
+static void update_dialog_cb (glLabelObject *object,
+ glViewBox *view_box);
+
+static void update_dialog_from_move_cb (glLabelObject *object,
+ gdouble dx,
+ gdouble dy,
+ glViewBox *view_box);
\f
/*****************************************************************************/
/*----------------------------*/
g_signal_connect (G_OBJECT (object), "changed",
G_CALLBACK (update_dialog_cb), view_box);
+ g_signal_connect (G_OBJECT (object), "moved",
+ G_CALLBACK (update_dialog_from_move_cb), view_box);
gl_debug (DEBUG_VIEW, "END");
gl_debug (DEBUG_VIEW, "END");
}
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. label object "moved" callback. */
+/*---------------------------------------------------------------------------*/
+static void
+update_dialog_from_move_cb (glLabelObject *object,
+ gdouble dx,
+ gdouble dy,
+ glViewBox *view_box)
+{
+ gdouble x, y;
+
+ gl_debug (DEBUG_VIEW, "START");
+
+ /* Query properties of object. */
+ gl_label_object_get_position (GL_LABEL_OBJECT(object), &x, &y);
+
+ /* Block widget handlers to prevent recursion */
+ g_signal_handlers_block_by_func (G_OBJECT(view_box->private->position),
+ position_changed_cb, view_box);
+
+ /* Update widgets in property dialog */
+ gl_wdgt_position_set_position (GL_WDGT_POSITION(view_box->private->position),
+ x, y);
+
+ /* Unblock widget handlers */
+ g_signal_handlers_unblock_by_func (G_OBJECT(view_box->private->position),
+ position_changed_cb, view_box);
+
+ gl_debug (DEBUG_VIEW, "END");
+}
+
/*****************************************************************************/
/* Return apropos cursor for create object mode. */
/*****************************************************************************/
/*========================================================*/
static void gl_view_ellipse_class_init (glViewEllipseClass *klass);
-static void gl_view_ellipse_instance_init (glViewEllipse *view_ellipse);
-static void gl_view_ellipse_finalize (GObject *object);
+static void gl_view_ellipse_instance_init (glViewEllipse *view_ellipse);
+static void gl_view_ellipse_finalize (GObject *object);
-static void update_view_ellipse_cb (glLabelObject *object,
- glViewEllipse *view_ellipse);
+static void update_view_ellipse_cb (glLabelObject *object,
+ glViewEllipse *view_ellipse);
-static GtkWidget *construct_properties_dialog (glViewEllipse *view_ellipse);
+static GtkWidget *construct_properties_dialog (glViewEllipse *view_ellipse);
-static void response_cb (GtkDialog *dialog,
- gint response,
- glViewEllipse *view_ellipse);
+static void response_cb (GtkDialog *dialog,
+ gint response,
+ glViewEllipse *view_ellipse);
-static void line_changed_cb (glWdgtLine *line,
- glViewEllipse *view_ellipse);
+static void line_changed_cb (glWdgtLine *line,
+ glViewEllipse *view_ellipse);
-static void fill_changed_cb (glWdgtFill *fill,
- glViewEllipse *view_ellipse);
+static void fill_changed_cb (glWdgtFill *fill,
+ glViewEllipse *view_ellipse);
static void position_changed_cb (glWdgtPosition *position,
- glViewEllipse *view_ellipse);
+ glViewEllipse *view_ellipse);
-static void size_changed_cb (glWdgtSize *size,
- glViewEllipse *view_ellipse);
+static void size_changed_cb (glWdgtSize *size,
+ glViewEllipse *view_ellipse);
-static void update_dialog_cb (glLabelObject *object,
- glViewEllipse *view_ellipse);
+static void update_dialog_cb (glLabelObject *object,
+ glViewEllipse *view_ellipse);
+
+static void update_dialog_from_move_cb (glLabelObject *object,
+ gdouble dx,
+ gdouble dy,
+ glViewEllipse *view_ellipse);
\f
/*****************************************************************************/
/*----------------------------*/
g_signal_connect (G_OBJECT (object), "changed",
G_CALLBACK (update_dialog_cb), view_ellipse);
+ g_signal_connect (G_OBJECT (object), "moved",
+ G_CALLBACK (update_dialog_from_move_cb),
+ view_ellipse);
gl_debug (DEBUG_VIEW, "END");
g_signal_handlers_unblock_by_func (G_OBJECT(view_ellipse->private->size),
size_changed_cb, view_ellipse);
+ gl_debug (DEBUG_VIEW, "END");
+}
+
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. label object "moved" callback. */
+/*---------------------------------------------------------------------------*/
+static void
+update_dialog_from_move_cb (glLabelObject *object,
+ gdouble dx,
+ gdouble dy,
+ glViewEllipse *view_ellipse)
+{
+ gdouble x, y;
+
+ gl_debug (DEBUG_VIEW, "START");
+
+ /* Query properties of object. */
+ gl_label_object_get_position (GL_LABEL_OBJECT(object), &x, &y);
+
+ /* Block widget handlers to prevent recursion */
+ g_signal_handlers_block_by_func (G_OBJECT(view_ellipse->private->position),
+ position_changed_cb, view_ellipse);
+
+ /* Update widgets in property dialog */
+ gl_wdgt_position_set_position (GL_WDGT_POSITION(view_ellipse->private->position),
+ x, y);
+
+ /* Unblock widget handlers */
+ g_signal_handlers_unblock_by_func (G_OBJECT(view_ellipse->private->position),
+ position_changed_cb, view_ellipse);
gl_debug (DEBUG_VIEW, "END");
}
/* Private function prototypes. */
/*========================================================*/
-static void gl_view_image_class_init (glViewImageClass *klass);
-static void gl_view_image_instance_init (glViewImage *view_image);
-static void gl_view_image_finalize (GObject *object);
+static void gl_view_image_class_init (glViewImageClass *klass);
+static void gl_view_image_instance_init (glViewImage *view_image);
+static void gl_view_image_finalize (GObject *object);
-static void update_view_image_cb (glLabelObject *object,
- glViewImage *view_image);
+static void update_view_image_cb (glLabelObject *object,
+ glViewImage *view_image);
-static GtkWidget *construct_properties_dialog (glViewImage *view_image);
+static GtkWidget *construct_properties_dialog (glViewImage *view_image);
-static void response_cb (GtkDialog *dialog,
- gint response,
- glViewImage *view_image);
+static void response_cb (GtkDialog *dialog,
+ gint response,
+ glViewImage *view_image);
-static void file_changed_cb (GtkEntry *pixmap_entry,
- glViewImage *view_image);
+static void file_changed_cb (GtkEntry *pixmap_entry,
+ glViewImage *view_image);
static void position_changed_cb (glWdgtPosition *position,
- glViewImage *view_image);
+ glViewImage *view_image);
-static void size_changed_cb (glWdgtSize *size,
- glViewImage *view_image);
+static void size_changed_cb (glWdgtSize *size,
+ glViewImage *view_image);
-static void size_reset_cb (GtkButton *button,
- glViewImage *view_image);
+static void size_reset_cb (GtkButton *button,
+ glViewImage *view_image);
-static void update_dialog_cb (glLabelObject *object,
- glViewImage *view_image);
+static void update_dialog_cb (glLabelObject *object,
+ glViewImage *view_image);
+
+static void update_dialog_from_move_cb (glLabelObject *object,
+ gdouble dx,
+ gdouble dy,
+ glViewImage *view_image);
\f
/*****************************************************************************/
/*----------------------------*/
g_signal_connect (G_OBJECT (object), "changed",
G_CALLBACK (update_dialog_cb), view_image);
+ g_signal_connect (G_OBJECT (object), "moved",
+ G_CALLBACK (update_dialog_from_move_cb), view_image);
gl_debug (DEBUG_VIEW, "END");
/*---------------------------------------------------------------------------*/
static void
response_cb (GtkDialog *dialog,
- gint response,
+ gint response,
glViewImage *view_image)
{
gl_debug (DEBUG_VIEW, "START");
/* PRIVATE. position "changed" callback. */
/*---------------------------------------------------------------------------*/
static void
-position_changed_cb (glWdgtPosition *position,
+position_changed_cb (glWdgtPosition *position,
glViewImage *view_image)
{
glLabelObject *object;
/* PRIVATE. size "changed" callback. */
/*---------------------------------------------------------------------------*/
static void
-size_changed_cb (glWdgtSize *size,
+size_changed_cb (glWdgtSize *size,
glViewImage *view_image)
{
glLabelObject *object;
/* PRIVATE. label object "changed" callback. */
/*---------------------------------------------------------------------------*/
static void
-update_dialog_cb (glLabelObject *object,
+update_dialog_cb (glLabelObject *object,
glViewImage *view_image)
{
gchar *filename;
gl_debug (DEBUG_VIEW, "END");
}
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. label object "moved" callback. */
+/*---------------------------------------------------------------------------*/
+static void
+update_dialog_from_move_cb (glLabelObject *object,
+ gdouble dx,
+ gdouble dy,
+ glViewImage *view_image)
+{
+ gdouble x, y;
+
+ gl_debug (DEBUG_VIEW, "START");
+
+ /* Query properties of object. */
+ gl_label_object_get_position (GL_LABEL_OBJECT(object), &x, &y);
+
+ /* Block widget handlers to prevent recursion */
+ g_signal_handlers_block_by_func (G_OBJECT(view_image->private->position),
+ position_changed_cb, view_image);
+
+ /* Update widgets in property dialog */
+ gl_wdgt_position_set_position (GL_WDGT_POSITION(view_image->private->position),
+ x, y);
+
+ /* Unblock widget handlers */
+ g_signal_handlers_unblock_by_func (G_OBJECT(view_image->private->position),
+ position_changed_cb, view_image);
+
+ gl_debug (DEBUG_VIEW, "END");
+}
+
/*****************************************************************************/
/* Return apropos cursor for create object mode. */
/*****************************************************************************/
/* Private function prototypes. */
/*========================================================*/
-static void gl_view_line_class_init (glViewLineClass *klass);
-static void gl_view_line_instance_init (glViewLine *view_line);
-static void gl_view_line_finalize (GObject *object);
+static void gl_view_line_class_init (glViewLineClass *klass);
+static void gl_view_line_instance_init (glViewLine *view_line);
+static void gl_view_line_finalize (GObject *object);
-static void update_view_line_cb (glLabelObject *object,
- glViewLine *view_line);
+static void update_view_line_cb (glLabelObject *object,
+ glViewLine *view_line);
-static GtkWidget *construct_properties_dialog (glViewLine *view_line);
+static GtkWidget *construct_properties_dialog (glViewLine *view_line);
-static void response_cb (GtkDialog *dialog,
- gint response,
- glViewLine *view_line);
+static void response_cb (GtkDialog *dialog,
+ gint response,
+ glViewLine *view_line);
-static void line_changed_cb (glWdgtLine *line,
- glViewLine *view_line);
+static void line_changed_cb (glWdgtLine *line,
+ glViewLine *view_line);
-static void position_changed_cb (glWdgtPosition *position,
- glViewLine *view_line);
+static void position_changed_cb (glWdgtPosition *position,
+ glViewLine *view_line);
-static void vector_changed_cb (glWdgtVector *vector,
- glViewLine *view_line);
+static void vector_changed_cb (glWdgtVector *vector,
+ glViewLine *view_line);
-static void update_dialog_cb (glLabelObject *object,
- glViewLine *view_line);
+static void update_dialog_cb (glLabelObject *object,
+ glViewLine *view_line);
+
+static void update_dialog_from_move_cb (glLabelObject *object,
+ gdouble dx,
+ gdouble dy,
+ glViewLine *view_line);
\f
/*****************************************************************************/
/*----------------------------*/
g_signal_connect (G_OBJECT (object), "changed",
G_CALLBACK (update_dialog_cb), view_line);
+ g_signal_connect (G_OBJECT (object), "moved",
+ G_CALLBACK (update_dialog_from_move_cb), view_line);
gl_debug (DEBUG_VIEW, "END");
gl_debug (DEBUG_VIEW, "END");
}
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. label object "moved" callback. */
+/*---------------------------------------------------------------------------*/
+static void
+update_dialog_from_move_cb (glLabelObject *object,
+ gdouble dx,
+ gdouble dy,
+ glViewLine *view_line)
+{
+ gdouble x, y;
+
+ gl_debug (DEBUG_VIEW, "START");
+
+ /* Query properties of object. */
+ gl_label_object_get_position (GL_LABEL_OBJECT(object), &x, &y);
+
+ /* Block widget handlers to prevent recursion */
+ g_signal_handlers_block_by_func (G_OBJECT(view_line->private->position),
+ position_changed_cb, view_line);
+
+ /* Update widgets in property dialog */
+ gl_wdgt_position_set_position (GL_WDGT_POSITION(view_line->private->position),
+ x, y);
+
+ /* Unblock widget handlers */
+ g_signal_handlers_unblock_by_func (G_OBJECT(view_line->private->position),
+ position_changed_cb, view_line);
+
+ gl_debug (DEBUG_VIEW, "END");
+}
+
/*****************************************************************************/
/* Return apropos cursor for create object mode. */
/*****************************************************************************/
/*========================================================*/
static void gl_view_text_class_init (glViewTextClass *klass);
-static void gl_view_text_instance_init (glViewText *view_text);
-static void gl_view_text_finalize (GObject *object);
+static void gl_view_text_instance_init (glViewText *view_text);
+static void gl_view_text_finalize (GObject *object);
-static void update_view_text_cb (glLabelObject *object,
- glViewText *view_text);
+static void update_view_text_cb (glLabelObject *object,
+ glViewText *view_text);
-static GtkWidget *construct_properties_dialog (glViewText *view_text);
+static GtkWidget *construct_properties_dialog (glViewText *view_text);
-static void response_cb (GtkDialog *dialog,
- gint response,
- glViewText *view_text);
+static void response_cb (GtkDialog *dialog,
+ gint response,
+ glViewText *view_text);
static void text_entry_changed_cb (glWdgtTextEntry *text_entry,
- glViewText *view_text);
+ glViewText *view_text);
static void text_props_changed_cb (glWdgtTextProps *text_props,
- glViewText *view_text);
+ glViewText *view_text);
-static void position_changed_cb (glWdgtPosition *position,
- glViewText *view_text);
+static void position_changed_cb (glWdgtPosition *position,
+ glViewText *view_text);
-static void update_dialog_cb (glLabelObject *object,
- glViewText *view_text);
+static void update_dialog_cb (glLabelObject *object,
+ glViewText *view_text);
-static void draw_hacktext (glViewText *view_text);
+static void update_dialog_from_move_cb (glLabelObject *object,
+ gdouble dx,
+ gdouble dy,
+ glViewText *view_text);
+
+static void draw_hacktext (glViewText *view_text);
\f
/*****************************************************************************/
/*----------------------------*/
g_signal_connect (G_OBJECT (object), "changed",
G_CALLBACK (update_dialog_cb), view_text);
+ g_signal_connect (G_OBJECT (object), "moved",
+ G_CALLBACK (update_dialog_from_move_cb), view_text);
gl_debug (DEBUG_VIEW, "END");
gl_debug (DEBUG_VIEW, "END");
}
+/*---------------------------------------------------------------------------*/
+/* PRIVATE. label object "moved" callback. */
+/*---------------------------------------------------------------------------*/
+static void
+update_dialog_from_move_cb (glLabelObject *object,
+ gdouble dx,
+ gdouble dy,
+ glViewText *view_text)
+{
+ gdouble x, y;
+
+ gl_debug (DEBUG_VIEW, "START");
+
+ /* Query properties of object. */
+ gl_label_object_get_position (GL_LABEL_OBJECT(object), &x, &y);
+
+ /* Block widget handlers to prevent recursion */
+ g_signal_handlers_block_by_func (G_OBJECT(view_text->private->position),
+ position_changed_cb, view_text);
+
+ /* Update widgets in property dialog */
+ gl_wdgt_position_set_position (GL_WDGT_POSITION(view_text->private->position),
+ x, y);
+
+ /* Unblock widget handlers */
+ g_signal_handlers_unblock_by_func (G_OBJECT(view_text->private->position),
+ position_changed_cb, view_text);
+
+ gl_debug (DEBUG_VIEW, "END");
+}
+
/*****************************************************************************/
/* Return apropos cursor for create object mode. */
/*****************************************************************************/