00001
00002
00003
00004 #ifndef Impala_Visualization_DirImViewerScroller_h
00005 #define Impala_Visualization_DirImViewerScroller_h
00006
00007 #include "OglGui/WindowDocScroller.h"
00008 #include "Visualization/DirImViewer.h"
00009
00010 namespace Impala {
00011 namespace Visualization {
00012
00013 class DirImViewerScroller : public OglGui::WindowDocScroller
00014 {
00015 public:
00016 typedef OglGui::WindowDocScroller WindowDocScroller;
00017
00018 DirImViewerScroller(int x, int y, int w, int h) :
00019 WindowDocScroller(x, y, w, h, 2+0)
00020 {
00021 Init();
00022 }
00023
00024 DirImViewerScroller(Window* parent, int w, int h) :
00025 WindowDocScroller(parent, w, h, 2+0)
00026 {
00027 Init();
00028 }
00029
00030 DirImViewerScroller(Window* parent,int x,int y,int w,int h):
00031 WindowDocScroller(parent, x, y, w, h, 2+0)
00032 {
00033 Init();
00034 }
00035
00036 void OpenDir(strconst dirName) { mDirImViewer->OpenDir(dirName); }
00037
00038 #if !defined(NO_RAW) && defined(REPOSITORY_USED)
00039 void OpenSrc(const Persistency::RgbDataSrcLocator& loc)
00040 {
00041 mDirImViewer->OpenSrc(loc);
00042 }
00043 #endif
00044
00045 DirImViewer* DirImView() { return mDirImViewer; }
00046 void NrOfImOnRow(int n) { mDirImViewer->NrOfImOnRow(n); }
00047 void ShowNames(bool mode) { mDirImViewer->ShowNames(mode); }
00048 void ShowDims(bool mode) { mDirImViewer->ShowDims(mode); }
00049 void FixedCellWidth(int w) { mDirImViewer->FixedCellWidth(w); }
00050
00051
00052 virtual void DisplayFunc()
00053 {
00054 OglGui::WindowDocScroller::DisplayFunc();
00055 int hH = mHolder->H();
00056 int cellH = mDirImViewer->CellHeight();
00057 int dif = (cellH > hH) ? hH-cellH : hH%cellH;
00058 SetPageDeltas(RETAIN, dif);
00059 }
00060
00061 private:
00062 void Init()
00063 {
00064 VerticalScrollBar()->SetLineIncrement(10);
00065 mDirImViewer = new DirImViewer(this,0,0,100, 100);
00066 SetDocWindow(mDirImViewer,mDirImViewer,2);
00067 ReshapeFollowMode(0);
00068 }
00069
00070 DirImViewer* mDirImViewer;
00071 };
00072
00073 }
00074 }
00075 #endif
00076