MyGUI  3.2.0
MyGUI_ILayer.h
Go to the documentation of this file.
1 
6 /*
7  This file is part of MyGUI.
8 
9  MyGUI is free software: you can redistribute it and/or modify
10  it under the terms of the GNU Lesser General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  MyGUI is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public License
20  along with MyGUI. If not, see <http://www.gnu.org/licenses/>.
21 */
22 #ifndef __MYGUI_I_LAYER_H__
23 #define __MYGUI_I_LAYER_H__
24 
25 #include "MyGUI_Prerequest.h"
26 #include "MyGUI_Types.h"
27 #include "MyGUI_IRenderTarget.h"
28 #include "MyGUI_ILayerNode.h"
29 #include "MyGUI_ISerializable.h"
30 
31 namespace MyGUI
32 {
33 
34  class ILayerItem;
35 
37  public ISerializable
38  {
40 
41  public:
42  ILayer() { }
43  virtual ~ILayer() { }
44 
45  // имя леера
46  const std::string& getName() const
47  {
48  return mName;
49  }
50 
51  // создаем дочерний нод
52  virtual ILayerNode* createChildItemNode() = 0;
53  // удаляем дочерний нод
54  virtual void destroyChildItemNode(ILayerNode* _node) = 0;
55 
56  // поднимаем дочерний нод
57  virtual void upChildItemNode(ILayerNode* _node) = 0;
58 
59  // список детей
60  virtual EnumeratorILayerNode getEnumerator() const = 0;
61 
62  // возвращает виджет по позиции
63  virtual ILayerItem* getLayerItemByPoint(int _left, int _top) const = 0;
64 
65  // возвращает позицию в координатах леера
66  virtual IntPoint getPosition(int _left, int _top) const = 0;
67 
68  // возвращает размер леера
69  virtual const IntSize& getSize() const = 0;
70 
71  // рисует леер
72  virtual void renderToTarget(IRenderTarget* _target, bool _update) = 0;
73 
74  virtual void resizeView(const IntSize& _viewSize) = 0;
75 
76  protected:
77  std::string mName;
78  };
79 
80 } // namespace MyGUI
81 
82 #endif // __MYGUI_I_LAYER_H__