層在MyGUI 是一個容器,層的組織是什麼樣的,它究竟包含哪些東西?
按照接口的定義而言,藉口只是純虛函數的組合,沒有member varible
ILayer() { }
virtual ~ILayer() { }
// 鐵路的名稱,不明白google爲何這樣翻譯,應該是層名吧?
const std::string& getName() const { return mName; }
// 創建一個子節點,ILayerNode
virtual ILayerNode* createChildItemNode() = 0;
// 清楚子節點
virtual void destroyChildItemNode(ILayerNode* _node) = 0;
// 維護更新一個子節點
virtual void upChildItemNode(ILayerNode* _node) = 0;
// 子節點類型
virtual EnumeratorILayerNode getEnumerator() = 0;
// 返回當前位置的子節點
virtual ILayerItem* getLayerItemByPoint(int _left, int _top) = 0;
// 獲得Layer的位置
// 這點需要得到強調:
// 是由InputManager 的injectPressMouse 壓入的。
virtual IntPoint getPosition(int _left, int _top) const = 0;
// 返回視窗的大小View
virtual const IntSize& getSize() const = 0;
// 渲染。
virtual void renderToTarget(IRenderTarget* _target, bool _update) = 0;
virtual void dumpStatisticToLog() { }