Merge branch 'hotfix-1.4.1' into develop
This commit is contained in:
@@ -222,9 +222,6 @@ namespace detail
|
||||
basic_window* focus{nullptr};
|
||||
basic_window* menubar{nullptr};
|
||||
bool ime_enabled{false};
|
||||
#if defined(NANA_WINDOWS)
|
||||
cursor running_cursor{ nana::cursor::arrow };
|
||||
#endif
|
||||
cursor state_cursor{nana::cursor::arrow};
|
||||
basic_window* state_cursor_window{ nullptr };
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace API
|
||||
void affinity_execute(window window_handle, const std::function<void()>&);
|
||||
|
||||
bool set_events(window, const std::shared_ptr<general_events>&);
|
||||
|
||||
|
||||
template<typename Scheme>
|
||||
std::unique_ptr<Scheme> make_scheme()
|
||||
{
|
||||
@@ -161,7 +161,7 @@ namespace API
|
||||
}//end namespace detail
|
||||
|
||||
void exit(); ///< close all windows in current thread
|
||||
void exit_all(); ///< close all windows
|
||||
void exit_all(); ///< close all windows
|
||||
|
||||
/// @brief Searchs whether the text contains a '&' and removes the character for transforming.
|
||||
/// If the text contains more than one '&' charachers, the others are ignored. e.g
|
||||
@@ -189,7 +189,7 @@ namespace API
|
||||
|
||||
void window_icon_default(const paint::image& small_icon, const paint::image& big_icon = {});
|
||||
void window_icon(window, const paint::image& small_icon, const paint::image& big_icon = {});
|
||||
|
||||
|
||||
bool empty_window(window); ///< Determines whether a window is existing.
|
||||
bool is_window(window); ///< Determines whether a window is existing, equal to !empty_window.
|
||||
bool is_destroying(window); ///< Determines whether a window is destroying
|
||||
@@ -292,7 +292,7 @@ namespace API
|
||||
* @param window_handle A handle to the window to be refreshed.
|
||||
*/
|
||||
void refresh_window(window window_handle);
|
||||
void refresh_window_tree(window); ///< Refreshs the specified window and all it<EFBFBD>s children windows, then display it immediately
|
||||
void refresh_window_tree(window); ///< Refreshes the specified window and all its children windows, then display it immediately
|
||||
void update_window(window); ///< Copies the off-screen buffer to the screen for immediate display.
|
||||
|
||||
void window_caption(window, const std::string& title_utf8);
|
||||
@@ -304,7 +304,7 @@ namespace API
|
||||
|
||||
void activate_window(window);
|
||||
|
||||
/// Determines whether the specified window will get the keyboard focus when its root window gets native system focus.
|
||||
/// Determines whether the specified window will get the keyboard focus when its root window gets native system focus.
|
||||
bool is_focus_ready(window);
|
||||
|
||||
/// Returns the current keyboard focus window.
|
||||
@@ -322,7 +322,7 @@ namespace API
|
||||
* @param ignore_children Indicates whether to redirect the mouse input to its children if the mouse pointer is over its children.
|
||||
*/
|
||||
void set_capture(window window_handle, bool ignore_children);
|
||||
|
||||
|
||||
/// Disable a window to grab the mouse input.
|
||||
/**
|
||||
* @param window handle A handle to a window to release grab of mouse input.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* A Categorize Implementation
|
||||
* Nana C++ Library(http://www.nanapro.org)
|
||||
* Copyright(C) 2003-2016 Jinhao(cnjinhao@hotmail.com)
|
||||
* Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com)
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* A Tree Container class implementation
|
||||
* Copyright(C) 2003-2016 Jinhao(cnjinhao@hotmail.com)
|
||||
* Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com)
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -58,6 +58,31 @@ namespace detail
|
||||
t = t_next;
|
||||
}
|
||||
}
|
||||
|
||||
bool is_ancestor_of(const tree_node* child) const
|
||||
{
|
||||
while (child)
|
||||
{
|
||||
if (child->owner == this)
|
||||
return true;
|
||||
|
||||
child = child->owner;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
tree_node * front() const
|
||||
{
|
||||
if (this->owner && (this != this->owner->child))
|
||||
{
|
||||
auto i = this->owner->child;
|
||||
while (i->next != this)
|
||||
i = i->next;
|
||||
|
||||
return i;
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
};
|
||||
|
||||
template<typename UserData>
|
||||
@@ -76,12 +101,17 @@ namespace detail
|
||||
|
||||
~tree_cont()
|
||||
{
|
||||
clear();
|
||||
clear(&root_);
|
||||
}
|
||||
|
||||
void clear()
|
||||
void clear(node_type* node)
|
||||
{
|
||||
remove(root_.child);
|
||||
while (node->child)
|
||||
{
|
||||
//If there is a sibling of child, the root_.child
|
||||
//will be assigned with the sibling.
|
||||
remove(node->child);
|
||||
}
|
||||
}
|
||||
|
||||
bool verify(const node_type* node) const
|
||||
|
||||
@@ -122,7 +122,9 @@ namespace nana
|
||||
|
||||
void value(size_type s)
|
||||
{
|
||||
if (s + metrics_.range > metrics_.peak)
|
||||
if (metrics_.range > metrics_.peak)
|
||||
s = 0;
|
||||
else if (s + metrics_.range > metrics_.peak)
|
||||
s = metrics_.peak - metrics_.range;
|
||||
|
||||
if (graph_ && (metrics_.value != s))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/**
|
||||
* A Spin box widget
|
||||
* Nana C++ Library(http://www.nanapro.org)
|
||||
* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
|
||||
* Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com)
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace nana
|
||||
{
|
||||
enum class component
|
||||
{
|
||||
begin, expender = begin, crook, icon, text, bground, end
|
||||
begin, expander = begin, crook, icon, text, bground, end
|
||||
};
|
||||
|
||||
struct node_image_tag
|
||||
@@ -119,27 +119,17 @@ namespace nana
|
||||
implement * impl() const;
|
||||
|
||||
void check(node_type*, checkstate);
|
||||
bool draw();
|
||||
|
||||
const tree_cont_type & tree() const;
|
||||
tree_cont_type & tree();
|
||||
|
||||
void renderer(::nana::pat::cloneable<renderer_interface>&&);
|
||||
const ::nana::pat::cloneable<renderer_interface>& renderer() const;
|
||||
void placer(::nana::pat::cloneable<compset_placer_interface>&&);
|
||||
const ::nana::pat::cloneable<compset_placer_interface>& placer() const;
|
||||
|
||||
nana::any & value(node_type*) const;
|
||||
node_type* insert(node_type*, const std::string& key, std::string&&);
|
||||
node_type* insert(const std::string& path, std::string&&);
|
||||
|
||||
bool verify_kinship(node_type* parent, node_type* child) const;
|
||||
|
||||
void remove(node_type*);
|
||||
node_type * selected() const;
|
||||
void selected(node_type*);
|
||||
void set_expand(node_type*, bool);
|
||||
void set_expand(const ::std::string& path, bool);
|
||||
|
||||
node_image_tag& icon(const ::std::string&) const;
|
||||
void icon_erase(const ::std::string&);
|
||||
@@ -201,6 +191,9 @@ namespace nana
|
||||
/// Set the check state, and it returns itself.
|
||||
item_proxy& check(bool);
|
||||
|
||||
/// Clears the child nodes
|
||||
item_proxy& clear();
|
||||
|
||||
/// Return true when the node is expanded \todo change to expanded ??
|
||||
bool expanded() const;
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ namespace system{
|
||||
|
||||
void get(std::string& text_utf8);
|
||||
void get(std::wstring& text);
|
||||
|
||||
std::wstring wget();
|
||||
private:
|
||||
bool _m_set(format, const void* buf, std::size_t size, native_window_type);
|
||||
void* _m_get(format, size_t& size);
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
|
||||
|
||||
|
||||
#define STRING2(x) #x
|
||||
#define STRING2(...) #__VA_ARGS__
|
||||
#define STRING(x) STRING2(x)
|
||||
#define SHOW_VALUE(x) " " #x " = " STRING2(x)
|
||||
#define SHOW_VALUE(x) " " #x " = " STRING2(x)
|
||||
|
||||
#pragma message ( "\n -----> Verbose preprocessor" )
|
||||
#pragma message ( SHOW_VALUE(VERBOSE_PREPROCESSOR) )
|
||||
@@ -124,7 +124,7 @@
|
||||
#pragma message ( SHOW_VALUE(USE_LIBJPEG_FROM_OS) )
|
||||
#pragma message ( SHOW_VALUE(NANA_LIBJPEG) )
|
||||
|
||||
|
||||
|
||||
// #pragma message ( "\n =" STRING() ", \n =" STRING()" , \n =" STRING() )
|
||||
|
||||
#if defined(STOP_VERBOSE_PREPROCESSOR)
|
||||
|
||||
Reference in New Issue
Block a user