Changeset 15345


Ignore:
Timestamp:
Apr 27, 2012, 9:00:32 PM (7 years ago)
Author:
rme
Message:

Introduce new ide-window and ide-view classes and use them for now.
This avoids adding new behavior to the NSWindow class, which
other code typically doesn't expect.

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

Legend:

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

    r15325 r15345  
    21852185      echo-area)))
    21862186               
    2187 (defclass hemlock-frame (ns:ns-window)
     2187(defclass hemlock-frame (ide-window)
    21882188    ((echo-area-view :foreign-type :id)
    21892189     (pane :foreign-type :id)
  • trunk/source/cocoa-ide/cocoa-window.lisp

    r15028 r15345  
    346346                        #@"") ))
    347347
    348 (defmethod allocate-instance ((class ns:+ns-window)
     348(defclass ide-window (ns:ns-window)
     349  ()
     350  (:metaclass ns:+ns-object))
     351
     352(defmethod allocate-instance ((class +ide-window)
    349353                              &rest initargs
    350354                              &key
     
    387391  (apply #'call-next-method class initargs))
    388392
    389 (defmethod initialize-instance :after ((w ns:ns-window)
     393(defmethod initialize-instance :after ((w ide-window)
    390394                                       &key
    391395                                       (title nil)
     
    419423    (activate-window w)))
    420424
    421 
    422 (defmethod allocate-instance ((class ns:+ns-view)
     425(defclass ide-view (ns:ns-view)
     426  ()
     427  (:metaclass ns:+ns-object))
     428
     429(defmethod allocate-instance ((class +ide-view)
    423430                              &rest initargs
    424431                              &key
     
    436443
    437444
    438 (defmethod initialize-instance :after ((view ns:ns-view)
     445(defmethod initialize-instance :after ((view ide-view)
    439446                                       &key
    440447                                       (horizontally-resizable nil hrp)
     
    482489
    483490(defun new-cocoa-window (&key
    484                          (class (find-class 'ns:ns-window))
     491                         (class (find-class 'ide-window))
    485492                         (title nil)
    486493                         (x 200.0)
Note: See TracChangeset for help on using the changeset viewer.