00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef BUTTONHANDLE_H
00020 #define BUTTONHANDLE_H
00021
00022 #include <pandabase.h>
00023
00024
00025
00026
00027
00028
00029
00030 class EXPCL_PANDA ButtonHandle {
00031 PUBLISHED:
00032 INLINE ButtonHandle();
00033
00034 public:
00035 INLINE ButtonHandle(const ButtonHandle ©);
00036
00037 INLINE bool operator == (const ButtonHandle &other) const;
00038 INLINE bool operator != (const ButtonHandle &other) const;
00039 INLINE bool operator < (const ButtonHandle &other) const;
00040
00041 PUBLISHED:
00042 string get_name() const;
00043 INLINE bool has_ascii_equivalent() const;
00044 INLINE char get_ascii_equivalent() const;
00045
00046 INLINE int get_index() const;
00047 INLINE void output(ostream &out) const;
00048 INLINE static ButtonHandle none();
00049
00050 private:
00051 int _index;
00052 static ButtonHandle _none;
00053
00054 friend class ButtonRegistry;
00055 };
00056
00057
00058
00059 INLINE ostream &operator << (ostream &out, ButtonHandle button) {
00060 button.output(out);
00061 return out;
00062 }
00063
00064 #include "buttonHandle.I"
00065
00066 #endif
00067