Skip to content
Snippets Groups Projects
Commit f272e00a authored by Otmane Lahlou's avatar Otmane Lahlou
Browse files

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

parent 9f98d4ed
No related branches found
No related tags found
No related merge requests found
...@@ -164,4 +164,19 @@ PackedWidgetManager ...@@ -164,4 +164,19 @@ PackedWidgetManager
return m_PackedWidget->m_Window->shown(); 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: ...@@ -63,7 +63,8 @@ public:
virtual void SetLabelScrollWidget(const char * label); virtual void SetLabelScrollWidget(const char * label);
virtual void SetLabelFullWidget(const char * label); virtual void SetLabelFullWidget(const char * label);
virtual void SetLabelZoomWidget(const char * label); virtual void SetLabelZoomWidget(const char * label);
virtual int Shown(); virtual int Shown();
virtual void SetResizable(bool resize);
protected: protected:
/** Constructor */ /** Constructor */
......
...@@ -185,4 +185,35 @@ SplittedWidgetManager ...@@ -185,4 +185,35 @@ SplittedWidgetManager
m_SplittedWidget->m_ZoomGroup->label(label); 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: ...@@ -61,6 +61,9 @@ public:
virtual void SetLabelScrollWidget(const char * label); virtual void SetLabelScrollWidget(const char * label);
virtual void SetLabelFullWidget(const char * label); virtual void SetLabelFullWidget(const char * label);
virtual void SetLabelZoomWidget(const char * label); virtual void SetLabelZoomWidget(const char * label);
virtual int ZoomWidgetShown();
virtual int FullWidgetShown();
virtual void SetResizable(bool resize);
protected: protected:
/** Constructor */ /** Constructor */
...@@ -79,7 +82,6 @@ private: ...@@ -79,7 +82,6 @@ private:
void operator =(const Self&); // purposely not implemented void operator =(const Self&); // purposely not implemented
ImageWidgetSplittedManagerType* m_SplittedWidget; ImageWidgetSplittedManagerType* m_SplittedWidget;
}; };
} }
#endif #endif
...@@ -62,6 +62,7 @@ public: ...@@ -62,6 +62,7 @@ public:
virtual void SetLabelScrollWidget(const char * label) = 0; virtual void SetLabelScrollWidget(const char * label) = 0;
virtual void SetLabelFullWidget(const char * label) = 0; virtual void SetLabelFullWidget(const char * label) = 0;
virtual void SetLabelZoomWidget(const char * label) = 0; virtual void SetLabelZoomWidget(const char * label) = 0;
virtual void SetResizable(bool resize) = 0;
protected: protected:
/** Constructor */ /** Constructor */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment