mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-25 01:19:06 +02:00
added enable switch
This commit is contained in:
parent
f0ffa66fc3
commit
8ff2f8f7e4
@ -89,6 +89,9 @@ void PanelRenderer::renderHead(const Renderable* pRenderable, const RenderContex
|
|||||||
else
|
else
|
||||||
ostr << ",header:false";
|
ostr << ",header:false";
|
||||||
|
|
||||||
|
if (!pPanel->enabled())
|
||||||
|
ostr << ",disabled:true";
|
||||||
|
|
||||||
// a panel has exactly one child
|
// a panel has exactly one child
|
||||||
// if this child is a layout we are fine otherwise we have to generate the items array
|
// if this child is a layout we are fine otherwise we have to generate the items array
|
||||||
View::Ptr pChild = pPanel->getChild();
|
View::Ptr pChild = pPanel->getChild();
|
||||||
|
@ -111,7 +111,9 @@ public:
|
|||||||
bool showHeader() const;
|
bool showHeader() const;
|
||||||
/// Returns if the header of the Panel is shown
|
/// Returns if the header of the Panel is shown
|
||||||
|
|
||||||
|
void enable(bool val);
|
||||||
|
|
||||||
|
bool enabled() const;
|
||||||
protected:
|
protected:
|
||||||
~Panel();
|
~Panel();
|
||||||
/// Destroys the Panel.
|
/// Destroys the Panel.
|
||||||
@ -122,6 +124,7 @@ private:
|
|||||||
bool _modal;
|
bool _modal;
|
||||||
bool _showCloseIcon;
|
bool _showCloseIcon;
|
||||||
bool _showHeader;
|
bool _showHeader;
|
||||||
|
bool _enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -195,6 +198,18 @@ inline bool Panel::showHeader() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline void Panel::enable(bool val)
|
||||||
|
{
|
||||||
|
_enabled = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline bool Panel::enabled() const
|
||||||
|
{
|
||||||
|
return _enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} } // namespace Poco::WebWidgets
|
} } // namespace Poco::WebWidgets
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,7 +47,8 @@ Panel::Panel():
|
|||||||
_title(),
|
_title(),
|
||||||
_modal(false),
|
_modal(false),
|
||||||
_showCloseIcon(true),
|
_showCloseIcon(true),
|
||||||
_showHeader(true)
|
_showHeader(true),
|
||||||
|
_enabled(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,7 +59,8 @@ Panel::Panel(const std::string& name):
|
|||||||
_title(),
|
_title(),
|
||||||
_modal(false),
|
_modal(false),
|
||||||
_showCloseIcon(true),
|
_showCloseIcon(true),
|
||||||
_showHeader(true)
|
_showHeader(true),
|
||||||
|
_enabled(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -69,7 +71,8 @@ Panel::Panel(const std::string& name, const std::string& title):
|
|||||||
_title(title),
|
_title(title),
|
||||||
_modal(false),
|
_modal(false),
|
||||||
_showCloseIcon(true),
|
_showCloseIcon(true),
|
||||||
_showHeader(true)
|
_showHeader(true),
|
||||||
|
_enabled(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,7 +83,8 @@ Panel::Panel(View::Ptr pChild):
|
|||||||
_title(),
|
_title(),
|
||||||
_modal(false),
|
_modal(false),
|
||||||
_showCloseIcon(true),
|
_showCloseIcon(true),
|
||||||
_showHeader(true)
|
_showHeader(true),
|
||||||
|
_enabled(true)
|
||||||
{
|
{
|
||||||
setChild(pChild);
|
setChild(pChild);
|
||||||
}
|
}
|
||||||
@ -92,7 +96,8 @@ Panel::Panel(const std::string& name, View::Ptr pChild):
|
|||||||
_title(),
|
_title(),
|
||||||
_modal(false),
|
_modal(false),
|
||||||
_showCloseIcon(true),
|
_showCloseIcon(true),
|
||||||
_showHeader(true)
|
_showHeader(true),
|
||||||
|
_enabled(true)
|
||||||
{
|
{
|
||||||
setChild(pChild);
|
setChild(pChild);
|
||||||
}
|
}
|
||||||
@ -104,7 +109,8 @@ Panel::Panel(const std::string& name, const std::string& title, View::Ptr pChild
|
|||||||
_title(title),
|
_title(title),
|
||||||
_modal(false),
|
_modal(false),
|
||||||
_showCloseIcon(true),
|
_showCloseIcon(true),
|
||||||
_showHeader(true)
|
_showHeader(true),
|
||||||
|
_enabled(true)
|
||||||
{
|
{
|
||||||
setChild(pChild);
|
setChild(pChild);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user