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
  
/* -*- C -*- */ 
require gtk24; 
 
class GTK2.FontButton; 
inherit GTK2.Button; 
 
//! Properties: 
//! string font-name 
//! int show-size 
//! int show-style 
//! string title 
//! int use-font 
//! int use-size 
 
signal font_set; 
 
void create(string|mapping(string:mixed)|void font_or_props) 
//! Create a new font picker widget.  If font is specified, it will be 
//! displayed in the font selection dialog. 
{ 
  pgtk2_verify_not_inited(); 
  pgtk2_verify_setup(); 
  if (args) { 
    if (TYPEOF(Pike_sp[-args]) == PIKE_T_STRING) { 
      const gchar *font; 
      GtkWidget *gf; 
      get_all_args(NULL,args,"%s",&font); 
      gf=gtk_font_button_new_with_font(font); 
      THIS->obj=G_OBJECT(gf); 
    } else { 
      INIT_WITH_PROPS(GTK_TYPE_FONT_BUTTON); 
    } 
    pgtk2_pop_n_elems(args); 
  } else { 
    GtkWidget *gf; 
    gf=gtk_font_button_new(); 
    THIS->obj=G_OBJECT(gf); 
  } 
  pgtk2__init_this_object(); 
} 
 
int set_font_name(string font); 
//! Sets or updates the currently-displayed font. 
 
string get_font_name(); 
//! Retrieves the name of the currently selected font. 
 
void set_show_style(int setting); 
//! If setting is true, the font style will be displayed along with the name 
//! of the selected font. 
 
int get_show_style(); 
//! Returns whether the name of the font style will be shown in the label. 
 
void set_show_size(int setting); 
//! If setting is true, the font size will be displayed along with the name of 
//! the selected of the selected font. 
 
int get_show_size(); 
//! Returns whether the font size will be shown in the label. 
 
void set_use_font(int setting); 
//! If setting is true, the font name will be written using the selected font. 
 
int get_use_font(); 
//! Returns whether the selected font is used in the label. 
 
void set_use_size(int setting); 
//! If setting is true, the font name will be written using the selected size. 
 
int get_use_size(); 
//! Returns whether the selected size is used in the label. 
 
void set_title(string title); 
//! Sets the title for the font selection dialog. 
 
string get_title(); 
//! Retrieves the title of the font selection dialog. 
endrequire;