Changeset 632
- Timestamp:
- Mar 6, 2004, 11:55:15 PM (21 years ago)
- File:
-
- 1 edited
-
trunk/ccl/examples/cocoa-editor.lisp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/examples/cocoa-editor.lisp
r617 r632 685 685 686 686 687 (defclass echo-area-view (ns:ns-text-view) 688 () 689 (:metaclass ns:+ns-object)) 690 691 692 (defun make-echo-area-for-window (w) 693 (let* ((content-view (send w 'content-view))) 694 (slet ((bounds (send content-view 'bounds))) 695 (slet ((frame (ns-make-rect 5.0 5.0 (- (pref bounds :<NSR>ect.size.width) 24.0) 15.0))) 696 (let* ((echo-area (make-objc-instance 'echo-area-view :with-frame frame))) 697 (send echo-area :set-autoresizing-mask #$NSViewWidthSizable) 698 (send content-view :add-subview echo-area) 699 echo-area))))) 700 701 687 702 (defmethod hemlock-frame-command-info ((w ns:ns-window)) 688 703 nil) … … 690 705 691 706 (defclass hemlock-frame (ns:ns-window) 692 ((command-info :initform (hi::make-command-interpreter-info) 707 ((echo-area-view :foreign-type :id) 708 (command-info :initform (hi::make-command-interpreter-info) 693 709 :accessor hemlock-frame-command-info)) 694 710 (:metaclass ns:+ns-object)) … … 764 780 (get-cocoa-window-flag w :auto-display) 765 781 auto-display) 782 (setf (slot-value w 'echo-area-view) 783 (make-echo-area-for-window w)) 766 784 (when activate (activate-window w)) 767 785 (values w (add-pane-to-window w :reserve-below 20.0))))) … … 1185 1203 1186 1204 1205 (defun initialize-user-interface () 1206 (update-cocoa-defaults) 1207 (make-editor-style-map)) 1208 1209 (defun hi::scroll-window (textpane n) 1210 (let* ((textview (text-pane-text-view textpane))) 1211 (unless (%null-ptr-p textview) 1212 (if (> n 0) 1213 (send textview :page-down nil) 1214 (send textview :page-up nil))))) 1215 1216 1217 1187 1218 (provide "COCOA-EDITOR")
Note:
See TracChangeset
for help on using the changeset viewer.
