diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-06-13 22:37:28 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-06-13 22:37:28 +0800 |
commit | c9bdd525e41cd0e2392da161dde2cf6aa72d8b4d (patch) | |
tree | f20b908b57e9c2a60dd24d3dab56e384458ed53a /widgets/misc/e-printable.c | |
parent | 799153001fa43ad0991c260c461b7bbc266daee9 (diff) | |
download | gsoc2013-evolution-c9bdd525e41cd0e2392da161dde2cf6aa72d8b4d.tar gsoc2013-evolution-c9bdd525e41cd0e2392da161dde2cf6aa72d8b4d.tar.gz gsoc2013-evolution-c9bdd525e41cd0e2392da161dde2cf6aa72d8b4d.tar.bz2 gsoc2013-evolution-c9bdd525e41cd0e2392da161dde2cf6aa72d8b4d.tar.lz gsoc2013-evolution-c9bdd525e41cd0e2392da161dde2cf6aa72d8b4d.tar.xz gsoc2013-evolution-c9bdd525e41cd0e2392da161dde2cf6aa72d8b4d.tar.zst gsoc2013-evolution-c9bdd525e41cd0e2392da161dde2cf6aa72d8b4d.zip |
Changed the needed e_marshal functions.
2000-06-13 Christopher James Lahey <clahey@helixcode.com>
* e-util.c, e-util.h: Changed the needed e_marshal functions.
* e-printable.c, e-printable.h: Added a quantize parameter to
e_printable_height. Also, added a e_printable_will_fit function.
svn path=/trunk/; revision=3551
Diffstat (limited to 'widgets/misc/e-printable.c')
-rw-r--r-- | widgets/misc/e-printable.c | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/widgets/misc/e-printable.c b/widgets/misc/e-printable.c index 27170fef84..ed982469b8 100644 --- a/widgets/misc/e-printable.c +++ b/widgets/misc/e-printable.c @@ -24,6 +24,7 @@ enum { DATA_LEFT, RESET, HEIGHT, + WILL_FIT, LAST_SIGNAL }; @@ -64,8 +65,16 @@ e_printable_class_init (GtkObjectClass *object_class) GTK_RUN_LAST, object_class->type, GTK_SIGNAL_OFFSET (EPrintableClass, height), - e_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE, - GTK_TYPE_DOUBLE, 3, GTK_TYPE_OBJECT, GTK_TYPE_DOUBLE, GTK_TYPE_DOUBLE); + e_marshal_DOUBLE__OBJECT_DOUBLE_DOUBLE_BOOL, + GTK_TYPE_DOUBLE, 4, GTK_TYPE_OBJECT, GTK_TYPE_DOUBLE, GTK_TYPE_DOUBLE, GTK_TYPE_BOOL); + + e_printable_signals [WILL_FIT] = + gtk_signal_new ("will_fit", + GTK_RUN_LAST, + object_class->type, + GTK_SIGNAL_OFFSET (EPrintableClass, will_fit), + e_marshal_BOOL__OBJECT_DOUBLE_DOUBLE_BOOL, + GTK_TYPE_BOOL, 4, GTK_TYPE_OBJECT, GTK_TYPE_DOUBLE, GTK_TYPE_DOUBLE, GTK_TYPE_BOOL); gtk_object_class_add_signals (object_class, e_printable_signals, LAST_SIGNAL); @@ -73,6 +82,7 @@ e_printable_class_init (GtkObjectClass *object_class) klass->data_left = NULL; klass->reset = NULL; klass->height = NULL; + klass->will_fit = NULL; } @@ -154,7 +164,8 @@ gdouble e_printable_height (EPrintable *e_printable, GnomePrintContext *context, gdouble width, - gdouble max_height) + gdouble max_height, + gboolean quantized) { gdouble ret_val; @@ -166,6 +177,30 @@ e_printable_height (EPrintable *e_printable, context, width, max_height, + quantized, + &ret_val); + + return ret_val; +} + +gboolean +e_printable_will_fit (EPrintable *e_printable, + GnomePrintContext *context, + gdouble width, + gdouble max_height, + gboolean quantized) +{ + gboolean ret_val; + + g_return_val_if_fail (e_printable != NULL, -1); + g_return_val_if_fail (E_IS_PRINTABLE (e_printable), -1); + + gtk_signal_emit (GTK_OBJECT (e_printable), + e_printable_signals [WILL_FIT], + context, + width, + max_height, + quantized, &ret_val); return ret_val; |