System Projects Reference > Situational Awareness System Projects > Situational Awareness Include Project > Theme_Header_GetColorIndex

Theme_Header_GetColorIndex

Returns the Header toolbar button color index for the specific button state.

Syntax

Theme_Header_GetColorIndex(INT nState)

nState

Indicates which state the UI element is in such that correct shade of the color is returned. This can be one of the following values:

CTRL_ITEM_STATE_Normal 0 Normal state - no mouse over
CTRL_ITEM_STATE_NormalHover 2 Mouse is hovering over control
CTRL_ITEM_STATE_NormalPressed 3 Mouse button pressed on control
CTRL_ITEM_STATE_Active 4 Item is in selected state
CTRL_ITEM_STATE_ActiveHover 5 Item is in selected and mouse is hovering
CTRL_ITEM_STATE_ActivePressed 6 Item is is selected and mouse button is down
CTRL_ITEM_STATE_Disabled 1 Item is disabled
CTRL_ITEM_STATE_ActiveDisabled 7 Item is in selected AND disabled state

Typically, this state will be returned by a function such as “Button_GetState”.

Return Value

Returns an index into the color array configured on the graphics object that called this function.

Example

Theme_Header_GetColorIndex(Button_GetState(dspGetAnCur()))

Related Functions

Published June 2018