cocoa toolbar button and some unimplemented clean-up
This commit is contained in:
parent
ece405106b
commit
7e8a08cdd8
|
@ -21,9 +21,11 @@
|
|||
;; ----------------------------------------
|
||||
|
||||
(import-class NSWindow NSGraphicsContext NSMenu NSPanel
|
||||
NSApplication NSAutoreleasePool NSScreen)
|
||||
NSApplication NSAutoreleasePool NSScreen
|
||||
NSToolbar)
|
||||
|
||||
(define NSWindowCloseButton 0)
|
||||
(define NSWindowToolbarButton 3)
|
||||
|
||||
(define front #f)
|
||||
|
||||
|
@ -81,7 +83,14 @@
|
|||
(send empty-mb install)
|
||||
(send wx notify-responder #f)
|
||||
(queue-window-event wx (lambda ()
|
||||
(send wx on-activate #f))))))])
|
||||
(send wx on-activate #f))))))]
|
||||
[-a _void (toggleToolbarShown: [_id sender])
|
||||
(when wxb
|
||||
(let ([wx (->wx wxb)])
|
||||
(when wx
|
||||
(queue-window-event wx
|
||||
(lambda () (send wx on-toolbar-click))))))
|
||||
(void)])
|
||||
|
||||
(define-objc-class MyWindow NSWindow
|
||||
#:mixins (FocusResponder KeyMouseResponder MyWindowMethods)
|
||||
|
@ -156,6 +165,12 @@
|
|||
(define cocoa (get-cocoa))
|
||||
(tellv cocoa setDelegate: cocoa)
|
||||
|
||||
(when (memq 'toolbar-button style)
|
||||
(atomically
|
||||
(let ([tb (tell (tell NSToolbar alloc) initWithIdentifier: #:type _NSString "Ok")])
|
||||
(tellv cocoa setToolbar: tb)
|
||||
(tellv tb setVisible: #:type _BOOL #f))))
|
||||
|
||||
(move -11111 (if (= y -11111) 0 y))
|
||||
|
||||
(tellv cocoa setAcceptsMouseMovedEvents: #:type _BOOL #t)
|
||||
|
@ -459,7 +474,7 @@
|
|||
|
||||
(define/public (on-menu-click) (void))
|
||||
|
||||
(def/public-unimplemented on-toolbar-click)
|
||||
(define/public (on-toolbar-click) (void))
|
||||
(def/public-unimplemented on-menu-command)
|
||||
(def/public-unimplemented on-mdi-activate)
|
||||
(def/public-unimplemented on-close)
|
||||
|
|
|
@ -119,7 +119,6 @@
|
|||
(defclass menu-bar% object%
|
||||
(define menus null)
|
||||
|
||||
(def/public-unimplemented number)
|
||||
(define/public (enable-top pos on?)
|
||||
(set-box! (cddr (list-ref menus pos)) on?)
|
||||
(when (eq? current-mb this)
|
||||
|
|
|
@ -138,9 +138,3 @@
|
|||
(free-immobile-cell cell) ;; FIXME : don't leak
|
||||
(gtk_widget_hide dlg-gtk)
|
||||
(unbox response-box)))
|
||||
|
||||
(define (id-to-menu-item i) i)
|
||||
(define-unimplemented get-the-x-selection)
|
||||
(define-unimplemented get-the-clipboard)
|
||||
(define-unimplemented show-print-setup)
|
||||
(define (can-show-print-setup?) #f)
|
||||
|
|
|
@ -371,10 +371,6 @@
|
|||
(set! is-modified? (and mod? #t))
|
||||
(set-title saved-title)))
|
||||
|
||||
(define/public (create-status-line) (void))
|
||||
(define/public (set-status-text s) (void))
|
||||
(def/public-unimplemented status-line-exists?)
|
||||
|
||||
(define waiting-cursor? #f)
|
||||
(define/public (set-wait-cursor-mode on?)
|
||||
(set! waiting-cursor? on?)
|
||||
|
|
|
@ -114,7 +114,6 @@
|
|||
(gtk_label_set_text_with_mnemonic (gtk_bin_get_child item-gtk)
|
||||
(fixup-mneumonic str)))))
|
||||
|
||||
(def/public-unimplemented number)
|
||||
(def/public-unimplemented enable-top)
|
||||
|
||||
(define/public (delete which pos)
|
||||
|
|
|
@ -16,12 +16,9 @@
|
|||
(def/public-unimplemented designate-root-frame)
|
||||
(def/public-unimplemented system-menu)
|
||||
(def/public-unimplemented set-modified)
|
||||
(def/public-unimplemented create-status-line)
|
||||
(def/public-unimplemented is-maximized?)
|
||||
(def/public-unimplemented maximize)
|
||||
(def/public-unimplemented status-line-exists?)
|
||||
(def/public-unimplemented iconized?)
|
||||
(def/public-unimplemented set-status-text)
|
||||
(def/public-unimplemented get-menu-bar)
|
||||
(def/public-unimplemented set-menu-bar)
|
||||
(def/public-unimplemented set-icon)
|
||||
|
|
Loading…
Reference in New Issue
Block a user