Package: gtk
Class gtk-info-bar
Superclassesgtk-box, gtk-container, gtk-widget, gtk-buildable, gtk-orientable, g-object, common-lisp:standard-object, common-lisp:t Documented Subclasses
None
Direct SlotsDetails The gtk-info-bar widget can be used to show messages to the user
without showing a dialog.
It is often temporarily shown at the top or bottom of a document. In contrast to the gtk-dialog widget, which has a horizontal action area at the
bottom, the info bar has a vertical action area at the side. The API of the gtk-info-bar widget is very similar to the gtk-dialog widget, allowing you to add buttons to the action area with the gtk-info-bar-add-button or gtk-info-bar-new-with-buttons functions. The sensitivity of action widgets can be controlled with the gtk-info-bar-set-response-sensitive function. To add widgets to the main content area of an info bar, use the gtk-info-bar-content-area function and add your widgets to the container. Similar to gtk-message-dialog widget, the contents of an info bar can by classified as error message, warning, informational message, etc, by using the gtk-info-bar-message-type slot access function. GTK uses the message type to determine the background color of the message area. Example(defun create-info-bar () (let* ((info-bar (make-instance 'gtk-info-bar)) (message (make-instance 'gtk-label :label "Some text")) (content (gtk-info-bar-content-area info-bar))) ;; Hide the info by default (setf (gtk-widget-no-show-all info-bar) t) ;; Add a label for the message to the content of the info bar (gtk-container-add content message) (gtk-widget-show message) ;; Add buttons to the info bar (gtk-info-bar-add-buttons info-bar "gtk-ok" 1 "gtk-cancel" 2) ;; Connect a signal handler to the info bar (g-signal-connect info-bar "response" (lambda (widget response) (declare (ignore response)) (gtk-widget-hide widget))) info-bar)) GtkInfoBar as GtkBuildableThe gtk-info-bar implementation supports a custom <action-widgets> element, which can contain multiple <action-widget> elements. The response attribute specifies a numeric response, and the content of the element is the ID of widget, which should be a child of the dialogs action area. CSS nodesStyle Property Details
Signal DetailsThe "close" signallambda (infobar) :actionThe signal is a keybinding signal which gets emitted when the user uses a keybinding to dismiss the info bar. The default binding for this signal is the Escape key.
The "response" signallambda (infobar response) :run-lastEmitted when an action widget is clicked or the application programmer calls the gtk-dialog-response function. The response argument depends on which action widget was clicked.
| Slot Access FunctionsInherited Slot Access FunctionsSee also |
*2021-12-22