TGUI  v0.5.2
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
GroupObject.hpp
1 //
3 // TGUI - Texus's Graphical User Interface
4 // Copyright (C) 2012 Bruno Van de Velde (VDV_B@hotmail.com)
5 //
6 // This software is provided 'as-is', without any express or implied warranty.
7 // In no event will the authors be held liable for any damages arising from the use of this software.
8 //
9 // Permission is granted to anyone to use this software for any purpose,
10 // including commercial applications, and to alter it and redistribute it freely,
11 // subject to the following restrictions:
12 //
13 // 1. The origin of this software must not be misrepresented;
14 // you must not claim that you wrote the original software.
15 // If you use this software in a product, an acknowledgment
16 // in the product documentation would be appreciated but is not required.
17 //
18 // 2. Altered source versions must be plainly marked as such,
19 // and must not be misrepresented as being the original software.
20 //
21 // 3. This notice may not be removed or altered from any source distribution.
22 //
24 
25 
26 #ifndef _TGUI_GROUP_OBJECT_INCLUDED_
27 #define _TGUI_GROUP_OBJECT_INCLUDED_
28 
30 
31 namespace tgui
32 {
34 
35  struct TGUI_API GroupObject : public OBJECT, Group
36  {
40  GroupObject();
41 
42 
46  GroupObject(const GroupObject& copy);
47 
48 
52  virtual ~GroupObject();
53 
54 
58  GroupObject& operator= (const GroupObject& right);
59 
60 
64  virtual void initialize();
65 
66 
68  protected:
69 
71  // Send the event to all underlying objects.
73  virtual void handleEvent(sf::Event& event, float mouseX = 0, float mouseY = 0);
74 
75 
77  // Focuses the next object in the group. If the last object was focused then all objects will be unfocused and this function will return false.
79  virtual bool focusNextObject();
80 
81 
82  friend struct EventManager;
83 
85  };
86 
88 }
89 
91 
92 #endif //_TGUI_GROUP_OBJECT_INCLUDED_
Definition: GroupObject.hpp:35
The parent struct for every object.
Definition: Objects.hpp:36
Parent struct for objects that store multiple objects.
Definition: Group.hpp:38