+// ----------------------------------------------------------------------------
+// translate various flags into corresponding renderer constants
+// ----------------------------------------------------------------------------
+
+/* static */
+void wxStdRenderer::GetIndicatorsFromFlags(int flags,
+ IndicatorState& state,
+ IndicatorStatus& status)
+{
+ if ( flags & wxCONTROL_SELECTED )
+ state = flags & wxCONTROL_DISABLED ? IndicatorState_SelectedDisabled
+ : IndicatorState_Selected;
+ else if ( flags & wxCONTROL_DISABLED )
+ state = IndicatorState_Disabled;
+ else if ( flags & wxCONTROL_PRESSED )
+ state = IndicatorState_Pressed;
+ else
+ state = IndicatorState_Normal;
+
+ status = flags & wxCONTROL_CHECKED ? IndicatorStatus_Checked
+ : flags & wxCONTROL_UNDETERMINED
+ ? IndicatorStatus_Undetermined
+ : IndicatorStatus_Unchecked;
+}
+
+/* static */
+wxStdRenderer::ArrowDirection wxStdRenderer::GetArrowDirection(wxDirection dir)
+{
+ switch ( dir )
+ {
+ case wxLEFT:
+ return Arrow_Left;
+
+ case wxRIGHT:
+ return Arrow_Right;
+
+ case wxUP:
+ return Arrow_Up;
+
+ case wxDOWN:
+ return Arrow_Down;
+
+ default:
+ wxFAIL_MSG(_T("unknown arrow direction"));
+ }
+
+ return Arrow_Max;
+}
+