Home || Architecture || Video Search || Visual Search || Scripts || Applications || Important Messages || OGL || Src

TagsLife.h

Go to the documentation of this file.
00001 //345678901234567890123456789012345678901234567890123456789012345678901234567890
00002 #ifndef Impala_Application_TagsLife_TagsLife_h
00003 #define Impala_Application_TagsLife_TagsLife_h
00004 
00005 #include "Application/MediaTable/TableDataStore.h"
00006 
00007 #include "OglGui/Tabs.h"
00008 #include "OglGui/StringSelector.h"
00009 #include "OglGui/WindowView2D.h"
00010 #include "OglGui/ZoomPanControl.h"
00011 #include "OglGui/TextEdit.h"
00012 #include "OglGui/IntervalChooser.h"
00013 #include "OglGui/ScrollWnd.h"
00014 #include "Basis/String.h"
00015 
00016 #include "DirFileNames.h"
00017 
00018 #include "TagsWeekPlot.h"
00019 #include "HistogramBars.h"
00020 #include "ViewListenerCircles.h"
00021 
00022 //#define USE_BOOST_GRAPH
00023 #ifdef USE_BOOST_GRAPH
00024 #include "BoostedGraph.h"
00025 #else
00026 #include "LabeledGraph.h"
00027 #endif
00028 
00029 #define USE_CURL
00030 //#define USE_BOOST_THREADPOOL
00031 #include "RemoteRetriever.h"
00032 
00033 #include "TableDataSourceWeekMap.h"
00034 
00035 #include "Application/MediaTable/ImageCache.h"
00036 #include "Application/MediaTable/GridWindow.h"
00037 #include "Application/MediaTable/TableWindow.h"
00038 
00039 #include "BarPlot.h"
00040 #include "TagsWeekBarPlot.h"
00041 
00042 #include "Tag.h"
00043 
00044 namespace Impala {
00045 namespace Application {
00046 namespace TagsLife {
00047 
00048 using namespace MediaTable;
00049 
00050 class TagsLife :  public OglGui::Window,
00051                   public OglGui::TabsListener,
00052                   public OglGui::StringListener,
00053                   public OglGui::IntervalChooserListener
00054 {
00055 public:
00056     typedef OglGui::StaticText                  StaticText;
00057     typedef OglGui::StringSelector              StringSelector;
00058     typedef OglGui::ZoomPanControl              ZoomPanControl;
00059     typedef OglGui::WindowView2D                WindowView2D;
00060     typedef OglGui::IntervalChooser             IntervalChooser;
00061 
00062 #ifndef USE_BOOST_GRAPH
00063     typedef LabeledGraph                                                BoostedGraph;
00064 #endif
00065 
00066     TagsLife(int x, int y, int w, int h) :
00067         OglGui::Window(x,y,w,h)
00068     {
00069         Init(w,h);
00070     }
00071 
00072     TagsLife(OglGui::Window* parent, int x, int y, int w, int h) :
00073         OglGui::Window(parent,x,y,w,h)
00074     {
00075         Init(w,h);
00076     }
00077 
00078     virtual void
00079     StringSelectionEvent(StringSelector *src, int strIndex, void* listenerData)
00080     {
00081         string tag = "";
00082         if(mTag != 0) tag = mTag->tag;
00083         if(tag.compare(src->GetString(strIndex)) != 0) {
00084                 string newTag = src->GetString(strIndex);
00085                 ILOG_INFO("Loading new tag: " << newTag);
00086                 loadNewTag(newTag);
00087         }
00088     }
00089 
00090     virtual void
00091     IntervalChanged(IntervalChooser *src,int minVal,int maxVal,void *userData)
00092     {
00093         mTagsWeekPlotUsed->ShowRange(minVal,maxVal);
00094         mBarPlotViewed->ShowRange(minVal,maxVal);
00095         mHistoBarsUsed->HighLightInterval(minVal,maxVal);
00096         mHistoBarsViewed->HighLightInterval(minVal,maxVal);
00097 
00098         int x, y, w, h;
00099         float zoomx, zoomy;
00100 
00101         OGLVIEW* v = mGlobeMap->GetOglView();
00102         if(v == 0 || v->im == 0) return;
00103         int imW = v->im->w;
00104         int imH = v->im->h;
00105 
00106         float lat2ym65 = lat2y(-65), lat2y85 = lat2y(85);
00107 
00108         mViewListenerCircles.Clear();
00109 
00110         Tag::geoDataType geoData = mTag->getGeoData(minVal, maxVal);
00111                 for(Tag::geoDataType::iterator iter = geoData.begin(); iter != geoData.end(); iter++) {
00112                         float radius = 5*sqrt(iter->second->count)/(maxVal-minVal);
00113                         radius = cap(radius, 3, 75);
00114                         mViewListenerCircles.AddCircle(map(iter->second->centerLongitude, -180, 180, 0, imH),
00115                                                                                         map(lat2y(iter->second->centerLatitude), lat2ym65, lat2y85, 0, imH),
00116                                                                                         radius);
00117                 }
00118     }
00119 
00120     float y2lat(float a) { return 180/M_PI * (2 * atan(exp(a*M_PI/180)) - M_PI/2); }
00121     float lat2y(float a) { return 180/M_PI * log(tan(M_PI/4+a*(M_PI/180)/2)); }
00122 
00123 
00124     virtual void
00125     TabSelectionEvent(OglGui::Tabs *src, int tabNr, void* data)
00126     {
00127         ULONG   normCol = (tabNr==0) ? oglRED     : 0xff0090ee;
00128         ULONG   highCol = (tabNr==0) ? 0xff800000 : 0xff00385d;
00129         mIntervalChooser->StartThumb()->SetColors(normCol, highCol);
00130         mHistoBarsUsed->SetVisible(tabNr==0);
00131         mHistoBarsViewed->SetVisible(tabNr==1);
00132     }
00133 
00134 protected:
00135     void FillTagSelector()
00136     {
00137         vector<string*> files;
00138         DirFileNames("Data", files);
00139         for(int j=0 ; j<files.size() ; j++) {
00140                 string filter = "_analysis.xml";
00141                 string fileName = *files[j];
00142                 if(fileName.size() > filter.size() &&
00143                                 fileName.compare(fileName.size()-filter.size(), filter.size(), filter) == 0)
00144                          mTagSelector->AddString(fileName.substr(0, fileName.size()-filter.size()));
00145         }
00146     }
00147 
00148     void
00149     SetTagInfo()
00150     {
00151         ILOG_DEBUG("Setting value for TagInfo, tag=" << mTag->tag);
00152         ILOG_DEBUG("Setting value for TagInfo, nrOfPhotos=" << mTag->nrOfPhotos);
00153                 string txt = "I am the " + mTag->tag + " tag.\n"
00154                                    + "I was first used on " + Tag::formatDate(&mTag->firstUse) + ".\n"
00155                                    + "Since then, I have been used " + MakeString(mTag->nrOfPhotos) + " times.\n"
00156                                    + "I was most used in week " + MakeString(mTag->mostUsedWeek) + "\n"
00157                                    + "with a total of " + MakeString(mTag->mostUsedCount) + " uses.\n"
00158                                    + "My 3 most popular pictures are:";
00159         mTagInfoTEdit->SetText(txt);
00160     }
00161 
00162 
00163 protected:
00164 
00165     /*void DoTitleImage(OglGui::Window* parent, int x, int y, int w, int h)
00166     {
00167         OGLIMAGE* oglIm = TryReadPNG("TagsLife276x60.png");
00168         mTitleView2D = new WindowView2D(parent,x,y,w,h,oglIm);
00169         ReleaseOglImage(oglIm);
00170     }*/
00171 
00172     void DoTagSelector(OglGui::Window* parent, int x, int y, int w, int h)
00173     {
00174         mTagSelector = new StringSelector(parent,x,y,w,h);
00175         //mTagSelector->SetBackground(PaletteBackground);
00176         mTagSelector->SetStringListener(this);
00177         FillTagSelector();
00178     }
00179 
00180     void DoTabs(OglGui::Window* parent, int x, int y, int w, int h)
00181     {
00182         mTabs = new OglGui::Tabs(parent,x,y,w,h,120,22);
00183         mTabs->SetTabsListener(this);
00184         mTabs->SetBackground(PaletteMainBackground);
00185         mTabs->SetBorderBackground(PaletteBackground);
00186 
00187         mTabUsed = newTab("Used", mTabs);
00188 
00189         mTagsWeekPlotUsed =
00190             new TagsWeekPlot(mTabUsed,0,0,mTabUsed->W(),mTabUsed->H());
00191 
00192         mTagsWeekPlotUsed->ConnectTo(mTabUsed);
00193         mTagsWeekPlotUsed->BarColors(PaletteForeground1, PaletteForeground1, PaletteForeground1);
00194         mTagsWeekPlotUsed->ShowRange(0,20);
00195 
00196         TableDataSource* src = new TableDataSourceWeekMap(mTag->weekStats, mTag->lastWeek);
00197 
00198         TableDataStore::GetInstance()->AddTableDataSource("WeekMap", src);
00199         mSource = TableDataStore::GetInstance()->GetTableDataView("WeekMap", "MediaTable");
00200 
00201         mTabViewed = newTab("Viewed", mTabs);
00202 
00203         mBarPlotViewed =
00204             new TagsWeekBarPlot(mTabViewed,0,0,mTabViewed->W(),mTabViewed->H());
00205         mBarPlotViewed->ConnectTo(mTabViewed);
00206         mBarPlotViewed->BarColors(PaletteForeground2, PaletteForeground2a, PaletteForeground2);
00207         mBarPlotViewed->ShowRange(0,20);
00208 
00209         mTabRelated = newTab("Related", mTabs);
00210 
00211         mTagsRelatedGraph = new BoostedGraph(mTabRelated, mTabRelated->W(), mTabRelated->H());
00212         mTagsRelatedGraph->ConnectTo(mTabRelated);
00213 
00214         mTabTable = newTab("Table", mTabs);
00215         mTabGrid = newTab("Grid", mTabs);
00216         DoVideoExcelTabs();
00217 
00218         mTabs->SetForeground(PaletteForeground);
00219         mTabs->SetActiveTab(0);
00220     }
00221 
00222     OglGui::Window* newTab(string title, OglGui::Tabs* tabs) {
00223         OglGui::Window* newTab = tabs->CreateTab(title);
00224         newTab->SetBorderType(BEV_ETCHED);
00225         newTab->SetBorderFillShaded(2);
00226         /*newTab->SetBorderType(BEV_LINE);
00227         newTab->SetBackground(oglBLACK);
00228         newTab->SetBorderBackground(PaletteBackground);
00229         newTab->GetExternWindowReference()->SetForeground(PaletteForeground);
00230         newTab->GetExternWindowReference()->SetBorderType(BEV_LINE);
00231         newTab->GetExternWindowReference()->SetBorderFillShaded(0);
00232         newTab->GetExternWindowReference()->SetBorderBackground(PaletteBackground);
00233         dynamic_cast<OglGui::StaticText*> (newTab->GetExternWindowReference())->SetShadowColor(PaletteForegroundShadow);*/
00234                 return newTab;
00235     }
00236 
00237     void DoVideoExcelTabs() {
00238         mGrid = new GridWindow(mTabGrid,mSource,mTabGrid->W(),mTabGrid->H());
00239         mGrid->SetGridSize(75, 75);
00240         mGrid->ConnectTo(mTabGrid);
00241         /*grid->SetBorderFillShaded(0);
00242         grid->SetBorderBackground(PaletteBackground);
00243         grid->SetForeground(PaletteForeground);*/
00244 
00245         mTable = new TableWindow(mTabTable,mSource,mTabTable->W(),mTabTable->H());
00246         mTable->ConnectTo(mTabTable);
00247         /*table->SetBorderFillShaded(0);
00248         table->SetBorderBackground(PaletteBackground);
00249         table->SetForeground(PaletteForeground);*/
00250 
00251         /*TableOverviewWindow *overview =
00252             new TableOverviewWindow(this,src,w-155,5+botH,150,centerH);
00253         //overview->ConnectTo(this, L2R|R2R|T2T|B2B);
00254         overview->ConnectTo(this, OglGui::TORIGHT|OglGui::TOTOPBOTTOM);
00255 
00256         TableControlBarWindow *buttonbar =
00257             new TableControlBarWindow(this,table,grid,5,h-btnH-5,w-10,btnH);
00258         //buttonbar->ConnectTo(this, L2L|R2R|T2T|B2T);
00259         buttonbar->ConnectTo(this, OglGui::TOLEFTRIGHT | OglGui::TOTOP);
00260 
00261         SelectionCollection *selcol =
00262             new SelectionCollection(this,src,5,5,w-10,botH);
00263         //selcol->ConnectTo(this, L2L|R2R|T2B|B2B);
00264         selcol->ConnectTo(this, OglGui::TOLEFTRIGHT | OglGui::TOBOTTOM);*/
00265 
00266         // overlay window to show preview of table on top of everything else..
00267         // there must be a better way to do this though :)
00268         Window *overlay = new Window(this, 0, 0, W(), H());
00269         overlay->ConnectTo(this);
00270         oglSys.SetNoMouseInput(overlay->GetOGLWND(),1);
00271 
00272         mGrid->SetListenTableUpdates(false);
00273         mTable->SetListenTableUpdates(true);
00274         /*overview->SetListenTableUpdates(true);*/
00275 
00276         // for which column/cache should the table display larger images
00277         // OBS: (need to set here because there can be more than one images row)
00278         mTable->SetZoomViewTargetWindow(overlay, true);
00279         mGrid->SetZoomViewTargetWindow(overlay, true);
00280     }
00281 
00282     void DoTagInfo(OglGui::Window* parent, int x, int y, int w, int h)
00283     {
00284         mTagInfoWnd = new OglGui::Window(parent,x,y,w,h);
00285         mTagInfoWnd->SetBorderType(BEV_ETCHED);
00286         mTagInfoWnd->SetBorderFillShaded(2);
00287         //mTagInfoWnd->SetBackground(PaletteBackground);
00288 
00289         mTagInfoTEdit =
00290             new OglGui::TextEdit(mTagInfoWnd,0,h-90,w,90,"info",0);
00291         mTagInfoTEdit->Editable(false);
00292         mTagInfoTEdit->SetBorderType(0);
00293         mTagInfoTEdit->SetBackground(0);
00294         mTagInfoTEdit->ConnectTo(mTagInfoWnd,OglGui::TOTOP|OglGui::TOLEFTRIGHT);
00295         SetTagInfo();
00296 
00297         OglGui::Window* popWnd = new OglGui::Window(mTagInfoWnd,0,0,w,h-90);
00298         for (int i=0; i<3; i++)
00299         {
00300             mPopular[i] = new WindowView2D(popWnd,i*100,1,100,100,0);
00301             mPopular[i]->Texturing(false);
00302         }
00303         popWnd->ConnectTo(mTagInfoWnd);
00304         popWnd->ScaleChildren();
00305         // Do not allow outsiders to scale us as we scale ourselves
00306         popWnd->SetAllowChildScaling(false);
00307     }
00308 
00309     void DoWeekLine(OglGui::Window* parent, int x, int y, int w, int h)
00310     {
00311         mWeekLine = new OglGui::Window(parent,x,y,w,h);
00312         mWeekLine->SetBorderType(-1);
00313         mWeekLine->SetBorderFillShaded(2);
00314         mWeekLine->SetAllowChildScaling(false);
00315 
00316         mHistoBarsUsed = new HistogramBars(mWeekLine,0,46,w,h-46);
00317         mHistoBarsUsed->SetColors(PaletteForeground1,PaletteForeground1a);
00318         mHistoBarsUsed->ConnectTo(mWeekLine);
00319 
00320         mHistoBarsViewed = new HistogramBars(mWeekLine,0,46,w,h-46);
00321         mHistoBarsViewed->SetColors(PaletteForeground2,PaletteForeground2a);
00322         mHistoBarsViewed->ConnectTo(mWeekLine);
00323 
00324         uint barCount = mTag->lastWeek;
00325         mIntervalChooser =
00326             new OglGui::IntervalChooser(mWeekLine,0,16,w,30,0,barCount-1,barCount-10,barCount-1);
00327         mIntervalChooser->SetIntervalChooserListener(this,0);
00328         mIntervalChooser->MinInterval(4);
00329         mIntervalChooser->SetBackground(PaletteBackground);
00330         mIntervalChooser->EndThumb()->SetColors(0xff404040,0xff000000);
00331         mIntervalChooser->SetHighlightBorderType(BEV_RAISED);
00332         mIntervalChooser->ConnectTo(mWeekLine,OglGui::TOLEFTRIGHT);
00333 
00334         StaticText* sTxt = new StaticText(mWeekLine,0,0,70,20,"Jan 1, 2004",false);
00335         sTxt->SetAlignOffsets(-2,-2);
00336 
00337         sTxt = new StaticText(mWeekLine,w-40,0,40,20,"today",false);
00338         sTxt->SetAlignOffsets(0,-2);
00339         sTxt->ConnectTo(mWeekLine,OglGui::TORIGHT);
00340     }
00341 
00342     void DoMap(OglGui::Window* parent, int x, int y, int w, int h)
00343     {
00344         OGLIMAGE* oglIm = TryReadPNG("World.png");
00345 
00346         mMapWnd = new OglGui::Window(parent,x,y,w,h);
00347         mGlobeMap = new WindowView2D(mMapWnd,0,92,w,h-92,oglIm);
00348         mGlobeMap->SetBorderType(1);
00349         mGlobeMap->SetScaleToWindow(false);
00350         mGlobeMap->ConnectTo(mMapWnd);
00351         ReleaseOglImage(oglIm);
00352 
00353         // Turn the C-Based OGLVIEW2D into a C++ based View with listener
00354         OGLVIEW* oglView = mGlobeMap->GetOglView();
00355         new OglGui::View(oglView, &mViewListenerCircles);
00356 
00357         mZoomPanControl = new ZoomPanControl(mMapWnd,0,0,w,90,mGlobeMap->GetOGLWND(),5,1);
00358         mZoomPanControl->PanWindow()->SetRoundness(0,0,0,0);
00359         mZoomPanControl->ConnectTo(mMapWnd,OglGui::TOBOTTOM|OglGui::TOLEFTRIGHT);
00360 
00361         // Turn the C-Based OGLVIEW2D into a C++ based View with listener
00362         OGLWND* oglWnd = mZoomPanControl->PanWindow()->GetOGLWND();
00363         oglView = (OGLVIEW*) oglWnd->objectList->info;
00364         new OglGui::View(oglView, &mViewListenerCircles);
00365     }
00366 
00367     // When an image becomes available add it to the plots
00368     virtual void DisplayFunc()
00369     {
00370         Window::DisplayFunc();
00371 
00372         if (mImReadWeek > 0)
00373         {
00374                 if(mTag->weekStats.count(mImReadWeek) > 0) {
00375                         OGLIMAGE* oglIm = retriever->requestImage(mTag->weekStats[mImReadWeek]->mostPopularPhoto->imageUrl("s"));
00376                 mTagsWeekPlotUsed->SetImage(mImReadWeek,oglIm);
00377                 }
00378 
00379             mImReadWeek--;
00380             SetAlwaysDraw(mImReadWeek > 0);
00381         }
00382     }
00383 
00384 private:
00385 
00386     void Init(int reqW, int reqH)
00387     {
00388         mOglWnd->topTitle = "TagsLife";
00389 
00390         // GUI designed at 1024 x 768
00391         int w = 1024, h = 768;
00392         SetDimensions(w,h);
00393         SetBackground(PaletteMainBackground);
00394         //SetForeground(PaletteForeground);
00395 
00396         retriever = RemoteRetriever::GetInstance();
00397 
00398         mTag = new Tag("obama");
00399         //DoTitleImage(this,2,h-64,160,60);
00400         DoTagSelector(this,w-300,h-85,298,83);
00401         DoMap(this,w-300,406,298,h-85-408);
00402         DoWeekLine(this,2,0,w-2,198);
00403         DoTabs(this,2,202,w-304,h-206);
00404         DoTagInfo(this,w-300,202,298,202);
00405 
00406         loadNewTag();
00407 
00408         // Let all child windows scale to this one.
00409         ScaleChildren();
00410         // Scale the app to the requested size
00411         SetDimensions(reqW,reqH);
00412         // Force laying out before being displayed
00413         OnLayoutChange();
00414 
00415         // Force laying out the ZoomPanControl before being displayed
00416         mZoomPanControl->OnLayoutChange();
00417         // Show map fitted to its viewer's size
00418         mZoomPanControl->ZoomController()->FitButton()->DoButtonSelectionEvent();
00419     }
00420 
00421     void loadNewTag(string tag="") {
00422         if(tag.size() != 0) {
00423                 delete mTag;
00424                 mTag = new Tag(tag);
00425                 // TODO: Check for compat with MediaTable model
00426                 delete mSource;
00427             TableDataSource* src = new TableDataSourceWeekMap(mTag->weekStats, mTag->lastWeek);
00428 
00429             TableDataStore::GetInstance()->AddTableDataSource("WeekMap", src);
00430             mSource = TableDataStore::GetInstance()->GetTableDataView("WeekMap", "MediaTable");
00431         }
00432 
00433         mImReadWeek = mTag->lastWeek;
00434         SetTagInfo();
00435         mTagsWeekPlotUsed->Clear();
00436         mBarPlotViewed->Clear();
00437         mHistoBarsUsed->Clear();
00438         mHistoBarsViewed->Clear();
00439 
00440         TableDataView* viewBarPlot = TableDataStore::GetInstance()->GetTableDataView("WeekMap", "BarPlot");
00441         mBarPlotViewed->AddColumnsFromDataSource(viewBarPlot, "flickrWeek", "views", "most popular photo", "contribution");
00442 
00443         // add default data columns for specified data source:
00444         mGrid->AddColumnsFromDataSource();
00445         mTable->AddColumnsFromDataSource();
00446         mSource->SetSortColumn("views", false);
00447 
00448         // TODO: Should be more elegant, but Graph does not support clearing yet
00449         //mTagsRelatedGraph->Clear();
00450         delete mTagsRelatedGraph;
00451         mTagsRelatedGraph = new BoostedGraph(mTabRelated, mTabRelated->W(), mTabRelated->H());
00452         mTagsRelatedGraph->ConnectTo(mTabRelated);
00453 
00454         uint mWeekStatCount = 0;
00455         for(Tag::weekStatsType::const_iterator it = mTag->weekStats.begin(); it != mTag->weekStats.end(); ++it) {
00456                 for(; mWeekStatCount < it->first; mWeekStatCount++) {
00457                         //ILOG_DEBUG("No Weekstats for week " << mWeekStatCount);
00458                 mTagsWeekPlotUsed->AddToHistogram(0);
00459                 mHistoBarsUsed->AddToHistogram(0);
00460                 }
00461                 //ILOG_DEBUG("WeekStats: " << it->first << "->" << it->second->usage);
00462                 mWeekStatCount++;
00463             mTagsWeekPlotUsed->AddToHistogram(it->second->usage,0,0);
00464             mHistoBarsUsed->AddToHistogram(it->second->usage);
00465             mHistoBarsViewed->AddToHistogram(it->second->views);
00466         }
00467 
00468         for(uint i=0; i < 3; i++) {
00469                 mPopular[i]->SetImage(retriever->requestImage(mTag->mostPopularPhotos[i]->imageUrl("s")));
00470         }
00471 
00472         while(mTagSelector->GetCurrentString().compare(mTag->tag) != 0)
00473                 mTagSelector->CurrentStringUpDown(true, true);
00474 
00475         mTag->readRelated();
00476         mTagsRelatedGraph->addNodes(mTag->relatedTags);
00477 
00478         // Should be easier...
00479         uint barCount = mTag->lastWeek;
00480         mIntervalChooser =
00481             new OglGui::IntervalChooser(mWeekLine,0,16,W()-2,30,0,barCount,barCount-9,barCount);
00482         mIntervalChooser->SetIntervalChooserListener(this,0);
00483         mIntervalChooser->MinInterval(4);
00484         mIntervalChooser->SetBackground(PaletteBackground);
00485         mIntervalChooser->EndThumb()->SetColors(0xff404040,0xff000000);
00486         mIntervalChooser->SetHighlightBorderType(BEV_RAISED);
00487         mIntervalChooser->ConnectTo(mWeekLine,OglGui::TOLEFTRIGHT);
00488     }
00489 
00490     float map(float v, float vmin, float vmax, float min, float max) {
00491         float r = (v-vmin)/(vmax-vmin);
00492         r *= (max-min);
00493         r += min;
00494         return r;
00495     }
00496 
00497     float cap(float v, float min, float max) {
00498         if(v < min) return min;
00499         if(v > max) return max;
00500         return v;
00501     }
00502 
00503     Tag*                                                mTag;
00504     string                                              newTag;
00505     RemoteRetriever*                    retriever;
00506 
00507         TableDataView*                          mSource;
00508 
00509     /*enum Palette {                            PaletteMainBackground = oglDARKGREY,
00510                                                                 PaletteBackground = oglBLACK,
00511                                                                 PaletteText = oglWHITE,
00512                                                                 PaletteForeground = PaletteText,
00513                                                                 PaletteForegroundShadow = oglDARKGREY,
00514                                                                 PaletteForeground1 = oglRED,
00515                                                                 PaletteForeground1a = 0xff800000,
00516                                                                 PaletteForeground2 = 0xff0090ee,
00517                                                                 PaletteForeground2a = 0xff00385d };*/
00518     enum Palette {                              PaletteMainBackground = oglGREY,
00519                                                                 PaletteBackground = oglDARKGREY,
00520                                                                 PaletteText = oglWHITE,
00521                                                                 PaletteForeground = PaletteText,
00522                                                                 PaletteForegroundShadow = oglGREY,
00523                                                                 PaletteForeground1 = oglRED,
00524                                                                 PaletteForeground1a = 0xff800000,
00525                                                                 PaletteForeground2 = 0xff0090ee,
00526                                                                 PaletteForeground2a = 0xff00385d };
00527 /*
00528 #define oglWHITE            0xffffffff  ///< White color, opaque
00529 #define oglBLACK            0xff000000  ///< Black color, opaque
00530 
00531 #define oglRED              0xffff0000  ///< Red, opaque
00532 #define oglDARKRED          0xff800000  ///< Dark Red, opaque
00533 #define oglLIGHTRED         0xffff4040  ///< Dark Red, opaque
00534 #define oglGREEN            0xff00ff00  ///< Green, opaque
00535 #define oglDARKGREEN        0xff008000  ///< Dark Green, opaque
00536 #define oglLIGHTGREEN       0xff40ff40  ///< Dark Green, opaque
00537 #define oglBLUE             0xff0000ff  ///< Blue, opaque
00538 #define oglDARKBLUE         0xff000080  ///< Dark Blue, opaque
00539 #define oglLIGHTBLUE        0xff4040ff  ///< Dark Blue, opaque
00540 
00541 #define oglGREY             0xff808080  ///< Grey, opaque
00542 #define oglDARKGREY         0xff404040  ///< Dark Grey, opaque
00543 #define oglLIGHTGREY        0xffD0D0D0  ///< Light Grey, opaque
00544 */
00545 
00546     OglGui::Tabs*               mTabs;
00547     OglGui::Window*             mTabUsed;
00548     OglGui::Window*             mTabViewed;
00549     OglGui::Window*             mTabRelated;
00550     OglGui::Window*             mTabTable;
00551     OglGui::Window*             mTabGrid;
00552     OglGui::Window*             mMapWnd;
00553     OglGui::Window*             mTagInfoWnd;
00554     OglGui::Window*             mWeekLine;
00555 
00556     TableWindow*                                mTable;
00557     GridWindow*                                 mGrid;
00558 
00559     OglGui::TextEdit*           mTagInfoTEdit;
00560     ZoomPanControl*             mZoomPanControl;
00561     WindowView2D*               mTitleView2D;
00562     WindowView2D*               mGlobeMap;
00563     WindowView2D*               mPopular[3];
00564     StringSelector*             mTagSelector;
00565 
00566     TagsWeekPlot*               mTagsWeekPlotUsed;
00567     BarPlot*                    mBarPlotViewed;
00568     HistogramBars*              mHistoBarsUsed;
00569     HistogramBars*              mHistoBarsViewed;
00570     IntervalChooser*            mIntervalChooser;
00571     BoostedGraph*                               mTagsRelatedGraph;
00572 
00573     ViewListenerCircles         mViewListenerCircles;
00574 
00575     int                         mImReadWeek;
00576 
00577     ILOG_VAR_DEC;
00578 };
00579 
00580 ILOG_VAR_INIT(TagsLife, Impala.Application);
00581 
00582 } // namespace TagsLife
00583 } // namespace Application
00584 } // namespace Impala
00585 
00586 #endif // Impala_Application_TagsLife_TagsLife_h

Generated on Fri Mar 19 09:30:40 2010 for ImpalaSrc by  doxygen 1.5.1