16 #include "GUIControlLookup.h" 28 CGUIControlGroup(
int parentID,
int controlID,
float posX,
float posY,
float width,
float height);
33 void Process(
unsigned int currentTime, CDirtyRegionList &dirtyregions)
override;
34 void Render()
override;
35 void RenderEx()
override;
36 bool OnAction(
const CAction &action)
override;
38 virtual bool SendControlMessage(
CGUIMessage& message);
39 bool HasFocus()
const override;
40 void AllocResources()
override;
41 void FreeResources(
bool immediately =
false)
override;
42 void DynamicResourceAlloc(
bool bOnOff)
override;
43 bool CanFocus()
const override;
48 void SetInitialVisibility()
override;
50 bool IsAnimating(ANIMATION_TYPE anim)
override;
51 bool HasAnimation(ANIMATION_TYPE anim)
override;
52 void QueueAnimation(ANIMATION_TYPE anim)
override;
53 void ResetAnimation(ANIMATION_TYPE anim)
override;
54 void ResetAnimations()
override;
56 int GetFocusedControlID()
const;
58 virtual CGUIControl *GetFirstFocusableControl(
int id);
60 virtual void AddControl(
CGUIControl *control,
int position = -1);
62 virtual bool RemoveControl(
const CGUIControl *control);
63 virtual void ClearAll();
64 void SetDefaultControl(
int id,
bool always)
66 m_defaultControl = id;
67 m_defaultAlways = always;
69 void SetRenderFocusedLast(
bool renderLast) { m_renderFocusedLast = renderLast; }
71 void SaveStates(std::vector<CControlState> &states)
override;
73 bool IsGroup()
const override {
return true; }
76 void DumpTextureUse()
override;
80 std::vector<CGUIControl *> m_children;
82 typedef std::vector<CGUIControl *>::iterator iControls;
83 typedef std::vector<CGUIControl *>::const_iterator ciControls;
84 typedef std::vector<CGUIControl *>::reverse_iterator rControls;
85 typedef std::vector<CGUIControl *>::const_reverse_iterator crControls;
90 bool m_renderFocusedLast;
92 typedef std::vector< std::vector<CGUIControl *> * > COLLECTORTYPE;
94 struct IDCollectorList
98 for (
auto item : m_items)
102 std::vector<CGUIControl *> *Get() {
103 if (++m_stackDepth > m_items.size())
104 m_items.push_back(
new std::vector<CGUIControl *>());
105 return m_items[m_stackDepth - 1];
108 void Release() { --m_stackDepth; }
110 COLLECTORTYPE m_items;
111 size_t m_stackDepth = 0;
116 explicit IDCollector(IDCollectorList& list) : m_list(list), m_collector(list.Get()) {}
118 ~IDCollector() { m_list.Release(); }
120 IDCollectorList &m_list;
121 std::vector<CGUIControl *> *m_collector;
Definition: GUIControlLookup.h:13
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
EVENT_RESULT SendMouseEvent(const CPoint &point, const KODI::MOUSE::CMouseEvent &event) override
React to a mouse event.
Definition: GUIControlGroup.cpp:357
Class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:21
Definition: GUIMessage.h:365
group of controls, useful for remembering last control + animating/hiding together ...
Definition: GUIControlGroup.h:24
Simple class for mouse events.
Definition: MouseEvent.h:20
void UnfocusFromPoint(const CPoint &point) override
Unfocus the control if the given point on screen is not within it's boundary.
Definition: GUIControlGroup.cpp:385