File: gtknotebook.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 (114 lines) | stat: -rw-r--r-- 5,078 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
PROGRAM(notebook);
// The NoteBook Widget is a collection of 'pages' that overlap each
// other, each page contains different information. This widget has
// become more common lately in GUI programming, and it is a good way
// to show blocks similar information that warrant separation in their
// display.
//
// IMG: GTK.Notebook( )->set_tab_pos( GTK.POS_LEFT )->append_page( GTK.Label("Page 1\nContents"), GTK.Label("Page 1"))->append_page( GTK.Label(""), GTK.Label("Page 2"))->append_page(GTK.Label("Page 3 contents\nare here!"), GTK.Label("Page 3"))
// IMG: GTK.Notebook( )->set_tab_pos( GTK.POS_TOP )->append_page( GTK.Label("Page 1\nContents"), GTK.Label("Page 1"))->append_page( GTK.Label(""), GTK.Label("Page 2"))->append_page(GTK.Label("Page 3 contents\nare here!"), GTK.Label("Page 3"))
// IMG: GTK.Notebook( )->set_tab_pos( GTK.POS_RIGHT )->append_page( GTK.Label("Page 1\nContents"), GTK.Label("Page 1"))->append_page( GTK.Label(""), GTK.Label("Page 2"))->append_page(GTK.Label("Page 3 contents\nare here!"), GTK.Label("Page 3"))->next_page()->next_page()
SIGNAL("switch_page", "Called when a different page is selected");
INHERIT(container);
COMPLEX_FUNCTION(create);
COMPLEX_FUNCTION(append_page, widget, widget);
NAME_ARGS(contents,label);
// Add a new 'page' to the notebook. The first argument is the contents of
// the page, the second argument is the label.
COMPLEX_FUNCTION(append_page_menu, widget, widget, widget);
NAME_ARGS(contents,label,mennu);
// Add a new 'page' to the notebook. The first argument is the
// contents of the page, the second argument is the label, the third
// argument is a menu widget.
COMPLEX_FUNCTION(prepend_page, widget, widget);
NAME_ARGS(contents,label);
// Add a page at the end of the list of pages. The first argument is
// the contents of the page, the second argument is the label.
COMPLEX_FUNCTION(prepend_page_menu, widget, widget, widget);
NAME_ARGS(contents,label,menu);
// Add a new 'page' at the end of the list of pages. The first
// argument is the contents of the page, the second argument is the
// label, the third argument is a menu widget.
COMPLEX_FUNCTION(insert_page, widget, widget, int);
NAME_ARGS(contents,label,pos);
COMPLEX_FUNCTION(insert_page_menu, widget, widget, widget, int);
NAME_ARGS(contents,label,menu,pos);
// Insert a page at the specified location, arguments as for
// append_page and append_page_menu, but an aditional integer
// specifies the location.
COMPLEX_FUNCTION(remove_page, int);
NAME_ARGS(pos);
// Remove a page.
int COMPLEX_FUNCTION(get_current_page);
widget COMPLEX_FUNCTION(get_nth_page, int);
int COMPLEX_FUNCTION(page_num, widget);
COMPLEX_FUNCTION(set_page, int);
NAME_ARGS(pos);
// Go to the specified page
SIMPLE_FUNCTION(next_page);
// Go to the next page
SIMPLE_FUNCTION(prev_page);
// Go to the previous page
COMPLEX_FUNCTION(set_tab_pos, int);
NAME_ARGS(pos);
// One of CONST(GTK_POS)
COMPLEX_FUNCTION(set_show_tabs, int);
NAME_ARGS(showtabsp);
// If supplied with a true value, the tabs will be shown. Otherwise
// they will not be shown. The user will not be able to select the
// pages without them, but you can add 'next' and 'previous' buttons
// to create a wizard-line interface.
COMPLEX_FUNCTION(set_homogeneous_tabs, int);
NAME_ARGS(homogeneousp);
COMPLEX_FUNCTION(set_show_border, int);
NAME_ARGS(showborderp);
// If true, show the borders around the contents and tabs.
COMPLEX_FUNCTION(set_scrollable, int);
NAME_ARGS(scrollablep);
// If true, add scrollbars if nessesary.
COMPLEX_FUNCTION(set_tab_border, int);
NAME_ARGS(border_width);
// In pixels. 
COMPLEX_FUNCTION(set_tab_hborder, int);
NAME_ARGS(border_width);
// In pixels. 
COMPLEX_FUNCTION(set_tab_vborder, int);
NAME_ARGS(border_width);
// In pixels. 
SIMPLE_FUNCTION(popup_enable);
// Enable the popup menu (set with insert_page_menu)
SIMPLE_FUNCTION(popup_disable);
// Disable the popup menu (set with insert_page_menu)

widget COMPLEX_FUNCTION(get_tab_label, widget);
COMPLEX_FUNCTION(set_tab_label, widget, widget);
COMPLEX_FUNCTION(set_tab_label_text, widget, string);
widget COMPLEX_FUNCTION(get_menu_label, widget);
COMPLEX_FUNCTION(set_menu_label, widget, widget);
COMPLEX_FUNCTION(set_menu_label_text, widget, string);

COMPLEX_FUNCTION(set_tab_label_packing, widget, int,int,int);
NAME_ARGS(child,expand,fill,type);
FUNCTION(query_tab_label_packing, "function(object:mapping)");
{
  struct object *o;
  gboolean expand=0, fill=0;
  GtkPackType pack_type=0;
  get_all_args( "query_tab_label_packing", args, "%o", &o );
  gtk_notebook_query_tab_label_packing( GTK_NOTEBOOK( THIS->obj ), 
                                        GTK_WIDGET( get_gtkobject( o ) ),
                                        &expand,
                                        &fill,
                                        &pack_type );
  pop_n_elems(args);
  push_text( "expand" );
  push_int( expand );
  push_text( "fill" );
  push_int( fill );
  push_text( "pack_type" );
  push_int( pack_type );
  f_aggregate_mapping( 6 );
}

COMPLEX_FUNCTION(reorder_child, widget, int);
NAME_ARGS(child, new_position);