+ // empty slider?
+ if (end == start) return;
+
+ bool transpose = (orient == wxVERTICAL);
+ bool left = ((style & wxSL_AUTOTICKS) != 0) &
+ (((style & wxSL_TOP) != 0) & !transpose |
+ ((style & wxSL_LEFT) != 0) & transpose |
+ ((style & wxSL_BOTH) != 0));
+ bool right = ((style & wxSL_AUTOTICKS) != 0) &
+ (((style & wxSL_BOTTOM) != 0) & !transpose |
+ ((style & wxSL_RIGHT) != 0) & transpose |
+ ((style & wxSL_BOTH) != 0));
+
+ // default thumb size
+ wxSize sizeThumb = GetSliderThumbSize (rect, 0, orient);
+ wxCoord defaultLen = (transpose ? sizeThumb.x : sizeThumb.y);
+
+ // normal thumb size
+ sizeThumb = GetSliderThumbSize (rect, lenThumb, orient);
+ wxCoord widthThumb = (transpose ? sizeThumb.y : sizeThumb.x);
+
+ wxRect rectShaft = GetSliderShaftRect (rect, lenThumb, orient, style);
+
+ wxCoord x1, x2, y1, y2, y3, y4 , len;
+ x1 = (transpose ? rectShaft.y : rectShaft.x) + widthThumb/2;
+ x2 = (transpose ? rectShaft.GetBottom() : rectShaft.GetRight()) - widthThumb/2;
+ y1 = (transpose ? rectShaft.x : rectShaft.y) - defaultLen/2;
+ y2 = (transpose ? rectShaft.GetRight() : rectShaft.GetBottom()) + defaultLen/2;
+ y3 = (transpose ? rect.x : rect.y);
+ y4 = (transpose ? rect.GetRight() : rect.GetBottom());
+ len = x2 - x1;