new method is_single_enabled for listbox
This commit is contained in:
parent
8ecae7402c
commit
e057724f98
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* A List Box Implementation
|
* A List Box Implementation
|
||||||
* Nana C++ Library(http://www.nanapro.org)
|
* Nana C++ Library(http://www.nanapro.org)
|
||||||
* Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com)
|
* Copyright(C) 2003-2019 Jinhao(cnjinhao@hotmail.com)
|
||||||
*
|
*
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@ -1538,6 +1538,7 @@ the nana::detail::basic_window member pointer scheme
|
|||||||
|
|
||||||
void enable_single(bool for_selection, bool category_limited);
|
void enable_single(bool for_selection, bool category_limited);
|
||||||
void disable_single(bool for_selection);
|
void disable_single(bool for_selection);
|
||||||
|
bool is_single_enabled(bool for_selection) const noexcept; ///< Determines whether the single selection/check is enabled.
|
||||||
export_options& def_export_options();
|
export_options& def_export_options();
|
||||||
|
|
||||||
|
|
||||||
|
@ -1850,6 +1850,11 @@ namespace nana
|
|||||||
(for_selection ? single_selection_ : single_check_) = false;
|
(for_selection ? single_selection_ : single_check_) = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool is_single_enabled(bool for_selection) const noexcept
|
||||||
|
{
|
||||||
|
return (for_selection ? single_selection_ : single_check_);
|
||||||
|
}
|
||||||
|
|
||||||
size_type size_item(size_type cat) const
|
size_type size_item(size_type cat) const
|
||||||
{
|
{
|
||||||
return get(cat)->items.size();
|
return get(cat)->items.size();
|
||||||
@ -5959,9 +5964,16 @@ namespace nana
|
|||||||
|
|
||||||
void listbox::disable_single(bool for_selection)
|
void listbox::disable_single(bool for_selection)
|
||||||
{
|
{
|
||||||
|
internal_scope_guard lock;
|
||||||
_m_ess().lister.disable_single(for_selection);
|
_m_ess().lister.disable_single(for_selection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool listbox::is_single_enabled(bool for_selection) const noexcept
|
||||||
|
{
|
||||||
|
internal_scope_guard lock;
|
||||||
|
return _m_ess().lister.is_single_enabled(for_selection);
|
||||||
|
}
|
||||||
|
|
||||||
listbox::export_options& listbox::def_export_options()
|
listbox::export_options& listbox::def_export_options()
|
||||||
{
|
{
|
||||||
return _m_ess().def_exp_options;
|
return _m_ess().def_exp_options;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user