Package: gtk
Class gtk-color-button
Superclassesgtk-button, gtk-bin, gtk-container, gtk-widget, gtk-buildable, gtk-actionable, gtk-activatable, gtk-color-chooser, g-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. CSS nodesExample(defun example-color-button () (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)) (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 DetailsThe "color-set" signallambda (button) : Run FirstThe "color-set" signal is emitted when the user selects a color. When handling this signal, use the function gtk-color-chooser-rgba to find out which color was just selected. Note that this signal is only emitted when the user changes the color. If you need to react to programmatic color changes as well, use the "notify::color" signal.
| Slot Access Functions
Inherited Slot Access FunctionsSee also |
*2021-1-24