mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-19 00:46:03 +01:00
extensions to frame
This commit is contained in:
parent
ab06f0a999
commit
1fe9732a5c
@ -99,6 +99,8 @@ void FrameRenderer::writeProperties(const Frame* pFrame, std::ostream& ostr)
|
||||
ostr << ",height:" << pFrame->getHeight();
|
||||
if (!pFrame->getTitle().empty())
|
||||
ostr << ",title:'" << pFrame->getTitle() << "'";
|
||||
if (pFrame->collapsible())
|
||||
ostr << ",collapsible:true";
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,6 +91,12 @@ public:
|
||||
|
||||
const std::string& getTitle() const;
|
||||
/// Returns the title of the Frame
|
||||
|
||||
void setCollapsible(bool val);
|
||||
/// En/Disable collapsible
|
||||
|
||||
bool collapsible() const;
|
||||
/// Returns collapsible property
|
||||
|
||||
protected:
|
||||
Frame(const std::type_info& type);
|
||||
@ -109,8 +115,9 @@ protected:
|
||||
/// Destroys the Frame.
|
||||
|
||||
private:
|
||||
View::Ptr _pChild;
|
||||
View::Ptr _pChild;
|
||||
std::string _title;
|
||||
bool _collapsible;
|
||||
};
|
||||
|
||||
|
||||
@ -148,6 +155,18 @@ inline const std::string& Frame::getTitle() const
|
||||
}
|
||||
|
||||
|
||||
inline void Frame::setCollapsible(bool val)
|
||||
{
|
||||
_collapsible = val;
|
||||
}
|
||||
|
||||
|
||||
inline bool Frame::collapsible() const
|
||||
{
|
||||
return _collapsible;
|
||||
}
|
||||
|
||||
|
||||
} } // namespace Poco::WebWidgets
|
||||
|
||||
|
||||
|
@ -44,7 +44,8 @@ namespace WebWidgets {
|
||||
Frame::Frame():
|
||||
View(typeid(Frame)),
|
||||
_pChild(),
|
||||
_title()
|
||||
_title(),
|
||||
_collapsible(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -52,7 +53,8 @@ Frame::Frame():
|
||||
Frame::Frame(const std::string& name):
|
||||
View(name, typeid(Frame)),
|
||||
_pChild(),
|
||||
_title()
|
||||
_title(),
|
||||
_collapsible(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -60,7 +62,8 @@ Frame::Frame(const std::string& name):
|
||||
Frame::Frame(const std::string& name, const std::string& title):
|
||||
View(name, typeid(Frame)),
|
||||
_pChild(),
|
||||
_title(title)
|
||||
_title(title),
|
||||
_collapsible(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -68,7 +71,8 @@ Frame::Frame(const std::string& name, const std::string& title):
|
||||
Frame::Frame(View::Ptr pChild):
|
||||
View(typeid(Frame)),
|
||||
_pChild(),
|
||||
_title()
|
||||
_title(),
|
||||
_collapsible(false)
|
||||
{
|
||||
setChild(pChild);
|
||||
}
|
||||
@ -77,7 +81,8 @@ Frame::Frame(View::Ptr pChild):
|
||||
Frame::Frame(const std::string& name, View::Ptr pChild):
|
||||
View(name, typeid(Frame)),
|
||||
_pChild(),
|
||||
_title()
|
||||
_title(),
|
||||
_collapsible(false)
|
||||
{
|
||||
setChild(pChild);
|
||||
}
|
||||
@ -86,7 +91,8 @@ Frame::Frame(const std::string& name, View::Ptr pChild):
|
||||
Frame::Frame(const std::string& name, const std::string& title, View::Ptr pChild):
|
||||
View(name, typeid(Frame)),
|
||||
_pChild(),
|
||||
_title(title)
|
||||
_title(title),
|
||||
_collapsible(false)
|
||||
{
|
||||
setChild(pChild);
|
||||
}
|
||||
@ -95,7 +101,8 @@ Frame::Frame(const std::string& name, const std::string& title, View::Ptr pChild
|
||||
Frame::Frame(const std::type_info& type):
|
||||
View(type),
|
||||
_pChild(),
|
||||
_title()
|
||||
_title(),
|
||||
_collapsible(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -103,7 +110,8 @@ Frame::Frame(const std::type_info& type):
|
||||
Frame::Frame(const std::string& name, const std::type_info& type):
|
||||
View(name, type),
|
||||
_pChild(),
|
||||
_title()
|
||||
_title(),
|
||||
_collapsible(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -111,7 +119,8 @@ Frame::Frame(const std::string& name, const std::type_info& type):
|
||||
Frame::Frame(View::Ptr pChild, const std::type_info& type):
|
||||
View(type),
|
||||
_pChild(),
|
||||
_title()
|
||||
_title(),
|
||||
_collapsible(false)
|
||||
{
|
||||
setChild(pChild);
|
||||
}
|
||||
@ -120,7 +129,8 @@ Frame::Frame(View::Ptr pChild, const std::type_info& type):
|
||||
Frame::Frame(const std::string& name, View::Ptr pChild, const std::type_info& type):
|
||||
View(name, typeid(Frame)),
|
||||
_pChild(),
|
||||
_title()
|
||||
_title(),
|
||||
_collapsible(false)
|
||||
{
|
||||
setChild(pChild);
|
||||
}
|
||||
|
@ -174,6 +174,7 @@ void RequestHandler::handleAjaxRequest(Poco::Net::HTTPServerRequest& request, Po
|
||||
|
||||
it = args.begin();
|
||||
RequestProcessor* pProc = _pApp->getAjaxProcessor(id);
|
||||
poco_assert_dbg (pProc);
|
||||
if (!pProc)
|
||||
{
|
||||
response.setStatusAndReason(Poco::Net::HTTPResponse::HTTP_INTERNAL_SERVER_ERROR, "no requestprocessor found");
|
||||
|
Loading…
x
Reference in New Issue
Block a user