[ExecString] combine SplitParameters with identical function of CUtil
[xbmc.git] / xbmc / guilib / GUIScrollBarControl.h
blob3a5ff28fca28ae584600f4fb60664dc9630e259f
1 /*
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.
7 */
9 #pragma once
11 /*!
12 \file
13 \brief
16 #include "GUIControl.h"
17 #include "GUITexture.h"
19 /*!
20 \ingroup controls
21 \brief
23 class GUIScrollBarControl :
24 public CGUIControl
26 public:
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);
46 int GetValue() const;
47 std::string GetDescription() const override;
48 bool IsVisible() const override;
49 protected:
50 EVENT_RESULT OnMouseEvent(const CPoint& point, const KODI::MOUSE::CMouseEvent& event) override;
51 bool UpdateColors(const CGUIListItem* item) override;
52 bool UpdateBarSize();
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;
62 int m_numItems;
63 int m_pageSize;
64 int m_offset;
66 bool m_showOnePage;
67 ORIENTATION m_orientation;
69 private:
70 GUIScrollBarControl(const GUIScrollBarControl& control);