+/*****************************************************************************/
+/* Set vertical text alignment. */
+/*****************************************************************************/
+void
+gl_object_editor_set_text_valignment (glObjectEditor *editor,
+ glValignment valign)
+{
+ gl_debug (DEBUG_EDITOR, "START");
+
+
+ g_signal_handlers_block_by_func (G_OBJECT (editor->priv->text_top_toggle), valign_toggle_cb, editor);
+ g_signal_handlers_block_by_func (G_OBJECT (editor->priv->text_vcenter_toggle), valign_toggle_cb, editor);
+ g_signal_handlers_block_by_func (G_OBJECT (editor->priv->text_bottom_toggle), valign_toggle_cb, editor);
+
+
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_top_toggle),
+ (valign == GL_VALIGN_TOP));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_vcenter_toggle),
+ (valign == GL_VALIGN_VCENTER));
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editor->priv->text_bottom_toggle),
+ (valign == GL_VALIGN_BOTTOM));
+
+
+ g_signal_handlers_unblock_by_func (G_OBJECT (editor->priv->text_top_toggle), valign_toggle_cb, editor);
+ g_signal_handlers_unblock_by_func (G_OBJECT (editor->priv->text_vcenter_toggle), valign_toggle_cb, editor);
+ g_signal_handlers_unblock_by_func (G_OBJECT (editor->priv->text_bottom_toggle), valign_toggle_cb, editor);
+
+
+ gl_debug (DEBUG_EDITOR, "END");
+}
+
+
+/*****************************************************************************/
+/* Query vertical text alignment. */
+/*****************************************************************************/
+glValignment
+gl_object_editor_get_text_valignment (glObjectEditor *editor)
+{
+ glValignment valign;
+
+ gl_debug (DEBUG_EDITOR, "START");
+
+ if (gtk_toggle_button_get_active
+ (GTK_TOGGLE_BUTTON (editor->priv->text_top_toggle))) {
+ valign = GL_VALIGN_TOP;
+ } else
+ if (gtk_toggle_button_get_active
+ (GTK_TOGGLE_BUTTON (editor->priv->text_bottom_toggle))) {
+ valign = GL_VALIGN_BOTTOM;
+ } else
+ if (gtk_toggle_button_get_active
+ (GTK_TOGGLE_BUTTON (editor->priv->text_vcenter_toggle))) {
+ valign = GL_VALIGN_VCENTER;
+ } else {
+ valign = GL_VALIGN_TOP; /* Should not happen. */
+ }
+
+ gl_debug (DEBUG_EDITOR, "END");
+
+ return valign;
+}
+
+