Main Page   Hardware Class Hierarchy   Hardware API     Mapping Class Hierarchy  Mapping API 

fltk_gui.h

Go to the documentation of this file.
00001 /*
00002 Object Oriented Mobile Robot Model (OOMRM) C++  Library Copyright (C) 2002-2005  Derek Jones
00003 
00004 This library is free software; you can redistribute it  and/or
00005 modify it under the terms of the GNU Lesser General Public
00006 License  as published by the Free Software Foundation; either
00007 version 2.1 of the  License, or (at your option) any later version.
00008 
00009 This library is  distributed in the hope that it will be useful,
00010 but WITHOUT ANY WARRANTY;  without even the implied warranty of
00011 MERCHANTABILITY or FITNESS FOR A  PARTICULAR PURPOSE.  See the GNU
00012 Lesser General Public License for more  details.
00013 
00014 You should have received a copy of the GNU Lesser General  Public
00015 License along with this library; if not, write to the Free  Software
00016 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA   02111-1307  USA
00017 
00018 $Id: fltk_gui.h,v 1.3 2007/06/10 22:41:30 derek Exp $ 
00019 */
00020 #ifndef FLTK_GUI_H
00021 #define FLTK_GUI_H
00022 #include <host/fluid/fl_range_sensor.h>
00023 #include <FL/fl_ask.H>
00024 #include <FL/Fl_Hold_Browser.H>
00025 #include <FL/Fl_Menu.H>
00026 #include <FL/Fl_Output.H>
00027 #include <FL/Fl_Value_Output.H>
00028 #include <FL/Fl_Value_Input.H>
00029 #include <FL/Fl_Select_Browser.H>
00030 #include <jaus/component_list.h>
00031 #include <host/fl_simulator.h>
00032 #include <host/component_directory.h>
00033 //#include <jaus/components/subsystem_commander.h>
00034 #include <types.h>
00035 
00036 #define TILE_WIDTH 900
00037 #define TILE_HEIGHT 550
00038 #define XPOSITION 52
00039 
00040 enum OOMRM_GUI_RESOLUTION_CONVERTER { OOMRM_GUI_80x60=0, OOMRM_GUI_160x120=1, OOMRM_GUI_320x240=2, OOMRM_GUI_640x480=3};
00041 enum OOMRM_GUI_COLOR_CONVERTER { OOMRM_GUI_2BIT=0, OOMRM_GUI_4BIT=1, OOMRM_GUI_6BIT=2, OOMRM_GUI_8BIT=3, OOMRM_GUI_JPEG=4};
00042 
00043 class RS_GUI : public Range_Sensor
00044 {
00045 public:
00046   RS_GUI(void);
00047   uint8 label(void);
00048   void label(uint8);
00049   #ifndef RTOS
00050   CENTIMETER query_distance(uint8);
00051   #endif
00052   void refresh(void);
00053   void distance(int); // update output.
00054   void bearing(int); 
00055 private:
00056   uint8 Label; // rather than keep label inside OOMRM object just use object_list::count();
00057 };
00058 
00059 
00060 class OOMRM_Simulator;
00061 
00063 
00069 class FLTK_GUI  //: public Drawing_Area // public subsystem_commander
00070 {
00071 protected:
00072 
00073 public:
00074   FLTK_GUI(int x,int y,int w,int h);    
00075   FLTK_GUI(void);
00076   #ifndef RTOS
00077   // until I decide to abandon the non RTOS portion.
00078   void refresh(Component_List& component_list);
00079   #endif
00080   bool check(void);
00081   void check_cursor(void);
00082   bool wait(void);
00083   int handle(int);
00084   int get_selection(void);
00085   void diagnostics(void);
00086 };
00087 
00088 #endif

Generated on Mon Oct 8 19:32:18 2007 for OOMRM Mapping API by doxygen1.3