Changeset 12422


Ignore:
Timestamp:
Jul 17, 2009, 10:01:40 AM (10 years ago)
Author:
gb
Message:

command.lisp: define a "System Default Behavior" command.
interp.lisp: GET-SYSTEM-DEFAULT-BEHAVIOR-COMMAND returns the "System Default Behavior" command.
main.lisp: define a Hemlock variable that contains the name of the "System Default Behavior" command.
views.lisp: SYSTEM-DEFAULT-BEHAVIOR-P: returns T if Hemlock key event is bound to "System Default Behavior" command.
cocoa-editor.lisp: if Hemlock key event is bound to You Know What, pass the
NSEvent to the Cocoa text system.

Location:
trunk/source/cocoa-ide
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/cocoa-editor.lisp

    r12370 r12422  
    983983          ((not (eventqueue-abort-pending-p self))
    984984           (let ((hemlock-key (nsevent-to-key-event event quote-p)))
    985              (if hemlock-key
     985             (if (and hemlock-key
     986                      (not (hi::bound-to-system-default-behavior-p view hemlock-key)))
    986987               (progn
    987988                 (#/setHiddenUntilMouseMoves: ns:ns-cursor t)
  • trunk/source/cocoa-ide/hemlock/src/command.lisp

    r12324 r12422  
    4747
    4848
    49 
     49(defcommand "System Default Behavior" (p)
     50  "Pass the native key event to which this command is bound to the native
     51window system."
     52  "Pass the native key event to which this command is bound to the native
     53window system."
     54  (declare (ignore p))
     55  (editor-error "This command shouldn't be called."))
    5056
    5157
  • trunk/source/cocoa-ide/hemlock/src/interp.lisp

    r8428 r12422  
    412412  ;; Get the command used when no binding is present in current buffer.
    413413  (getstring (value hemlock::default-command-name) *command-names*))
     414
     415(defun get-system-default-behavior-command ()
     416  ;; Get the command used to invoke "System Default Behavior"
     417  (getstring (value hemlock::system-default-behavior-command-name) *command-names*))
  • trunk/source/cocoa-ide/hemlock/src/main.lisp

    r8428 r12422  
    155155     defined.  By default, this is \"Illegal\"."
    156156    :value "Illegal")
     157  (defhvar "System Default Behavior Command Name"
     158    "The name of the command to handle keys which should by handled by the
     159     native window system (not by Hemlock.)
     160     By default, this is \"System Default Behavior\"."
     161    :value "System Default Behavior")
    157162  )
    158163
  • trunk/source/cocoa-ide/hemlock/src/views.lisp

    r12315 r12422  
    208208             (invoke-command binding *last-prefix-argument*))
    209209           (invoke-command main-binding *last-prefix-argument*)))))))
     210
     211(defmethod bound-to-system-default-behavior-p ((view hemlock-view)
     212                                               key)
     213  (eq (get-command-binding-for-key view key)
     214      (hi::get-system-default-behavior-command)))
     215
    210216
    211217(defmethod update-echo-area-after-command ((view hemlock-view))
Note: See TracChangeset for help on using the changeset viewer.