Common code for the same handling of wxSL_INVERSE.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32044 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-02-14 19:29:37 +00:00
parent cd0bbd03d7
commit 01526d4f6c
7 changed files with 102 additions and 119 deletions

View File

@@ -80,10 +80,19 @@ public:
virtual int GetSelStart() const { return GetMax(); }
virtual void SetSelection(int WXUNUSED(min), int WXUNUSED(max)) { }
virtual void ApplyParentThemeBackground(const wxColour& bg)
{ SetBackgroundColour(bg); }
protected:
// adjust value according to wxSL_INVERSE style
virtual int ValueInvertOrNot(int value) const
{
if (HasFlag(wxSL_INVERSE))
return (GetMax() + GetMin()) - value;
else
return value;
}
private:
DECLARE_NO_COPY_CLASS(wxSliderBase)