/*
- * $Id: rb_esmart_container.c 70 2004-08-16 15:43:51Z tilman $
+ * $Id: rb_esmart_container.c 217 2005-02-10 14:24:57Z tilman $
*
* Copyright (C) 2004 Tilman Sauerbeck (tilman at code-monkey de)
*
return Qnil;
}
+static VALUE c_alignment_get (VALUE self)
+{
+ GET_OBJ (self, RbEvasObject, e);
+
+ return INT2FIX (esmart_container_alignment_get (e->real));
+}
+
+static VALUE c_alignment_set (VALUE self, VALUE val)
+{
+ GET_OBJ (self, RbEvasObject, e);
+
+ Check_Type (val, T_FIXNUM);
+
+ esmart_container_alignment_set (e->real, FIX2INT (val));
+
+ return Qnil;
+}
+
+
static VALUE c_get_padding (VALUE self)
{
double l = 0, r = 0, t = 0, b = 0;
rb_define_method (c, "spacing=", c_spacing_set, 1);
rb_define_method (c, "fill_policy", c_fill_policy_get, 0);
rb_define_method (c, "fill_policy=", c_fill_policy_set, 1);
+ rb_define_method (c, "alignment", c_alignment_get, 0);
+ rb_define_method (c, "alignment=", c_alignment_set, 1);
rb_define_method (c, "get_padding", c_get_padding, 0);
rb_define_method (c, "set_padding", c_set_padding, 4);
rb_define_method (c, "append_element", c_append_element, 1);
INT2FIX (CONTAINER_FILL_POLICY_FILL_Y));
rb_define_const (c, "HOMOGENOUS",
INT2FIX (CONTAINER_FILL_POLICY_HOMOGENOUS));
+
+ rb_define_const (c, "CENTER",
+ INT2FIX (CONTAINER_ALIGN_CENTER));
+ rb_define_const (c, "LEFT",
+ INT2FIX (CONTAINER_ALIGN_LEFT));
+ rb_define_const (c, "RIGHT",
+ INT2FIX (CONTAINER_ALIGN_RIGHT));
+ rb_define_const (c, "BOTTOM",
+ INT2FIX (CONTAINER_ALIGN_BOTTOM));
+ rb_define_const (c, "TOP",
+ INT2FIX (CONTAINER_ALIGN_TOP));
}