Orfeo Toolbox  3.16
otbPackedWidgetManager.cxx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ORFEO Toolbox
4  Language: C++
5  Date: $Date$
6  Version: $Revision$
7 
8 
9  Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
10  See OTBCopyright.txt for details.
11 
12 
13  This software is distributed WITHOUT ANY WARRANTY; without even
14  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  PURPOSE. See the above copyright notices for more information.
16 
17 =========================================================================*/
18 #include "otbPackedWidgetManager.h"
19 
20 namespace otb
21 {
22 
25 {
26  m_PackedWidget = new ImageWidgetPackedManagerType();
27 }
28 
31 {
32  delete m_PackedWidget;
33 }
34 
35 void
38 {
39  m_InternalFullWidget = fullWidget;
40  m_PackedWidget->m_FullGroup->add(fullWidget);
41  m_PackedWidget->m_FullGroup->resizable(fullWidget);
42  fullWidget->resize(m_PackedWidget->m_FullGroup->x(), m_PackedWidget->m_FullGroup->y(),
43  m_PackedWidget->m_FullGroup->w(), m_PackedWidget->m_FullGroup->h());
44 }
45 
46 void
49 {
50  m_InternalScrollWidget = scrollWidget;
51  m_PackedWidget->m_QuicklookGroup->add(scrollWidget);
52  m_PackedWidget->m_QuicklookGroup->resizable(scrollWidget);
53  scrollWidget->resize(m_PackedWidget->m_QuicklookGroup->x(), m_PackedWidget->m_QuicklookGroup->y(),
54  m_PackedWidget->m_QuicklookGroup->w(), m_PackedWidget->m_QuicklookGroup->h());
55 
56 }
57 
58 void
61 {
62  m_InternalZoomWidget = zoomWidget;
63  m_PackedWidget->m_ZoomGroup->add(zoomWidget);
64  m_PackedWidget->m_ZoomGroup->resizable(zoomWidget);
65  zoomWidget->resize(m_PackedWidget->m_ZoomGroup->x(), m_PackedWidget->m_ZoomGroup->y(),
66  m_PackedWidget->m_ZoomGroup->w(), m_PackedWidget->m_ZoomGroup->h());
67 }
68 void
70 ::RegisterPixelDescriptionWidget(Fl_Output * pixelWidget)
71 {
72  m_IntenalPixelWidget = pixelWidget;
73  m_PackedWidget->m_PixelDescriptionGroup->add(pixelWidget);
74  m_PackedWidget->m_PixelDescriptionGroup->resizable(pixelWidget);
75  pixelWidget->resize(m_PackedWidget->m_PixelDescriptionGroup->x(), m_PackedWidget->m_PixelDescriptionGroup->y(),
76  m_PackedWidget->m_PixelDescriptionGroup->w(), m_PackedWidget->m_PixelDescriptionGroup->h());
77 
78 }
79 
80 void
83 {
84  m_InternalCurveWidget = curveWidget;
85  m_PackedWidget->m_HistogramsGroup->add(curveWidget);
86  m_PackedWidget->m_HistogramsGroup->resizable(curveWidget);
87  curveWidget->resize(m_PackedWidget->m_HistogramsGroup->x(), m_PackedWidget->m_HistogramsGroup->y(),
88  m_PackedWidget->m_HistogramsGroup->w(), m_PackedWidget->m_HistogramsGroup->h());
89 }
90 
91 void
94 {
95  m_PackedWidget->m_Window->show();
96  m_InternalCurveWidget->show();
97  m_IntenalPixelWidget->show();
98  m_InternalFullWidget->show();
99  m_InternalScrollWidget->show();
100  m_InternalZoomWidget->show();
101 }
102 
103 void
106 {
107  m_PackedWidget->m_Window->hide();
108 }
109 
110 void
113 {
114  m_InternalScrollWidget->redraw();
115  m_InternalFullWidget->redraw();
116  m_InternalZoomWidget->redraw();
117  m_IntenalPixelWidget->redraw();
118  m_InternalCurveWidget->redraw();
119 }
120 
121 void
124 {
125  m_PackedWidget->m_FullGroup->remove(m_InternalFullWidget);
126  m_PackedWidget->m_ZoomGroup->remove(m_InternalZoomWidget);
127  m_PackedWidget->m_PixelDescriptionGroup->remove(m_IntenalPixelWidget);
128  m_PackedWidget->m_QuicklookGroup->remove(m_InternalScrollWidget);
129  m_PackedWidget->m_HistogramsGroup->remove(m_InternalCurveWidget);
130 }
131 
132 void
134 ::SetLabel(const char * label)
135 {
136  m_PackedWidget->m_Window->copy_label(label);
137 }
138 
139 void
141 ::SetLabelScrollWidget(const char * label)
142 {
143  m_PackedWidget->m_QuicklookGroup->label(label);
144 }
145 
146 void
148 ::SetLabelFullWidget(const char * label)
149 {
150  m_PackedWidget->m_FullGroup->label(label);
151 }
152 
153 void
155 ::SetLabelZoomWidget(const char * label)
156 {
157  m_PackedWidget->m_ZoomGroup->label(label);
158 }
159 
160 void
162 ::SetLabelHistogramWidget(const char * label)
163 {
164  m_PackedWidget->m_HistogramsGroup->label(label);
165 }
166 
167 void
170 {
171  m_PackedWidget->m_PixelDescriptionGroup->label(label);
172 }
173 
174 int
177 {
178  return m_PackedWidget->m_Window->shown();
179 }
180 
181 void
183 ::SetResizable(bool resize)
184 {
185  if (resize)
186  {
187  m_PackedWidget->m_Window->resizable(m_PackedWidget->m_Window);
188  }
189  else
190  {
191  // If the resizable is NULL then all widgets remain a fixed size
192  m_PackedWidget->m_Window->resizable(NULL);
193  }
194 }
195 
196 }

Generated at Sun Feb 3 2013 00:41:12 for Orfeo Toolbox with doxygen 1.8.1.1