urgViewDemo.h

00001 #ifndef URG_VIEW_DEMO_H
00002 #define URG_VIEW_DEMO_H
00003 
00004 /*
00005   URGView のデモクラス
00006   Satofumi KAMIMURA
00007   $Id$
00008 */
00009 
00010 #include "guiApplicationInterface.h"
00011 #include "mURGCtrl.h"
00012 #include "propertyInfo.h"
00013 
00014 #define Monitor
00015 
00016 
00017 class URGViewDemo : public GUI_ApplicationInterface {
00018   enum {
00019     M_LINES = 10,
00020     FrameWidth = 100,
00021     LogLevel = 1,
00022   };
00023   enum {
00024     BackColor = Gray3,
00025     LineColor = Gray13,
00026   };
00027   DrawSurface* times_text;
00028   LabelComponent* times_label;
00029   FillSurface* back;
00030   FillSurface* frame;
00031   FillSurface* button_back;
00032   FillSurface* button_focused_back;
00033   DrawSurface* larger_text;
00034   MultiSurface* larger_normal;
00035   MultiSurface* larger_focused;
00036   DrawSurface* smaller_text;
00037   MultiSurface* smaller_normal;
00038   MultiSurface* smaller_focused;
00039   DrawSurface* quit_text;
00040   MultiSurface* quit_normal;
00041   MultiSurface* quit_focused;
00042   DrawSurface* m_surface[M_LINES];
00043   DrawSurface* pause_text;
00044 #ifdef Monitor
00045   mURGCtrl* urg;
00046 #else
00047   URGCtrl* urg;
00048 #endif
00049 
00050   ViewComponent* view;
00051   ViewComponent* sensed;
00052   LabelComponent* m_label[M_LINES];
00053   ButtonComponent* quit_button;
00054   ButtonComponent* larger_button;
00055   ButtonComponent* smaller_button;
00056 
00057   double base_magnify;
00058   int int_magnify;
00059   double magnify_max;
00060   double magnify_min;
00061   Grid view_offset;
00062 
00063   std::string ttf_path;
00064   class URGViewProperty : public PropertyInfo {
00065     void evaluate(void);
00066   public:
00067     std::string ttf_file;
00068   };
00069   URGViewProperty& property;
00070 
00071   void updateMagnify(double magnify);
00072 
00073 
00074 public:
00075   URGViewDemo(void);
00076   ~URGViewDemo(void);
00077 
00078   int Initialize(int argc, char *argv[]);
00079   int MainLoop(void);
00080 };
00081 
00082 #endif /* !URG_VIEW_DEMO_H */
00083 

Generated on Mon Apr 13 22:52:02 2009 by  doxygen 1.5.7.1