00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef ROCKETREGION_H
00016 #define ROCKETREGION_H
00017
00018 #include "config_rocket.h"
00019 #include "displayRegion.h"
00020 #include "rocketRenderInterface.h"
00021 #include "rocketInputHandler.h"
00022
00023 class OrthographicLens;
00024
00025
00026
00027
00028
00029
00030 class EXPCL_ROCKET RocketRegion : public DisplayRegion {
00031 protected:
00032 RocketRegion(GraphicsOutput *window, const LVecBase4 &dimensions,
00033 const string &context_name);
00034
00035 virtual void do_cull(CullHandler *cull_handler, SceneSetup *scene_setup,
00036 GraphicsStateGuardian *gsg, Thread *current_thread);
00037
00038 PUBLISHED:
00039 virtual ~RocketRegion();
00040
00041 INLINE static RocketRegion* make(const string &context_name,
00042 GraphicsOutput *window);
00043 INLINE static RocketRegion* make(const string &context_name,
00044 GraphicsOutput *window,
00045 const LVecBase4 &dimensions);
00046 #ifndef CPPPARSER
00047 INLINE Rocket::Core::Context* get_context() const;
00048 #endif
00049 #ifdef HAVE_ROCKET_PYTHON
00050 EXTENSION(PyObject *get_context() const);
00051 #endif
00052
00053 INLINE void set_input_handler(RocketInputHandler *handler);
00054 INLINE RocketInputHandler *get_input_handler() const;
00055
00056 bool init_debugger();
00057 void set_debugger_visible(bool visible);
00058 bool is_debugger_visible() const;
00059
00060 private:
00061 RocketRenderInterface _interface;
00062 Rocket::Core::Context* _context;
00063 PT(OrthographicLens) _lens;
00064 PT(RocketInputHandler) _input_handler;
00065
00066 public:
00067 static TypeHandle get_class_type() {
00068 return _type_handle;
00069 }
00070 static void init_type() {
00071 DisplayRegion::init_type();
00072 register_type(_type_handle, "RocketRegion",
00073 DisplayRegion::get_class_type());
00074 }
00075 virtual TypeHandle get_type() const {
00076 return get_class_type();
00077 }
00078 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00079
00080 private:
00081 static TypeHandle _type_handle;
00082 };
00083
00084 #include "rocketRegion.I"
00085
00086 #endif