Evita  0.16
evGUIComponentMultiBrowser.h
Go to the documentation of this file.
1 /*
2  *
3  * EVITA: Efficient Visualization of Terascale Datasets
4  * Copyright (C) 2000-2016 Team Evita
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
19  * MA 02139, USA.
20  *
21  */
22 
23 
24 #ifndef __evGUIComponentMultiBrowser_h
25 #define __evGUIComponentMultiBrowser_h
26 
27 
28 #include "evGUIMultiBrowser.h"
29 
30 
32 {
33 public:
34  evGUIComponentMultiBrowser(const int x, const int y,
35  const int width, const int height,
36  const char *title);
37  virtual ~evGUIComponentMultiBrowser(void);
38 
39  virtual const evString GetClassName(void) const
40  {
41  return(evString("evGUIComponentMultiBrowser"));
42  }
43 
44  virtual void Clear();
45  virtual void Hide(const unsigned int entry);
46  virtual void Select(const unsigned int entry);
47 
48  unsigned int GetVectorDimension(const unsigned int entry) const;
49  void AddVectorDimension(const unsigned int vector_dimension);
50 
51 protected:
52 
53 private:
54  std::vector<unsigned int> VectorDimensions;
55 };
56 
57 
59  const int y,
60  const int width,
61  const int height,
62  const char
63  *title) :
64  evGUIMultiBrowser(x, y, width, height, title)
65 {
66 }
67 
68 
70 {
71 }
72 
73 
75 {
76  this->VectorDimensions.clear();
78 }
79 
80 
81 inline void evGUIComponentMultiBrowser::Hide(const unsigned int entry)
82 {
83  this->Browser->hide(entry + 1);
84 }
85 
86 
87 inline void evGUIComponentMultiBrowser::Select(const unsigned int entry)
88 {
89  this->Browser->select(entry + 1);
90 }
91 
92 
93 inline unsigned int
95  const
96 {
97  if (entry >= this->VectorDimensions.size())
98  return(0);
99  else
100  return(this->VectorDimensions[entry]);
101 }
102 
103 
105  vector_dimension)
106 {
107  this->VectorDimensions.push_back(vector_dimension);
108 }
109 
110 
111 #endif
evGUIComponentMultiBrowser(const int x, const int y, const int width, const int height, const char *title)
Definition: evGUIComponentMultiBrowser.h:58
Fl_Multi_Browser * Browser
Definition: evGUIMultiBrowser.h:57
virtual void Hide(const unsigned int entry)
Definition: evGUIComponentMultiBrowser.h:81
virtual void Clear(void)
Definition: evGUIMultiBrowser.h:69
void AddVectorDimension(const unsigned int vector_dimension)
Definition: evGUIComponentMultiBrowser.h:104
unsigned int GetVectorDimension(const unsigned int entry) const
Definition: evGUIComponentMultiBrowser.h:94
Definition: evGUIComponentMultiBrowser.h:31
virtual ~evGUIComponentMultiBrowser(void)
Definition: evGUIComponentMultiBrowser.h:69
virtual void Clear()
Definition: evGUIComponentMultiBrowser.h:74
std::vector< unsigned int > VectorDimensions
Definition: evGUIComponentMultiBrowser.h:54
virtual void Select(const unsigned int entry)
Definition: evGUIComponentMultiBrowser.h:87
Definition: evGUIMultiBrowser.h:38
Definition: evString.h:30
virtual const evString GetClassName(void) const
Definition: evGUIComponentMultiBrowser.h:39