diff --git a/.travis.yml b/.travis.yml
index 170ef287..ba037042 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -56,7 +56,7 @@ matrix:
- llvm-toolchain-precise
before_install:
- - git clone --depth=1 --branch=develop https://github.com/qPCR4vir/nana-demo.git ../nana-demo
+ - git clone --depth=1 --branch=hotfix-1.4 https://github.com/qPCR4vir/nana-demo.git ../nana-demo
- export PATH="$HOME/bin:$PATH"
- mkdir ~/bin
- wget --no-check-certificate --no-clobber -O /tmp/tools/cmake https://cmake.org/files/v3.4/cmake-3.4.0-rc3-Linux-x86_64.sh || true
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5c9c9c97..8f0dc030 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,12 +68,26 @@ if(WIN32)
add_definitions(-DWIN32)
#Global MSVC definitions. You may prefer the hand-tuned sln and projects from the nana repository.
if(MSVC)
- option(WIN32_USE_MP "Set to ON to build nana with the /MP option (Visual Studio 2005 and above)." ON)
- # ??
- if(WIN32_USE_MP)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
- endif(WIN32_USE_MP)
- endif(MSVC)
+ option(MSVC_USE_MP "Set to ON to build nana with the /MP option (Visual Studio 2005 and above)." ON)
+ option(MSVC_USE_STATIC_RUNTIME "Set to ON to build nana with the /MT(d) option." ON)
+
+ # Change the MSVC Compiler flags
+ if(MSVC_USE_MP)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP")
+ endif(MSVC_USE_MP)
+
+ if(MSVC_USE_STATIC_RUNTIME)
+ foreach(flag
+ CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
+ CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
+ CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
+ CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
+ if(${flag} MATCHES "/MD")
+ string(REGEX REPLACE "/MD" "/MT" ${flag} "${${flag}}")
+ endif()
+ endforeach()
+ endif(MSVC_USE_STATIC_RUNTIME)
+ endif(MSVC)
if(MINGW)
if(NANA_CMAKE_ENABLE_MINGW_STD_THREADS_WITH_MEGANZ)
@@ -251,8 +265,8 @@ foreach(subdir ${NANA_SOURCE_SUBDIRS})
# message("Subir: ${subdir}") # message("Files: ${sources}")
endforeach(subdir ${NANA_SOURCE_SUBDIRS})
-include_directories(${NANA_INCLUDE_DIR})
add_library(${PROJECT_NAME} ${sources} )
+target_include_directories(${PROJECT_NAME} PUBLIC ${NANA_INCLUDE_DIR})
target_link_libraries(${PROJECT_NAME} ${NANA_LINKS})
# Headers: use INCLUDE_DIRECTORIES
@@ -289,6 +303,4 @@ message ( "NANA_CMAKE_BOOST_FILESYSTEM_FORCE = " ${NANA_CMAKE_BOOST_FILE
message ( "NANA_CMAKE_BOOST_FILESYSTEM_INCLUDE_ROOT = " ${NANA_CMAKE_BOOST_FILESYSTEM_INCLUDE_ROOT})
message ( "NANA_CMAKE_BOOST_FILESYSTEM_LIB = " ${NANA_CMAKE_BOOST_FILESYSTEM_LIB})
message ( "NANA_CMAKE_AUTOMATIC_GUI_TESTING = " ${NANA_CMAKE_AUTOMATIC_GUI_TESTING})
-message ( "NANA_CMAKE_ADD_DEF_AUTOMATIC_GUI_TESTING = " ${NANA_CMAKE_ADD_DEF_AUTOMATIC_GUI_TESTING})
-
-
+message ( "NANA_CMAKE_ADD_DEF_AUTOMATIC_GUI_TESTING = " ${NANA_CMAKE_ADD_DEF_AUTOMATIC_GUI_TESTING})
\ No newline at end of file
diff --git a/LICENSE_1_0.txt b/LICENSE
similarity index 100%
rename from LICENSE_1_0.txt
rename to LICENSE
diff --git a/build/codeblocks/nana.cbp b/build/codeblocks/nana.cbp
index 18e276ca..c598a95d 100644
--- a/build/codeblocks/nana.cbp
+++ b/build/codeblocks/nana.cbp
@@ -49,7 +49,7 @@
-
+
@@ -96,6 +96,7 @@
+
@@ -113,6 +114,7 @@
+
diff --git a/build/vc2013/nana.vcxproj b/build/vc2013/nana.vcxproj
index c52001e4..8501f83f 100644
--- a/build/vc2013/nana.vcxproj
+++ b/build/vc2013/nana.vcxproj
@@ -187,6 +187,7 @@
+
@@ -232,6 +233,7 @@
+
@@ -249,6 +251,7 @@
+
diff --git a/build/vc2013/nana.vcxproj.filters b/build/vc2013/nana.vcxproj.filters
index dd9f87a2..6fe722eb 100644
--- a/build/vc2013/nana.vcxproj.filters
+++ b/build/vc2013/nana.vcxproj.filters
@@ -324,6 +324,15 @@
Source Files\nana\gui\detail
+
+ Source Files\nana
+
+
+ Source Files\nana\gui\widgets\skeletons
+
+
+ Source Files\nana\detail
+
diff --git a/build/vc2015/nana.vcxproj b/build/vc2015/nana.vcxproj
index e9c0aa02..9dd9c3bc 100644
--- a/build/vc2015/nana.vcxproj
+++ b/build/vc2015/nana.vcxproj
@@ -181,6 +181,7 @@
+
@@ -226,6 +227,7 @@
+
@@ -243,6 +245,7 @@
+
diff --git a/build/vc2015/nana.vcxproj.filters b/build/vc2015/nana.vcxproj.filters
index 4fcfbb6b..32f7afd6 100644
--- a/build/vc2015/nana.vcxproj.filters
+++ b/build/vc2015/nana.vcxproj.filters
@@ -282,5 +282,14 @@
Source Files\gui\detail
+
+ Source Files
+
+
+ Source Files\gui\widgets\skeletons
+
+
+ Source Files\detail
+
\ No newline at end of file
diff --git a/build/vc2017/nana.sln b/build/vc2017/nana.sln
new file mode 100644
index 00000000..d01415ee
--- /dev/null
+++ b/build/vc2017/nana.sln
@@ -0,0 +1,28 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26228.4
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nana", "nana.vcxproj", "{42D0520F-EFA5-4831-84FE-2B9085301C5D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {42D0520F-EFA5-4831-84FE-2B9085301C5D}.Debug|x64.ActiveCfg = Debug|x64
+ {42D0520F-EFA5-4831-84FE-2B9085301C5D}.Debug|x64.Build.0 = Debug|x64
+ {42D0520F-EFA5-4831-84FE-2B9085301C5D}.Debug|x86.ActiveCfg = Debug|Win32
+ {42D0520F-EFA5-4831-84FE-2B9085301C5D}.Debug|x86.Build.0 = Debug|Win32
+ {42D0520F-EFA5-4831-84FE-2B9085301C5D}.Release|x64.ActiveCfg = Release|x64
+ {42D0520F-EFA5-4831-84FE-2B9085301C5D}.Release|x64.Build.0 = Release|x64
+ {42D0520F-EFA5-4831-84FE-2B9085301C5D}.Release|x86.ActiveCfg = Release|Win32
+ {42D0520F-EFA5-4831-84FE-2B9085301C5D}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/build/vc2017/nana.vcxproj b/build/vc2017/nana.vcxproj
new file mode 100644
index 00000000..6ee38270
--- /dev/null
+++ b/build/vc2017/nana.vcxproj
@@ -0,0 +1,209 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {42D0520F-EFA5-4831-84FE-2B9085301C5D}
+ Win32Proj
+ nana
+ 10.0.14393.0
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ..\..\include;$(IncludePath)
+ ../bin/
+ ..\..\..\temp\$(ProjectName)\$(PlatformToolset)_$(Configuration)_$(PlatformShortName)\
+ $(ProjectName)_$(PlatformToolset)_$(Configuration)_$(PlatformShortName)
+
+
+ ..\..\include;$(IncludePath)
+ ../bin/
+ ..\..\..\temp\$(ProjectName)\$(PlatformToolset)_$(Configuration)_$(PlatformShortName)\
+ $(ProjectName)_$(PlatformToolset)_$(Configuration)_$(PlatformShortName)
+
+
+
+
+
+ Level3
+ Disabled
+ WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
+
+
+ Windows
+
+
+
+
+
+
+ Level3
+ Disabled
+ _DEBUG;_LIB;%(PreprocessorDefinitions)
+
+
+ Windows
+
+
+
+
+ Level3
+
+
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
+
+
+ Windows
+ true
+ true
+
+
+
+
+ Level3
+
+
+ MaxSpeed
+ true
+ true
+ NDEBUG;_LIB;%(PreprocessorDefinitions)
+
+
+ Windows
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/vc2017/nana.vcxproj.filters b/build/vc2017/nana.vcxproj.filters
new file mode 100644
index 00000000..13f8c102
--- /dev/null
+++ b/build/vc2017/nana.vcxproj.filters
@@ -0,0 +1,244 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;hm;inl;inc;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms
+
+
+ {81850bad-7436-405a-beb5-357c5e34f039}
+
+
+ {44582b36-4575-4663-ac02-e80417f95d05}
+
+
+ {b7e3cdb7-99ac-473d-86c8-53dddce70480}
+
+
+ {02fa693c-edc1-4e04-bf1d-ec3c2a89182a}
+
+
+ {cffe7506-b96c-42aa-a747-41b5115d9580}
+
+
+ {b6b2c032-c6a4-4884-8c14-eca4aa69ef0c}
+
+
+ {58f2e0f8-4d63-40db-807d-d7adf71c4ebe}
+
+
+ {f288a25d-3ce8-4c2e-a86f-9aeda44bc557}
+
+
+ {90b2da01-605d-489b-b6c5-2af8d3c2d8a6}
+
+
+ {430feed0-e1d9-45cb-8d59-e1a48a04d19f}
+
+
+ {dcf62634-a658-453b-a58d-f1a96a12a8b8}
+
+
+ {c1cdf46a-519f-422a-947f-39e173045414}
+
+
+
+
+ 源文件
+
+
+ 源文件
+
+
+ 源文件
+
+
+ 源文件
+
+
+ 源文件
+
+
+ 源文件
+
+
+ 源文件
+
+
+ 源文件
+
+
+ 源文件\audio\detail
+
+
+ 源文件\audio\detail
+
+
+ 源文件\audio\detail
+
+
+ 源文件\audio
+
+
+ 源文件\detail
+
+
+ 源文件\filesystem
+
+
+ 源文件\gui\detail
+
+
+ 源文件\gui\detail
+
+
+ 源文件\gui\detail
+
+
+ 源文件\gui\detail
+
+
+ 源文件\gui\detail
+
+
+ 源文件\gui\detail
+
+
+ 源文件\gui\detail
+
+
+ 源文件\gui\detail
+
+
+ 源文件\gui\detail
+
+
+ 源文件\gui\detail
+
+
+ 源文件\gui\widgets\skeletons
+
+
+ 源文件\gui\widgets\skeletons
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\gui\widgets
+
+
+ 源文件\paint\detail
+
+
+ 源文件\paint\detail
+
+
+ 源文件\paint
+
+
+ 源文件\paint
+
+
+ 源文件\paint
+
+
+ 源文件\paint
+
+
+ 源文件\paint
+
+
+ 源文件\system
+
+
+ 源文件\system
+
+
+ 源文件\system
+
+
+ 源文件\system
+
+
+ 源文件\threads
+
+
+ 源文件\detail
+
+
+
\ No newline at end of file
diff --git a/include/nana/basic_types.hpp b/include/nana/basic_types.hpp
index 6ddb6912..af9faa26 100644
--- a/include/nana/basic_types.hpp
+++ b/include/nana/basic_types.hpp
@@ -1,7 +1,7 @@
/*
* Basic Types definition
* 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
@@ -84,7 +84,7 @@ namespace nana
enum class mouse_action
{
- begin, normal = begin, hovered, pressed, end
+ begin, normal = begin, normal_captured, hovered, pressed, end
};
enum class element_state
@@ -97,12 +97,6 @@ namespace nana
disabled
};
- typedef unsigned scalar_t;
- typedef unsigned char uint8_t;
- typedef unsigned long uint32_t;
- typedef unsigned uint_t;
- typedef long long long_long_t;
-
union pixel_argb_t
{
struct element_tag
@@ -304,8 +298,7 @@ namespace nana
color(color_rgb);
color(color_argb);
color(color_rgba);
- color(unsigned red, unsigned green, unsigned blue);
- color(unsigned red, unsigned green, unsigned blue, double alpha);
+ color(unsigned red, unsigned green, unsigned blue, double alpha = 1.0);
/// Initializes the color with a CSS-like rgb string.
explicit color(std::string css_rgb);
@@ -319,10 +312,7 @@ 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& bgcolor, bool ignore_bgcolor_alpha) const;
-
- /// Blends two colors with the specified alpha, and the alpha values that come with these two colors are both ignored.
- color blend(const color& bgcolor, double alpha) const;
+ color blend(const color& blending_color, double alpha) const;
/// Determines whether the color is completely transparent.
bool invisible() const;
@@ -457,8 +447,8 @@ namespace nana
rectangle& pare_off(int pixels); /// is a known issue on libstdc++, it works on libc++)
* - STD_THREAD_NOT_SUPPORTED (GCC < 4.8.1)
- * - STD_put_time_NOT_SUPPORTED (GCC < 5)
* - STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED (MinGW with GCC < 4.8.1)
* - STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED (MinGW with GCC < 4.8.1)
* - STD_TO_STRING_NOT_SUPPORTED (MinGW with GCC < 4.8)
* - STD_FILESYSTEM_NOT_SUPPORTED (GCC < 5.3) ....
* - CXX_NO_INLINE_NAMESPACE (Visual C++ < 2015)
- * - STD_MAKE_UNIQUE_NOT_SUPPORTED (GCC < 4.9)
+ * - _enable_std_make_unique (GCC < 4.9)
+ * - _enable_std_put_time (GCC < 5)
+ * - _enable_std_clamp (Visual C++ < 2017)
*/
#ifndef NANA_CXX_DEFINES_INCLUDED
@@ -57,7 +58,7 @@
# 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 constexpr const //no support of constexpr until Visual C++ 2015 ? const ??
+# define constexpr //no support of constexpr until Visual C++ 2015 ? const ??
# else
# undef STD_FILESYSTEM_NOT_SUPPORTED
# endif
@@ -102,15 +103,21 @@
#define _CRT_SECURE_NO_DEPRECATE
#pragma warning(disable : 4996)
- #if (_MSC_VER == 1900)
+# if (_MSC_VER >= 1900)
// google: break any code that tries to use codecvt or codecvt.
// google: It appears the C++ libs haven't been compiled with native char16_t/char32_t support.
// google: Those definitions are for codecvt::id, codecvt::id and codecvt::id respectively.
// However, the codecvt::id and codecvt::id definitions aren't there, and indeed, if you look at locale0.cpp in the CRT source code you'll see they're not defined at all.
// google: That's a known issue, tracked by an active bug (DevDiv#1060849). We were able to update the STL's headers in response to char16_t/char32_t, but we still need to update the separately compiled sources.
- #define STD_CODECVT_NOT_SUPPORTED
- #endif // _MSC_VER == 1900
+# define STD_CODECVT_NOT_SUPPORTED
+# endif // _MSC_VER == 1900
+# if (_MSC_VER < 1910) //VS2017 RTM
+# define _enable_std_clamp
+# endif
+
+#elif defined(NANA_MINGW)
+# define STD_THREAD_NOT_SUPPORTED
#elif defined(__clang__) //Clang
#include //Introduces some implement-specific flags of ISO C++ Library
@@ -119,13 +126,15 @@
#define STD_CODECVT_NOT_SUPPORTED
#if !defined(__cpp_lib_make_unique) || (__cpp_lib_make_unique != 201304)
- #ifndef STD_MAKE_UNIQUE_NOT_SUPPORTED
- #define STD_MAKE_UNIQUE_NOT_SUPPORTED
+ #ifndef _enable_std_make_unique
+ #define _enable_std_make_unique
#endif
#endif
#endif
+# define _enable_std_clamp
+
#elif defined(__GNUC__) //GCC
#include //Introduces some implement-specific flags of ISO C++ Library
@@ -145,9 +154,9 @@
#endif
- #if ((__GNUC__ < 5) )
- # define STD_put_time_NOT_SUPPORTED
- #endif
+# if ((__GNUC__ < 5) )
+# define _enable_std_put_time
+# endif
#if ((__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 3 ) ) )
# undef STD_FILESYSTEM_NOT_SUPPORTED
@@ -160,7 +169,7 @@
#endif
#if (__GNUC_MINOR__ < 9)
- #define STD_MAKE_UNIQUE_NOT_SUPPORTED
+ #define _enable_std_make_unique
#endif
#if defined(NANA_MINGW)
@@ -181,6 +190,8 @@
#endif
#endif
#endif
+
+# define _enable_std_clamp
#endif
diff --git a/include/nana/deploy.hpp b/include/nana/deploy.hpp
index 82025904..686bb4ce 100644
--- a/include/nana/deploy.hpp
+++ b/include/nana/deploy.hpp
@@ -1,7 +1,7 @@
/*
* The Deploy 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
@@ -17,98 +17,11 @@
#include
#include
+#include
-
-#include
#include
-//Implement workarounds for GCC/MinGW which version is below 4.8.2
-#if defined(STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED)
-namespace std
-{
- //Workaround for no implemenation of std::stoi in MinGW.
- int stoi(const std::string&, std::size_t * pos = nullptr, int base = 10);
- int stoi(const std::wstring&, std::size_t* pos = nullptr, int base = 10);
-
- //Workaround for no implemenation of std::stof in MinGW.
- float stof(const std::string&, std::size_t * pos = nullptr);
- float stof(const std::wstring&, std::size_t* pos = nullptr);
-
- //Workaround for no implemenation of std::stod in MinGW.
- double stod(const std::string&, std::size_t * pos = nullptr);
- double stod(const std::wstring&, std::size_t* pos = nullptr);
-
- //Workaround for no implemenation of std::stold in MinGW.
- long double stold(const std::string&, std::size_t * pos = nullptr);
- long double stold(const std::wstring&, std::size_t* pos = nullptr);
-
- //Workaround for no implemenation of std::stol in MinGW.
- long stol(const std::string&, std::size_t* pos = nullptr, int base = 10);
- long stol(const std::wstring&, std::size_t* pos = nullptr, int base = 10);
-
- //Workaround for no implemenation of std::stoll in MinGW.
- long long stoll(const std::string&, std::size_t* pos = nullptr, int base = 10);
- long long stoll(const std::wstring&, std::size_t* pos = nullptr, int base = 10);
-
- //Workaround for no implemenation of std::stoul in MinGW.
- unsigned long stoul(const std::string&, std::size_t* pos = nullptr, int base = 10);
- unsigned long stoul(const std::wstring&, std::size_t* pos = nullptr, int base = 10);
-
- //Workaround for no implemenation of std::stoull in MinGW.
- unsigned long long stoull(const std::string&, std::size_t* pos = nullptr, int base = 10);
- unsigned long long stoull(const std::wstring&, std::size_t* pos = nullptr, int base = 10);
-}
-#endif //STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED
-
-#ifdef STD_TO_STRING_NOT_SUPPORTED
-namespace std
-{
- //Workaround for no implemenation of std::to_string/std::to_wstring in MinGW.
- std::string to_string(long double);
- std::string to_string(double);
- std::string to_string(unsigned);
- std::string to_string(int);
- std::string to_string(long);
- std::string to_string(unsigned long);
- std::string to_string(long long);
- std::string to_string(unsigned long long);
- std::string to_string(float);
-}
-#endif
-
-#ifdef STD_TO_WSTRING_NOT_SUPPORTED
-namespace std
-{
- std::wstring to_wstring(long double);
- std::wstring to_wstring(double);
- std::wstring to_wstring(unsigned);
- std::wstring to_wstring(int);
- std::wstring to_wstring(long);
- std::wstring to_wstring(unsigned long);
- std::wstring to_wstring(long long);
- std::wstring to_wstring(unsigned long long);
- std::wstring to_wstring(float);
-}
-#endif
-
-#ifdef STD_put_time_NOT_SUPPORTED
-#include
-namespace std
-{
- //Workaround for no implemenation of std::put_time in gcc < 5.
- /* std unspecified return type */
- //template< class CharT, class RTSTR >// let fail for CharT != char / wchar_t
- //RTSTR put_time(const std::tm* tmb, const CharT* fmt);
-
- //template< >
- std::string put_time/**/(const std::tm* tmb, const char* fmt);
-
- //Defined in header
- // std::size_t strftime(char* str, std::size_t count, const char* format, const std::tm* time);
- //template<>
- //std::wstring put_time(const std::tm* tmb, const wchar_t* fmt);
-}
-#endif // STD_put_time_NOT_SUPPORTED
+#include
namespace nana
{
@@ -192,45 +105,5 @@ namespace nana
#define NANA_RGB(a) (((DWORD)(a) & 0xFF)<<16) | ((DWORD)(a) & 0xFF00) | (((DWORD)(a) & 0xFF0000) >> 16 )
-
-#ifdef STD_MAKE_UNIQUE_NOT_SUPPORTED
-// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3656.htm
-
-#include
-#include
-#include
-#include
-
-namespace std {
- template struct _Unique_if {
- typedef unique_ptr _Single_object;
- };
-
- template struct _Unique_if {
- typedef unique_ptr _Unknown_bound;
- };
-
- template struct _Unique_if {
- typedef void _Known_bound;
- };
-
- template
- typename _Unique_if::_Single_object
- make_unique(Args&&... args) {
- return unique_ptr(new T(std::forward(args)...));
- }
-
- template
- typename _Unique_if::_Unknown_bound
- make_unique(size_t n) {
- typedef typename remove_extent::type U;
- return unique_ptr(new U[n]());
- }
-
- template
- typename _Unique_if::_Known_bound
- make_unique(Args&&...) = delete;
-}
-#endif //STD_make_unique_NOT_SUPPORTED
#include
#endif //NANA_DEPLOY_HPP
diff --git a/include/nana/filesystem/filesystem_ext.hpp b/include/nana/filesystem/filesystem_ext.hpp
index 39fc4a07..2c28acad 100644
--- a/include/nana/filesystem/filesystem_ext.hpp
+++ b/include/nana/filesystem/filesystem_ext.hpp
@@ -1,6 +1,6 @@
/**
* 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
@@ -23,13 +23,13 @@ namespace filesystem_ext
{
#if defined(NANA_WINDOWS)
- constexpr auto def_root = "C:";
- constexpr auto def_rootstr = "C:\\";
- constexpr auto def_rootname = "Local Drive(C:)";
+ constexpr auto const def_root = "C:";
+ constexpr auto const def_rootstr = "C:\\";
+ constexpr auto const def_rootname = "Local Drive(C:)";
#elif defined(NANA_LINUX)
- constexpr auto def_root = "/";
- constexpr auto def_rootstr = "/";
- constexpr auto def_rootname = "Root/";
+ constexpr auto const def_root = "/";
+ constexpr auto const def_rootstr = "/";
+ constexpr auto const def_rootname = "Root/";
#endif
std::experimental::filesystem::path path_user(); ///< extention ?
diff --git a/include/nana/gui/detail/basic_window.hpp b/include/nana/gui/detail/basic_window.hpp
index 038acdbb..2230a422 100644
--- a/include/nana/gui/detail/basic_window.hpp
+++ b/include/nana/gui/detail/basic_window.hpp
@@ -1,7 +1,7 @@
/**
* A Basic Window Widget Definition
* 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
@@ -17,6 +17,7 @@
#include "drawer.hpp"
#include "events_holder.hpp"
#include "widget_geometrics.hpp"
+#include "widget_content_measurer_interface.hpp"
#include "widget_notifier_interface.hpp"
#include
#include
@@ -85,7 +86,7 @@ namespace detail
enum class update_state
{
- none, lazy, refresh
+ none, lazy, refreshed, request_refresh
};
struct edge_nimbus_action
@@ -191,6 +192,7 @@ namespace detail
//The following pointers refer to the widget's object.
std::shared_ptr events_ptr;
widget_geometrics* scheme{ nullptr };
+ ::nana::dev::widget_content_measurer_interface* content_measurer{ nullptr };
}annex;
struct
@@ -220,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 };
diff --git a/include/nana/gui/detail/bedrock.hpp b/include/nana/gui/detail/bedrock.hpp
index cda91c98..5462857d 100644
--- a/include/nana/gui/detail/bedrock.hpp
+++ b/include/nana/gui/detail/bedrock.hpp
@@ -1,7 +1,7 @@
/**
* A Bedrock 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
@@ -70,6 +70,9 @@ namespace detail
element_store& get_element_store() const;
void map_through_widgets(core_window_t*, native_drawable_type);
+
+ //Closes the windows which are associated with the specified thread. If the given thread_id is 0, it closes all windows
+ void close_thread_window(unsigned thread_id);
public:
void event_expose(core_window_t *, bool exposed);
void event_move(core_window_t*, int x, int y);
@@ -92,7 +95,6 @@ namespace detail
private:
void _m_emit_core(event_code, core_window_t*, bool draw_only, const event_arg&);
void _m_event_filter(event_code, core_window_t*, thread_context*);
- void _m_except_handler();
private:
static bedrock bedrock_object;
diff --git a/include/nana/gui/detail/drawer.hpp b/include/nana/gui/detail/drawer.hpp
index 472f822e..5a202438 100644
--- a/include/nana/gui/detail/drawer.hpp
+++ b/include/nana/gui/detail/drawer.hpp
@@ -1,7 +1,7 @@
/*
* A Drawer Implementation
* 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
@@ -126,8 +126,7 @@ namespace nana
void* draw(std::function &&, bool diehard);
void erase(void* diehard);
private:
- void _m_effect_bground(bool before);
- bool _m_lazy_decleared() const;
+ void _m_effect_bground_subsequent();
method_state& _m_mth_state(int pos);
template
@@ -140,8 +139,6 @@ namespace nana
if (realizer && (method_state::not_overrided != mth_state))
{
- _m_effect_bground(true);
-
if (method_state::pending == mth_state)
{
(realizer->*mfptr)(graphics, arg);
@@ -154,8 +151,7 @@ namespace nana
else
(realizer->*mfptr)(graphics, arg);
- if (_m_lazy_decleared())
- _m_effect_bground(false);
+ _m_effect_bground_subsequent();
}
}
public:
diff --git a/include/nana/gui/detail/effects_renderer.hpp b/include/nana/gui/detail/effects_renderer.hpp
index 155fcb78..3727933a 100644
--- a/include/nana/gui/detail/effects_renderer.hpp
+++ b/include/nana/gui/detail/effects_renderer.hpp
@@ -86,7 +86,7 @@ namespace nana{
}
//Avoiding duplicated rendering. If the window is declared to lazy refresh, it should be rendered.
- if ((forced && (action.window == wd)) || (focused == action.window) || !action.rendered || (action.window->other.upd_state == core_window_t::update_state::refresh))
+ if ((forced && (action.window == wd)) || (focused == action.window) || !action.rendered || (action.window->other.upd_state == core_window_t::update_state::refreshed))
{
rd_set.emplace_back(r, action.window);
action.rendered = true;
diff --git a/include/nana/gui/detail/handle_manager.hpp b/include/nana/gui/detail/handle_manager.hpp
deleted file mode 100644
index 6319e319..00000000
--- a/include/nana/gui/detail/handle_manager.hpp
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * Handle Manager Implementation
- * Copyright(C) 2003-2013 Jinhao(cnjinhao@hotmail.com)
- *
- * Distributed under the Boost Software License, Version 1.0.
- * (See accompanying file LICENSE_1_0.txt or copy at
- * http://www.boost.org/LICENSE_1_0.txt)
- *
- * @file: nana/gui/detail/handle_manager.hpp
- *
- * @description:
- * this manages all the window handles
- */
-
-#ifndef NANA_GUI_DETAIL_HANDLE_MANAGER_HPP
-#define NANA_GUI_DETAIL_HANDLE_MANAGER_HPP
-
-#include
-#include
-#if defined(STD_THREAD_NOT_SUPPORTED)
- #include
-#else
- #include
-#endif
-
-#include