Merge branch 'hotfix-1.5.5' of https://github.com/qPCR4vir/nana into qPCR4vir-hotfix-1.5.5
This commit is contained in:
commit
f2e7a4c044
1
.gitignore
vendored
1
.gitignore
vendored
@ -39,6 +39,7 @@ lib/
|
||||
*.ninja*
|
||||
CMakeCache.txt
|
||||
CMakeFiles/
|
||||
cmake-build-debug/
|
||||
.idea/
|
||||
cmake_install.cmake
|
||||
*.DS_Store
|
||||
|
@ -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 ..
|
||||
|
@ -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})
|
||||
|
@ -252,6 +252,32 @@
|
||||
<ClCompile Include="..\..\source\threads\pool.cpp" />
|
||||
<ClCompile Include="..\..\source\unicode_bidi.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\nana\any.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\basic_types.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\c++defines.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\charset.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\concepts.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\config.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\datetime.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\deploy.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\fwd.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\gui.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\internationalization.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\key_type.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\optional.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\stdc++.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\std_condition_variable.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\std_mutex.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\std_thread.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\traits.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\unicode_bidi.hpp" />
|
||||
<ClInclude Include="..\..\include\nana\verbose_preprocessor.hpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\include\nana\pop_ignore_diagnostic" />
|
||||
<None Include="..\..\include\nana\push_ignore_diagnostic" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
|
@ -292,4 +292,74 @@
|
||||
<Filter>Source Files\detail</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\..\include\nana\any.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\basic_types.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\c++defines.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\charset.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\concepts.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\config.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\datetime.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\deploy.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\fwd.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\gui.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\internationalization.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\key_type.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\optional.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\std_condition_variable.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\std_mutex.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\std_thread.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\stdc++.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\traits.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\unicode_bidi.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\include\nana\verbose_preprocessor.hpp">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\include\nana\pop_ignore_diagnostic">
|
||||
<Filter>Header Files</Filter>
|
||||
</None>
|
||||
<None Include="..\..\include\nana\push_ignore_diagnostic">
|
||||
<Filter>Header Files</Filter>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -101,6 +101,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@ -113,6 +114,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@ -127,6 +129,7 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
@ -143,6 +146,7 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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 <nana/gui/widgets/treebox.hpp>
|
||||
#include <nana/gui/widgets/scroll.hpp>
|
||||
|
Loading…
x
Reference in New Issue
Block a user