File: gtkbuttonbox.pre

package info (click to toggle)
pigtk 1.1.3-3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,248 kB
  • ctags: 104
  • sloc: ansic: 1,087; sh: 152; makefile: 121
file content (42 lines) | stat: -rw-r--r-- 1,199 bytes parent folder | download
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
/* -*- c -*- */

PROGRAM(button_box);
// More or less equivalent to a normal box, but you can set a few
// layout schemes that are not available for normal boxes.
// See the hbox and vbox documentation for examples.
INHERIT(box);
SIMPLE_INT_FUNCTION(set_spacing);
NAME_ARGS(spacing);
// in pixels
SIMPLE_INT_FUNCTION(set_layout);
NAME_ARGS(layout);
// layout is one of CONST(GTK_BUTTONBOX)
COMPLEX_FUNCTION(set_child_size, int, int);
NAME_ARGS(child_number, child_size);
COMPLEX_FUNCTION(set_child_ipadding, int, int);
NAME_ARGS(child_number, child_padding);

int COMPLEX_FUNCTION(get_spacing);
int COMPLEX_FUNCTION(get_layout);
FUNCTION(get_child_size, "function(void:mapping)");
{
  int x, y;
  pop_n_elems(args);
  gtk_button_box_get_child_size( GTK_BUTTON_BOX( THIS->obj ), &x, &y );
  push_constant_text( "x" );
  push_int( x );
  push_constant_text( "y" );
  push_int( y );
  f_aggregate_mapping( 4 );
}
FUNCTION(get_child_ipadding, "function(void:mapping)");
{
  int x, y;
  pop_n_elems(args);
  gtk_button_box_get_child_ipadding( GTK_BUTTON_BOX( THIS->obj ), &x, &y );
  push_constant_text( "x" );
  push_int( x );
  push_constant_text( "y" );
  push_int( y );
  f_aggregate_mapping( 4 );
}