diff --git a/.gitignore b/.gitignore
index f6f1e54d..a8f12de9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,9 @@
#ignore thumbnails created by windows
Thumbs.db
#Ignore files build by Visual Studio
+bii/build/*
+bii/cmake/*
+bii/deps/*
*.obj
*.exe
*.pdb
@@ -21,10 +24,12 @@ Thumbs.db
[Bb]in
[Dd]ebug*/
*.lib
+*.a
*.sbr
obj/
[Rr]elease*/
_ReSharper*/
[Tt]est[Rr]esult*
*.suo
-*.sdf
\ No newline at end of file
+*.sdf
+lib/
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 87593cf6..dba9e2c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,11 +2,50 @@
# Author: Andrew Kornilov(https://github.com/ierofant)
# Contributor:
# Robert Hauck - Enable support for PNG/Freetype
+# Qiangqiang Wu - Add biicode support
+
+if(BIICODE)
+ # prepare BII_LIB_SRC
+ set(LIB_SRC ${BII_LIB_SRC})
+
+ foreach(cpp ${BII_LIB_SRC})
+ if(${cpp} MATCHES "/detail/(win32|linux_X11)/.+$")
+ list(APPEND trash_files ${cpp})
+ endif()
+ endforeach()
+
+ list(REMOVE_ITEM BII_LIB_SRC ${trash_files})
+
+ if(WIN32)
+ file(GLOB_RECURSE platform_files "*/detail/win32/*")
+ list(APPEND BII_LIB_SRC ${platform_files})
+ elseif(UNIX)
+ file(GLOB_RECURSE platform_files "*/detail/linux_X11/*")
+ list(APPEND BII_LIB_SRC ${platform_files})
+ else()
+ message(FATAL_ERROR "Only Windows and Unix are supported for the moment")
+ endif()
+
+ # set compile flags
+ if(CMAKE_COMPILER_IS_GNUCXX)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
+ endif(CMAKE_COMPILER_IS_GNUCXX)
+
+ # we'll use the default config file so we can iliminate the following macro definitions
+ if(MSVC)
+ # More MSVC specific compilation flags
+ add_definitions(-D_SCL_SECURE_NO_WARNINGS)
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
+ endif()
+
+ add_biicode_targets()
+
+ return()
+endif()
project(nana)
cmake_minimum_required(VERSION 2.8)
-
#Select platform automatically
if(WIN32)
add_definitions(-DNANA_WINDOWS)
@@ -54,43 +93,42 @@ if(NANA_UNICODE)
endif()
endif()
-
#Find PNG
if(UNIX)
- find_package(Freetype)
- if (FREETYPE_FOUND)
- include_directories( ${FREETYPE_INCLUDE_DIRS})
- endif()
+ find_package(Freetype)
+ if (FREETYPE_FOUND)
+ include_directories( ${FREETYPE_INCLUDE_DIRS})
+ endif()
endif()
option(NANA_ENABLE_PNG "Enable the use of PNG" ON)
if(NANA_ENABLE_PNG)
- add_definitions(-DNANA_ENABLE_PNG)
+ add_definitions(-DNANA_ENABLE_PNG)
- option(NANA_LIBPNG "Use the included libpng" ON)
- if(NANA_LIBPNG)
- add_definitions(-DNANA_LIBPNG)
- else()
- find_package(PNG)
- if (PNG_FOUND)
- include_directories( ${PNG_INCLUDE_DIRS})
- endif()
- endif()
+ option(NANA_LIBPNG "Use the included libpng" ON)
+ if(NANA_LIBPNG)
+ add_definitions(-DNANA_LIBPNG)
+ else()
+ find_package(PNG)
+ if (PNG_FOUND)
+ include_directories( ${PNG_INCLUDE_DIRS})
+ endif()
+ endif()
endif()
-
-
#Copy our new config.hpp (with removed defines)
-execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_SOURCE_DIR}/build/cmake/config.hpp ${CMAKE_SOURCE_DIR}/include/nana/)
-
+execute_process(COMMAND ${CMAKE_COMMAND}
+ -E copy_if_different
+ ${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/config.hpp
+ ${CMAKE_CURRENT_SOURCE_DIR}/include/nana/)
+
+if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
+endif(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
set(NANA_SOURCE_DIR ${CMAKE_SOURCE_DIR}/source)
set(NANA_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/include)
-if(CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall")
-endif(CMAKE_COMPILER_IS_GNUCXX)
-
include_directories(${NANA_INCLUDE_DIR})
aux_source_directory(${NANA_SOURCE_DIR} NANA_SOURCE)
aux_source_directory(${NANA_SOURCE_DIR}/detail NANA_DETAIL_SOURCE)
@@ -107,21 +145,19 @@ aux_source_directory(${NANA_SOURCE_DIR}/system NANA_SYSTEM_SOURCE)
aux_source_directory(${NANA_SOURCE_DIR}/threads NANA_THREADS_SOURCE)
add_library(${PROJECT_NAME} ${NANA_SOURCE}
- ${NANA_DETAIL_SOURCE}
- ${NANA_FILESYSTEM_SOURCE}
- ${NANA_AUDIO_SOURCE}
- ${NANA_AUDIO_DETAIL_SOURCE}
- ${NANA_GUI_SOURCE}
- ${NANA_GUI_DETAIL_SOURCE}
- ${NANA_GUI_WIDGETS_SOURCE}
- ${NANA_GUI_WIDGETS_SKELETONS_SOURCE}
- ${NANA_PAINT_SOURCE}
- ${NANA_PAINT_DETAIL_SOURCE}
- ${NANA_SYSTEM_SOURCE}
- ${NANA_THREADS_SOURCE})
-
-
+ ${NANA_DETAIL_SOURCE}
+ ${NANA_FILESYSTEM_SOURCE}
+ ${NANA_AUDIO_SOURCE}
+ ${NANA_AUDIO_DETAIL_SOURCE}
+ ${NANA_GUI_SOURCE}
+ ${NANA_GUI_DETAIL_SOURCE}
+ ${NANA_GUI_WIDGETS_SOURCE}
+ ${NANA_GUI_WIDGETS_SKELETONS_SOURCE}
+ ${NANA_PAINT_SOURCE}
+ ${NANA_PAINT_DETAIL_SOURCE}
+ ${NANA_SYSTEM_SOURCE}
+ ${NANA_THREADS_SOURCE})
install(TARGETS ${PROJECT_NAME}
- ARCHIVE DESTINATION lib
- LIBRARY DESTINATION lib)
-install(DIRECTORY ${NANA_INCLUDE_DIR}/nana DESTINATION include)
\ No newline at end of file
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib)
+install(DIRECTORY ${NANA_INCLUDE_DIR}/nana DESTINATION include)
diff --git a/README.md b/README.md
index 3546c151..0b034cf6 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
# Nana C++ Library
+[](https://www.biicode.com/qiangwu/nana)
Nana is a C++ library designed to allow developers to easily create cross-platform GUI applications with modern C++11 style, currently it can work on Linux(X11) and Windows. The nana repository contains the entire source of library, you can browse the source code and submit your pull request for contributing.
@@ -8,6 +9,21 @@ Nana is licensed under the [Boost Software License].
[Boost Software License]: http://www.boost.org/LICENSE_1_0.txt
+## Biicode
+Nana is available in biicode, download biicode and try the nana example:
+
+```
+> mkdir try-nana
+> cd try-nana
+> bii init
+> bii open qiangwu/nana-example
+> bii find
+> bii build
+> cd bin
+```
+
+Run it! All dependencies will be resovled automatically by biicode! Amazing, isn't it?
+
## Support
The best way to get help with Nana library is by visiting http://nanapro.org/help.htm
diff --git a/bii/layout.bii b/bii/layout.bii
new file mode 100644
index 00000000..31e284d2
--- /dev/null
+++ b/bii/layout.bii
@@ -0,0 +1,12 @@
+ # Minimal layout, with all auxiliary folders inside "bii" and
+# The binary "bin" folder as is, and enabled code edition in the project root
+cmake: bii/cmake
+lib: bii/lib
+build: bii/build
+
+deps: bii/deps
+# Setting this to True enables directly editing in the project root
+# instead of blocks/youruser/yourblock
+# the block will be named as your project folder
+auto-root-block: True
+root-block: qiangwu/nana
\ No newline at end of file
diff --git a/bii/policies.bii b/bii/policies.bii
new file mode 100644
index 00000000..d6d5e86e
--- /dev/null
+++ b/bii/policies.bii
@@ -0,0 +1,11 @@
+# This file configures your finds of dependencies.
+#
+# It is an ordered list of rules, which will be evaluated in order, of the form:
+# block_pattern: TAG
+#
+# For each possible block that could resolve your dependencies,
+# only versions with tag >= TAG will be accepted
+
+qiangwu/* : DEV
+* : STABLE
+
diff --git a/bii/settings.bii b/bii/settings.bii
new file mode 100644
index 00000000..fa648ede
--- /dev/null
+++ b/bii/settings.bii
@@ -0,0 +1,2 @@
+cmake: {generator: MinGW Makefiles}
+os: {arch: 32bit, family: Windows, subfamily: '7', version: 6.1.7601}
diff --git a/biicode.conf b/biicode.conf
new file mode 100644
index 00000000..872c1375
--- /dev/null
+++ b/biicode.conf
@@ -0,0 +1,49 @@
+# Biicode configuration file
+
+[requirements]
+ glenn/png: 6
+
+[parent]
+ # The parent version of this block. Must match folder name. E.g.
+ # user/block # No version number means not published yet
+ # You can change it to publish to a different track, and change version, e.g.
+ # user/block(track): 7
+ qiangwu/nana: 0
+
+[paths]
+ # Local directories to look for headers (within block)
+ # /
+ include
+
+[dependencies]
+ # Manual adjust file implicit dependencies, add (+), remove (-), or overwrite (=)
+ # hello.h + hello_imp.cpp hello_imp2.cpp
+ # *.h + *.cpp
+ include/nana/config.hpp + include/*
+ include/nana/config.hpp + source/*
+
+[mains]
+ # Manual adjust of files that define an executable
+ # !main.cpp # Do not build executable from this file
+ # main2.cpp # Build it (it doesnt have a main() function, but maybe it includes it)
+
+[tests]
+ # Manual adjust of files that define a CTest test
+ # test/* pattern to evaluate this test/ folder sources like tests
+
+[hooks]
+ # These are defined equal to [dependencies],files names matching bii*stage*hook.py
+ # will be launched as python scripts at stage = {post_process, clean}
+ # CMakeLists.txt + bii/my_post_process1_hook.py bii_clean_hook.py
+
+[includes]
+ # Mapping of include patterns to external blocks
+ # hello*.h: user3/depblock # includes will be processed as user3/depblock/hello*.h
+ png.h: glenn/png
+
+[data]
+ # Manually define data files dependencies, that will be copied to bin for execution
+ # By default they are copied to bin/user/block/... which should be taken into account
+ # when loading from disk such data
+ # image.cpp + image.jpg # code should write open("user/block/image.jpg")
+
diff --git a/build/bakefile/nana.bkl b/build/bakefile/nana.bkl
new file mode 100644
index 00000000..def827a4
--- /dev/null
+++ b/build/bakefile/nana.bkl
@@ -0,0 +1,96 @@
+srcdir ../../source;
+
+toolsets = gnu vs2013;
+
+gnu.makefile = ../build/makefile/makefile;
+vs2013.solutionfile = ../build/vc2013/nana.sln;
+
+library nana {
+ includedirs = ../include;
+
+ if ($(toolset) == gnu)
+ cxx-compiler-options = "-std=c++0x `pkg-config --cflags freetype2`";
+
+ sources {
+ any.cpp
+ basic_types.cpp
+ charset.cpp
+ datetime.cpp
+ deploy.cpp
+ exceptions.cpp
+ internationalization.cpp
+ traits.cpp
+ unicode_bidi.cpp
+ filesystem/file_iterator.cpp
+ filesystem/fs_utility.cpp
+ audio/player.cpp
+ audio/detail/audio_device.cpp
+ audio/detail/audio_stream.cpp
+ audio/detail/buffer_preparation.cpp
+ detail/platform_spec_selector.cpp
+ gui/animation.cpp
+ gui/basis.cpp
+ gui/dragger.cpp
+ gui/drawing.cpp
+ gui/effects.cpp
+ gui/element.cpp
+ gui/filebox.cpp
+ gui/layout_utility.cpp
+ gui/msgbox.cpp
+ gui/notifier.cpp
+ gui/place.cpp
+ gui/programming_interface.cpp
+ gui/screen.cpp
+ gui/state_cursor.cpp
+ gui/timer.cpp
+ gui/tooltip.cpp
+ gui/wvl.cpp
+ gui/detail/basic_window.cpp
+ gui/detail/bedrock_pi.cpp
+ gui/detail/bedrock_selector.cpp
+ gui/detail/color_schemes.cpp
+ gui/detail/drawer.cpp
+ gui/detail/element_store.cpp
+ gui/detail/events_operation.cpp
+ gui/detail/native_window_interface.cpp
+ gui/detail/window_layout.cpp
+ gui/detail/window_manager.cpp
+ gui/widgets/button.cpp
+ gui/widgets/categorize.cpp
+ gui/widgets/checkbox.cpp
+ gui/widgets/combox.cpp
+ gui/widgets/date_chooser.cpp
+ gui/widgets/float_listbox.cpp
+ gui/widgets/form.cpp
+ gui/widgets/frame.cpp
+ gui/widgets/label.cpp
+ gui/widgets/listbox.cpp
+ gui/widgets/menubar.cpp
+ gui/widgets/menu.cpp
+ gui/widgets/panel.cpp
+ gui/widgets/picture.cpp
+ gui/widgets/progress.cpp
+ gui/widgets/scroll.cpp
+ gui/widgets/slider.cpp
+ gui/widgets/spinbox.cpp
+ gui/widgets/tabbar.cpp
+ gui/widgets/textbox.cpp
+ gui/widgets/toolbar.cpp
+ gui/widgets/treebox.cpp
+ gui/widgets/widget.cpp
+ gui/widgets/skeletons/text_editor.cpp
+ paint/gadget.cpp
+ paint/graphics.cpp
+ paint/image.cpp
+ paint/image_process_selector.cpp
+ paint/pixel_buffer.cpp
+ paint/text_renderer.cpp
+ paint/detail/image_process_provider.cpp
+ paint/detail/native_paint_interface.cpp
+ system/dataexch.cpp
+ system/platform.cpp
+ system/shared_wrapper.cpp
+ system/timepiece.cpp
+ threads/pool.cpp
+ }
+}
diff --git a/build/codeblocks/nana.layout b/build/codeblocks/nana.layout
index 57a19817..805917bc 100644
--- a/build/codeblocks/nana.layout
+++ b/build/codeblocks/nana.layout
@@ -1,24 +1,9 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -26,99 +11,14 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -131,9 +31,9 @@
-
+
-
+
@@ -141,14 +41,114 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/makefile-bkl/makefile b/build/makefile-bkl/makefile
new file mode 100644
index 00000000..03225611
--- /dev/null
+++ b/build/makefile-bkl/makefile
@@ -0,0 +1,305 @@
+# This file was automatically generated by bakefile.
+#
+# Any manual changes will be lost if it is regenerated,
+# modify the source .bkl file instead if possible.
+
+# You may define standard make variables such as CFLAGS or
+# CXXFLAGS to affect the build. For example, you could use:
+#
+# make CXXFLAGS=-g
+#
+# to build with debug information. The full list of variables
+# that can be used by this makefile is:
+# AR, CC, CFLAGS, CPPFLAGS, CXX, CXXFLAGS, LD, LDFLAGS, MAKE, RANLIB.
+
+# You may also specify config=Debug|Release
+# or their corresponding lower case variants on make command line to select
+# the corresponding default flags values.
+ifeq ($(config),debug)
+override config := Debug
+endif
+ifeq ($(config),release)
+override config := Release
+endif
+ifeq ($(config),Debug)
+override CPPFLAGS += -DDEBUG
+override CFLAGS += -g -O0
+override CXXFLAGS += -g -O0
+override LDFLAGS += -g
+else ifeq ($(config),Release)
+override CPPFLAGS += -DNDEBUG
+override CFLAGS += -O2
+override CXXFLAGS += -O2
+else ifneq (,$(config))
+$(warning Unknown configuration "$(config)")
+endif
+
+# Use "make RANLIB=''" for platforms without ranlib.
+RANLIB ?= ranlib
+
+CC := cc
+CXX := c++
+
+# The directory for the build files, may be overridden on make command line.
+builddir = .
+
+ifneq ($(builddir),.)
+_builddir := $(if $(findstring $(abspath $(builddir)),$(builddir)),,../../../)$(builddir)/../build/makefile/
+_builddir_error := $(shell mkdir -p $(_builddir) 2>&1)
+$(if $(_builddir_error),$(error Failed to create build directory: $(_builddir_error)))
+endif
+all: $(_builddir)libnana.a
+
+$(_builddir)libnana.a: $(_builddir)nana_any.o $(_builddir)nana_basic_types.o $(_builddir)nana_charset.o $(_builddir)nana_datetime.o $(_builddir)nana_deploy.o $(_builddir)nana_exceptions.o $(_builddir)nana_internationalization.o $(_builddir)nana_traits.o $(_builddir)nana_unicode_bidi.o $(_builddir)nana_file_iterator.o $(_builddir)nana_fs_utility.o $(_builddir)nana_player.o $(_builddir)nana_audio_device.o $(_builddir)nana_audio_stream.o $(_builddir)nana_buffer_preparation.o $(_builddir)nana_animation.o $(_builddir)nana_basis.o $(_builddir)nana_dragger.o $(_builddir)nana_drawing.o $(_builddir)nana_effects.o $(_builddir)nana_element.o $(_builddir)nana_filebox.o $(_builddir)nana_layout_utility.o $(_builddir)nana_msgbox.o $(_builddir)nana_notifier.o $(_builddir)nana_place.o $(_builddir)nana_programming_interface.o $(_builddir)nana_screen.o $(_builddir)nana_state_cursor.o $(_builddir)nana_timer.o $(_builddir)nana_tooltip.o $(_builddir)nana_wvl.o $(_builddir)nana_basic_window.o $(_builddir)nana_bedrock_pi.o $(_builddir)nana_color_schemes.o $(_builddir)nana_drawer.o $(_builddir)nana_element_store.o $(_builddir)nana_events_operation.o $(_builddir)nana_native_window_interface.o $(_builddir)nana_window_layout.o $(_builddir)nana_window_manager.o $(_builddir)nana_button.o $(_builddir)nana_categorize.o $(_builddir)nana_checkbox.o $(_builddir)nana_combox.o $(_builddir)nana_date_chooser.o $(_builddir)nana_float_listbox.o $(_builddir)nana_form.o $(_builddir)nana_frame.o $(_builddir)nana_label.o $(_builddir)nana_listbox.o $(_builddir)nana_menubar.o $(_builddir)nana_menu.o $(_builddir)nana_panel.o $(_builddir)nana_picture.o $(_builddir)nana_progress.o $(_builddir)nana_scroll.o $(_builddir)nana_slider.o $(_builddir)nana_spinbox.o $(_builddir)nana_tabbar.o $(_builddir)nana_textbox.o $(_builddir)nana_toolbar.o $(_builddir)nana_treebox.o $(_builddir)nana_widget.o $(_builddir)nana_text_editor.o $(_builddir)nana_gadget.o $(_builddir)nana_graphics.o $(_builddir)nana_image.o $(_builddir)nana_image_process_selector.o $(_builddir)nana_pixel_buffer.o $(_builddir)nana_text_renderer.o $(_builddir)nana_image_process_provider.o $(_builddir)nana_native_paint_interface.o $(_builddir)nana_dataexch.o $(_builddir)nana_platform.o $(_builddir)nana_shared_wrapper.o $(_builddir)nana_timepiece.o $(_builddir)nana_pool.o $(_builddir)nana_platform_spec_selector.o $(_builddir)nana_bedrock_selector.o
+ $(AR) rcu $@ $(_builddir)nana_any.o $(_builddir)nana_basic_types.o $(_builddir)nana_charset.o $(_builddir)nana_datetime.o $(_builddir)nana_deploy.o $(_builddir)nana_exceptions.o $(_builddir)nana_internationalization.o $(_builddir)nana_traits.o $(_builddir)nana_unicode_bidi.o $(_builddir)nana_file_iterator.o $(_builddir)nana_fs_utility.o $(_builddir)nana_player.o $(_builddir)nana_audio_device.o $(_builddir)nana_audio_stream.o $(_builddir)nana_buffer_preparation.o $(_builddir)nana_animation.o $(_builddir)nana_basis.o $(_builddir)nana_dragger.o $(_builddir)nana_drawing.o $(_builddir)nana_effects.o $(_builddir)nana_element.o $(_builddir)nana_filebox.o $(_builddir)nana_layout_utility.o $(_builddir)nana_msgbox.o $(_builddir)nana_notifier.o $(_builddir)nana_place.o $(_builddir)nana_programming_interface.o $(_builddir)nana_screen.o $(_builddir)nana_state_cursor.o $(_builddir)nana_timer.o $(_builddir)nana_tooltip.o $(_builddir)nana_wvl.o $(_builddir)nana_basic_window.o $(_builddir)nana_bedrock_pi.o $(_builddir)nana_color_schemes.o $(_builddir)nana_drawer.o $(_builddir)nana_element_store.o $(_builddir)nana_events_operation.o $(_builddir)nana_native_window_interface.o $(_builddir)nana_window_layout.o $(_builddir)nana_window_manager.o $(_builddir)nana_button.o $(_builddir)nana_categorize.o $(_builddir)nana_checkbox.o $(_builddir)nana_combox.o $(_builddir)nana_date_chooser.o $(_builddir)nana_float_listbox.o $(_builddir)nana_form.o $(_builddir)nana_frame.o $(_builddir)nana_label.o $(_builddir)nana_listbox.o $(_builddir)nana_menubar.o $(_builddir)nana_menu.o $(_builddir)nana_panel.o $(_builddir)nana_picture.o $(_builddir)nana_progress.o $(_builddir)nana_scroll.o $(_builddir)nana_slider.o $(_builddir)nana_spinbox.o $(_builddir)nana_tabbar.o $(_builddir)nana_textbox.o $(_builddir)nana_toolbar.o $(_builddir)nana_treebox.o $(_builddir)nana_widget.o $(_builddir)nana_text_editor.o $(_builddir)nana_gadget.o $(_builddir)nana_graphics.o $(_builddir)nana_image.o $(_builddir)nana_image_process_selector.o $(_builddir)nana_pixel_buffer.o $(_builddir)nana_text_renderer.o $(_builddir)nana_image_process_provider.o $(_builddir)nana_native_paint_interface.o $(_builddir)nana_dataexch.o $(_builddir)nana_platform.o $(_builddir)nana_shared_wrapper.o $(_builddir)nana_timepiece.o $(_builddir)nana_pool.o $(_builddir)nana_platform_spec_selector.o $(_builddir)nana_bedrock_selector.o
+ $(RANLIB) $@
+
+$(_builddir)nana_any.o: ../../source/any.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/any.cpp
+
+$(_builddir)nana_basic_types.o: ../../source/basic_types.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/basic_types.cpp
+
+$(_builddir)nana_charset.o: ../../source/charset.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/charset.cpp
+
+$(_builddir)nana_datetime.o: ../../source/datetime.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/datetime.cpp
+
+$(_builddir)nana_deploy.o: ../../source/deploy.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/deploy.cpp
+
+$(_builddir)nana_exceptions.o: ../../source/exceptions.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/exceptions.cpp
+
+$(_builddir)nana_internationalization.o: ../../source/internationalization.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/internationalization.cpp
+
+$(_builddir)nana_traits.o: ../../source/traits.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/traits.cpp
+
+$(_builddir)nana_unicode_bidi.o: ../../source/unicode_bidi.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/unicode_bidi.cpp
+
+$(_builddir)nana_file_iterator.o: ../../source/filesystem/file_iterator.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/filesystem/file_iterator.cpp
+
+$(_builddir)nana_fs_utility.o: ../../source/filesystem/fs_utility.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/filesystem/fs_utility.cpp
+
+$(_builddir)nana_player.o: ../../source/audio/player.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/audio/player.cpp
+
+$(_builddir)nana_audio_device.o: ../../source/audio/detail/audio_device.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/audio/detail/audio_device.cpp
+
+$(_builddir)nana_audio_stream.o: ../../source/audio/detail/audio_stream.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/audio/detail/audio_stream.cpp
+
+$(_builddir)nana_buffer_preparation.o: ../../source/audio/detail/buffer_preparation.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/audio/detail/buffer_preparation.cpp
+
+$(_builddir)nana_animation.o: ../../source/gui/animation.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/animation.cpp
+
+$(_builddir)nana_basis.o: ../../source/gui/basis.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/basis.cpp
+
+$(_builddir)nana_dragger.o: ../../source/gui/dragger.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/dragger.cpp
+
+$(_builddir)nana_drawing.o: ../../source/gui/drawing.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/drawing.cpp
+
+$(_builddir)nana_effects.o: ../../source/gui/effects.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/effects.cpp
+
+$(_builddir)nana_element.o: ../../source/gui/element.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/element.cpp
+
+$(_builddir)nana_filebox.o: ../../source/gui/filebox.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/filebox.cpp
+
+$(_builddir)nana_layout_utility.o: ../../source/gui/layout_utility.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/layout_utility.cpp
+
+$(_builddir)nana_msgbox.o: ../../source/gui/msgbox.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/msgbox.cpp
+
+$(_builddir)nana_notifier.o: ../../source/gui/notifier.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/notifier.cpp
+
+$(_builddir)nana_place.o: ../../source/gui/place.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/place.cpp
+
+$(_builddir)nana_programming_interface.o: ../../source/gui/programming_interface.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/programming_interface.cpp
+
+$(_builddir)nana_screen.o: ../../source/gui/screen.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/screen.cpp
+
+$(_builddir)nana_state_cursor.o: ../../source/gui/state_cursor.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/state_cursor.cpp
+
+$(_builddir)nana_timer.o: ../../source/gui/timer.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/timer.cpp
+
+$(_builddir)nana_tooltip.o: ../../source/gui/tooltip.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/tooltip.cpp
+
+$(_builddir)nana_wvl.o: ../../source/gui/wvl.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/wvl.cpp
+
+$(_builddir)nana_basic_window.o: ../../source/gui/detail/basic_window.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/detail/basic_window.cpp
+
+$(_builddir)nana_bedrock_pi.o: ../../source/gui/detail/bedrock_pi.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/detail/bedrock_pi.cpp
+
+$(_builddir)nana_color_schemes.o: ../../source/gui/detail/color_schemes.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/detail/color_schemes.cpp
+
+$(_builddir)nana_drawer.o: ../../source/gui/detail/drawer.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/detail/drawer.cpp
+
+$(_builddir)nana_element_store.o: ../../source/gui/detail/element_store.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/detail/element_store.cpp
+
+$(_builddir)nana_events_operation.o: ../../source/gui/detail/events_operation.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/detail/events_operation.cpp
+
+$(_builddir)nana_native_window_interface.o: ../../source/gui/detail/native_window_interface.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/detail/native_window_interface.cpp
+
+$(_builddir)nana_window_layout.o: ../../source/gui/detail/window_layout.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/detail/window_layout.cpp
+
+$(_builddir)nana_window_manager.o: ../../source/gui/detail/window_manager.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/detail/window_manager.cpp
+
+$(_builddir)nana_button.o: ../../source/gui/widgets/button.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/button.cpp
+
+$(_builddir)nana_categorize.o: ../../source/gui/widgets/categorize.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/categorize.cpp
+
+$(_builddir)nana_checkbox.o: ../../source/gui/widgets/checkbox.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/checkbox.cpp
+
+$(_builddir)nana_combox.o: ../../source/gui/widgets/combox.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/combox.cpp
+
+$(_builddir)nana_date_chooser.o: ../../source/gui/widgets/date_chooser.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/date_chooser.cpp
+
+$(_builddir)nana_float_listbox.o: ../../source/gui/widgets/float_listbox.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/float_listbox.cpp
+
+$(_builddir)nana_form.o: ../../source/gui/widgets/form.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/form.cpp
+
+$(_builddir)nana_frame.o: ../../source/gui/widgets/frame.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/frame.cpp
+
+$(_builddir)nana_label.o: ../../source/gui/widgets/label.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/label.cpp
+
+$(_builddir)nana_listbox.o: ../../source/gui/widgets/listbox.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/listbox.cpp
+
+$(_builddir)nana_menubar.o: ../../source/gui/widgets/menubar.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/menubar.cpp
+
+$(_builddir)nana_menu.o: ../../source/gui/widgets/menu.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/menu.cpp
+
+$(_builddir)nana_panel.o: ../../source/gui/widgets/panel.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/panel.cpp
+
+$(_builddir)nana_picture.o: ../../source/gui/widgets/picture.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/picture.cpp
+
+$(_builddir)nana_progress.o: ../../source/gui/widgets/progress.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/progress.cpp
+
+$(_builddir)nana_scroll.o: ../../source/gui/widgets/scroll.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/scroll.cpp
+
+$(_builddir)nana_slider.o: ../../source/gui/widgets/slider.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/slider.cpp
+
+$(_builddir)nana_spinbox.o: ../../source/gui/widgets/spinbox.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/spinbox.cpp
+
+$(_builddir)nana_tabbar.o: ../../source/gui/widgets/tabbar.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/tabbar.cpp
+
+$(_builddir)nana_textbox.o: ../../source/gui/widgets/textbox.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/textbox.cpp
+
+$(_builddir)nana_toolbar.o: ../../source/gui/widgets/toolbar.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/toolbar.cpp
+
+$(_builddir)nana_treebox.o: ../../source/gui/widgets/treebox.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/treebox.cpp
+
+$(_builddir)nana_widget.o: ../../source/gui/widgets/widget.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/widget.cpp
+
+$(_builddir)nana_text_editor.o: ../../source/gui/widgets/skeletons/text_editor.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/widgets/skeletons/text_editor.cpp
+
+$(_builddir)nana_gadget.o: ../../source/paint/gadget.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/paint/gadget.cpp
+
+$(_builddir)nana_graphics.o: ../../source/paint/graphics.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/paint/graphics.cpp
+
+$(_builddir)nana_image.o: ../../source/paint/image.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/paint/image.cpp
+
+$(_builddir)nana_image_process_selector.o: ../../source/paint/image_process_selector.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/paint/image_process_selector.cpp
+
+$(_builddir)nana_pixel_buffer.o: ../../source/paint/pixel_buffer.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/paint/pixel_buffer.cpp
+
+$(_builddir)nana_text_renderer.o: ../../source/paint/text_renderer.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/paint/text_renderer.cpp
+
+$(_builddir)nana_image_process_provider.o: ../../source/paint/detail/image_process_provider.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/paint/detail/image_process_provider.cpp
+
+$(_builddir)nana_native_paint_interface.o: ../../source/paint/detail/native_paint_interface.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/paint/detail/native_paint_interface.cpp
+
+$(_builddir)nana_dataexch.o: ../../source/system/dataexch.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/system/dataexch.cpp
+
+$(_builddir)nana_platform.o: ../../source/system/platform.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/system/platform.cpp
+
+$(_builddir)nana_shared_wrapper.o: ../../source/system/shared_wrapper.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/system/shared_wrapper.cpp
+
+$(_builddir)nana_timepiece.o: ../../source/system/timepiece.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/system/timepiece.cpp
+
+$(_builddir)nana_pool.o: ../../source/threads/pool.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/threads/pool.cpp
+
+$(_builddir)nana_platform_spec_selector.o: ../../source/detail/platform_spec_selector.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/detail/platform_spec_selector.cpp
+
+$(_builddir)nana_bedrock_selector.o: ../../source/gui/detail/bedrock_selector.cpp
+ $(CXX) -c -o $@ $(CPPFLAGS) $(CXXFLAGS) -MD -MP -fPIC -DPIC -pthread -I../../include -std=c++0x `pkg-config --cflags freetype2` ../../source/gui/detail/bedrock_selector.cpp
+
+clean:
+ rm -f $(_builddir)*.o
+ rm -f $(_builddir)*.d
+ rm -f $(_builddir)libnana.a
+
+.PHONY: all clean
+
+# Dependencies tracking:
+-include *.d
diff --git a/build/vc2013-bkl/vc2013/nana.sln b/build/vc2013-bkl/vc2013/nana.sln
new file mode 100644
index 00000000..8f49cc71
--- /dev/null
+++ b/build/vc2013-bkl/vc2013/nana.sln
@@ -0,0 +1,22 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 2013
+VisualStudioVersion = 12.0.21005.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nana", "nana.vcxproj", "{78487472-4F43-5A69-93CC-4FDC4D124241}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {78487472-4F43-5A69-93CC-4FDC4D124241}.Debug|Win32.ActiveCfg = Debug|Win32
+ {78487472-4F43-5A69-93CC-4FDC4D124241}.Debug|Win32.Build.0 = Debug|Win32
+ {78487472-4F43-5A69-93CC-4FDC4D124241}.Release|Win32.ActiveCfg = Release|Win32
+ {78487472-4F43-5A69-93CC-4FDC4D124241}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/build/vc2013-bkl/vc2013/nana.vcxproj b/build/vc2013-bkl/vc2013/nana.vcxproj
new file mode 100644
index 00000000..c3b2d3ac
--- /dev/null
+++ b/build/vc2013-bkl/vc2013/nana.vcxproj
@@ -0,0 +1,163 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+
+ {78487472-4F43-5A69-93CC-4FDC4D124241}
+ Win32Proj
+ nana
+ nana
+
+
+
+ StaticLibrary
+ true
+ Unicode
+ v120
+
+
+ StaticLibrary
+ false
+ Unicode
+ v120
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Level3
+ Disabled
+ WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ false
+ ..\..\include
+ MultiThreadedDebugDLL
+
+
+ Windows
+ true
+
+
+
+
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
+ true
+ false
+ ..\..\include
+ MultiThreadedDLL
+
+
+ Windows
+ true
+ true
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/vc2013-bkl/vc2013/nana.vcxproj.filters b/build/vc2013-bkl/vc2013/nana.vcxproj.filters
new file mode 100644
index 00000000..2858b8fa
--- /dev/null
+++ b/build/vc2013-bkl/vc2013/nana.vcxproj.filters
@@ -0,0 +1,261 @@
+
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;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
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+
diff --git a/build/vc2013/nana.sln b/build/vc2013/nana.sln
index 6baefd4a..3d18acf9 100644
--- a/build/vc2013/nana.sln
+++ b/build/vc2013/nana.sln
@@ -1,20 +1,26 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Express 2013 for Windows Desktop
-VisualStudioVersion = 12.0.21005.1
+VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nana", "nana.vcxproj", "{25B21068-491B-4A9F-B99F-6C27BF31BAAD}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Debug|Win32.ActiveCfg = Debug|Win32
{25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Debug|Win32.Build.0 = Debug|Win32
+ {25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Debug|x64.ActiveCfg = Debug|x64
+ {25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Debug|x64.Build.0 = Debug|x64
{25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Release|Win32.ActiveCfg = Release|Win32
{25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Release|Win32.Build.0 = Release|Win32
+ {25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Release|x64.ActiveCfg = Release|x64
+ {25B21068-491B-4A9F-B99F-6C27BF31BAAD}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/build/vc2013/nana.vcxproj b/build/vc2013/nana.vcxproj
index d6b6e976..7e216758 100644
--- a/build/vc2013/nana.vcxproj
+++ b/build/vc2013/nana.vcxproj
@@ -5,10 +5,18 @@
Debug
Win32
+
+ Debug
+ x64
+
Release
Win32
+
+ Release
+ x64
+
{25B21068-491B-4A9F-B99F-6C27BF31BAAD}
@@ -22,6 +30,12 @@
v120
Unicode
+
+ StaticLibrary
+ true
+ v120
+ Unicode
+
StaticLibrary
false
@@ -29,21 +43,48 @@
true
Unicode
+
+ StaticLibrary
+ false
+ v120
+ true
+ Unicode
+
+
+
+
+
+
+
../bin/vc2013/
+ ..\..\include;$(IncludePath)
+ ..\..\source;$(VC_SourcePath);
+
+
+ ..\..\include;$(IncludePath)
+ ..\..\source;$(VC_SourcePath);
+ ../bin/vc2013/
../bin/vc2013/
+ ..\..\include;$(IncludePath)
+ ..\..\source;$(VC_SourcePath);
+
+
+ ..\..\include;$(IncludePath)
+ ..\..\source;$(VC_SourcePath);
+ ../bin/vc2013/
@@ -52,13 +93,33 @@
Level3
Disabled
WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
+ MultiThreadedDebug
+ true
+ false
Windows
true
- $(OutDir)\nana_debug.lib
+ $(OutDir)\nana_$(ConfigurationName)_$(PlatformShortName).lib
+
+
+
+
+
+
+ Level3
+ Disabled
+ WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)
+ MultiThreadedDebug
+
+
+ Windows
+ true
+
+
+ $(OutDir)\nana_$(ConfigurationName)_$(PlatformShortName).lib
@@ -70,6 +131,8 @@
true
true
WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
+ MultiThreaded
+ true
Windows
@@ -78,7 +141,28 @@
true
- $(OutDir)\nana_release.lib
+ $(OutDir)\nana_$(ConfigurationName)_$(PlatformShortName).lib
+
+
+
+
+ Level3
+
+
+ MaxSpeed
+ true
+ true
+ WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)
+ MultiThreaded
+
+
+ Windows
+ true
+ true
+ true
+
+
+ $(OutDir)\nana_$(ConfigurationName)_$(PlatformShortName).lib
diff --git a/extrlib/readme (2).txt b/extrlib/readme (2).txt
new file mode 100644
index 00000000..84359ae5
--- /dev/null
+++ b/extrlib/readme (2).txt
@@ -0,0 +1 @@
+The libpng.a is for MinGW(Not linux), and other .lib files are for VS2013
\ No newline at end of file
diff --git a/include/nana/basic_types.hpp b/include/nana/basic_types.hpp
index 9a2d85f2..a48d9ece 100644
--- a/include/nana/basic_types.hpp
+++ b/include/nana/basic_types.hpp
@@ -18,7 +18,7 @@
namespace nana
{
- //A constant value for the invalid position.
+ /// A constant value for the invalid position.
const std::size_t npos = static_cast(-1);
@@ -127,8 +127,7 @@ namespace nana
using pixel_color_t = pixel_argb_t;
- //http://www.w3.org/TR/2011/REC-css3-color-20110607/
- //4.3. Extended color keywords
+ /// See extended CSS color keywords (4.3) in http://www.w3.org/TR/2011/REC-css3-color-20110607/
enum class colors
{
alice_blue = 0xf0f8ff,
@@ -283,7 +282,7 @@ namespace nana
//temporary defintions, these will be replaced by color schema
button_face_shadow_start = 0xF5F4F2,
button_face_shadow_end = 0xD5D2CA,
- button_face = 0xD4D0C8,
+ button_face = 0xD4D0C8 , //,light_cyan
dark_border = 0x404040,
gray_border = 0x808080,
highlight = 0x1CC4F7
@@ -320,10 +319,10 @@ namespace nana
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.
+ /// 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;
- ///< Determines whether the color is completely transparent.
+ /// Determines whether the color is completely transparent.
bool invisible() const;
pixel_color_t px_color() const;
pixel_argb_t argb() const;
@@ -435,10 +434,10 @@ namespace nana
unsigned height;
};
- class area_rotator
+ class rectangle_rotator
{
public:
- area_rotator(bool rotated, const ::nana::rectangle& area);
+ rectangle_rotator(bool rotated, const ::nana::rectangle& area);
int x() const;
int & x_ref();
@@ -455,7 +454,7 @@ namespace nana
private:
bool rotated_;
::nana::rectangle area_;
- };//end class area_rotator
+ };//end class rectangle_rotator
enum class arrange
{
diff --git a/include/nana/config.hpp b/include/nana/config.hpp
index 418871f1..77b9005c 100644
--- a/include/nana/config.hpp
+++ b/include/nana/config.hpp
@@ -1,7 +1,7 @@
/*
* Nana Configuration
* Nana C++ Library(http://www.nanapro.org)
- * Copyright(C) 2003-2014 Jinhao(cnjinhao@hotmail.com)
+ * Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
@@ -20,10 +20,13 @@
#define PLATFORM_SPEC_HPP
//Test if it is MINGW
- #if defined(__MINGW32__)
+ #if defined(__MINGW32__) || defined(__MINGW64__)
#define NANA_MINGW
#define STD_CODECVT_NOT_SUPPORTED
- //#define STD_THREAD_NOT_SUPPORTED //Use this flag if MinGW version is older than 4.8.1
+ #if (__GNUC__ == 4) && ((__GNUC_MINOR__ < 8) || (__GNUC_MINOR__ == 8 && __GNUC_PATCHLEVEL__ < 1))
+ //Use this flag if MinGW version is older than 4.8.1
+ #define STD_THREAD_NOT_SUPPORTED
+ #endif
#endif
#elif (defined(linux) || defined(__linux) || defined(__linux__) || defined(__GNU__) || defined(__GLIBC__)) && !defined(_CRAYC)
//Linux:
@@ -31,10 +34,18 @@
#define NANA_X11 1
#define PLATFORM_SPEC_HPP
#define STD_CODECVT_NOT_SUPPORTED
+#else
+# static_assert(false, "Only Windows and Unix are support now");
+#endif
+
+#if defined(NANA_MINGW) || defined(NANA_LINUX)
+ #if (__GNUC__ == 4) && (__GNUC_MINOR__ == 8) && (__GNUC_PATCHLEVEL__ <= 1)
+ //Some functions which are specified in 21.5 Numeric conversions in Strings library have not yet implemented
+ #define STD_NUMERIC_CONVERSIONS_NOT_SUPPORTED
+ #endif
#endif
//Here defines some flags that tell Nana what features will be supported.
-
#define NANA_UNICODE
#if defined(NANA_UNICODE) && defined(NANA_WINDOWS)
diff --git a/include/nana/datetime.hpp b/include/nana/datetime.hpp
index 6b9dd4e8..b6678226 100644
--- a/include/nana/datetime.hpp
+++ b/include/nana/datetime.hpp
@@ -41,6 +41,7 @@ namespace nana
int day_of_week() const;
const value & read() const;
+ void set(const std::tm&);
static int day_of_week(int year, int month, int day);
static unsigned year_days(unsigned year); ///< the number of days in the specified year.
@@ -67,6 +68,7 @@ namespace nana
time(const std::tm&);
time(unsigned hour, unsigned minute, unsigned second);
const value& read() const;
+ void set(const std::tm&);
private:
value value_;
};//end class time
diff --git a/include/nana/deploy.hpp b/include/nana/deploy.hpp
index 0862a7a3..f51db6ef 100644
--- a/include/nana/deploy.hpp
+++ b/include/nana/deploy.hpp
@@ -15,14 +15,16 @@
#ifndef NANA_DEPLOY_HPP
#define NANA_DEPLOY_HPP
+#include
+
#include
#include
#if defined(NANA_LINUX)
#undef NANA_WINDOWS
#endif
-//Implement workarounds for MinGW
-#if defined(NANA_MINGW)
+//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.
@@ -91,6 +93,20 @@ namespace nana
{
std::size_t strlen(const char_t* str);
char_t* strcpy(char_t* dest, const char_t* source);
+#ifdef _MSC_VER
+ template
+ inline char* strcpy(char (&dest)[N], const char* source)
+ {
+ ::strncpy_s(dest, source, _TRUNCATE);
+ return dest;
+ }
+ template
+ inline wchar_t* strcpy(wchar_t (&dest)[N], const wchar_t* source)
+ {
+ ::wcsncpy_s(dest, source, _TRUNCATE);
+ return dest;
+ }
+#endif // #ifdef _MSC_VER
}
#if defined(NANA_WINDOWS)
diff --git a/include/nana/detail/linux_X11/msg_dispatcher.hpp b/include/nana/detail/linux_X11/msg_dispatcher.hpp
index a1ca507c..eab77f2f 100644
--- a/include/nana/detail/linux_X11/msg_dispatcher.hpp
+++ b/include/nana/detail/linux_X11/msg_dispatcher.hpp
@@ -172,7 +172,7 @@ namespace detail
{
int pending;
{
- nana::detail::platform_scope_guard psg;
+ nana::detail::platform_scope_guard lock;
pending = ::XPending(display_);
if(pending)
{
diff --git a/include/nana/gui/basis.hpp b/include/nana/gui/basis.hpp
index 4eb95c88..c0ef0aa5 100644
--- a/include/nana/gui/basis.hpp
+++ b/include/nana/gui/basis.hpp
@@ -96,7 +96,8 @@ namespace nana
//System Code for OS
os_pageup = 0x21, os_pagedown,
os_arrow_left = 0x25, os_arrow_up, os_arrow_right, os_arrow_down,
- os_insert = 0x2D, os_del
+ os_insert = 0x2D, os_del ,
+ os_end = 0x23 , os_home //Pos 1
};
};
diff --git a/include/nana/gui/detail/basic_window.hpp b/include/nana/gui/detail/basic_window.hpp
index 2834c870..659f4316 100644
--- a/include/nana/gui/detail/basic_window.hpp
+++ b/include/nana/gui/detail/basic_window.hpp
@@ -166,7 +166,8 @@ namespace detail
bool fullscreen :1; //When the window is maximizing whether it fit for fullscreen.
bool borderless :1;
bool make_bground_declared : 1; //explicitly make bground for bground effects
- unsigned Reserved :21;
+ bool ignore_menubar_focus : 1; //A flag indicates whether the menubar sets the focus.
+ unsigned Reserved :20;
unsigned char tab; //indicate a window that can receive the keyboard TAB
mouse_action action;
}flags;
@@ -175,7 +176,6 @@ namespace detail
{
caret_descriptor* caret;
std::shared_ptr events_ptr;
- general_events* attached_events;
}together;
widget_colors* scheme{ nullptr };
diff --git a/include/nana/gui/detail/bedrock.hpp b/include/nana/gui/detail/bedrock.hpp
index 71a52149..1ae2a41d 100644
--- a/include/nana/gui/detail/bedrock.hpp
+++ b/include/nana/gui/detail/bedrock.hpp
@@ -54,13 +54,14 @@ namespace detail
native_window_type root(core_window_t*);
void set_menubar_taken(core_window_t*);
- core_window_t* get_menubar_taken();
+
+ //Delay Restores focus when a menu which attached to menubar is closed
+ void delay_restore(int);
bool close_menu_if_focus_other_window(native_window_type focus);
void set_menu(native_window_type menu_window, bool is_keyboard_condition);
native_window_type get_menu(native_window_type owner, bool is_keyboard_condition);
native_window_type get_menu();
- void remove_menu();
- void empty_menu();
+ void erase_menu(bool try_destroy);
void get_key_state(arg_keyboard&);
bool set_keyboard_shortkey(bool yes);
diff --git a/include/nana/gui/detail/events_operation.hpp b/include/nana/gui/detail/events_operation.hpp
index 29c65430..418d2fa2 100644
--- a/include/nana/gui/detail/events_operation.hpp
+++ b/include/nana/gui/detail/events_operation.hpp
@@ -23,7 +23,6 @@ namespace nana
void register_evt(event_handle);
void cancel(event_handle);
void erase(event_handle);
- std::size_t size() const;
private:
mutable std::recursive_mutex mutex_;
std::unordered_set register_;
diff --git a/include/nana/gui/detail/general_events.hpp b/include/nana/gui/detail/general_events.hpp
index 20dae998..1a4bf972 100644
--- a/include/nana/gui/detail/general_events.hpp
+++ b/include/nana/gui/detail/general_events.hpp
@@ -1,4 +1,4 @@
-/*
+/**
* Definition of General Events
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
@@ -19,7 +19,6 @@
#include
#include
#include
-#include
namespace nana
{
@@ -43,11 +42,13 @@ namespace nana
void events_operation_cancel(event_handle);
}//end namespace detail
+ /// base clase for all event argument types
class event_arg
{
public:
virtual ~event_arg();
+ /// ignorable handlers behind the current one in a chain of event handlers will not get called.
void stop_propagation() const;
bool propagation_stopped() const;
private:
@@ -56,18 +57,19 @@ namespace nana
struct general_events;
+ /// the type of the members of general_events
template
class basic_event : public detail::event_interface
{
public:
- typedef const typename std::remove_reference::type & arg_reference;
+ using arg_reference = const typename std::remove_reference::type &;
private:
struct docker
: public detail::docker_interface
{
basic_event * const event_ptr;
std::function invoke;
- bool flag_entered{ false };
+
bool flag_deleted{ false };
bool unignorable{false};
@@ -89,7 +91,38 @@ namespace nana
return event_ptr;
}
};
+
+ //class emit_counter is a RAII helper for emitting count
+ //It is used for avoiding a try{}catch block which is required for some finial works when
+ //event handlers throw exceptions.
+ class emit_counter
+ {
+ public:
+ emit_counter(basic_event* evt)
+ : evt_{evt}
+ {
+ ++evt->emitting_count_;
+ }
+
+ ~emit_counter()
+ {
+ if ((0 == --evt_->emitting_count_) && evt_->deleted_flags_)
+ {
+ evt_->deleted_flags_ = false;
+ for (auto i = evt_->dockers_->begin(); i != evt_->dockers_->end();)
+ {
+ if (i->get()->flag_deleted)
+ i = evt_->dockers_->erase(i);
+ else
+ ++i;
+ }
+ }
+ }
+ private:
+ basic_event * const evt_;
+ };
public:
+ /// It will get called firstly, because it is set at the beginning of the chain.
template
event_handle connect_front(Function && fn)
{
@@ -112,6 +145,7 @@ namespace nana
});
}
+ /// It will not get called if stop_propagation() was called.
template
event_handle connect(Function && fn)
{
@@ -127,13 +161,15 @@ namespace nana
return evt;
}
- template
+ /// It will not get called if stop_propagation() was called.
+ template
event_handle operator()(Function&& fn)
{
return connect(std::forward(fn));
}
- template
+ /// It will get called because it is unignorable.
+ template
event_handle connect_unignorable(Function && fn, bool in_front = false)
{
internal_scope_guard lock;
@@ -157,54 +193,37 @@ namespace nana
return (nullptr == dockers_ ? 0 : dockers_->size());
}
- void emit(arg_reference& arg) const
+ void emit(arg_reference& arg)
{
internal_scope_guard lock;
if (nullptr == dockers_)
return;
- //Make a copy to allow create/destroy a new event handler when the call of emit in an event.
- const std::size_t fixed_size = 10;
- docker* fixed_buffer[fixed_size];
- docker** transitory = fixed_buffer;
+ emit_counter ec(this);
- std::unique_ptr variable_buffer;
auto& dockers = *dockers_;
- if (dockers.size() > fixed_size)
- {
- variable_buffer.reset(new docker*[dockers.size()]);
- transitory = variable_buffer.get();
- }
+ const auto dockers_len = dockers.size();
- auto output = transitory;
- for (auto & dck : dockers)
+ //The dockers may resize when a new event handler is created by a calling handler.
+ //Traverses with position can avaid crash error which caused by a iterator which becomes invalid.
+ for (std::size_t pos = 0; pos < dockers_len; ++pos)
{
- (*output++) = dck.get();
- }
-
- bool stop_propagation = false;
- for (; transitory != output; ++transitory)
- {
- auto docker_ptr = *transitory;
- if (stop_propagation && !docker_ptr->unignorable)
+ auto docker_ptr = dockers[pos].get();
+ if (docker_ptr->flag_deleted)
continue;
- auto i = std::find_if(dockers.begin(), dockers.end(), [docker_ptr](std::unique_ptr& p){
- return (docker_ptr == p.get());
- });
-
- if (i != dockers.end())
+ docker_ptr->invoke(arg);
+ if (arg.propagation_stopped())
{
- docker_ptr->flag_entered = true;
- docker_ptr->invoke(arg);
+ for (++pos; pos < dockers_len; ++pos)
+ {
+ auto docker_ptr = dockers[pos].get();
+ if (!docker_ptr->unignorable || docker_ptr->flag_deleted)
+ continue;
- if (arg.propagation_stopped())
- stop_propagation = true;
-
- docker_ptr->flag_entered = false;
-
- if (docker_ptr->flag_deleted)
- dockers.erase(i);
+ docker_ptr->invoke(arg);
+ }
+ break;
}
}
}
@@ -221,17 +240,20 @@ namespace nana
internal_scope_guard lock;
if (dockers_)
{
- auto i = std::find_if(dockers_->begin(), dockers_->end(), [evt](const std::unique_ptr& sp)
+ for (auto i = dockers_->begin(), end = dockers_->end(); i != end; ++i)
{
- return (reinterpret_cast(evt) == sp.get());
- });
-
- if (i != dockers_->end())
- {
- if (i->get()->flag_entered)
- i->get()->flag_deleted = true;
- else
- dockers_->erase(i);
+ if (reinterpret_cast(evt) == i->get())
+ {
+ //Checks whether this event is working now.
+ if (emitting_count_ > 1)
+ {
+ i->get()->flag_deleted = true;
+ deleted_flags_ = true;
+ }
+ else
+ dockers_->erase(i);
+ break;
+ }
}
}
}
@@ -392,22 +414,27 @@ namespace nana
}
};
private:
+ unsigned emitting_count_{ 0 };
+ bool deleted_flags_{ false };
std::unique_ptr>> dockers_;
};
struct arg_mouse
: public event_arg
{
- event_code evt_code;
- ::nana::window window_handle;
- ::nana::point pos;
- bool left_button;
- bool mid_button;
- bool right_button;
- bool shift;
- bool ctrl;
+ event_code evt_code; ///<
+ ::nana::window window_handle; ///< A handle to the event window
+ ::nana::point pos; ///< cursor position in the event window
+ bool left_button; ///< mouse left button is pressed?
+ bool mid_button; ///< mouse middle button is pressed?
+ bool right_button; ///< mouse right button is pressed?
+ bool shift; ///< keyboard Shift is pressed?
+ bool ctrl; ///< keyboard Ctrl is pressed?
};
+ /// in arg_wheel event_code is event_code::mouse_wheel
+ /// The type arg_wheel is derived from arg_mouse, a handler
+ /// with prototype void(const arg_mouse&) can be set for mouse_wheel.
struct arg_wheel : public arg_mouse
{
enum class wheel{
@@ -415,98 +442,99 @@ namespace nana
horizontal
};
- wheel which; /// files;
+ ::nana::window window_handle; ///< A handle to the event window
+ ::nana::point pos; ///< cursor position in the event window
+ std::vector files; ///< external filenames
};
struct arg_expose : public event_arg
{
- ::nana::window window_handle;
- bool exposed;
+ ::nana::window window_handle; ///< A handle to the event window
+ bool exposed; ///< the window is visible?
};
struct arg_focus : public event_arg
{
- ::nana::window window_handle;
- ::nana::native_window_type receiver;
- bool getting;
+ ::nana::window window_handle; ///< A handle to the event window
+ ::nana::native_window_type receiver; ///< it is a native window handle, and specified which window receives focus
+ bool getting; ///< the window received focus?
};
struct arg_keyboard : public event_arg
{
- event_code evt_code;
- ::nana::window window_handle;
- mutable nana::char_t key;
- mutable bool ignore;
- bool ctrl;
- bool shift;
+ event_code evt_code; ///< it is event_code::key_press in current event
+ ::nana::window window_handle; ///< A handle to the event window
+ mutable nana::char_t key; ///< the key corresponding to the key pressed
+ mutable bool ignore; ///< this member is not used
+ bool ctrl; ///< keyboard Ctrl is pressed?
+ bool shift; ///< keyboard Shift is pressed
};
struct arg_move : public event_arg
{
- ::nana::window window_handle;
- int x;
- int y;
+ ::nana::window window_handle; ///< A handle to the event window
+ int x; ///<
+ int y; ///<
};
struct arg_resized : public event_arg
{
- ::nana::window window_handle;
- unsigned width;
- unsigned height;
+ ::nana::window window_handle; ///< A handle to the event window
+ unsigned width; ///< new width in pixels.
+ unsigned height; ///< new height in pixels.
};
struct arg_resizing : public event_arg
{
- ::nana::window window_handle;
- window_border border;
- mutable unsigned width;
- mutable unsigned height;
+ ::nana::window window_handle; ///< A handle to the event window
+ window_border border; ///< the window is being resized by moving border
+ mutable unsigned width; ///< new width in pixels. If it is modified, the window's width will be the modified value
+ mutable unsigned height; ///< new height in pixels. If it is modified, the window's height will be the modified value
};
struct arg_unload : public event_arg
{
- ::nana::window window_handle;
- mutable bool cancel;
+ ::nana::window window_handle; ///< A handle to the event window
+ mutable bool cancel; ///<
};
struct arg_destroy : public event_arg
{
- ::nana::window window_handle;
+ ::nana::window window_handle; ///< A handle to the event window
};
+ /// provides some fundamental events that every widget owns.
struct general_events
{
virtual ~general_events(){}
- basic_event mouse_enter;
- basic_event mouse_move;
- basic_event mouse_leave;
- basic_event mouse_down;
- basic_event mouse_up;
- basic_event click;
- basic_event dbl_click;
- basic_event mouse_wheel;
- basic_event mouse_dropfiles;
- basic_event expose;
- basic_event focus;
- basic_event key_press;
- basic_event key_release;
- basic_event key_char;
- basic_event shortkey;
+ basic_event mouse_enter; ///< the cursor enters the window
+ basic_event mouse_move; ///< the cursor moves on the window
+ basic_event mouse_leave; ///< the cursor leaves the window
+ basic_event mouse_down; ///< the user presses the mouse button
+ basic_event mouse_up; ///< the user presses the mouse button
+ basic_event click; ///< the window is clicked, but occurs after mouse_down and before mouse_up
+ basic_event dbl_click; ///< the window is double clicked
+ basic_event mouse_wheel; ///< the mouse wheel rotates while the window has focus
+ basic_event mouse_dropfiles; ///< the mouse drops some external data while the window enable accepting files
+ basic_event expose; ///< the visibility changes
+ basic_event focus; ///< the window receives or loses keyboard focus
+ basic_event key_press; ///< a key is pressed while the window has focus. event code is event_code::key_press
+ basic_event key_release; ///< a key is released while the window has focus. event code is event_code::key_release
+ basic_event key_char; ///< a character, whitespace or backspace is pressed. event code is event_code::key_char
+ basic_event shortkey; ///< a defined short key is pressed. event code is event_code::shortkey
- basic_event move;
- basic_event resizing;
- basic_event resized;
+ basic_event move; ///< the window changes position
+ basic_event resizing; ///< the window is changing its size
+ basic_event resized; ///< the window is changing its size
- basic_event destroy;
+ basic_event destroy; ///< the window is destroyed, but occurs when all children have been destroyed
};
namespace detail
diff --git a/include/nana/gui/detail/handle_manager.hpp b/include/nana/gui/detail/handle_manager.hpp
index 33bb97a6..91ac70f1 100644
--- a/include/nana/gui/detail/handle_manager.hpp
+++ b/include/nana/gui/detail/handle_manager.hpp
@@ -25,7 +25,6 @@
#include