Merge branch 'hotfix-1.7' into develop
This commit is contained in:
@@ -254,7 +254,7 @@ namespace nana { namespace experimental { namespace filesystem
|
||||
path relative_path() const;
|
||||
path parent_path() const;
|
||||
path filename() const;
|
||||
//path stem() const;
|
||||
path stem() const;
|
||||
path extension() const;
|
||||
|
||||
// query
|
||||
@@ -290,6 +290,8 @@ namespace nana { namespace experimental { namespace filesystem
|
||||
// std::u16string generic_u16string() const;
|
||||
// std::u32string generic_u32string() const;
|
||||
|
||||
path lexically_normal() const;
|
||||
|
||||
//appends
|
||||
path& operator/=(const path& other);
|
||||
|
||||
@@ -544,6 +546,9 @@ namespace std {
|
||||
|
||||
path canonical(const path& p);
|
||||
path canonical(const path& p, std::error_code& err);
|
||||
|
||||
path weakly_canonical(const path& p);
|
||||
path weakly_canonical(const path& p, std::error_code& err);
|
||||
#endif
|
||||
|
||||
#if defined(NANA_FILESYSTEM_FORCE) || defined(NANA_MINGW)
|
||||
|
||||
@@ -127,6 +127,9 @@ namespace detail
|
||||
basic_window * seek_non_lite_widget_ancestor() const;
|
||||
|
||||
void set_action(mouse_action);
|
||||
|
||||
/// Only refresh when the root of window is in lazy-updating mode
|
||||
bool try_lazy_update(bool try_refresh);
|
||||
public:
|
||||
/// Override event_holder
|
||||
bool set_events(const std::shared_ptr<general_events>&) override;
|
||||
@@ -176,8 +179,7 @@ namespace detail
|
||||
bool ignore_mouse_focus : 1; ///< A flag indicates whether the widget accepts focus when clicking on it
|
||||
bool space_click_enabled : 1; ///< A flag indicates whether enable mouse_down/click/mouse_up when pressing and releasing whitespace key.
|
||||
bool draggable : 1;
|
||||
bool ignore_child_mapping : 1;
|
||||
unsigned Reserved :16;
|
||||
unsigned Reserved : 17;
|
||||
unsigned char tab; ///< indicate a window that can receive the keyboard TAB
|
||||
mouse_action action;
|
||||
mouse_action action_before;
|
||||
@@ -205,11 +207,14 @@ namespace detail
|
||||
{
|
||||
struct attr_root_tag
|
||||
{
|
||||
bool ime_enabled{ false };
|
||||
bool lazy_update{ false }; ///< Indicates whether the window is in lazy-updating mode.
|
||||
|
||||
container update_requesters; ///< Container for lazy-updating requesting windows.
|
||||
container tabstop;
|
||||
std::vector<edge_nimbus_action> effects_edge_nimbus;
|
||||
basic_window* focus{nullptr};
|
||||
basic_window* menubar{nullptr};
|
||||
bool ime_enabled{false};
|
||||
cursor state_cursor{nana::cursor::arrow};
|
||||
basic_window* state_cursor_window{ nullptr };
|
||||
|
||||
@@ -223,8 +228,6 @@ namespace detail
|
||||
update_state upd_state;
|
||||
dragdrop_status dnd_state{ dragdrop_status::not_ready };
|
||||
|
||||
container mapping_requester; ///< Children which are ignored to mapping
|
||||
|
||||
union
|
||||
{
|
||||
attr_root_tag * root;
|
||||
|
||||
@@ -99,7 +99,11 @@ namespace detail
|
||||
|
||||
bool show(core_window_t* wd, bool visible);
|
||||
|
||||
core_window_t* find_window(native_window_type root, const point& pos);
|
||||
//find a widget window at specified position
|
||||
//@param root A root window
|
||||
//@param pos Position
|
||||
//@param ignore_captured A flag indicates whether to ignore redirecting the result to its captured window. If this paramter is true, it returns the window at the position, if the parameter is false, it returns the captured window if the captured window don't ignore children.
|
||||
core_window_t* find_window(native_window_type root, const point& pos, bool ignore_captured = false);
|
||||
|
||||
//move the wnd and its all children window, x and y is a relatively coordinate for wnd's parent window
|
||||
bool move(core_window_t*, int x, int y, bool passive);
|
||||
@@ -116,7 +120,6 @@ namespace detail
|
||||
void refresh_tree(core_window_t*);
|
||||
|
||||
void do_lazy_refresh(core_window_t*, bool force_copy_to_screen, bool refresh_tree = false);
|
||||
void map_requester(core_window_t*);
|
||||
|
||||
bool set_parent(core_window_t* wd, core_window_t* new_parent);
|
||||
core_window_t* set_focus(core_window_t*, bool root_has_been_focused, arg_focus::reason);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* A CheckBox Implementation
|
||||
* 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.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -98,6 +98,7 @@ namespace drawerbase
|
||||
void transparent(bool value);
|
||||
bool transparent() const;
|
||||
};//end class checkbox
|
||||
|
||||
/// for managing checkboxs in radio mode
|
||||
class radio_group
|
||||
{
|
||||
@@ -113,8 +114,28 @@ namespace drawerbase
|
||||
constexpr static const std::size_t npos = static_cast<std::size_t>(-1);
|
||||
~radio_group();
|
||||
void add(checkbox&);
|
||||
std::size_t checked() const; ///< Retrieves the index of the checkbox which is checked.
|
||||
|
||||
///< Retrieves the index of checked option. It returns radio_group::npos if no checkbox is checked.
|
||||
std::size_t checked() const;
|
||||
std::size_t size() const;
|
||||
|
||||
template<typename Function>
|
||||
void on_clicked(Function&& click_fn)
|
||||
{
|
||||
for (auto & e : ui_container_)
|
||||
{
|
||||
e.uiobj->events().click(std::move(click_fn));
|
||||
}
|
||||
}
|
||||
|
||||
template<typename Function>
|
||||
void on_checked(Function&& check_fn)
|
||||
{
|
||||
for (auto & e : ui_container_)
|
||||
{
|
||||
e.uiobj->events().checked(std::move(check_fn));
|
||||
}
|
||||
}
|
||||
private:
|
||||
std::vector<element_tag> ui_container_;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user