00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00033
00034 #ifndef esve_viewers_dim3_Simple_Viewer_hxx
00035 #define esve_viewers_dim3_Simple_Viewer_hxx
00036
00037 #include <esve/viewers/dim3/Minimal_Viewer.hxx>
00038 #include <esve/viewers/dim3/Auto_Widgets.hxx>
00039 #include <esve/viewers/dimn/Simple_Viewer.hxx>
00040 #include <esve/engine/dim3/Make_Geom.hxx>
00041 #include <string>
00042 #include <memory>
00043
00044 namespace esve { namespace viewers { namespace dim3 {
00045
00050
00051 class Simple_Viewer
00052 : virtual protected Auto_Widgets,
00053 virtual protected viewers::dimn::Simple_Viewer,
00054 virtual protected viewers::dim3::Minimal_Viewer
00055 {
00056 public:
00058 Simple_Viewer( int argc,
00059 char** argv,
00060 const std::string & label = "simple3d" ) ;
00061
00062 int takeover() ;
00063
00064 ~Simple_Viewer() ;
00065
00066 protected:
00068
00070
00071 const std::string & help_text() const ;
00072 void initialize() ;
00073
00075
00077
00078 void add_geom( engine::dim3::Geom & ) ;
00079 void remove_geom( engine::dim3::Geom & ) ;
00080
00082
00084
00085 void create_label( const std::string & label ) ;
00086
00087
00089 Valuator &
00090 create_valuator( real initial_value,
00091 const std::string & label = "" ) ;
00092
00093 Complex_Valuator &
00094 create_valuator( const complex & initial_value,
00095 const std::string & label = "" ) ;
00096
00097 Pure_Valuator &
00098 create_valuator( const pure & initial_value,
00099 const std::string & label = "" ) ;
00100
00101 Quat_Valuator &
00102 create_valuator( const quat & initial_value,
00103 const std::string & label = "" ) ;
00104
00105 Toggle &
00106 create_toggle( bool initial_value,
00107 const std::string & label ) ;
00108
00109 File_Selector &
00110 create_file_selector( const std::string & initial_value = "",
00111 const std::string & label = "file",
00112 const std::string & selector_label = "select a file",
00113 const std::string & initial_directory = ".",
00114 const std::string & filter = "*" ) ;
00115
00116 void create_help( const std::string & text,
00117 const std::string & label = "help" ) ;
00118
00120
00122
00123 Valuator &
00124 create_scaling_valuator( const std::string & label = "scale" ) ;
00125
00127
00129
00132 void add_handler( kernel::Handler & ) ;
00133 void remove_handler( kernel::Handler & ) ;
00134 void add_handler( components::dimn::Motion_Handler & ) ;
00135 void remove_handler( components::dimn::Motion_Handler & ) ;
00137
00138 Catch_Function catch_function() const ;
00139 void catch_function( Catch_Function ) ;
00140
00141 private:
00142 Simple_Viewer( const Simple_Viewer & ) ;
00143 Simple_Viewer & operator=( const Simple_Viewer & ) ;
00144
00145 class Private ;
00146 const std::auto_ptr<Private> m ;
00147 } ;
00148
00149 }}}
00150
00151 #endif
00152