frame extensions

This commit is contained in:
Peter Schojer 2008-09-09 06:36:21 +00:00
parent 1fe9732a5c
commit 63caffdb6e
3 changed files with 41 additions and 10 deletions

View File

@ -101,6 +101,8 @@ void FrameRenderer::writeProperties(const Frame* pFrame, std::ostream& ostr)
ostr << ",title:'" << pFrame->getTitle() << "'";
if (pFrame->collapsible())
ostr << ",collapsible:true";
if (pFrame->collapsed())
ostr << ",collapsed:true";
}

View File

@ -97,6 +97,12 @@ public:
bool collapsible() const;
/// Returns collapsible property
void setCollapsed(bool coll);
/// How should the Frame be rendered initially?
bool collapsed() const;
/// Returns how the Frame should be rendered initially
protected:
Frame(const std::type_info& type);
@ -118,6 +124,7 @@ private:
View::Ptr _pChild;
std::string _title;
bool _collapsible;
bool _collapsed;
};
@ -167,6 +174,18 @@ inline bool Frame::collapsible() const
}
inline void Frame::setCollapsed(bool coll)
{
_collapsed = coll;
}
inline bool Frame::collapsed() const
{
return _collapsed;
}
} } // namespace Poco::WebWidgets

View File

@ -45,7 +45,8 @@ Frame::Frame():
View(typeid(Frame)),
_pChild(),
_title(),
_collapsible(false)
_collapsible(false),
_collapsed(false)
{
}
@ -54,7 +55,8 @@ Frame::Frame(const std::string& name):
View(name, typeid(Frame)),
_pChild(),
_title(),
_collapsible(false)
_collapsible(false),
_collapsed(false)
{
}
@ -63,7 +65,8 @@ Frame::Frame(const std::string& name, const std::string& title):
View(name, typeid(Frame)),
_pChild(),
_title(title),
_collapsible(false)
_collapsible(false),
_collapsed(false)
{
}
@ -72,7 +75,8 @@ Frame::Frame(View::Ptr pChild):
View(typeid(Frame)),
_pChild(),
_title(),
_collapsible(false)
_collapsible(false),
_collapsed(false)
{
setChild(pChild);
}
@ -82,7 +86,8 @@ Frame::Frame(const std::string& name, View::Ptr pChild):
View(name, typeid(Frame)),
_pChild(),
_title(),
_collapsible(false)
_collapsible(false),
_collapsed(false)
{
setChild(pChild);
}
@ -92,7 +97,8 @@ Frame::Frame(const std::string& name, const std::string& title, View::Ptr pChild
View(name, typeid(Frame)),
_pChild(),
_title(title),
_collapsible(false)
_collapsible(false),
_collapsed(false)
{
setChild(pChild);
}
@ -102,7 +108,8 @@ Frame::Frame(const std::type_info& type):
View(type),
_pChild(),
_title(),
_collapsible(false)
_collapsible(false),
_collapsed(false)
{
}
@ -111,7 +118,8 @@ Frame::Frame(const std::string& name, const std::type_info& type):
View(name, type),
_pChild(),
_title(),
_collapsible(false)
_collapsible(false),
_collapsed(false)
{
}
@ -120,7 +128,8 @@ Frame::Frame(View::Ptr pChild, const std::type_info& type):
View(type),
_pChild(),
_title(),
_collapsible(false)
_collapsible(false),
_collapsed(false)
{
setChild(pChild);
}
@ -130,7 +139,8 @@ Frame::Frame(const std::string& name, View::Ptr pChild, const std::type_info& ty
View(name, typeid(Frame)),
_pChild(),
_title(),
_collapsible(false)
_collapsible(false),
_collapsed(false)
{
setChild(pChild);
}