kodi
xbmc
guilib
GUIProgressControl.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2005-2018 Team Kodi
3
* This file is part of Kodi - https://kodi.tv
4
*
5
* SPDX-License-Identifier: GPL-2.0-or-later
6
* See LICENSES/README.md for more information.
7
*/
8
9
#pragma once
10
16
#include "
GUIControl.h
"
17
#include "GUITexture.h"
18
23
class
CGUIProgressControl
:
24
public
CGUIControl
25
{
26
public
:
27
CGUIProgressControl
(
int
parentID,
int
controlID,
float
posX,
float
posY,
28
float
width,
float
height,
const
CTextureInfo
& backGroundTexture,
29
const
CTextureInfo
& leftTexture,
const
CTextureInfo
& midTexture,
30
const
CTextureInfo
& rightTexture,
const
CTextureInfo
& overlayTexture,
31
bool
reveal=
false
);
32
~
CGUIProgressControl
()
override
=
default
;
33
CGUIProgressControl
* Clone()
const override
{
return
new
CGUIProgressControl
(*
this
); }
34
35
void
Process(
unsigned
int
currentTime, CDirtyRegionList &dirtyregions)
override
;
36
void
Render()
override
;
37
bool
CanFocus()
const override
;
38
void
AllocResources()
override
;
39
void
FreeResources(
bool
immediately =
false
)
override
;
40
void
DynamicResourceAlloc(
bool
bOnOff)
override
;
41
void
SetInvalid()
override
;
42
bool
OnMessage(
CGUIMessage
& message)
override
;
43
void
SetPosition(
float
posX,
float
posY)
override
;
44
void
SetPercentage(
float
fPercent);
45
void
SetInfo(
int
iInfo,
int
iInfo2 = 0);
46
int
GetInfo()
const
{
return
m_iInfoCode; }
47
48
float
GetPercentage()
const
;
49
std::string GetDescription()
const override
;
50
void
UpdateInfo(
const
CGUIListItem
*item = NULL)
override
;
51
bool
UpdateLayout(
void
);
52
protected
:
53
bool
UpdateColors(
const
CGUIListItem
* item)
override
;
54
std::unique_ptr<CGUITexture> m_guiBackground;
55
std::unique_ptr<CGUITexture> m_guiLeft;
56
std::unique_ptr<CGUITexture> m_guiMid;
57
std::unique_ptr<CGUITexture> m_guiRight;
58
std::unique_ptr<CGUITexture> m_guiOverlay;
59
CRect
m_guiMidClipRect;
60
61
int
m_iInfoCode;
62
int
m_iInfoCode2 = 0;
63
float
m_fPercent;
64
float
m_fPercent2 = 0.0f;
65
bool
m_bReveal;
66
bool
m_bChanged;
67
68
private
:
69
CGUIProgressControl
(
const
CGUIProgressControl
& control);
70
};
71
CRectGen< float >
CGUIListItem
Definition:
GUIListItem.h:29
CGUIProgressControl
Definition:
GUIProgressControl.h:23
CGUIControl
Base class for controls.
Definition:
GUIControl.h:83
GUIControl.h
CTextureInfo
Definition:
GUITexture.h:51
CGUIMessage
Definition:
GUIMessage.h:365
Generated by
1.8.13