Merge branch 'develop'
This commit is contained in:
commit
760a0a9b78
@ -39,6 +39,7 @@
|
|||||||
#ifndef NANA_CXX_DEFINES_INCLUDED
|
#ifndef NANA_CXX_DEFINES_INCLUDED
|
||||||
#define NANA_CXX_DEFINES_INCLUDED
|
#define NANA_CXX_DEFINES_INCLUDED
|
||||||
#define STD_FILESYSTEM_NOT_SUPPORTED
|
#define STD_FILESYSTEM_NOT_SUPPORTED
|
||||||
|
|
||||||
//C++ language
|
//C++ language
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
# undef STD_FILESYSTEM_NOT_SUPPORTED
|
# undef STD_FILESYSTEM_NOT_SUPPORTED
|
||||||
@ -46,6 +47,7 @@
|
|||||||
# //Nana defines some macros for lack of support of keywords
|
# //Nana defines some macros for lack of support of keywords
|
||||||
# define _ALLOW_KEYWORD_MACROS
|
# define _ALLOW_KEYWORD_MACROS
|
||||||
#
|
#
|
||||||
|
# define CXX_NO_INLINE_NAMESPACE //no support of C++11 inline namespace until Visual C++ 2015
|
||||||
# define noexcept //no support of noexcept until Visual C++ 2015
|
# define noexcept //no support of noexcept until Visual C++ 2015
|
||||||
# define constexpr //no support of constexpr until Visual C++ 2015
|
# define constexpr //no support of constexpr until Visual C++ 2015
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@ -42,8 +42,13 @@
|
|||||||
|
|
||||||
// namespace std { namespace experimental { namespace filesystem { inline namespace v1 {
|
// namespace std { namespace experimental { namespace filesystem { inline namespace v1 {
|
||||||
|
|
||||||
namespace nana { namespace experimental { inline namespace v1
|
namespace nana { namespace experimental {
|
||||||
|
|
||||||
|
#ifndef CXX_NO_INLINE_NAMESPACE
|
||||||
|
inline namespace v1
|
||||||
{
|
{
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace filesystem
|
namespace filesystem
|
||||||
{
|
{
|
||||||
enum class file_type
|
enum class file_type
|
||||||
@ -367,8 +372,9 @@ namespace filesystem
|
|||||||
|
|
||||||
return index ? path.substr(0, index + 1) : std::basic_string<CharType>();
|
return index ? path.substr(0, index + 1) : std::basic_string<CharType>();
|
||||||
}
|
}
|
||||||
|
#ifndef CXX_NO_INLINE_NAMESPACE
|
||||||
} //end namespace v1
|
} //end namespace v1
|
||||||
|
#endif
|
||||||
} //end namespace filesystem
|
} //end namespace filesystem
|
||||||
} //end namespace experimental
|
} //end namespace experimental
|
||||||
|
|
||||||
|
|||||||
@ -478,7 +478,7 @@ namespace nana
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// The event argument type for listbox's category_dbl_click
|
/// The event argument type for listbox's category_dbl_click
|
||||||
struct arg_category
|
struct arg_listbox_category
|
||||||
: public event_arg
|
: public event_arg
|
||||||
{
|
{
|
||||||
drawerbase::listbox::cat_proxy category;
|
drawerbase::listbox::cat_proxy category;
|
||||||
@ -489,7 +489,7 @@ namespace nana
|
|||||||
/// Determines whether expension/shrink of category is blocked
|
/// Determines whether expension/shrink of category is blocked
|
||||||
bool category_change_blocked() const noexcept;
|
bool category_change_blocked() const noexcept;
|
||||||
|
|
||||||
arg_category(const drawerbase::listbox::cat_proxy&) noexcept;
|
arg_listbox_category(const drawerbase::listbox::cat_proxy&) noexcept;
|
||||||
private:
|
private:
|
||||||
mutable bool block_change_;
|
mutable bool block_change_;
|
||||||
};
|
};
|
||||||
@ -505,7 +505,7 @@ namespace nana
|
|||||||
basic_event<arg_listbox> selected;
|
basic_event<arg_listbox> selected;
|
||||||
|
|
||||||
/// An event occurs when a listbox category is double clicking.
|
/// An event occurs when a listbox category is double clicking.
|
||||||
basic_event<arg_category> category_dbl_click;
|
basic_event<arg_listbox_category> category_dbl_click;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct scheme
|
struct scheme
|
||||||
|
|||||||
@ -38,7 +38,9 @@
|
|||||||
|
|
||||||
|
|
||||||
namespace nana { namespace experimental {
|
namespace nana { namespace experimental {
|
||||||
|
#ifndef CXX_NO_INLINE_NAMESPACE
|
||||||
inline namespace v1 {
|
inline namespace v1 {
|
||||||
|
#endif
|
||||||
namespace filesystem
|
namespace filesystem
|
||||||
{
|
{
|
||||||
//class filesystem_error
|
//class filesystem_error
|
||||||
@ -870,7 +872,10 @@ namespace nana { namespace experimental {
|
|||||||
::chdir(p.c_str());
|
::chdir(p.c_str());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef CXX_NO_INLINE_NAMESPACE
|
||||||
} //end namespace v1
|
} //end namespace v1
|
||||||
|
#endif
|
||||||
}//end namespace filesystem
|
}//end namespace filesystem
|
||||||
} //end namespace experimental
|
} //end namespace experimental
|
||||||
}//end namespace nana
|
}//end namespace nana
|
||||||
|
|||||||
@ -3571,10 +3571,10 @@ namespace nana
|
|||||||
if (!item_pos.is_category()) //being the npos of item.second is a category
|
if (!item_pos.is_category()) //being the npos of item.second is a category
|
||||||
return;
|
return;
|
||||||
|
|
||||||
arg_category ai(cat_proxy(essence_, item_pos.cat));
|
arg_listbox_category arg_cat(cat_proxy(essence_, item_pos.cat));
|
||||||
lister.wd_ptr()->events().category_dbl_click.emit(ai);
|
lister.wd_ptr()->events().category_dbl_click.emit(arg_cat);
|
||||||
|
|
||||||
if(!ai.category_change_blocked()){
|
if (!arg_cat.category_change_blocked()){
|
||||||
bool do_expand = (lister.expand(item_pos.cat) == false);
|
bool do_expand = (lister.expand(item_pos.cat) == false);
|
||||||
lister.expand(item_pos.cat, do_expand);
|
lister.expand(item_pos.cat, do_expand);
|
||||||
|
|
||||||
@ -4299,17 +4299,17 @@ namespace nana
|
|||||||
|
|
||||||
//Implementation of arg_category
|
//Implementation of arg_category
|
||||||
//Contributed by leobackes(pr#97)
|
//Contributed by leobackes(pr#97)
|
||||||
arg_category::arg_category ( const nana::drawerbase::listbox::cat_proxy& cat ) noexcept
|
arg_listbox_category::arg_listbox_category(const nana::drawerbase::listbox::cat_proxy& cat) noexcept
|
||||||
: category(cat), block_change_(false)
|
: category(cat), block_change_(false)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void arg_category::block_category_change() const noexcept
|
void arg_listbox_category::block_category_change() const noexcept
|
||||||
{
|
{
|
||||||
block_change_ = true;
|
block_change_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool arg_category::category_change_blocked() const noexcept
|
bool arg_listbox_category::category_change_blocked() const noexcept
|
||||||
{
|
{
|
||||||
return block_change_;
|
return block_change_;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user