Commit f272e00a authored by Otmane Lahlou's avatar Otmane Lahlou

ENH: add methods to modify the resizable status of the widget & to get the shown status

parent 9f98d4ed
......@@ -164,4 +164,19 @@ PackedWidgetManager
return m_PackedWidget->m_Window->shown();
}
void
PackedWidgetManager
::SetResizable(bool resize)
{
if (resize)
{
m_PackedWidget->m_Window->resizable(m_PackedWidget->m_Window);
}
else
{
// If the resizable is NULL then all widgets remain a fixed size
m_PackedWidget->m_Window->resizable(NULL);
}
}
}
......@@ -63,7 +63,8 @@ public:
virtual void SetLabelScrollWidget(const char * label);
virtual void SetLabelFullWidget(const char * label);
virtual void SetLabelZoomWidget(const char * label);
virtual int Shown();
virtual int Shown();
virtual void SetResizable(bool resize);
protected:
/** Constructor */
......
......@@ -185,4 +185,35 @@ SplittedWidgetManager
m_SplittedWidget->m_ZoomGroup->label(label);
}
int
SplittedWidgetManager
::ZoomWidgetShown()
{
return m_SplittedWidget->m_ZoomGroup->shown();
}
int
SplittedWidgetManager
::FullWidgetShown()
{
return m_SplittedWidget->m_FullGroup->shown();
}
void
SplittedWidgetManager
::SetResizable(bool resize)
{
if (resize)
{
m_SplittedWidget->m_FullGroup->resizable(m_SplittedWidget->m_FullGroup);
m_SplittedWidget->m_ZoomGroup->resizable(m_SplittedWidget->m_ZoomGroup);
}
else
{
// If the resizable is NULL then all widgets remain a fixed size
m_SplittedWidget->m_FullGroup->resizable(NULL);
m_SplittedWidget->m_ZoomGroup->resizable(NULL);
}
}
}
......@@ -61,6 +61,9 @@ public:
virtual void SetLabelScrollWidget(const char * label);
virtual void SetLabelFullWidget(const char * label);
virtual void SetLabelZoomWidget(const char * label);
virtual int ZoomWidgetShown();
virtual int FullWidgetShown();
virtual void SetResizable(bool resize);
protected:
/** Constructor */
......@@ -79,7 +82,6 @@ private:
void operator =(const Self&); // purposely not implemented
ImageWidgetSplittedManagerType* m_SplittedWidget;
};
}
#endif
......@@ -62,6 +62,7 @@ public:
virtual void SetLabelScrollWidget(const char * label) = 0;
virtual void SetLabelFullWidget(const char * label) = 0;
virtual void SetLabelZoomWidget(const char * label) = 0;
virtual void SetResizable(bool resize) = 0;
protected:
/** Constructor */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment