+;;;; Combo Box
+
+(defmethod shared-initialize ((combo-box combo-box) names &key model content)
+ (unless model
+ (setf
+ (combo-box-model combo-box)
+ (make-instance 'list-store :column-types '(string)))
+ (unless (typep combo-box 'combo-box-entry)
+ (let ((cell (make-instance 'cell-renderer-text)))
+ (cell-layout-pack combo-box cell :expand t)
+ (cell-layout-add-attribute combo-box cell :text 0)))
+ (when content
+ (map 'nil #'(lambda (text)
+ (combo-box-append-text combo-box text))
+ content)))
+ (call-next-method))
+
+;; (defmethod shared-initialize :after ((combo-box combo-box) names &key active)
+;; (when active
+;; (signal-emit combo-box 'changed)))
+
+(defbinding combo-box-append-text () nil
+ (combo-box combo-box)
+ (text string))
+
+(defbinding combo-box-insert-text () nil
+ (combo-box combo-box)
+ (position int)
+ (text string))
+
+(defbinding combo-box-prepend-text () nil
+ (combo-box combo-box)
+ (text string))
+
+#+gtk2.6
+(defbinding combo-box-get-active-text () string
+ (combo-box combo-box))
+
+(defbinding combo-box-popup () nil
+ (combo-box combo-box))
+
+(defbinding combo-box-popdown () nil
+ (combo-box combo-box))
+