Changeset 761


Ignore:
Timestamp:
Apr 7, 2004, 8:41:46 PM (21 years ago)
Author:
Gary Byers
Message:

Require "COCOA-PREFS". Doc string on defaults; handle
showPreferences: message.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/examples/cocoa-window.lisp

    r705 r761  
    2020(eval-when (:compile-toplevel :load-toplevel :execute)
    2121  (require "OBJC-SUPPORT")
    22   (require "COCOA-DEFAULTS"))
     22  (require "COCOA-DEFAULTS")
     23  (require "COCOA-PREFS"))
    2324
    2425(eval-when (:compile-toplevel :execute)
     
    4546                :load-nib-named mainnibname
    4647                :owner app)
    47           ;; Create an NSThread which does nothing but exit.
    48           ;; This'll help to convince the AppKit that we're
    49           ;; multitheaded.  (A lot of other things, including
    50           ;; the ObjC runtime, seem to have already noticed.)
    51           (send (@class "NSThread")
    52                 :detach-new-thread-selector (@selector "exit")
    53                 :to-target (@class "NSThread")
    54                 :with-object (%null-ptr))
    5548          app))))
    5649
     
    190183  (quit))
    191184
     185(define-objc-method ((:void :show-preferences sender) lisp-application)
     186  (declare (ignore sender))
     187  (send (send (find-class 'preferences-panel) 'shared-panel) 'show))
     188
    192189
    193190(defun nslog-condition (c)
     
    278275                                                 (toplevel)))))
    279276
    280 (def-cocoa-default *default-font-name* :string "Courier")
    281 (def-cocoa-default *default-font-size* :float 12.0e0)
     277(def-cocoa-default *default-font-name* :string "Courier" "Name of font to use in editor windows")
     278(def-cocoa-default *default-font-size* :float 12.0f0 "Size of font to use in editor windows, as a positive SINGLE-FLOAT")
    282279
    283280(defparameter *font-attribute-names*
     
    323320            (values font implemented-attributes))))))
    324321
    325 (def-cocoa-default *tab-width* :int 8)
     322(def-cocoa-default *tab-width* :int 8 "Width of editor tab stops, in characters" (integer 1 32))
    326323
    327324;;; Create a paragraph style, mostly so that we can set tabs reasonably.
     
    430427      (when title (send w :set-title (%make-nsstring title)))
    431428      w)))
     429
     430
     431
     432
Note: See TracChangeset for help on using the changeset viewer.