00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef PGWAITBAR_H
00016 #define PGWAITBAR_H
00017
00018 #include "pandabase.h"
00019
00020 #include "pgItem.h"
00021
00022
00023
00024
00025
00026
00027
00028
00029 class EXPCL_PANDA_PGUI PGWaitBar : public PGItem {
00030 PUBLISHED:
00031 PGWaitBar(const string &name = "");
00032 virtual ~PGWaitBar();
00033
00034 protected:
00035 PGWaitBar(const PGWaitBar ©);
00036
00037 public:
00038 virtual PandaNode *make_copy() const;
00039 virtual bool cull_callback(CullTraverser *trav, CullTraverserData &data);
00040
00041 PUBLISHED:
00042 void setup(PN_stdfloat width, PN_stdfloat height, PN_stdfloat range);
00043
00044 INLINE void set_range(PN_stdfloat range);
00045 INLINE PN_stdfloat get_range() const;
00046
00047 INLINE void set_value(PN_stdfloat value);
00048 INLINE PN_stdfloat get_value() const;
00049
00050 INLINE PN_stdfloat get_percent() const;
00051
00052 INLINE void set_bar_style(const PGFrameStyle &style);
00053 INLINE PGFrameStyle get_bar_style() const;
00054
00055 private:
00056 void update();
00057
00058 PN_stdfloat _range, _value;
00059 int _bar_state;
00060 PGFrameStyle _bar_style;
00061 NodePath _bar;
00062
00063 public:
00064 static TypeHandle get_class_type() {
00065 return _type_handle;
00066 }
00067 static void init_type() {
00068 PGItem::init_type();
00069 register_type(_type_handle, "PGWaitBar",
00070 PGItem::get_class_type());
00071 }
00072 virtual TypeHandle get_type() const {
00073 return get_class_type();
00074 }
00075 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
00076
00077 private:
00078 static TypeHandle _type_handle;
00079 };
00080
00081 #include "pgWaitBar.I"
00082
00083 #endif