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
  
/* -*- C -*- */ 
class GTK2.Frame; 
inherit GTK2.Bin; 
 
//! The frame widget is a Bin that surrounds its child with a 
//! decorative frame and an optional label. If present, the label is 
//! drawn in a gap in the top side of the frame. The position of the 
//! label can be controlled with set_label_align(). 
//! <p> 
//! Used to visually group objects. 
//! </p><p> 
//! IMG: GTK2.Frame("Title")->add(GTK2.Label("Contents")) 
//! IMG: GTK2.Frame()->add(GTK2.Label("Contents")) 
//! IMG: GTK2.Frame()->add(GTK2.Label("Contents"))->set_shadow_type(GTK2.SHADOW_IN) 
//! </p> 
 
//! Properties: 
//! string label 
//! GTK2.Widget label-widget 
//! float label-xalign 
//! float label-yalign 
//! int shadow 
//! int shadow-type 
 
void create(string|mapping|void label_or_props) 
//! Create a new W(Frame) widget. 
{ 
  pgtk2_verify_not_inited(); 
  pgtk2_verify_setup(); 
  if (args) { 
    if (TYPEOF(Pike_sp[-args]) == PIKE_T_STRING) { 
      struct pike_string *t; 
      GtkWidget *gf; 
      get_all_args("create",args,"%T",&t); 
      if (t) { 
        ref_push_string(t); 
        f_string_to_utf8(1); 
        gf=gtk_frame_new((char *)STR0(Pike_sp[-1].u.string)); 
        pop_stack(); 
      } else 
        gf=gtk_frame_new(NULL); 
      THIS->obj=G_OBJECT(gf); 
    } else { 
      INIT_WITH_PROPS(GTK_TYPE_FRAME); 
    } 
    pgtk2_pop_n_elems(args); 
  } else { 
    GtkWidget *gf; 
    gf=gtk_frame_new(NULL); 
    THIS->obj=G_OBJECT(gf); 
  } 
  pgtk2__init_this_object(); 
} 
 
 
void set_label(?string label_text); 
//! Set the text of the label. 
 
void set_label_widget(GTK2.Widget label); 
//! Sets the label widget for the frame.  This is the widget that will appear 
//! embedded in the top edge of the frame as a title. 
 
void set_label_align(float xalign, float yalign); 
//! Arguments are xalignment and yalignment. 
//! 0.0 is left or topmost, 1.0 is right or bottommost.<br /> 
//! The default value for a newly created Frame is 0.0. 
 
void set_shadow_type(int shadow_type); 
//! Set the shadow type for the Frame widget. The type is one of 
//! CONST(GTK_SHADOW) 
 
string get_label(); 
//! Return the text in the label widget. 
 
array get_label_align() 
//! Retrieves the x and y alignment of the label. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  { 
    gfloat x,y; 
    gtk_frame_get_label_align(GTK_FRAME(THIS->obj),&x,&y); 
    push_float(x); 
    push_float(y); 
    f_aggregate(2); 
  } 
} 
 
+GTK2.Widget get_label_widget(); 
//! Retrieves the label widget. 
 
int get_shadow_type(); 
//! Return the shadow type.