]> git.sur5r.net Git - glabels/blobdiff - glabels2/src/object-editor.h
2009-09-22 Jim Evins <evins@snaught.com>
[glabels] / glabels2 / src / object-editor.h
index 2e13c9fdcdaed60cfcdb73fc4d0ddd037ac25c62..71d63a3110ba719c33bf31477afb1af7db16fc8d 100644 (file)
@@ -1,33 +1,33 @@
 /*
- *  (GLABELS) Label and Business Card Creation program for GNOME
+ *  object-editor.h
+ *  Copyright (C) 2003-2009  Jim Evins <evins@snaught.com>.
  *
- *  object-editor.h:  object properties editor module header file
+ *  This file is part of gLabels.
  *
- *  Copyright (C) 2003  Jim Evins <evins@snaught.com>.
- *
- *  This program is free software; you can redistribute it and/or modify
+ *  gLabels is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
+ *  the Free Software Foundation, either version 3 of the License, or
  *  (at your option) any later version.
  *
- *  This program is distributed in the hope that it will be useful,
+ *  gLabels is distributed in the hope that it will be useful,
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ *  along with gLabels.  If not, see <http://www.gnu.org/licenses/>.
  */
+
 #ifndef __OBJECT_EDITOR_H__
 #define __OBJECT_EDITOR_H__
 
 #include <gtk/gtk.h>
+
 #include "text-node.h"
+#include "label.h"
 #include "merge.h"
 #include "bc.h"
-#include <gtk/gtkenums.h>
-#include <libgnomeprint/gnome-font.h>
+#include "color.h"
 
 G_BEGIN_DECLS
 
@@ -44,14 +44,20 @@ typedef enum {
        GL_OBJECT_EDITOR_EDIT_PAGE,
        GL_OBJECT_EDITOR_BC_PAGE,
        GL_OBJECT_EDITOR_DATA_PAGE,
+       GL_OBJECT_EDITOR_SHADOW_PAGE,
 } glObjectEditorOption;
 
 #define GL_TYPE_OBJECT_EDITOR            (gl_object_editor_get_type ())
-#define GL_OBJECT_EDITOR(obj)            (GTK_CHECK_CAST ((obj), GL_TYPE_OBJECT_EDITOR, glObjectEditor))
-#define GL_OBJECT_EDITOR_CLASS(klass)    (GTK_CHECK_CLASS_CAST ((klass), GL_TYPE_OBJECT_EDITOR, glObjectEditorClass))
-#define GL_IS_OBJECT_EDITOR(obj)         (GTK_CHECK_TYPE ((obj), GL_TYPE_OBJECT_EDITOR))
-#define GL_IS_OBJECT_EDITOR_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GL_TYPE_OBJECT_EDITOR))
-#define GL_OBJECT_EDITOR_GET_CLASS(obj)  (GTK_CHECK_GET_CLASS ((obj), GL_TYPE_OBJECT_EDITOR, glObjectEditorClass))
+#define GL_OBJECT_EDITOR(obj) \
+        (G_TYPE_CHECK_INSTANCE_CAST ((obj), GL_TYPE_OBJECT_EDITOR, glObjectEditor))
+#define GL_OBJECT_EDITOR_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_CAST ((klass), GL_TYPE_OBJECT_EDITOR, glObjectEditorClass))
+#define GL_IS_OBJECT_EDITOR(obj) \
+        (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GL_TYPE_OBJECT_EDITOR))
+#define GL_IS_OBJECT_EDITOR_CLASS(klass) \
+        (G_TYPE_CHECK_CLASS_TYPE ((klass), GL_TYPE_OBJECT_EDITOR))
+#define GL_OBJECT_EDITOR_GET_CLASS(obj) \
+        (G_TYPE_INSTANCE_GET_CLASS ((obj), GL_TYPE_OBJECT_EDITOR, glObjectEditorClass))
 
 
 typedef struct _glObjectEditor         glObjectEditor;
@@ -71,16 +77,18 @@ struct  _glObjectEditorClass
 {
        GtkVBoxClass             parent_class;
 
-       void (*changed) (glObjectEditor *editor, gpointer user_data);
+       void (*changed)      (glObjectEditor *editor, gpointer user_data);
+       void (*size_changed) (glObjectEditor *editor, gpointer user_data);
 };
 
 
 
 
-GtkType     gl_object_editor_get_type             (void) G_GNUC_CONST;
+GType       gl_object_editor_get_type             (void) G_GNUC_CONST;
 
 GtkWidget  *gl_object_editor_new                  (gchar               *image,
-                                                  gchar               *label,
+                                                  gchar               *title,
+                                                   glLabel             *label,
                                                   glObjectEditorOption first_option, ...);
 
 void        gl_object_editor_set_key_names        (glObjectEditor      *editor,
@@ -142,18 +150,20 @@ void        gl_object_editor_get_lsize            (glObjectEditor      *editor,
  * Fill Page
  */
 void        gl_object_editor_set_fill_color       (glObjectEditor      *editor,
-                                                  guint                color);
+                                                  gboolean             merge_flag,
+                                                  glColorNode         *color_node);
 
-guint       gl_object_editor_get_fill_color       (glObjectEditor      *editor);
+glColorNode* gl_object_editor_get_fill_color      (glObjectEditor      *editor);
 
 
 /*
  * Line/Outline Page
  */
 void        gl_object_editor_set_line_color       (glObjectEditor      *editor,
-                                                  guint                color);
+                                                  gboolean             merge_flag,
+                                                  glColorNode         *color_node);
 
