diff --git a/.gitignore b/.gitignore
index 6580f35b..0972b5ae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,6 +39,7 @@ lib/
*.ninja*
CMakeCache.txt
CMakeFiles/
+cmake-build-debug/
.idea/
cmake_install.cmake
*.DS_Store
diff --git a/.travis.yml b/.travis.yml
index 4543e6b3..9f6d3ed3 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.5 https://github.com/qPCR4vir/nana-demo.git ../nana-demo
- export PATH="$HOME/bin:$PATH"
#- mkdir ~/bin #it seemd that a bin already exists from 20170901
- 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
@@ -84,7 +84,7 @@ script:
# we are in "... nana/../nana_lib/bin/" we need "../../nana" to get the CMakeList.txt of nana.
# Thus, make install will put the nana.lib in "... nana/../nana_lib/lib/"
# and the includes in "... nana/../nana_lib/include/"
- - cmake -G"Unix Makefiles" ../../nana -DCMAKE_INSTALL_PREFIX=.. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_BUILD_DEMOS=ON -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON
+ - cmake -G"Unix Makefiles" ../../nana -DCMAKE_INSTALL_PREFIX=.. -DNANA_CMAKE_ENABLE_JPEG=ON -DNANA_CMAKE_ENABLE_PNG=OFF -DNANA_CMAKE_ENABLE_AUDIO=OFF -DNANA_CMAKE_FIND_BOOST_FILESYSTEM=ON -DNANA_CMAKE_BOOST_FILESYSTEM_FORCE=OFF -DNANA_CMAKE_AUTOMATIC_GUI_TESTING=ON
- make install
- ls
- cd ..
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7f89337e..0b6e1afe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -33,6 +33,7 @@ option(NANA_CMAKE_ENABLE_AUDIO "Enable class audio::play for PCM playback." OFF)
option(NANA_CMAKE_VERBOSE_PREPROCESSOR "Show annoying debug messages during compilation." ON)
option(NANA_CMAKE_STOP_VERBOSE_PREPROCESSOR "Stop compilation after showing the annoying debug messages." OFF)
option(NANA_CMAKE_AUTOMATIC_GUI_TESTING "Activate automatic GUI testing?" OFF)
+option(NANA_CLION "Activate some CLion specific workarounds" OFF)
# The ISO C++ File System Technical Specification (ISO-TS, or STD) is optional.
# http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4100.pdf
@@ -62,11 +63,12 @@ if(POLICY CMP0004) # ignore leading space
cmake_policy(SET CMP0004 OLD)
endif()
+set(CMAKE_DEBUG_POSTFIX "_d")
+
########### OS
if(WIN32)
add_definitions(-DWIN32)
- set(CMAKE_DEBUG_POSTFIX "_d")
#Global MSVC definitions. You may prefer the hand-tuned sln and projects from the nana repository.
if(MSVC)
option(MSVC_USE_MP "Set to ON to build nana with the /MP option (Visual Studio 2005 and above)." ON)
@@ -121,10 +123,15 @@ endif(UNIX)
########### Compilers
#
# Using gcc: gcc 4.8 don't support C++14 and make_unique. You may want to update at least to 4.9.
-# In Windows, the gcc which come with CLion was 4.8 from MinGW. You may want to install MinGW-w64 from the
-# TDM-GCC Compiler Suite for Windows which will update you to gcc 5.1.
# gcc 5.3 and 5.4 include filesytem, but you need to add the link flag: -lstdc++fs
#
+# In Windows, the gcc which come with CLion was 4.8 from MinGW.
+# CLion was updated to MinGW with gcc 6.3 ? Allways check this in File/Settings.../toolchains
+# You could install MinGW-w64 from the TDM-GCC Compiler Suite for Windows which will update you to gcc 5.1.
+# It is posible to follow https://computingabdn.com/softech/mingw-howto-install-gcc-for-windows/
+# and install MinGW with gcc 7.1 with has STD_THREADS and fs, from: https://sourceforge.net/projects/mingw-w64/files/
+#
+#
# see at end of: https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dynamic_or_shared.html
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") # Clang || GNU
@@ -275,8 +282,19 @@ target_link_libraries(${PROJECT_NAME} ${NANA_LINKS})
# Installing: the static "nana lib" will be in DESTDIR/CMAKE_INSTALL_PREFIX/lib/
# and the includes files "include/nana/" in DESTDIR/CMAKE_INSTALL_PREFIX/include/nana/
+# unfortunatelly install() is still ignored by CLion:
+# https://intellij-support.jetbrains.com/hc/en-us/community/posts/205822949-CMake-install-isn-t-supported-
install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib)
+
+# http://stackoverflow.com/questions/33788729/how-do-i-get-clion-to-run-an-install-target
+if(NANA_CLION) # the Clion IDE don't reconize the install target
+ add_custom_target(install_${PROJECT_NAME}
+ $(MAKE) install
+ DEPENDS ${PROJECT_NAME}
+ COMMENT "Installing ${PROJECT_NAME}")
+endif()
+
message("The compiled Nana library will be installed in ${CMAKE_INSTALL_PREFIX}/lib")
# Install the include directories too.
if(NANA_CMAKE_INSTALL_INCLUDES)
@@ -299,6 +317,9 @@ message ( "CMAKE_INSTALL_PREFIX = " ${CMAKE_INSTALL_PREFIX})
message ( "NANA_INCLUDE_DIR = " ${NANA_INCLUDE_DIR})
message ( "CMAKE_CURRENT_SOURCE_DIR= " ${CMAKE_CURRENT_SOURCE_DIR})
message ( "NANA_CMAKE_ENABLE_AUDIO = " ${NANA_CMAKE_ENABLE_AUDIO})
+message ( "NANA_CLION = " ${NANA_CLION})
+message ( "CMAKE_MAKE_PROGRAM = " ${CMAKE_MAKE_PROGRAM})
+
message ( "NANA_CMAKE_FIND_BOOST_FILESYSTEM = " ${NANA_CMAKE_FIND_BOOST_FILESYSTEM})
message ( "NANA_CMAKE_BOOST_FILESYSTEM_FORCE = " ${NANA_CMAKE_BOOST_FILESYSTEM_FORCE})
message ( "NANA_CMAKE_BOOST_FILESYSTEM_INCLUDE_ROOT = " ${NANA_CMAKE_BOOST_FILESYSTEM_INCLUDE_ROOT})
diff --git a/build/vc2015/nana.vcxproj b/build/vc2015/nana.vcxproj
index 9dd9c3bc..3ec4cf7d 100644
--- a/build/vc2015/nana.vcxproj
+++ b/build/vc2015/nana.vcxproj
@@ -252,6 +252,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/vc2015/nana.vcxproj.filters b/build/vc2015/nana.vcxproj.filters
index 32f7afd6..d1d7ba78 100644
--- a/build/vc2015/nana.vcxproj.filters
+++ b/build/vc2015/nana.vcxproj.filters
@@ -292,4 +292,74 @@
Source Files\detail
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
\ No newline at end of file
diff --git a/build/vc2017/nana.vcxproj b/build/vc2017/nana.vcxproj
index 818d6cf8..7b457574 100644
--- a/build/vc2017/nana.vcxproj
+++ b/build/vc2017/nana.vcxproj
@@ -101,6 +101,7 @@
Level3DisabledWIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
+ MultiThreadedDebugWindows
@@ -113,6 +114,7 @@
Level3Disabled_DEBUG;_LIB;%(PreprocessorDefinitions)
+ MultiThreadedDebugWindows
@@ -127,6 +129,7 @@
truetrueWIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
+ MultiThreadedWindows
@@ -143,6 +146,7 @@
truetrueNDEBUG;_LIB;%(PreprocessorDefinitions)
+ MultiThreadedWindows
diff --git a/include/nana/c++defines.hpp b/include/nana/c++defines.hpp
index 4c7a244e..04b5113f 100644
--- a/include/nana/c++defines.hpp
+++ b/include/nana/c++defines.hpp
@@ -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()
# undef STD_FILESYSTEM_NOT_SUPPORTED
# endif
+# if __has_include()
+# undef STD_THREAD_NOT_SUPPORTED
+# endif
#endif
#endif // NANA_CXX_DEFINES_INCLUDED
diff --git a/include/nana/gui/widgets/detail/tree_cont.hpp b/include/nana/gui/widgets/detail/tree_cont.hpp
index 2490ab95..3acbc6fa 100644
--- a/include/nana/gui/widgets/detail/tree_cont.hpp
+++ b/include/nana/gui/widgets/detail/tree_cont.hpp
@@ -1,12 +1,12 @@
-/*
+/**
* A Tree Container class implementation
* 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/detail/tree_cont.hpp
+ * @file nana/gui/widgets/detail/tree_cont.hpp
*/
#ifndef NANA_GUI_WIDGETS_DETAIL_TREE_CONT_HPP
diff --git a/include/nana/gui/widgets/treebox.hpp b/include/nana/gui/widgets/treebox.hpp
index 1ddb448d..08548dd4 100644
--- a/include/nana/gui/widgets/treebox.hpp
+++ b/include/nana/gui/widgets/treebox.hpp
@@ -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
@@ -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;///
#endif
diff --git a/source/gui/widgets/treebox.cpp b/source/gui/widgets/treebox.cpp
index 88468861..17696e53 100644
--- a/source/gui/widgets/treebox.cpp
+++ b/source/gui/widgets/treebox.cpp
@@ -1,13 +1,15 @@
-/*
+/**
* A Treebox Implementation
* Nana C++ Library(http://www.nanapro.org)
* 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.cpp
+ * @file nana/gui/widgets/treebox.cpp
+ * @brief
+ *
*/
#include
#include