The construction that creates the widget and set the title or caption
This commit is contained in:
@@ -33,6 +33,14 @@ namespace nana{
|
||||
caption.create(pnl);
|
||||
place_content.bind(pnl);
|
||||
}
|
||||
|
||||
implement() = default;
|
||||
implement(window grp_panel, string titel, bool format, unsigned gap=2)
|
||||
: caption (grp_panel, std::move(titel), format),
|
||||
place_content{grp_panel},
|
||||
gap{gap}
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
group::group()
|
||||
@@ -46,6 +54,20 @@ namespace nana{
|
||||
create(parent, r, vsb);
|
||||
}
|
||||
|
||||
group::group( window parent, ///<
|
||||
string titel_ /*={}*/, ///<
|
||||
bool format /*=false*/, ///<
|
||||
unsigned gap /*=2*/, ///<
|
||||
rectangle r /*={} */, ///<
|
||||
bool vsb /*= true */ ///<
|
||||
)
|
||||
: panel(parent, r, vsb),
|
||||
impl_(new implement(*this, std::move(titel_), vsb))
|
||||
{
|
||||
impl_->caption.format(format);
|
||||
init();
|
||||
}
|
||||
|
||||
|
||||
group::~group()
|
||||
{
|
||||
@@ -91,12 +113,8 @@ namespace nana{
|
||||
impl_->place_content[field] << wdg->handle();
|
||||
}
|
||||
|
||||
void group::_m_complete_creation()
|
||||
void group::init()
|
||||
{
|
||||
panel::_m_complete_creation();
|
||||
|
||||
impl_->create(handle());
|
||||
|
||||
this->div(nullptr);
|
||||
|
||||
auto & outter = impl_->place_content;
|
||||
@@ -127,6 +145,16 @@ namespace nana{
|
||||
});
|
||||
}
|
||||
|
||||
void group::_m_complete_creation()
|
||||
{
|
||||
panel::_m_complete_creation();
|
||||
|
||||
impl_->create(handle());
|
||||
|
||||
|
||||
init();
|
||||
}
|
||||
|
||||
::nana::string group::_m_caption() const
|
||||
{
|
||||
return impl_->caption.caption();
|
||||
|
||||
Reference in New Issue
Block a user