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 gtk:style-context-print-flags value that determine what to print

Return Value

The 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.

Examples

(setq context
      (gtk:widget-style-context (make-instance 'gtk:dialog)))
=> #<GTK:STYLE-CONTEXT {1001C70663}>
(gtk:style-context-to-string context :recurse)
=>
"[window.background.dialog:dir(ltr)]
  box.dialog-vbox.vertical:dir(ltr)
    box.vertical:dir(ltr)
    box.dialog-action-box.horizontal:dir(ltr)
      box.dialog-action-area.horizontal:dir(ltr)
"    

Warning

This function is deprecated since 4.10. This API will be removed in GTK 5.
 

See also

2024-10-13