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.
12 \file GUIRESIZEControl.h
16 #include "GUIControl.h"
17 #include "GUITexture.h"
18 #include "utils/MovingSpeed.h"
24 class CGUIResizeControl
: public CGUIControl
27 CGUIResizeControl(int parentID
,
33 const CTextureInfo
& textureFocus
,
34 const CTextureInfo
& textureNoFocus
,
35 UTILS::MOVING_SPEED::MapEventConfig
& movingSpeedCfg
);
37 ~CGUIResizeControl() override
= default;
38 CGUIResizeControl
* Clone() const override
{ return new CGUIResizeControl(*this); }
40 void Process(unsigned int currentTime
, CDirtyRegionList
&dirtyregions
) override
;
41 void Render() override
;
42 bool OnAction(const CAction
&action
) override
;
44 void OnDown() override
;
45 void OnLeft() override
;
46 void OnRight() override
;
47 void AllocResources() override
;
48 void FreeResources(bool immediately
= false) override
;
49 void DynamicResourceAlloc(bool bOnOff
) override
;
50 void SetInvalid() override
;
51 void SetPosition(float posX
, float posY
) override
;
52 void SetLimits(float x1
, float y1
, float x2
, float y2
);
53 bool CanFocus() const override
{ return true; }
56 EVENT_RESULT
OnMouseEvent(const CPoint
&point
, const CMouseEvent
&event
) override
;
57 bool UpdateColors(const CGUIListItem
* item
) override
;
58 bool SetAlpha(unsigned char alpha
);
59 void Resize(float x
, float y
);
60 std::unique_ptr
<CGUITexture
> m_imgFocus
;
61 std::unique_ptr
<CGUITexture
> m_imgNoFocus
;
62 unsigned int m_frameCounter
;
63 UTILS::MOVING_SPEED::CMovingSpeed m_movingSpeed
;
65 float m_x1
, m_x2
, m_y1
, m_y2
;
68 CGUIResizeControl(const CGUIResizeControl
& control
);