Package: gtk

Function gtk:widget-path-iter-state

Lambda List

gtk:widget-path-iter-state (path pos)

Syntax

(gtk:widget-path-iter-state path pos) => state
(setf (gtk:widget-path-iter-state path pos) state)

Arguments

path -- a gtk:widget-path instance
pos -- an integer with the position , -1 for the path head
state -- a gtk:state-flags value to set or unset

Details

Accessor of the state flags. The gtk:widget-path-iter-state function returns the state flags corresponding to the widget found at the position pos in the widget hierarchy defined by path. The (setf gtk:widget-path-iter-state) function sets the state flags.

If you want to update just a single state flag, you need to do this manually, as this function updates all state flags.

Examples

Setting more flags
(let ((flags (gtk:widget-path-iter-state path pos)))
  (setf (gtk:widget-path-iter-state path pos)
        (union flags '(:dir-ltr :selected))))    
Unsetting a flag
(let ((flags (gtk:widget-path-iter-state path pos)))
  (setf (gtk:widget-path-iter-state path pos)
        (set-difference flags '(:active))))    
 

See also

#2023-3-30