00001 00002 // 00003 // Copyright 2010, Lowell Boggs Jr. 00004 // 00005 // This file or directory, containing source code for a computer program, 00006 // is Copyrighted by Lowell Boggs, Jr. 987 Regency Drive, Lewisville 00007 // TX (USA), 75067. You may use, copy, modify, and distribute this 00008 // source file without charge or obligation so long as you agree to 00009 // the following: 00010 // 00011 // 1. You must indemnify Lowell Boggs against any and all financial 00012 // obligations caused by its use, misuse, function, or malfunction. 00013 // Further, you acknowledge that there is no warranty of any kind, 00014 // whatsoever. 00015 // 00016 // 2. You agree not to attempt to patent any portion of this original 00017 // work -- though you may attempt to patent your own extensions to 00018 // it if you so choose. 00019 // 00020 // 3. You keep this copyright notice with the file and all copies 00021 // of the file and do not change it anyway except language translation. 00022 // 00023 // You are responsible for enforcing your own compliance with these 00024 // conditions and may not use this source file if you cannot agree to the 00025 // above terms and conditions. 00026 00027 00028 //@File 00029 // 00032 00033 #include <cxxtls/csvviewer.h> 00034 #include <cxxtls/viewermanager.h> 00035 #include <iostream> 00036 00037 using namespace std; 00038 using namespace cxxtls; 00039 00040 00041 00042 int main() 00043 { 00044 ViewerManager vm; 00045 00046 vm.open(); 00047 00048 CsvViewer *p; 00049 00050 vm.add( p = (new CsvViewer(&vm,"csv.csv")), "CSV" ); 00051 00052 (*p)(vm.active_viewport(), CursorWindow::viewport::repaint_handler::activate); 00053 00054 vm.run(); 00055 00056 00057 00058 } 00059