mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
select on window now displays the currently focused win
This commit is contained in:
parent
06fdabf759
commit
83c36a9582
2 changed files with 13 additions and 9 deletions
|
|
@ -491,21 +491,21 @@ clog-body. If main-menu add as main menu bar."))
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
||||||
(defclass clog-gui-menu-window-select (clog-select)()
|
(defclass clog-gui-menu-window-select (clog-select)()
|
||||||
(:documentation "Drop down containing windows. Selecting a window
|
(:documentation "Drop down containing existing windows."))
|
||||||
will maximize it on top."))
|
|
||||||
|
|
||||||
(defgeneric create-gui-menu-window-select (clog-obj
|
(defgeneric create-gui-menu-window-select (clog-obj
|
||||||
&key class
|
&key class
|
||||||
html-id)
|
html-id)
|
||||||
(:documentation "Attached a clog-select as a menu item that auto updates
|
(:documentation "Attaches a clog-select as a menu item that auto updates
|
||||||
with open windows and maximizes them unless is a keep-on-top window or
|
with open windows and focuses them unless is a keep-on-top window.
|
||||||
on-window-can-maximize returns nil. Only one instance allowed."))
|
Only one instance allowed."))
|
||||||
|
|
||||||
(defmethod create-gui-menu-window-select
|
(defmethod create-gui-menu-window-select
|
||||||
((obj clog-obj)
|
((obj clog-obj)
|
||||||
&key (class "w3-select")
|
&key (class "w3-bar-item w3-button")
|
||||||
|
content
|
||||||
(html-id nil))
|
(html-id nil))
|
||||||
(let ((window-select (create-select obj :class class :html-id html-id))
|
(let ((window-select (create-select obj :html-id html-id :class class))
|
||||||
(app (connection-data-item obj "clog-gui")))
|
(app (connection-data-item obj "clog-gui")))
|
||||||
(change-class window-select 'clog-gui-menu-window-select)
|
(change-class window-select 'clog-gui-menu-window-select)
|
||||||
(setf (window-select app) window-select)
|
(setf (window-select app) window-select)
|
||||||
|
|
@ -515,7 +515,8 @@ on-window-can-maximize returns nil. Only one instance allowed."))
|
||||||
(unless (keep-on-top win)
|
(unless (keep-on-top win)
|
||||||
(setf (hiddenp win) nil)
|
(setf (hiddenp win) nil)
|
||||||
(window-focus win))))))
|
(window-focus win))))))
|
||||||
(create-option window-select :content "Select Window")
|
(when content
|
||||||
|
(create-option window-select :content content))
|
||||||
window-select))
|
window-select))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
|
@ -923,6 +924,7 @@ window-to-top-by-param or window-by-param."))
|
||||||
(when (window-select app)
|
(when (window-select app)
|
||||||
(setf (window-select-item win) (create-option (window-select app)
|
(setf (window-select-item win) (create-option (window-select app)
|
||||||
:content title
|
:content title
|
||||||
|
:selected t
|
||||||
:value html-id)))
|
:value html-id)))
|
||||||
(set-on-double-click (win-title win) (lambda (obj)
|
(set-on-double-click (win-title win) (lambda (obj)
|
||||||
(declare (ignore obj))
|
(declare (ignore obj))
|
||||||
|
|
@ -1029,6 +1031,8 @@ window-to-top-by-param or window-by-param."))
|
||||||
(let ((app (connection-data-item obj "clog-gui")))
|
(let ((app (connection-data-item obj "clog-gui")))
|
||||||
(unless (keep-on-top obj)
|
(unless (keep-on-top obj)
|
||||||
(setf (z-index obj) (incf (last-z app))))
|
(setf (z-index obj) (incf (last-z app))))
|
||||||
|
(when (window-select app)
|
||||||
|
(setf (selectedp (window-select-item obj)) t))
|
||||||
(fire-on-window-change obj app)))
|
(fire-on-window-change obj app)))
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;
|
||||||
|
|
|
||||||
|
|
@ -380,7 +380,6 @@ clog-builder window.")
|
||||||
(window-normalize (current-window obj)))))
|
(window-normalize (current-window obj)))))
|
||||||
(create-gui-menu-item win :content "Maximize All" :on-click #'maximize-all-windows)
|
(create-gui-menu-item win :content "Maximize All" :on-click #'maximize-all-windows)
|
||||||
(create-gui-menu-item win :content "Normalize All" :on-click #'normalize-all-windows)
|
(create-gui-menu-item win :content "Normalize All" :on-click #'normalize-all-windows)
|
||||||
(create-gui-menu-window-select win)
|
|
||||||
(create-gui-menu-item help :content "CLOG Quick Start" :on-click 'on-quick-start)
|
(create-gui-menu-item help :content "CLOG Quick Start" :on-click 'on-quick-start)
|
||||||
(create-gui-menu-item help :content "CLOG Manual" :on-click
|
(create-gui-menu-item help :content "CLOG Manual" :on-click
|
||||||
(lambda (obj)
|
(lambda (obj)
|
||||||
|
|
@ -415,6 +414,7 @@ clog-builder window.")
|
||||||
(declare (ignore obj))
|
(declare (ignore obj))
|
||||||
(open-window (window body) "https://www.w3schools.com/w3css/")))
|
(open-window (window body) "https://www.w3schools.com/w3css/")))
|
||||||
(create-gui-menu-item help :content "About CLOG Builder" :on-click #'on-help-about-builder)
|
(create-gui-menu-item help :content "About CLOG Builder" :on-click #'on-help-about-builder)
|
||||||
|
(create-gui-menu-window-select menu :class "w3-bar-item w3-button w3-dark-grey")
|
||||||
(create-gui-menu-full-screen menu))
|
(create-gui-menu-full-screen menu))
|
||||||
(on-show-copy-history-win body)
|
(on-show-copy-history-win body)
|
||||||
(cond
|
(cond
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue