h6. [[WindowManager]] h6(. » [[WindowManager SWI Calls|SWI Calls]] h6((. » Wimp_SetIconState h2. Wimp_SetIconState h5. (SWI &400CD) |_<^. Entry | | |<^. R1 |<^. Pointer to block | |<^. Block |<^. | |>^. +0 |<^. Window handle (-1 or -2 for icon bar) | |>^. +4 |<^. Icon handle | |>^. +8 |<^. EOR word | |>^. +12 |<^. Clear word | |_<^. Exit | | |<^. R0 |<^. Corrupt | h4. Use The purpose of this call is to set value of an icons [[Icon Flags|Icon Flag]] by the setting of the individual bits. h4. Notes This call sets the icon flags 'state' at the bit level. It does this by the following method: <code>new state = (old state AND NOT 'clear word') EOR 'EOR word' </code> A combination of the EOR word and the clear word determines the value of the bits of the current icon flag. The table below shows how the bits are set when the EOR and clear words are used. |<^. Clear |<^. EOR |<^. Meaning | |<^. 0|<^. 0 |<^. Preserve the bit’s status | |<^. 0|<^. 1 |<^. Toggle the bit’s state | |<^. 1|<^. 0 |<^. Clear the bit | |<^. 1|<^. 1 |<^. Set the bit | Any change to the icon flag will result in the icon being updated automatically on screen, however, if the justification of the icon is changed, and the icon has the input focus, then [[Wimp_SetCaretPosition|Wimp_SetCaretPosition]] should be called to make sure the caret remains at the correct text position. h4. See also * [[Icon Flags|Icon Flags]] * [[Wimp_SetCaretPosition|Wimp_SetCaretPosition]]