-guint       gl_object_editor_get_line_color       (glObjectEditor      *editor);
+glColorNode* gl_object_editor_get_line_color      (glObjectEditor      *editor);
 
 void        gl_object_editor_set_line_width       (glObjectEditor      *editor,
                                                   gdouble              width);
@@ -185,9 +195,9 @@ void        gl_object_editor_set_font_size        (glObjectEditor      *editor,
 gdouble     gl_object_editor_get_font_size        (glObjectEditor      *editor);
 
 void        gl_object_editor_set_font_weight      (glObjectEditor      *editor,
-                                                  GnomeFontWeight      font_weight);
+                                                  PangoWeight          font_weight);
 
-GnomeFontWeight gl_object_editor_get_font_weight  (glObjectEditor      *editor);
+PangoWeight gl_object_editor_get_font_weight      (glObjectEditor      *editor);
 
 void        gl_object_editor_set_font_italic_flag (glObjectEditor      *editor,
                                                   gboolean             font_italic_flag);
@@ -195,19 +205,25 @@ void        gl_object_editor_set_font_italic_flag (glObjectEditor      *editor,
 gboolean    gl_object_editor_get_font_italic_flag (glObjectEditor      *editor);
 
 void        gl_object_editor_set_text_alignment   (glObjectEditor      *editor,
-                                                  GtkJustification     text_alignment);
+                                                  PangoAlignment       text_alignment);
 
-GtkJustification gl_object_editor_get_text_alignment (glObjectEditor      *editor);
+PangoAlignment gl_object_editor_get_text_alignment (glObjectEditor      *editor);
 
 void        gl_object_editor_set_text_line_spacing (glObjectEditor      *editor,
-                                                  gdouble              text_line_spacing);
+                                                  gdouble               text_line_spacing);
 
 gdouble     gl_object_editor_get_text_line_spacing (glObjectEditor      *editor);
 
-void        gl_object_editor_set_text_color       (glObjectEditor      *editor,
-                                                  guint                text_color);
+void        gl_object_editor_set_text_color       (glObjectEditor       *editor,
+                                                  gboolean              merge_flag,
+                                                  glColorNode          *text_color_node);
+
+glColorNode* gl_object_editor_get_text_color      (glObjectEditor      *editor);
 
-guint       gl_object_editor_get_text_color       (glObjectEditor      *editor);
+void        gl_object_editor_set_text_auto_shrink (glObjectEditor      *editor,
+                                                  gboolean             auto_shrink);
+
+gboolean    gl_object_editor_get_text_auto_shrink (glObjectEditor      *editor);
 
 
 /*
@@ -220,19 +236,22 @@ void        gl_object_editor_set_text_buffer      (glObjectEditor      *editor,
  * Barcode Page
  */
 void        gl_object_editor_set_bc_style         (glObjectEditor      *editor,
-                                                  glBarcodeStyle       style,
+                                                  gchar               *id,
                                                   gboolean             text_flag,
-                                                  gboolean             checksum_flag);
+                                                  gboolean             checksum_flag,
+                                                  guint                format_digits);
 
 void        gl_object_editor_get_bc_style         (glObjectEditor      *editor,
-                                                  glBarcodeStyle      *style,
+                                                  gchar              **id,
                                                   gboolean            *text_flag,
-                                                  gboolean            *checksum_flag);
+                                                  gboolean            *checksum_flag,
+                                                  guint               *format_digits);
 
 void        gl_object_editor_set_bc_color         (glObjectEditor      *editor,
-                                                  guint                text_color);
+                                                  gboolean             merge_flag,
+                                                  glColorNode         *color_node);
 
-guint       gl_object_editor_get_bc_color         (glObjectEditor      *editor);
+glColorNode* gl_object_editor_get_bc_color        (glObjectEditor      *editor);
 
 
 /*
@@ -245,8 +264,51 @@ void        gl_object_editor_set_data             (glObjectEditor      *editor,
 glTextNode *gl_object_editor_get_data             (glObjectEditor      *editor);
 
 
+/*
+ * Shadow Page
+ */
+void        gl_object_editor_set_shadow_state     (glObjectEditor      *editor,
+                                                  gboolean             state);
+
+void        gl_object_editor_set_shadow_offset    (glObjectEditor      *editor,
+                                                  gdouble              x,
+                                                  gdouble              y);
+
+void        gl_object_editor_set_shadow_color     (glObjectEditor      *editor,
+                                                  gboolean             merge_flag,
+                                                  glColorNode         *color_node);
+
+void        gl_object_editor_set_shadow_opacity   (glObjectEditor      *editor,
+                                                  gdouble              alpha);
+
+void        gl_object_editor_set_max_shadow_offset(glObjectEditor      *editor,
+                                                  gdouble              x_max,
+                                                  gdouble              y_max);
+
+
+gboolean    gl_object_editor_get_shadow_state     (glObjectEditor      *editor);
+
+void        gl_object_editor_get_shadow_offset    (glObjectEditor      *editor,
+                                                  gdouble             *x,
+                                                  gdouble             *y);
+
+glColorNode* gl_object_editor_get_shadow_color    (glObjectEditor      *editor);
+
+gdouble     gl_object_editor_get_shadow_opacity   (glObjectEditor      *editor);
+
 
 
 G_END_DECLS
 
 #endif
+
+
+
+/*
+ * Local Variables:       -- emacs
+ * mode: C                -- emacs
+ * c-basic-offset: 8      -- emacs
+ * tab-width: 8           -- emacs
+ * indent-tabs-mode: nil  -- emacs
+ * End:                   -- emacs
+ */