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
  
/* -*- C -*- */ 
not gtk24; 
 
class GTK2.Combo; 
inherit GTK2.Hbox; 
 
//! Thee combo box is another fairly simple widget that is really just 
//! a collection of other widgets. From the user's point of view, the 
//! widget consists of a text entry box and a pull down menu from which 
//! the user can select one of a set of predefined 
//! entries. Alternatively, the user can type a different option 
//! directly into the text box. 
//! <p> 
//! The combo box has two principal parts that you as the programmer 
//! really care about: The W(entry) and the W(list). 
//! </p> 
//! DEPRECATED!!! 
//! <p> 
//! IMG: GTK2.Combo() 
 
//! Properties: 
//! int allow-empty 
//! int case-sensitive 
//! int enable-arrow-keys 
//! int enable-arrows-always 
//! int value-in-list 
 
void create(); 
//! Create a new combo box 
 
void set_value_in_list( int value_must_be_in_list, int ok_if_empty ); 
//! If value_must_be_in_list is true, the user will not be able to 
//! enter any value that is not in the list. If ok_if_empty is true, 
//! empty values are possible as well as the values in the list. 
 
void set_use_arrows( int use_arrows ); 
//! set_use_arrows() lets the user change the value in the entry using 
//! the up/down arrow keys. This doesn't bring up the list, but rather 
//! replaces the current text in the entry with the next list entry (up 
//! or down, as your key choice indicates). It does this by searching 
//! in the list for the item corresponding to the current value in the 
//! entry and selecting the previous/next item accordingly. Usually in 
//! an entry the arrow keys are used to change focus (you can do that 
//! anyway using TAB). Note that when the current item is the last of 
//! the list and you press arrow-down it changes the focus (the same 
//! applies with the first item and arrow-up). 
 
void set_use_arrows_always( int always_arrows ); 
//! set_use_arrows_always() allows the use the the up/down arrow keys 
//! to cycle through the choices in the dropdown list, just as with 
//! set_use_arrows, but it wraps around the values in the list, 
//! completely disabling the use of the up and down arrow keys for 
//! changing focus. 
 
void set_case_sensitive( int sensitivep ); 
//! set_case_sensitive() toggles whether or not GTK searches for 
//! entries in a case sensitive manner. This is used when the Combo 
//! widget is asked to find a value from the list using the current 
//! entry in the text box. This completion can be performed in either a 
//! case sensitive or insensitive manner, depending upon the use of 
//! this function. The Combo widget can also simply complete the 
//! current entry if the user presses the key combination MOD-1 and 
//! "Tab". MOD-1 is often mapped to the "Alt" key, by the xmodmap 
//! utility. Note, however that some window managers also use this key 
//! combination, which will override its use within GTK. 
 
void set_item_string( GTK2.Item item, string text ); 
//! The item is one of the ones in the list subwidget. 
 
void set_popdown_strings(array(string) strings) 
//! Set the values in the popdown list. 
{ 
  GList *s = NULL; 
  struct array *a; 
  int i; 
  get_all_args(NULL, args, "%a", &a); 
  for(i=0; i<a->size; i++) 
    if(TYPEOF(a->item[i]) == PIKE_T_STRING) 
      s = g_list_append( s, a->item[i].u.string->str ); 
  if(!s) 
    Pike_error("No items in list!\n"); 
  gtk_combo_set_popdown_strings( GTK_COMBO( THIS->obj ), s ); 
  g_list_free( s ); 
 
  RETURN_THIS(); 
} 
 
void disable_activate(); 
//! This will disable the 'activate' signal for the entry widget in the 
//! combo box. 
 
member GTK2.Entry entry; 
//! The entry widget 
/* member GTK2.List list; 
 //! The list widget, contains the list of choices as W(Label) widgets. 
*/ 
 
 
endnot;