Package: gtk

Function gtk-style-context-to-string

Lambda List

gtk-style-context-to-string (context flags)

Arguments

context -- a gtk-style-context object
flags -- a value of the gtk-style-context-print-flags flags that determine what to print

Return Value

A string representing the style context.

Details

Converts the style context into a string representation.

The string representation always includes information about the name, state, ID, visibility and style classes of the CSS node that is backing the style context. Depending on the flags, more information may be included.

This function is intended for testing and debugging of the CSS implementation in GTK. There are no guarantees about the format of the returned string, it may change.

Since 3.20

Example

(setq context
      (gtk-widget-style-context (make-instance 'gtk-message-dialog)))
=> #<GTK-STYLE-CONTEXT {1001C70663}>
(gtk-style-context-to-string context :recurse)
=>
"[messagedialog.background.csd:dir(ltr)]
  decoration:dir(ltr)
  box.vertical.dialog-vbox:dir(ltr)
    box.horizontal:dir(ltr)
      image:dir(ltr)
      box.vertical:dir(ltr)
        label:dir(ltr)
        [label:dir(ltr)]
    box.horizontal.dialog-action-box:dir(ltr)
      buttonbox.linked.horizontal.dialog-action-area:dir(ltr)
  box.titlebar.horizontal:dir(ltr)
    [label.title:dir(ltr)]
"    
 

See also

2021-11-26