improve dockable place

add a new API::at_safe_place()
This commit is contained in:
Jinhao
2015-09-20 23:21:44 +08:00
parent 5d2127e613
commit 460490040e
10 changed files with 181 additions and 13 deletions

View File

@@ -161,6 +161,9 @@ namespace detail
std::vector<std::pair<core_window_t*, unsigned long>> shortkeys(core_window_t*, bool with_children);
core_window_t* find_shortkey(native_window_type, unsigned long key);
void set_safe_place(core_window_t* wd, std::function<void()>&& fn);
void call_safe_place(unsigned thread_id);
private:
void _m_disengage(core_window_t*, core_window_t* for_new);
void _m_destroy(core_window_t*);

View File

@@ -298,6 +298,8 @@ namespace API
bool ignore_mouse_focus(window, bool ignore); ///< Enables/disables the mouse focus, it returns the previous state
bool ignore_mouse_focus(window); ///< Determines whether the mouse focus is enabled
void at_safe_place(window, std::function<void()>);
}//end namespace API
}//end namespace nana

View File

@@ -379,6 +379,9 @@ namespace nana
void push_back(std::string text, ::nana::any par = {});
void push_front(std::string text, ::nana::any par = {});
std::size_t selected() const;
void erase(std::size_t pos, bool close_attached = true);
};
}