Package: gtk
Class gtk:color-button
Superclassesgtk:button, gtk:bin, gtk:container, gtk:widget, gtk:buildable, gtk:actionable, gtk:activatable, gtk:color-chooser, gobject:object, common-lisp:standard-object, common-lisp:t Documented Subclasses
None
Direct SlotsDetails The gtk:color-button widget is a button which displays the currently
selected color and allows to open a color selection dialog to change the
color.
It is a suitable widget for selecting a color in a preference dialog. ![]() Figure: GtkColorButton CSS nodesExamples
(defun example-color-button ()
(gtk:within-main-loop
(let ((window (make-instance 'gtk:window
:title "Example Color Button"
:border-width 12
:default-width 250
:default-height 200))
(button (make-instance 'gtk:color-button
:rgba (gdk:rgba-parse "Blue"))))
(g:signal-connect window "destroy"
(lambda (widget)
(declare (ignore widget))
(gtk:leave-gtk-main)))
(g:signal-connect button "color-set"
(lambda (widget)
(let ((rgba (gtk:color-chooser-rgba widget)))
(format t "Selected color is ~A~%" (gdk:rgba-to-string rgba)))))
(gtk:container-add window button)
(gtk:widget-show-all window)))) Signal Details | Returned bySlot Access Functions
Inherited Slot Access FunctionsSee also |
2025-07-14
