1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
|
/* -*- c -*- */
PROGRAM(container)
// The basic container class.
SIGNAL("add", "Called when a new object is added to the container. (used internally)");
SIGNAL("remove", "Called when a object is removed from the container (used internally)");
SIGNAL("need_resize", "Called when the container needs resizing (used internally)");
SIGNAL("focus", "Called when the container gets focus (used internally)");
INHERIT(widget);
SIMPLE_INT_FUNCTION(set_border_width);
NAME_ARGS(external_border_width);
// Set the border width. The border width is the size of the
// padding around the container.
// Calling this function might result in a resize of the container.
#ifndef gtk_container_border_width
# define gtk_container_border_width gtk_container_set_border_width
#endif
SIMPLE_INT_FUNCTION(border_width);
// Compatibility alias for set_border_width.
SIMPLE_WIDGET_FUNCTION(add);
NAME_ARGS(widget);
// Add a subwidget to the container. Don't forget to call show() in
// the subwidget. Some (even most) containers can only contain one child.
// Calling this function might result in a resize of the container.
SIMPLE_WIDGET_FUNCTION(remove);
NAME_ARGS(widget);
// Remove a child from the container. The argument is the child to remove.
// Calling this function might result in a resize of the container.
/* SIMPLE_FUNCTION(disable_resize); */
/* // Stop all automatic resize actions */
/* SIMPLE_FUNCTION(enable_resize); */
/* // Enable all automatic resize actions */
SIMPLE_INT_FUNCTION(set_resize_mode);
// One of CONST(GTK_RESIZE)
/* SIMPLE_FUNCTION(block_resize); */
/* // (temporarily) disable all automatic resize actions */
/* SIMPLE_FUNCTION(unblock_resize); */
/* // reenable all automatic resize actions. */
FUNCTION(children, "function(void:array(object))");
RETURNS(array(GTK.Widget));
// This function returns all children of the container
// as an array.
{
GList *g;
int n = 0;
pop_n_elems(args);
g = gtk_container_children( GTK_CONTAINER( THIS->obj ) );
while(g)
{
push_gtkobjectclass( GTK_OBJECT( g->data ), pgtk_widget_program );
n++;
g = g->next;
}
f_aggregate(n);
}
SIMPLE_WIDGET_FUNCTION(set_focus_child);
SIMPLE_ADJUSTMENT_FUNCTION(set_focus_vadjustment);
SIMPLE_ADJUSTMENT_FUNCTION(set_focus_hadjustment);
SIMPLE_INT_FUNCTION(focus);
SIMPLE_FUNCTION(register_toplevel);
SIMPLE_FUNCTION(unregister_toplevel);
|