Merge branch 'besh81-hotfix-1.5.6' into hotfix-1.5.6
This commit is contained in:
commit
d2d0f0c555
@ -66,6 +66,10 @@ namespace nana{
|
||||
group& collocate() throw();
|
||||
group& div(const char* div_str) throw();
|
||||
field_reference operator[](const char* field);
|
||||
|
||||
void field_display(const char* field_name, bool display); ///<Displays/Discards an existing field.
|
||||
bool field_display(const char* field_name) const; ///<Determines whether the specified field is displayed.
|
||||
void erase(window handle); ///< Erases a window from field.
|
||||
|
||||
template<typename Widget, typename ...Args>
|
||||
Widget* create_child(const char* field, Args && ... args)
|
||||
|
@ -90,6 +90,7 @@ namespace nana
|
||||
void separate(); ///< Adds a separator.
|
||||
void append(const ::std::string& text, const nana::paint::image& img); ///< Adds a control button.
|
||||
void append(const ::std::string& text); ///< Adds a control button.
|
||||
void clear(); ///< Removes all control buttons and separators.
|
||||
bool enable(size_type index) const;
|
||||
void enable(size_type index, bool enable_state);
|
||||
void scale(unsigned s); ///< Sets the scale of control button.
|
||||
|
@ -194,6 +194,21 @@ namespace nana{
|
||||
return impl_->place_content.field(field);
|
||||
}
|
||||
|
||||
void group::field_display(const char* field_name, bool display)
|
||||
{
|
||||
impl_->place_content.field_display(field_name, display);
|
||||
}
|
||||
|
||||
bool group::field_display(const char* field_name) const
|
||||
{
|
||||
return impl_->place_content.field_display(field_name);
|
||||
}
|
||||
|
||||
void group::erase(window handle)
|
||||
{
|
||||
impl_->place_content.erase(handle);
|
||||
}
|
||||
|
||||
void group::_m_add_child(const char* field, widget* wdg)
|
||||
{
|
||||
impl_->place_content[field] << wdg->handle();
|
||||
|
@ -57,8 +57,7 @@ namespace nana
|
||||
|
||||
~item_container()
|
||||
{
|
||||
for(auto ptr : cont_)
|
||||
delete ptr;
|
||||
clear();
|
||||
}
|
||||
|
||||
void insert(size_type pos, std::string text, const nana::paint::image& img, item_type::kind type)
|
||||
@ -120,6 +119,15 @@ namespace nana
|
||||
{
|
||||
return cont_.at(pos);
|
||||
}
|
||||
|
||||
void clear()
|
||||
{
|
||||
for(auto ptr : cont_)
|
||||
delete ptr;
|
||||
|
||||
cont_.clear();
|
||||
}
|
||||
|
||||
private:
|
||||
container_type cont_;
|
||||
size_t right_{ npos };
|
||||
@ -461,6 +469,12 @@ namespace nana
|
||||
API::refresh_window(this->handle());
|
||||
}
|
||||
|
||||
void toolbar::clear()
|
||||
{
|
||||
get_drawer_trigger().items().clear();
|
||||
API::refresh_window(this->handle());
|
||||
}
|
||||
|
||||
bool toolbar::enable(size_type pos) const
|
||||
{
|
||||
auto & items = get_drawer_trigger().items();
|
||||
|
Loading…
x
Reference in New Issue
Block a user