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

Theme_Header_GetForegroundColorIndex

Returns the header foreground color index used for icons and text.

Syntax

Theme_Header_GetForegroundColorIndex(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 which called this function.

Example

Theme_Header_GetForegroundColorIndex(Button_GetState(DspGetAnCur()))

Related Functions

Published June 2018