From 5e25fdda9734946792e8fcffda7589023664c761 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 29 Jul 2008 17:11:17 +0100 Subject: [PATCH] More work on glrepl window --- glrepl-tests.lisp | 39 ++++++++++++++++++++++++++++++++++----- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/glrepl-tests.lisp b/glrepl-tests.lisp index 35a2a14..f64ab8c 100755 --- a/glrepl-tests.lisp +++ b/glrepl-tests.lisp @@ -13,7 +13,20 @@ (top-line :initform 0 :accessor top-line-of) (cursor-line :initform 0 :accessor cursor-line-of) (cursor-x :initform 0 :accessor cursor-x-of) - (cursor-y :initform 0 :accesor cursor-y-of)) + (cursor-y :initform 0 :accesor cursor-y-of) + (marks :initform (make-array 0 :adjustable t :fill-pointer 0) :accessor marks-of) + (kills :iniform (make-array 0 :adjustable t :fill-pointer 0) :accessor kills-of)) + +(defclass glrepl-window-mark () + (line :initform 0 :initarg :line :accesor line-of) + (cursor :initform 0 :initarg :cursor :accessor cursor-of)) + +(defmethod initialize-instance :after ((self glrepl-window-mark) &rest args) + (destructuring-bind + (&key window &allow-other-keys) + args + (setf (line-of self) (cursor-line-of window)) + (setf (cursor-of self) (make-instance 'flexichain-cursor :chain (aref (chains-of window) (cursor-line-of window)))))) (defclass glrepl-window-line () (chain :initform (make-instance 'standard-flexichain) :accessor chain-of) @@ -40,16 +53,32 @@ (incf (top-line-of win)) (incf (cursor-y-of win))))) -(defmethod cursor-left (win glrepl-window)) +(defmethod cursor-column ((win glrepl-window)) + ;; return column position of cusror + ))) + +(defmethod cursor-left ((win glrepl-window)) + ) -(defmethod cursor-right (win glrepl-window)) +(defmethod cursor-right ((win glrepl-window)) + ) (defmethod add-char ((win glrepl-window) c)) -(defmethod del-char-left ((win glrepl-window))) +(defmethod del-char-left ((win glrepl-window)) + ) + +(defmethod del-char-right ((win glrepl-window)) + ) + +(defmethod set-mark ((win glrepl-window))) + +(defmethod yank ((win glrepl-window)) + ) -(defmethod del-char-right ((win glrepl-window))) +(defmethod paste ((win glrepl-window))) +(defmethod ) (defvar *esc-pressed* nil) (defparameter *glrepl-font* nil) -- 2.11.4.GIT