add new platform_abstraction
add support of loading ttf file
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
* @file: nana/gui/detail/bedrock_pi.cpp
|
||||
*/
|
||||
|
||||
#include <nana/detail/platform_spec_selector.hpp>
|
||||
#include "../../detail/platform_spec_selector.hpp"
|
||||
#include <nana/gui/detail/bedrock_pi_data.hpp>
|
||||
#include <nana/gui/detail/event_code.hpp>
|
||||
#include <nana/system/platform.hpp>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* @file: nana/gui/detail/linux_X11/bedrock.cpp
|
||||
*/
|
||||
|
||||
#include <nana/detail/platform_spec_selector.hpp>
|
||||
#include "../../detail/platform_spec_selector.hpp"
|
||||
#if defined(NANA_POSIX) && defined(NANA_X11)
|
||||
#include <nana/gui/detail/bedrock_pi_data.hpp>
|
||||
#include <nana/gui/detail/event_code.hpp>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
* @contributors: Ariel Vina-Rodriguez
|
||||
*/
|
||||
|
||||
#include <nana/detail/platform_spec_selector.hpp>
|
||||
#include "../../detail/platform_spec_selector.hpp"
|
||||
#if defined(NANA_WINDOWS)
|
||||
#include <nana/gui/detail/bedrock.hpp>
|
||||
#include <nana/gui/detail/bedrock_pi_data.hpp>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "dynamic_drawing_object.hpp"
|
||||
|
||||
#if defined(NANA_X11)
|
||||
#include <nana/detail/linux_X11/platform_spec.hpp>
|
||||
#include "../../detail/posix/platform_spec.hpp"
|
||||
#endif
|
||||
|
||||
namespace nana
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
* @file: nana/gui/detail/native_window_interface.cpp
|
||||
*/
|
||||
|
||||
#include <nana/detail/platform_spec_selector.hpp>
|
||||
#include "../../detail/platform_spec_selector.hpp"
|
||||
#include <nana/gui/detail/native_window_interface.hpp>
|
||||
#include <nana/gui/screen.hpp>
|
||||
#include <nana/gui/detail/bedrock.hpp>
|
||||
|
||||
@@ -1397,13 +1397,13 @@ namespace detail
|
||||
{
|
||||
auto & tabs = wd->root_widget->other.attribute.root->tabstop;
|
||||
|
||||
auto end = tabs.cend();
|
||||
if (forward)
|
||||
{
|
||||
if (detail::tab_type::none == wd->flags.tab)
|
||||
return (tabs.front());
|
||||
else if (detail::tab_type::tabstop & wd->flags.tab)
|
||||
{
|
||||
auto end = tabs.cend();
|
||||
auto i = std::find(tabs.cbegin(), end, wd);
|
||||
if (i != end)
|
||||
{
|
||||
@@ -1417,8 +1417,8 @@ namespace detail
|
||||
}
|
||||
else if (tabs.size() > 1) //at least 2 elments in tabs are required when moving backward.
|
||||
{
|
||||
auto i = std::find(tabs.cbegin(), tabs.cend(), wd);
|
||||
if (i != tabs.cend())
|
||||
auto i = std::find(tabs.cbegin(), end, wd);
|
||||
if (i != end)
|
||||
return (tabs.cbegin() == i ? tabs.back() : *(i - 1));
|
||||
}
|
||||
return nullptr;
|
||||
@@ -1729,7 +1729,7 @@ namespace detail
|
||||
|
||||
if (established)
|
||||
{
|
||||
utl::erase(pa_children, wd);
|
||||
utl::erase(wd->parent->children, wd);
|
||||
if (for_new->children.empty())
|
||||
wd->index = 0;
|
||||
else
|
||||
@@ -1892,15 +1892,20 @@ namespace detail
|
||||
if(!wd->visible)
|
||||
return nullptr;
|
||||
|
||||
for(auto i = wd->children.rbegin(); i != wd->children.rend(); ++i)
|
||||
if (!wd->children.empty())
|
||||
{
|
||||
core_window_t* child = *i;
|
||||
if((child->other.category != category::flags::root) && _m_effective(child, pos))
|
||||
auto index = wd->children.size();
|
||||
|
||||
do
|
||||
{
|
||||
child = _m_find(child, pos);
|
||||
if(child)
|
||||
return child;
|
||||
}
|
||||
auto child = wd->children[--index];
|
||||
if ((child->other.category != category::flags::root) && _m_effective(child, pos))
|
||||
{
|
||||
child = _m_find(child, pos);
|
||||
if (child)
|
||||
return child;
|
||||
}
|
||||
} while (0 != index);
|
||||
}
|
||||
return wd;
|
||||
}
|
||||
|
||||
@@ -133,9 +133,10 @@ namespace nana
|
||||
if (base_.erase(wd))
|
||||
{
|
||||
wdcache_.insert(wd, false);
|
||||
trash_.push_back(wd);
|
||||
|
||||
if (category::flags::root == wd->other.category)
|
||||
{
|
||||
trash_.push_back(wd);
|
||||
auto i = std::find(queue_.begin(), queue_.end(), wd);
|
||||
if (i != queue_.end())
|
||||
queue_.erase(i);
|
||||
|
||||
Reference in New Issue
Block a user