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() << "'"; ostr << ",title:'" << pFrame->getTitle() << "'";
if (pFrame->collapsible()) if (pFrame->collapsible())
ostr << ",collapsible:true"; ostr << ",collapsible:true";
if (pFrame->collapsed())
ostr << ",collapsed:true";
} }

View File

@ -98,6 +98,12 @@ public:
bool collapsible() const; bool collapsible() const;
/// Returns collapsible property /// 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: protected:
Frame(const std::type_info& type); Frame(const std::type_info& type);
/// Creates an unnamed Frame. /// Creates an unnamed Frame.
@ -118,6 +124,7 @@ private:
View::Ptr _pChild; View::Ptr _pChild;
std::string _title; std::string _title;
bool _collapsible; 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 } } // namespace Poco::WebWidgets

View File

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