Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members

Simple_Viewer.hxx

00001 
00002 // 
00003 // Copyright (C) 2006 James M. Lawrence.  All rights reserved.
00004 // 
00005 // software: esve-1.0.3
00006 // file: esve/viewers/dimn/Simple_Viewer.hxx
00007 // 
00008 // Redistribution and use in source and binary forms, with or without
00009 // modification, are permitted provided that the following conditions
00010 // are met:
00011 // 
00012 // 1. Redistributions of source code must retain the above copyright
00013 //    notice, this list of conditions and the following disclaimer.
00014 // 
00015 // 2. The origin of this software must not be misrepresented; you must
00016 //    not claim that you wrote the original software.  If you use this
00017 //    software in a product, an acknowledgment in the product 
00018 //    documentation would be appreciated but is not required.
00019 // 
00020 // 3. Altered source versions must be plainly marked as such, and must
00021 //    not be misrepresented as being the original software.
00022 // 
00023 // 4. The name of the author may not be used to endorse or promote
00024 //    products derived from this software without specific prior written
00025 //    permission.
00026 // 
00027 // THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY,
00028 // AND WITH NO CLAIM AS TO ITS SUITABILITY FOR ANY PURPOSE.  IN NO EVENT
00029 // SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM WHATSOEVER MADE IN CONNECTION
00030 // TO THIS SOFTWARE.
00031 // 
00033 
00034 #ifndef esve_viewers_dimn_Simple_Viewer_hxx
00035 #define esve_viewers_dimn_Simple_Viewer_hxx
00036 
00037 #include <esve/viewers/dimn/Minimal_Viewer.hxx>
00038 #include <esve/components/dimn/Valuator_Handler.hxx>
00039 #include <esve/components/dimn/Simple_UI.hxx>
00040 #include <esve/ui/extra/Toggle_Handler.hxx>
00041 #include <esve/ui/extra/File_Selector_Handler.hxx>
00042 #include <esve/ui/base/Keyboard_Handler.hxx>
00043 #include <esve/ui/base/Mouse_Handler.hxx>
00044 #include <esve/types/quat.hxx>
00045 #include <esve/types/pure.hxx>
00046 #include <esve/types/complex.hxx>
00047 #include <esve/types/Constants.hxx>
00048 #include <string>
00049 
00050 namespace esve { namespace viewers { namespace dimn {
00051 
00056 
00057 class Simple_Viewer
00058     : virtual protected Minimal_Viewer,
00059       virtual protected components::dimn::Simple_UI,
00060       virtual protected types::Constants,
00061       protected components::dimn::Valuator_Handler<types::real>,
00062       protected components::dimn::Valuator_Handler<types::complex>,
00063       protected components::dimn::Valuator_Handler<types::pure>,
00064       protected components::dimn::Valuator_Handler<types::quat>,
00065       protected ui::extra::Toggle_Handler,
00066       protected ui::extra::File_Selector_Handler,
00067       protected ui::base::Keyboard_Handler,
00068       protected ui::base::Mouse_Handler
00069 {
00070 public:
00073     typedef types::real real ;
00074 
00077     typedef types::complex complex ;
00078 
00081     typedef types::pure pure ;
00082 
00085     typedef types::quat quat ;
00086 
00089     typedef components::dimn::Valuator<real> Valuator ;
00090 
00093     typedef components::dimn::Valuator<complex> Complex_Valuator ;
00094 
00097     typedef components::dimn::Valuator<pure> Pure_Valuator ;
00098 
00101     typedef components::dimn::Valuator<quat> Quat_Valuator ;
00102 
00104     virtual const std::string & help_text() const = 0 ;
00105 
00107     virtual void initialize() = 0 ;
00108 
00109     // defaults of 'return false'
00110     bool handle_key_push( Key, const Keyboard & ) ;
00111     bool handle_key_release( Key, const Keyboard & ) ;
00112     bool handle_mouse_move( const Mouse & ) ;
00113     bool handle_mouse_push( Button, const Mouse & ) ;
00114     bool handle_mouse_release( Button, const Mouse & ) ;
00115     bool handle_toggle( const Toggle & ) ;
00116     bool handle_file_selector( const File_Selector & ) ;
00117     bool handle_valuator( const Valuator & ) ;
00118     bool handle_valuator( const Complex_Valuator & ) ;
00119     bool handle_valuator( const Pure_Valuator & ) ;
00120     bool handle_valuator( const Quat_Valuator & ) ;
00121 
00122     virtual ~Simple_Viewer() = 0 ;
00123 
00124 protected:
00125     Simple_Viewer() ;
00126 
00127 private:
00128     Simple_Viewer( const Simple_Viewer & ) ;
00129     Simple_Viewer & operator=( const Simple_Viewer & ) ;
00130 } ;
00131 
00132 }}} // namespace esve::viewers::dimn
00133 
00134 #endif

Generated on Tue May 30 11:40:53 2006 for esve by doxygen 1.3.4