kodi
xbmc
guilib
GUIToggleButtonControl.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 "
GUIButtonControl.h
"
17
22
class
CGUIToggleButtonControl
:
public
CGUIButtonControl
23
{
24
public
:
25
CGUIToggleButtonControl
(
int
parentID,
int
controlID,
float
posX,
float
posY,
float
width,
float
height,
const
CTextureInfo
& textureFocus,
const
CTextureInfo
& textureNoFocus,
const
CTextureInfo
& altTextureFocus,
const
CTextureInfo
& altTextureNoFocus,
const
CLabelInfo
&labelInfo,
bool
wrapMultiline =
false
);
26
~
CGUIToggleButtonControl
(
void
)
override
;
27
CGUIToggleButtonControl
* Clone()
const override
{
return
new
CGUIToggleButtonControl
(*
this
); }
28
29
void
Process(
unsigned
int
currentTime, CDirtyRegionList &dirtyregions)
override
;
30
void
Render()
override
;
31
bool
OnAction(
const
CAction
&action)
override
;
32
void
AllocResources()
override
;
33
void
FreeResources(
bool
immediately =
false
)
override
;
34
void
DynamicResourceAlloc(
bool
bOnOff)
override
;
35
void
SetInvalid()
override
;
36
void
SetPosition(
float
posX,
float
posY)
override
;
37
void
SetWidth(
float
width)
override
;
38
void
SetHeight(
float
height)
override
;
39
void
SetMinWidth(
float
minWidth)
override
;
40
void
SetLabel(
const
std::string& label)
override
;
41
void
SetAltLabel(
const
std::string& label);
42
std::string GetDescription()
const override
;
43
void
SetToggleSelect(
const
std::string &toggleSelect);
44
void
SetAltClickActions(
const
CGUIAction
&clickActions);
45
46
protected
:
47
bool
UpdateColors(
const
CGUIListItem
* item)
override
;
48
void
OnClick()
override
;
49
CGUIButtonControl
m_selectButton;
50
INFO::InfoPtr m_toggleSelect;
51
52
private
:
53
void
ProcessToggle(
unsigned
int
currentTime);
54
std::string m_altLabel;
55
};
56
CGUIListItem
Definition:
GUIListItem.h:29
CGUIButtonControl
Definition:
GUIButtonControl.h:27
GUIButtonControl.h
CAction
Class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition:
Action.h:21
CGUIToggleButtonControl
Definition:
GUIToggleButtonControl.h:22
CTextureInfo
Definition:
GUITexture.h:51
CLabelInfo
Definition:
GUILabel.h:22
CGUIAction
Class containing vector of condition->(action/navigation route) and handling its execution.
Definition:
GUIAction.h:21
Generated by
1.8.13