2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
16 #include "GUIControl.h"
17 #include "GUITexture.h"
23 class GUIScrollBarControl
:
27 GUIScrollBarControl(int parentID
, int controlID
, float posX
, float posY
,
28 float width
, float height
,
29 const CTextureInfo
& backGroundTexture
,
30 const CTextureInfo
& barTexture
, const CTextureInfo
& barTextureFocus
,
31 const CTextureInfo
& nibTexture
, const CTextureInfo
& nibTextureFocus
,
32 ORIENTATION orientation
, bool showOnePage
);
33 ~GUIScrollBarControl() override
= default;
34 GUIScrollBarControl
* Clone() const override
{ return new GUIScrollBarControl(*this); }
36 void Process(unsigned int currentTime
, CDirtyRegionList
&dirtyregions
) override
;
37 void Render() override
;
38 bool OnAction(const CAction
&action
) override
;
39 void AllocResources() override
;
40 void FreeResources(bool immediately
= false) override
;
41 void DynamicResourceAlloc(bool bOnOff
) override
;
42 void SetInvalid() override
;
43 virtual void SetRange(int pageSize
, int numItems
);
44 bool OnMessage(CGUIMessage
& message
) override
;
45 void SetValue(int value
);
47 std::string
GetDescription() const override
;
48 bool IsVisible() const override
;
50 EVENT_RESULT
OnMouseEvent(const CPoint
& point
, const KODI::MOUSE::CMouseEvent
& event
) override
;
51 bool UpdateColors(const CGUIListItem
* item
) override
;
53 bool Move(int iNumSteps
);
54 virtual void SetFromPosition(const CPoint
&point
);
56 std::unique_ptr
<CGUITexture
> m_guiBackground
;
57 std::unique_ptr
<CGUITexture
> m_guiBarNoFocus
;
58 std::unique_ptr
<CGUITexture
> m_guiBarFocus
;
59 std::unique_ptr
<CGUITexture
> m_guiNibNoFocus
;
60 std::unique_ptr
<CGUITexture
> m_guiNibFocus
;
67 ORIENTATION m_orientation
;
70 GUIScrollBarControl(const GUIScrollBarControl
& control
);