00001 #ifndef Impala_Visualization_GUI_HelpViewer_h
00002 #define Impala_Visualization_GUI_HelpViewer_h
00003
00004 #include "OglGui/Window.h"
00005 #include "OglGui/TextEdit.h"
00006 #include "Basis/CmdOptions.h"
00007
00008 namespace Impala {
00009 namespace Visualization {
00010 namespace GUI {
00011
00012 class HelpViewer: public OglGui::Window
00013 {
00014 public:
00015 HelpViewer(OglGui::Window *parent, int width, int height):
00016 OglGui::Window(parent, width, height, true)
00017 {
00018 Init();
00019 }
00020
00021 HelpViewer(OglGui::Window *parent, int x, int y, int width, int height):
00022 OglGui::Window(parent, x, y, width, height, true)
00023 {
00024 Init();
00025 }
00026
00027 private:
00028 void Init()
00029 {
00030 CmdOptions &options = CmdOptions::GetInstance();
00031 mHelpFile = options.GetString("helpFile");
00032
00033 if (mHelpFile == "")
00034 mHelpFile = String("README.txt");
00035
00036 mViewer = new OglGui::TextEdit(this, 2, 2, W() - 4, H() - 4, "", 3);
00037 mViewer->ConnectTo(this);
00038 mViewer->Editable(false);
00039 mViewer->ReadFile(mHelpFile);
00040 mViewer->SetRoundness(0,0,10,0);
00041 mViewer->SetBackground(0);
00042 mViewer->SetBorderType(4);
00043 mViewer->SetBorderFillShaded(2);
00044 }
00045
00046 String mHelpFile;
00047 OglGui::TextEdit* mViewer;
00048 };
00049
00050 }
00051 }
00052 }
00053
00054 #endif