+#if wxUSE_SLIDER
+ // Fill the arguments with true or false if this slider has labels on
+ // left/right side (or top/bottom for horizontal sliders) respectively
+ static
+ void GetSliderLabelsSides(wxOrientation orient, long style,
+ bool *left, bool *right)
+ {
+ // should we draw ticks at all?
+ if ( !(style & wxSL_AUTOTICKS) )
+ {
+ *left =
+ *right = false;
+ return;
+ }
+
+ // should we draw them on both sides?
+ if ( style & wxSL_BOTH )
+ {
+ *left =
+ *right = true;
+ return;
+ }
+
+ // we draw them on one side only, determine which one
+ if ( ((style & wxSL_TOP) && (orient == wxHORIZONTAL)) ||
+ ((style & wxSL_LEFT) && (orient == wxVERTICAL)) )
+ {
+ *left = true;
+ *right = false;
+ }
+ else if ( ((style & wxSL_BOTTOM) && (orient == wxHORIZONTAL)) ||
+ ((style & wxSL_RIGHT) && (orient == wxVERTICAL)) )
+ {
+ *left = false;
+ *right = true;
+ }
+ else
+ {
+ wxFAIL_MSG( "inconsistent wxSlider flags" );
+
+ *left =
+ *right = false;
+ }
+ }
+#endif // wxUSE_SLIDER
+