diff --git a/panda/src/gui/guiRegion.I b/panda/src/gui/guiRegion.I deleted file mode 100644 index 51edd56ee9..0000000000 --- a/panda/src/gui/guiRegion.I +++ /dev/null @@ -1,54 +0,0 @@ -// Filename: guiRegion.I -// Created by: cary (26Oct00) -// -//////////////////////////////////////////////////////////////////// - -INLINE GuiRegion::GuiRegion(void) { -} - -INLINE GuiRegion::GuiRegion(const string& name, float l, float r, float b, - float t, bool buttons) : Namable(name), _left(l), - _right(r), _bottom(b), - _top(t) { - gui_cat->spam() << "region '" << name << "' constructed with (" << l - << ", " << r << ", " << b << ", " << t << ")" << endl; - _region = new MouseWatcherRegion(name, l, r, b, t); - _region->set_suppress_below(buttons); -} - -INLINE MouseWatcherRegion* GuiRegion::get_region(void) const { - test_ref_count_integrity(); - _region->test_ref_count_integrity(); - return _region; -} - -INLINE void GuiRegion::trap_clicks(bool t) { - test_ref_count_integrity(); - _region->test_ref_count_integrity(); - _region->set_suppress_below(t); -} - -INLINE void GuiRegion::set_region(float left, float right, float bottom, - float top) { - test_ref_count_integrity(); - _region->test_ref_count_integrity(); - _region->set_frame(left, right, bottom, top); - _left = left; - _right = right; - _bottom = bottom; - _top = top; - gui_cat->spam() << "reset region '" << this->get_name() << " to (" << left - << ", " << right << ", " << bottom << ", " << top << ")" - << endl; -} - -INLINE LVector4f GuiRegion::get_frame(void) const { - test_ref_count_integrity(); - _region->test_ref_count_integrity(); - return LVector4f(_left, _right, _bottom, _top); -} - -INLINE int GuiRegion::set_draw_order(int draw_order) { - _region->set_sort(draw_order); - return draw_order + 1; -} diff --git a/panda/src/gui/guiRegion.cxx b/panda/src/gui/guiRegion.cxx deleted file mode 100644 index b24b473417..0000000000 --- a/panda/src/gui/guiRegion.cxx +++ /dev/null @@ -1,16 +0,0 @@ -// Filename: guiRegion.cxx -// Created by: cary (26Oct00) -// -//////////////////////////////////////////////////////////////////// - -#include "config_gui.h" -#include "guiRegion.h" - -TypeHandle GuiRegion::_type_handle; - -GuiRegion::~GuiRegion(void) { -#ifdef _DEBUG - if (gui_cat->is_debug()) - gui_cat->debug() << "deleting region '" << *this << "'" << endl; -#endif -} diff --git a/panda/src/gui/guiRegion.h b/panda/src/gui/guiRegion.h deleted file mode 100644 index 20e33b6a7c..0000000000 --- a/panda/src/gui/guiRegion.h +++ /dev/null @@ -1,61 +0,0 @@ -// Filename: guiRegion.h -// Created by: cary (26Oct00) -// -//////////////////////////////////////////////////////////////////// - -#ifndef __GUIREGION_H__ -#define __GUIREGION_H__ - -#include -#include -#include -#include - -#include "config_gui.h" - -// container for active regions of a GUI - -class GuiManager; - -class EXPCL_PANDA GuiRegion : public MouseWatcherRegion { -private: - INLINE GuiRegion(void); - - INLINE MouseWatcherRegion* get_region(void) const; - - friend GuiManager; - -PUBLISHED: - INLINE GuiRegion(const string&, float, float, float, float, bool); - ~GuiRegion(void); - - INLINE void trap_clicks(bool); - - INLINE void set_region(float, float, float, float); - INLINE LVector4f get_frame(void) const; - INLINE int set_draw_order(int); - -public: - // type interface - static TypeHandle get_class_type(void) { - return _type_handle; - } - static void init_type(void) { - TypedReferenceCount::init_type(); - register_type(_type_handle, "GuiRegion", - TypedReferenceCount::get_class_type()); - } - virtual TypeHandle get_type(void) const { - return get_class_type(); - } - virtual TypeHandle force_init_type(void) { - init_type(); - return get_class_type(); - } -private: - static TypeHandle _type_handle; -}; - -#include "guiRegion.I" - -#endif /* __GUIREGION_H__ */