16 #include "GUIAction.h" 19 #include "GUITexture.h" 21 #include "utils/ColorUtils.h" 31 float posX,
float posY,
float width,
float height,
33 const CLabelInfo &label,
bool wrapMultiline =
false);
40 void Process(
unsigned int currentTime, CDirtyRegionList &dirtyregions)
override;
41 void Render()
override;
42 bool OnAction(
const CAction &action)
override ;
44 void AllocResources()
override;
45 void FreeResources(
bool immediately =
false)
override;
46 void DynamicResourceAlloc(
bool bOnOff)
override;
47 void SetInvalid()
override;
48 void SetPosition(
float posX,
float posY)
override;
49 virtual void SetLabel(
const std::string & aLabel);
50 virtual void SetLabel2(
const std::string & aLabel2);
51 void SetClickActions(
const CGUIAction& clickActions) { m_clickActions = clickActions; }
52 const CGUIAction& GetClickActions()
const {
return m_clickActions; }
53 void SetFocusActions(
const CGUIAction& focusActions) { m_focusActions = focusActions; }
54 void SetUnFocusActions(
const CGUIAction& unfocusActions) { m_unfocusActions = unfocusActions; }
55 const CLabelInfo& GetLabelInfo()
const {
return m_label.GetLabelInfo(); }
56 virtual std::string GetLabel()
const {
return GetDescription(); }
57 virtual std::string GetLabel2()
const;
58 void SetSelected(
bool bSelected);
59 std::string GetDescription()
const override;
60 float GetWidth()
const override;
61 virtual void SetMinWidth(
float minWidth);
62 void SetAlpha(
unsigned char alpha);
64 void PythonSetLabel(
const std::string& strFont,
65 const std::string& strText,
66 UTILS::COLOR::Color textColor,
67 UTILS::COLOR::Color shadowColor,
68 UTILS::COLOR::Color focusedColor);
69 void PythonSetDisabledColor(UTILS::COLOR::Color disabledColor);
71 virtual void OnClick();
81 void OnFocus()
override;
82 void OnUnFocus()
override;
83 virtual void ProcessText(
unsigned int currentTime);
90 void SetMaxWidth(
float labelMaxWidth) { m_labelMaxWidth = labelMaxWidth; }
92 std::unique_ptr<CGUITexture> m_imgFocus;
93 std::unique_ptr<CGUITexture> m_imgNoFocus;
94 unsigned int m_focusCounter;
95 unsigned char m_alpha;
99 float m_labelMaxWidth{0};
bool HasActionsMeetingCondition() const
Check if there is any action that meet its condition.
Definition: GUIAction.cpp:136
Class for rendering text labels. Handles alignment and rendering of text within a control...
Definition: GUILabel.h:69
Definition: GUIListItem.h:29
Definition: GUIInfoLabel.h:31
Base class for controls.
Definition: GUIControl.h:83
EVENT_RESULT
Results of OnMouseEvent() Any value not equal to EVENT_RESULT_UNHANDLED indicates that the event was ...
Definition: GUIControl.h:68
Class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:21
Definition: GUITexture.h:51
Definition: GUIMessage.h:365
Definition: GUILabel.h:22
Definition: GUISpinControlEx.h:23
COLOR
allowed color categories for labels, as defined by the skin
Definition: GUILabel.h:74
void RenderText(float posX, float posY, float width, float height) override
Render the spinner text.
Definition: GUISpinControlEx.cpp:136
Simple class for mouse events.
Definition: MouseEvent.h:20
Class containing vector of condition->(action/navigation route) and handling its execution.
Definition: GUIAction.h:21