UGDK
|
00001 #ifndef UGDK_UI_UIELEMENT_H_ 00002 #define UGDK_UI_UIELEMENT_H_ 00003 00004 #include <ugdk/ui.h> 00005 #include <ugdk/util.h> 00006 #include <ugdk/graphic.h> 00007 00008 namespace ugdk { 00009 namespace ui { 00010 00011 class UIElement { 00012 public: 00013 virtual ~UIElement(); 00014 00015 void set_owner(Menu* owner) { owner_ = owner; } 00016 graphic::Node* node() const { return node_; } 00017 00018 virtual void Interact() const = 0; 00019 virtual ikdtree::Box<2> GetBoundingBox() const = 0; 00020 00021 protected: 00022 UIElement(); 00023 00024 Menu* owner_; 00025 graphic::Node* node_; 00026 }; 00027 00028 } // namespace ui 00029 } // namespace ugdk 00030 00031 #endif /* UGDK_UIELEMENT_H_ */