6 #ifndef GUILIB_GUISCROLLBAR_H
7 #define GUILIB_GUISCROLLBAR_H
12 * Copyright (C) 2005-2013 Team XBMC
15 * This Program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2, or (at your option)
20 * This Program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
25 * You should have received a copy of the GNU General Public License
26 * along with XBMC; see the file COPYING. If not, see
27 * <http://www.gnu.org/licenses/>.
31 #include "GUITexture.h"
32 #include "GUIControl.h"
42 CGUIScrollBar(int parentID, int controlID, float posX, float posY,
43 float width, float height,
44 const CTextureInfo& backGroundTexture,
45 const CTextureInfo& barTexture, const CTextureInfo& barTextureFocus,
46 const CTextureInfo& nibTexture, const CTextureInfo& nibTextureFocus,
47 ORIENTATION orientation, bool showOnePage);
48 virtual ~CGUIScrollBar(void);
49 virtual CGUIScrollBar *Clone() const { return new CGUIScrollBar(*this); };
51 virtual void Process(unsigned int currentTime, CDirtyRegionList &dirtyregions);
52 virtual void Render();
53 virtual bool OnAction(const CAction &action);
54 virtual void AllocResources();
55 virtual void FreeResources(bool immediately = false);
56 virtual void DynamicResourceAlloc(bool bOnOff);
57 virtual void SetInvalid();
58 virtual void SetRange(int pageSize, int numItems);
59 virtual bool OnMessage(CGUIMessage& message);
60 void SetValue(int value);
62 virtual CStdString GetDescription() const;
63 virtual bool IsVisible() const;
65 virtual bool HitTest(const CPoint &point) const;
66 virtual EVENT_RESULT OnMouseEvent(const CPoint &point, const CMouseEvent &event);
67 virtual bool UpdateColors();
69 bool Move(int iNumSteps);
70 virtual void SetFromPosition(const CPoint &point);
72 CGUITexture m_guiBackground;
73 CGUITexture m_guiBarNoFocus;
74 CGUITexture m_guiBarFocus;
75 CGUITexture m_guiNibNoFocus;
76 CGUITexture m_guiNibFocus;
83 ORIENTATION m_orientation;