Merge branch 'hotfix-1.5.5' into develop
This commit is contained in:
@@ -312,7 +312,14 @@ namespace nana
|
||||
/// @param lightness in range of [0, 1]
|
||||
color& from_hsl(double hue, double saturation, double lightness); ///< immutable alpha channel
|
||||
|
||||
color blend(const color& blending_color, double alpha) const;
|
||||
/// Blends color
|
||||
/**
|
||||
* Returns a color which is blended as this * (1 - fade_rate) + blending_color * fade_rate
|
||||
* @param blending_color Color to blend
|
||||
* @param fade_rate Blending rate for blending_color
|
||||
* @return a blended color
|
||||
*/
|
||||
color blend(const color& blending_color, double fade_rate) const;
|
||||
|
||||
/// Determines whether the color is completely transparent.
|
||||
bool invisible() const;
|
||||
|
||||
@@ -173,6 +173,7 @@
|
||||
|
||||
//Assume the std::thread is not implement on MinGW
|
||||
//But some toolchains may implement std::thread.
|
||||
// it seems that MinGW 6.3 and 7.1 have std::thread
|
||||
#ifdef NANA_MINGW
|
||||
# ifndef STD_THREAD_NOT_SUPPORTED
|
||||
# define STD_THREAD_NOT_SUPPORTED
|
||||
@@ -220,6 +221,9 @@
|
||||
# if __has_include(<filesystem>)
|
||||
# undef STD_FILESYSTEM_NOT_SUPPORTED
|
||||
# endif
|
||||
# if __has_include(<mutex>)
|
||||
# undef STD_THREAD_NOT_SUPPORTED
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif // NANA_CXX_DEFINES_INCLUDED
|
||||
|
||||
@@ -273,6 +273,7 @@ that return a corresponding nana::appearance with predefined values.
|
||||
public:
|
||||
virtual ~caret_interface() = default;
|
||||
|
||||
virtual bool activated() const = 0;
|
||||
virtual void disable_throw() noexcept = 0;
|
||||
|
||||
virtual void effective_range(const rectangle& range) = 0;
|
||||
|
||||
@@ -55,6 +55,7 @@ namespace detail
|
||||
void dimension(const size& s) override;
|
||||
void visible(bool visibility) override;
|
||||
bool visible() const override;
|
||||
bool activated() const override;
|
||||
private:
|
||||
basic_window * owner_;
|
||||
point position_;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Platform 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
|
||||
@@ -66,11 +66,11 @@ namespace detail
|
||||
|
||||
static nana::point window_position(native_window_type);
|
||||
static void move_window(native_window_type, int x, int y);
|
||||
static void move_window(native_window_type, const rectangle&);
|
||||
static bool move_window(native_window_type, const rectangle&);
|
||||
static void bring_top(native_window_type, bool activated);
|
||||
static void set_window_z_order(native_window_type, native_window_type wd_after, z_order_action action_if_no_wd_after);
|
||||
|
||||
static void window_size(native_window_type, const size&);
|
||||
static bool window_size(native_window_type, const size&);
|
||||
static void get_window_rect(native_window_type, rectangle&);
|
||||
static void window_caption(native_window_type, const native_string_type&);
|
||||
static native_string_type window_caption(native_window_type);
|
||||
|
||||
@@ -38,9 +38,9 @@ namespace nana
|
||||
{
|
||||
std::vector<std::shared_ptr<item_interface>> items;
|
||||
|
||||
std::size_t max_items{10}; // the number of items display.
|
||||
mutable std::size_t index{::nana::npos}; // the result of the selection.
|
||||
mutable bool have_selected;
|
||||
std::size_t max_items{ 10 }; // the number of items display.
|
||||
mutable std::size_t index{ ::nana::npos }; // the result of the selection.
|
||||
mutable bool have_selected{ false };
|
||||
};
|
||||
|
||||
class item_renderer
|
||||
|
||||
@@ -36,7 +36,6 @@ namespace nana
|
||||
void attached(widget_reference, graph_reference) override;
|
||||
private:
|
||||
void refresh(graph_reference) override;
|
||||
void _m_draw_background(unsigned,unsigned);
|
||||
private:
|
||||
implement * const impl_;
|
||||
};
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
* 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
|
||||
* (See accompanying file LICENSE or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
* @file: nana/gui/widgets/treebox.hpp
|
||||
* @file nana/gui/widgets/treebox.hpp
|
||||
* @brief
|
||||
* The treebox organizes the nodes by a key string.
|
||||
* The treebox would have a vertical scrollbar if there are too many nodes
|
||||
@@ -344,7 +344,7 @@ namespace nana
|
||||
}//end namespace drawerbase
|
||||
|
||||
/// \brief Displays a hierarchical list of items, such as the files and directories on a disk.
|
||||
/// See also in [documentation](http://nanapro.org/en-us/help/widgets/treebox.htm)
|
||||
/// See also in [documentation](http://nanapro.org/en-us/documentation/widgets/treebox.htm)
|
||||
class treebox
|
||||
:public widget_object < category::widget_tag, drawerbase::treebox::trigger, drawerbase::treebox::treebox_events>
|
||||
{
|
||||
@@ -372,7 +372,7 @@ namespace nana
|
||||
/// \brief The construct that creates a widget.
|
||||
/// @param wd A handle to the parent window of the widget being created.
|
||||
/// @param r the size and position of the widget in its parent window coordinate.
|
||||
/// @param visible specifying the visible after creating.
|
||||
/// @param visible specifying if visible after creating.
|
||||
treebox(window, const nana::rectangle& = rectangle(), bool visible = true);
|
||||
|
||||
template<typename ItemRenderer>
|
||||
@@ -397,18 +397,18 @@ namespace nana
|
||||
///
|
||||
/// The treebox automatically redraws after certain operations, but,
|
||||
/// under some circumstances, it is good to disable the automatic drawing mode,
|
||||
/// for example, before adding nodes in a loop, disable the mode to avoiding
|
||||
/// for example, before adding nodes in a loop, disable the mode avoiding
|
||||
/// frequent and useless refresh for better performance, and then, after
|
||||
/// the operations, enable the automatic redraw mode again.
|
||||
/// @param bool whether to enable.
|
||||
void auto_draw(bool);
|
||||
/// @param enable bool whether to enable.
|
||||
void auto_draw(bool enable);
|
||||
|
||||
/// \brief Enable the checkboxs for each item of the widget.
|
||||
/// @param bool indicates whether to show or hide the checkboxs.
|
||||
/// @param enable bool indicates whether to show or hide the checkboxs.
|
||||
treebox & checkable(bool enable);
|
||||
|
||||
|
||||
bool checkable() const; ///< Determinte whether the checkboxs are enabled.
|
||||
bool checkable() const; ///< Are the checkboxs are enabled?
|
||||
|
||||
/// Clears the contents
|
||||
void clear();
|
||||
@@ -424,26 +424,30 @@ namespace nana
|
||||
|
||||
void icon_erase(const ::std::string& id);
|
||||
|
||||
item_proxy find(const ::std::string& keypath); ///< Find an item though a specified keypath.
|
||||
item_proxy find(const ::std::string& keypath); ///< Find an item through a specified keypath.
|
||||
|
||||
/// Inserts a new node to treebox, but if the keypath exists returns the existing node.
|
||||
/// Inserts a new node to treebox, but if the keypath exists change and returns the existing node.
|
||||
item_proxy insert(const ::std::string& path_key, ///< specifies the node hierarchy
|
||||
::std::string title ///< used for displaying
|
||||
);
|
||||
|
||||
/// Inserts a new node to treebox, but if the keypath exists returns the existing node.
|
||||
/// Inserts a new node to treebox, but if the keypath exists change and returns the existing node.
|
||||
item_proxy insert( item_proxy pos, ///< the parent item node
|
||||
const ::std::string& key, ///< specifies the new node
|
||||
::std::string title ///< title used for displaying in the new node.
|
||||
);
|
||||
item_proxy erase(item_proxy i); ///< Removes the node at pos and return the Item proxy following the removed node
|
||||
|
||||
item_proxy erase(item_proxy i); ///< Removes the node at i and return the Item proxy following the removed node
|
||||
|
||||
void erase(const ::std::string& keypath); ///< Removes the node by the key path.
|
||||
|
||||
::std::string make_key_path(item_proxy i, const ::std::string& splitter) const;///<returns the key path
|
||||
|
||||
item_proxy selected() const; ///< returns the selected node
|
||||
|
||||
};//end class treebox
|
||||
}//end namespace nana
|
||||
|
||||
#include <nana/pop_ignore_diagnostic>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -85,12 +85,14 @@ namespace nana
|
||||
|
||||
bool changed() const; ///< Returns true if the graphics object is operated
|
||||
bool empty() const; ///< Returns true if the graphics object does not refer to any resource.
|
||||
operator const void*() const;
|
||||
explicit operator bool() const noexcept;
|
||||
|
||||
drawable_type handle() const;
|
||||
const void* pixmap() const;
|
||||
const void* context() const;
|
||||
|
||||
void swap(graphics& other) noexcept;
|
||||
|
||||
/// Creates a graphics/drawable resource
|
||||
/**
|
||||
* @param sz The dimension of the graphics to be requested. If sz is empty, it performs as release().
|
||||
|
||||
Reference in New Issue
Block a user