/[gtk-cffi]/gtk-cffi/gtk/combo-box.lisp
ViewVC logotype

Contents of /gtk-cffi/gtk/combo-box.lisp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations)
Mon Dec 24 16:32:05 2012 UTC (15 months, 3 weeks ago) by rklochkov
Branch: MAIN
CVS Tags: HEAD
Changes since 1.6: +2 -8 lines
Reloading after CVS was broken
1 (in-package :gtk-cffi)
2
3 (defclass combo-box (bin cell-layout)
4 ())
5
6 (defcfun gtk-combo-box-new :pointer)
7 (defcfun gtk-combo-box-new-with-entry :pointer)
8 (defcfun gtk-combo-box-new-with-model :pointer (model pobject))
9 (defcfun gtk-combo-box-new-with-model-and-entry :pointer (model pobject))
10 (defcfun gtk-combo-box-new-with-area :pointer (area pobject))
11 (defcfun gtk-combo-box-new-with-area-and-entry :pointer (area pobject))
12
13 (defmethod gconstructor ((combo-box combo-box)
14 &key model area entry &allow-other-keys)
15 (initialize combo-box '(model area entry))
16 (cond
17 (model
18 (if entry
19 (gtk-combo-box-new-with-model-and-entry model)
20 (gtk-combo-box-new-with-model model)))
21 (area
22 (if entry
23 (gtk-combo-box-new-with-area-and-entry area)
24 (gtk-combo-box-new-with-area area)))
25 (t
26 (if entry
27 (gtk-combo-box-new-with-entry)
28 (gtk-combo-box-new)))))
29
30 (defslots combo-box
31 wrap-width :int
32 row-span-column :int
33 column-span-column :int
34 active :int
35 id-column :int
36 add-tearoffs :boolean
37 title :string
38 focus-on-click :boolean
39 button-sensitivity sensitivity-type
40 entry-text-column :int
41 model pobject
42 popup-fixed-width :boolean)
43
44 (deffuns combo-box
45 (:get active-id :string)
46 (popup-for-device :void (device pobject))
47 (popup :void)
48 (popdown :void)
49 (:get row-separator-func :pointer)
50 (:get has-entry :boolean))
51
52
53 (defcallback cb-row-separator-func
54 :boolean ((model pobject) (iter pobject) (data pdata))
55 (funcall data model iter))
56
57 (defcfun gtk-combo-box-set-row-separator-func :void
58 (combo-box pobject) (func pfunction) (data pdata) (notify pfunction))
59
60
61 (defgeneric (setf row-separator-func) (func combo-box &key data destroy-notify)
62 (:method (func (combo-box combo-box) &key data destroy-notify)
63 (set-callback combo-box gtk-combo-box-set-row-separator-func
64 cb-row-separator-func func data destroy-notify)))
65
66
67
68 (defcfun gtk-combo-box-set-active-id :boolean
69 (combo-box pobject) (active-id :string))
70 (defgeneric (setf active-id) (active-id combo-box)
71 (:method (active-id (combo-box combo-box))
72 (values active-id
73 (gtk-combo-box-set-active-id combo-box active-id))))
74 (save-setter combo-box active-id)
75
76 (defcfun gtk-combo-box-set-active-iter
77 :void (combo-box pobject) (iter (struct tree-iter :free-to-foreign nil)))
78 (defcfun gtk-combo-box-get-active-iter
79 :boolean (combo-box pobject) (iter (struct tree-iter :out t)))
80
81 (defgeneric (setf active-iter) (active-iter combo-box)
82 (:method (active-iter (combo-box combo-box))
83 (gtk-combo-box-set-active-iter combo-box active-iter)
84 active-iter))
85 (save-setter combo-box active-iter)
86
87 (defgeneric active-iter (combo-box)
88 (:method ((combo-box combo-box))
89 (let ((res (make-instance 'tree-iter)))
90 (values res (gtk-combo-box-get-active-iter combo-box res)))))
91
92 (init-slots combo-box)
93
94
95
96
97
98
99

  ViewVC Help
Powered by ViewVC 1.1.5