00001 #ifndef key_viewer_included 00002 #define key_viewer_included 00003 00004 #include <cxxtls/viewermanager.h> 00005 #include <cxxtls/file.h> 00006 #include <vector> 00007 #include <list> 00008 #include <set> 00009 00010 namespace cxxtls 00011 { 00012 00018 00019 struct KeyViewer 00020 : public ListViewer::policies 00021 // 00064 { 00065 bool is_marked(size_t index); 00066 00067 KeyViewer(); 00068 00069 virtual ~KeyViewer(); 00070 00071 void handle_resize(CursorWindow::row_col const &vp_size); 00072 // 00074 00075 int handle_event(CursorWindow::input_event const *e, 00076 size_t index, 00077 ViewerManager* vm); 00078 // 00081 // 00082 00083 00084 static Viewer* app(ViewerManager*vm, std::string &fullname); 00085 // 00090 00091 static std::string app_name; 00092 // 00095 00096 std::string const& application_name() const { return app_name; } 00097 // 00101 00102 std::string description() const { return "Viewing keys"; } 00103 00104 virtual std::auto_ptr< std::list<std::string> > help_text(); 00105 00106 }; 00107 00108 } // namespace cxxtls 00109 00110 #endif