(in-package :gtkglext)
+(register-object-type-implementation "GtkGLDrawingArea" gl-drawing-area "GtkDrawingArea" nil nil)
+
(defclass gl-drawing-area (drawing-area)
((on-expose :initarg :on-expose :initform nil :accessor gl-drawing-area-on-expose)
(on-init :initarg :on-init :initform nil :accessor gl-drawing-area-on-init)
:rgba-type)
(warn "set gl capability for ~A (with ~A) failed~%" widget *gl-config*)))
-(register-object-type-implementation "GtkGLDrawingArea" gl-drawing-area "GtkDrawingArea" nil nil)
-
(defmethod initialize-instance :after ((widget gl-drawing-area) &key &allow-other-keys)
(connect-signal widget "realize" #'gl-drawing-area-realize)
(connect-signal widget "unrealize" #'gl-drawing-area-unrealize)
; TODO: GtkTreeModelFilter
+(register-object-type-implementation "LispArrayListStore" array-list-store "GObject" ("GtkTreeModel") nil)
+
(defclass array-list-store (tree-model)
((items :initform (make-array 0 :adjustable t :fill-pointer t) :reader store-items)
(columns-getters :initform (make-array 0 :adjustable t :fill-pointer t) :reader store-getters)
(export 'array-list-store)
-(register-object-type-implementation "LispArrayListStore" array-list-store "GObject" ("GtkTreeModel") nil)
-
(defun store-items-count (store)
(length (store-items store)))
(item nil)
(children (make-array 0 :element-type 'tree-node :adjustable t :fill-pointer t)))
+(register-object-type-implementation "LispTreeStore" tree-lisp-store "GObject" ("GtkTreeModel") nil)
+
(defclass tree-lisp-store (tree-model)
((columns-getters :initform (make-array 0 :adjustable t :fill-pointer t) :reader tree-lisp-store-getters)
(columns-types :initform (make-array 0 :adjustable t :fill-pointer t) :reader tree-lisp-store-types)
(defmethod initialize-instance :after ((object tree-lisp-store) &key &allow-other-keys)
(setf (tree-node-tree (tree-lisp-store-root object)) object))
-(register-object-type-implementation "LispTreeStore" tree-lisp-store "GObject" ("GtkTreeModel") nil)
-
(defun map-subtree (node fn)
(funcall fn node)
(iter (for child in-vector (tree-node-children node))