code review
This commit is contained in:
parent
c6f13c1748
commit
573a5bee86
@ -16,7 +16,6 @@
|
||||
#include <vector>
|
||||
#include "general_events.hpp"
|
||||
#include <nana/paint/graphics.hpp>
|
||||
//#include <nana/paint/image.hpp> //deprecated
|
||||
#include <functional>
|
||||
|
||||
namespace nana
|
||||
|
@ -87,9 +87,6 @@ namespace drawerbase
|
||||
void add(checkbox&);
|
||||
std::size_t checked() const; ///< Retrieves the index of the checkbox which is checked.
|
||||
std::size_t size() const;
|
||||
private:
|
||||
//void _m_checked(const arg_click&); //deprecated
|
||||
//void _m_destroy(const arg_destroy&); //deprecated
|
||||
private:
|
||||
std::vector<element_tag> ui_container_;
|
||||
};
|
||||
|
@ -228,17 +228,5 @@ namespace nana
|
||||
void _m_caption(nana::string&&) override;
|
||||
nana::any * _m_anyobj(std::size_t pos, bool alloc_if_empty) const override;
|
||||
};
|
||||
|
||||
/*
|
||||
namespace dev //deprecated
|
||||
{
|
||||
template<>
|
||||
struct widget_traits<combox>
|
||||
{
|
||||
using event_type = drawerbase::combox::combox_events;
|
||||
using scheme_type = ::nana::widgets::skeletons::text_editor_scheme;
|
||||
};
|
||||
}
|
||||
*/
|
||||
}
|
||||
#endif
|
||||
|
@ -661,17 +661,5 @@ By \a clicking on one header the list get \a reordered, first up, and then down
|
||||
drawerbase::listbox::category_t* _m_at_key(std::shared_ptr<nana::detail::key_interface>);
|
||||
void _m_erase_key(nana::detail::key_interface*);
|
||||
};
|
||||
|
||||
/*
|
||||
namespace dev
|
||||
{
|
||||
template<>
|
||||
struct widget_traits<listbox> //deprecated
|
||||
{
|
||||
using event_type = drawerbase::listbox::listbox_events;
|
||||
using scheme_type = drawerbase::listbox::scheme;
|
||||
};
|
||||
}
|
||||
*/
|
||||
}//end namespace nana
|
||||
#endif
|
||||
|
@ -109,18 +109,6 @@ namespace nana
|
||||
::nana::string _m_caption() const throw();
|
||||
void _m_caption(::nana::string&&);
|
||||
}; //end class spinbox
|
||||
|
||||
/*
|
||||
namespace dev
|
||||
{
|
||||
template<>
|
||||
struct widget_traits<spinbox> //deprecated
|
||||
{
|
||||
using event_type = drawerbase::spinbox::spinbox_events;
|
||||
using scheme_type = ::nana::widgets::skeletons::text_editor_scheme;
|
||||
};
|
||||
}
|
||||
*/
|
||||
}//end namespace nana
|
||||
|
||||
#endif //NANA_GUI_WIDGET_SPINBOX_HPP
|
||||
|
@ -390,19 +390,6 @@ namespace nana
|
||||
std::size_t selected() const;
|
||||
void erase(std::size_t pos, bool close_attached = true);
|
||||
};
|
||||
|
||||
/*
|
||||
namespace dev
|
||||
{
|
||||
/// Traits for widget classes
|
||||
template<>
|
||||
struct widget_traits<tabbar_lite> //deprecated
|
||||
{
|
||||
using event_type = drawerbase::tabbar_lite::events;
|
||||
using scheme_type = ::nana::widget_colors;
|
||||
};
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -194,18 +194,5 @@ namespace nana
|
||||
void _m_caption(::nana::string&&) override;
|
||||
void _m_typeface(const paint::font&) override;
|
||||
};
|
||||
|
||||
/*
|
||||
namespace dev
|
||||
{
|
||||
/// Traits for widget classes
|
||||
template<>
|
||||
struct widget_traits<textbox> //deprecated
|
||||
{
|
||||
using event_type = drawerbase::textbox::textbox_events;
|
||||
using scheme_type = ::nana::widgets::skeletons::text_editor_scheme;
|
||||
};
|
||||
}
|
||||
*/
|
||||
}//end namespace nana
|
||||
#endif
|
||||
|
@ -166,8 +166,6 @@ namespace nana
|
||||
void resized(graph_reference, const arg_resized&) override;
|
||||
void key_press(graph_reference, const arg_keyboard&) override;
|
||||
void key_char(graph_reference, const arg_keyboard&) override;
|
||||
private:
|
||||
//void _m_deal_adjust(); //deprecated
|
||||
private:
|
||||
implement * const impl_;
|
||||
}; //end class trigger
|
||||
|
@ -65,7 +65,6 @@ namespace nana
|
||||
{
|
||||
trigger_t tg;
|
||||
tg.wd = wd;
|
||||
//auto fn = std::bind(&dragger_impl_t::_m_trace, this, std::placeholders::_1); //deprecated
|
||||
auto fn = [this](const arg_mouse& arg)
|
||||
{
|
||||
switch (arg.evt_code)
|
||||
@ -176,67 +175,6 @@ namespace nana
|
||||
if (pos.y < restr_area.y)
|
||||
pos.y = restr_area.y;
|
||||
}
|
||||
/*
|
||||
void _m_trace(const arg_mouse& arg) //deprecated
|
||||
{
|
||||
switch(arg.evt_code)
|
||||
{
|
||||
case event_code::mouse_down:
|
||||
dragging_ = true;
|
||||
API::capture_window(arg.window_handle, true);
|
||||
origin_ = API::cursor_position();
|
||||
for(auto & t : targets_)
|
||||
{
|
||||
t.origin = API::window_position(t.wd);
|
||||
window owner = API::get_owner_window(t.wd);
|
||||
if(owner)
|
||||
API::calc_screen_point(owner, t.origin);
|
||||
}
|
||||
break;
|
||||
case event_code::mouse_move:
|
||||
if(dragging_ && arg.left_button)
|
||||
{
|
||||
auto pos = API::cursor_position();
|
||||
pos -= origin_;
|
||||
|
||||
for(auto & t : targets_)
|
||||
{
|
||||
if(API::is_window_zoomed(t.wd, true) == false)
|
||||
{
|
||||
auto owner = API::get_owner_window(t.wd);
|
||||
auto wdps = t.origin;
|
||||
if (owner)
|
||||
API::calc_window_point(owner, wdps);
|
||||
|
||||
switch (t.move_direction)
|
||||
{
|
||||
case nana::arrange::horizontal:
|
||||
wdps.x += pos.x;
|
||||
break;
|
||||
case nana::arrange::vertical:
|
||||
wdps.y += pos.y;
|
||||
break;
|
||||
default:
|
||||
wdps += pos;
|
||||
}
|
||||
|
||||
if (!t.restrict_area.empty())
|
||||
_m_check_restrict_area(wdps, API::window_size(t.wd), t.restrict_area);
|
||||
|
||||
API::move_window(t.wd, wdps);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case event_code::mouse_up:
|
||||
API::capture_window(arg.window_handle, false);
|
||||
dragging_ = false;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
*/
|
||||
private:
|
||||
bool dragging_;
|
||||
nana::point origin_;
|
||||
|
@ -255,31 +255,6 @@ namespace nana
|
||||
instance(true);
|
||||
}
|
||||
private:
|
||||
/*
|
||||
void _m_enter(const arg_mouse& arg) //deprecated
|
||||
{
|
||||
pair_t & pr = _m_get(arg.window_handle);
|
||||
if(pr.second.size())
|
||||
{
|
||||
this->show(pr.second);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
void _m_leave(const arg_mouse&) //deprecated
|
||||
{
|
||||
close();
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
void _m_destroy(const arg_destroy& arg) //deprecated
|
||||
{
|
||||
_m_untip(arg.window_handle);
|
||||
}
|
||||
*/
|
||||
|
||||
void _m_untip(window wd)
|
||||
{
|
||||
for (auto i = cont_.begin(); i != cont_.end(); ++i)
|
||||
@ -313,8 +288,6 @@ namespace nana
|
||||
this->show(pr.second);
|
||||
});
|
||||
|
||||
//auto leave_fn = std::bind(&controller::_m_leave, this, std::placeholders::_1); //deprecated
|
||||
|
||||
auto leave_fn = [this]{
|
||||
this->close();
|
||||
};
|
||||
|
@ -213,25 +213,14 @@ namespace checkbox
|
||||
element_tag el;
|
||||
|
||||
el.uiobj = &uiobj;
|
||||
//el.eh_checked = uiobj.events().click.connect_unignorable(std::bind(&radio_group::_m_checked, this, std::placeholders::_1), true); //deprecated
|
||||
el.eh_checked = uiobj.events().click.connect_unignorable([this](const arg_click& arg)
|
||||
{
|
||||
for (auto & i : ui_container_)
|
||||
i.uiobj->check(arg.window_handle == i.uiobj->handle());
|
||||
}, true);
|
||||
|
||||
//el.eh_destroy = uiobj.events().destroy.connect_unignorable(std::bind(&radio_group::_m_destroy, this, std::placeholders::_1)); //deprecated
|
||||
el.eh_destroy = uiobj.events().destroy.connect_unignorable([this](const arg_destroy& arg)
|
||||
{
|
||||
/*
|
||||
auto i = std::find_if(ui_container_.begin(), ui_container_.end(), [&arg](decltype(*ui_container_.begin()) & x)
|
||||
{
|
||||
return (arg.window_handle == x.uiobj->handle());
|
||||
});
|
||||
if (i != ui_container_.end())
|
||||
ui_container_.erase(i);
|
||||
*/
|
||||
|
||||
for (auto i = ui_container_.begin(); i != ui_container_.end(); ++i)
|
||||
{
|
||||
if (arg.window_handle == i->uiobj->handle())
|
||||
@ -247,35 +236,18 @@ namespace checkbox
|
||||
|
||||
std::size_t radio_group::checked() const
|
||||
{
|
||||
auto i = std::find_if(ui_container_.cbegin(), ui_container_.cend(), [](decltype(*ui_container_.cbegin())& x)
|
||||
{
|
||||
return (x.uiobj->checked());
|
||||
});
|
||||
return static_cast<std::size_t>(i - ui_container_.cbegin());
|
||||
for (auto i = ui_container_.cbegin(); i != ui_container_.cend(); ++i)
|
||||
{
|
||||
if (i->uiobj->checked())
|
||||
return static_cast<std::size_t>(i - ui_container_.cbegin());
|
||||
}
|
||||
|
||||
return ui_container_.size();
|
||||
}
|
||||
|
||||
std::size_t radio_group::size() const
|
||||
{
|
||||
return ui_container_.size();
|
||||
}
|
||||
/*
|
||||
void radio_group::_m_checked(const arg_click& arg) //deprecated
|
||||
{
|
||||
for (auto & i : ui_container_)
|
||||
i.uiobj->check(arg.window_handle == i.uiobj->handle());
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
void radio_group::_m_destroy(const arg_destroy& arg) //deprecated
|
||||
{
|
||||
auto i = std::find_if(ui_container_.begin(), ui_container_.end(), [&arg](decltype(*ui_container_.begin()) & x)
|
||||
{
|
||||
return (arg.window_handle == x.uiobj->handle());
|
||||
});
|
||||
if(i != ui_container_.end())
|
||||
ui_container_.erase(i);
|
||||
}
|
||||
*/
|
||||
//end class radio_group
|
||||
}//end namespace nana
|
||||
|
@ -172,12 +172,6 @@ namespace nana
|
||||
{
|
||||
editor_->editable(enb);
|
||||
|
||||
/*
|
||||
if(enb)
|
||||
editor_->ext_renderer().background = nullptr;
|
||||
else
|
||||
editor_->ext_renderer().background = std::bind(&drawer_impl::_m_draw_background, this, std::placeholders::_1, std::placeholders::_2, std::placeholders::_3); //deprecated
|
||||
*/
|
||||
if (!enb)
|
||||
{
|
||||
editor_->ext_renderer().background = [this](graph_reference graph, const ::nana::rectangle&, const ::nana::color&)
|
||||
@ -454,22 +448,7 @@ namespace nana
|
||||
API::refresh_window(*widget_);
|
||||
}
|
||||
}
|
||||
/*
|
||||
void _m_draw_background(graph_reference graph, const rectangle&, const ::nana::color&) //deprecated
|
||||
{
|
||||
auto clr_from = colors::button_face_shadow_start;
|
||||
auto clr_to = colors::button_face_shadow_end;
|
||||
|
||||
int pare_off_px = 1;
|
||||
if (element_state::pressed == state_.button_state)
|
||||
{
|
||||
pare_off_px = 2;
|
||||
std::swap(clr_from, clr_to);
|
||||
}
|
||||
|
||||
graph.gradual_rectangle(::nana::rectangle(graph.size()).pare_off(pare_off_px), clr_from, clr_to, true);
|
||||
}
|
||||
*/
|
||||
void _m_draw_push_button(bool enabled)
|
||||
{
|
||||
::nana::rectangle r{graph_->size()};
|
||||
|
@ -920,12 +920,6 @@ namespace nana
|
||||
|
||||
return npos ;
|
||||
}
|
||||
/*
|
||||
category_t& at(std::size_t cat_pos)
|
||||
{
|
||||
return *(_m_at(cat_pos));
|
||||
}
|
||||
*/
|
||||
|
||||
category_t::container::value_type& at_abs(const index_pair& pos)
|
||||
{
|
||||
|
@ -217,13 +217,13 @@ namespace nana{ namespace widgets
|
||||
editor_.select_.a = sel_a_;
|
||||
editor_.select_.b = sel_b_;
|
||||
editor_.points_.caret = pos_;
|
||||
editor_._m_move_select(false);
|
||||
return;
|
||||
}
|
||||
|
||||
editor_.select_.a = dest_a_;
|
||||
editor_.select_.b = dest_b_;
|
||||
editor_.points_.caret = sel_a_;
|
||||
else
|
||||
{
|
||||
editor_.select_.a = dest_a_;
|
||||
editor_.select_.b = dest_b_;
|
||||
editor_.points_.caret = sel_a_;
|
||||
}
|
||||
editor_._m_move_select(false);
|
||||
}
|
||||
|
||||
@ -1331,12 +1331,12 @@ namespace nana{ namespace widgets
|
||||
|
||||
void text_editor::erase_keyword(const ::nana::string& kw)
|
||||
{
|
||||
auto i = std::find_if(keywords_->kwbase.begin(), keywords_->kwbase.end(), [&kw](keyword_desc& kd){
|
||||
return (kd.text == kw);
|
||||
});
|
||||
|
||||
if (i != keywords_->kwbase.end())
|
||||
keywords_->kwbase.erase(i);
|
||||
for (auto i = keywords_->kwbase.begin(); i != keywords_->kwbase.end(); ++i)
|
||||
if (i->text == kw)
|
||||
{
|
||||
keywords_->kwbase.erase(i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void text_editor::set_accept(std::function<bool(char_type)> pred)
|
||||
|
@ -193,12 +193,11 @@ namespace nana
|
||||
if (str.empty())
|
||||
return true;
|
||||
|
||||
auto i = std::find_if(texts_.cbegin(), texts_.cend(), [&str](const std::wstring& value)
|
||||
{
|
||||
return (value.find(str) != value.npos);
|
||||
});
|
||||
for (auto i = texts_.cbegin(); i != texts_.cend(); ++i)
|
||||
if (i->find(str) != str.npos)
|
||||
return false;
|
||||
|
||||
return (i != texts_.cend());
|
||||
return true;
|
||||
}
|
||||
|
||||
void spin(bool increase) override
|
||||
|
@ -103,13 +103,13 @@ namespace nana
|
||||
switch(sta)
|
||||
{
|
||||
case item_renderer::highlight:
|
||||
clr = { colors::white }; break;
|
||||
clr = colors::white; break;
|
||||
case item_renderer::press:
|
||||
clr = { 0xA0, 0xA0, 0xA0 }; break;
|
||||
clr = static_cast<color_rgb>(0xA0A0A0); break;
|
||||
case item_renderer::disable:
|
||||
clr = { 0x80, 0x80, 0x80 }; break;
|
||||
clr = static_cast<color_rgb>(0x808080); break;
|
||||
default:
|
||||
clr = { 0xF0, 0xF0, 0xF0 };
|
||||
clr = static_cast<color_rgb>(0xF0F0F0);
|
||||
}
|
||||
graph.rectangle(r, true, bgcolor_);
|
||||
facade<element::cross> cross;
|
||||
@ -121,7 +121,7 @@ namespace nana
|
||||
facade<element::x_icon> x_icon;
|
||||
x_icon.draw(graph, {}, colors::black, { r.x + static_cast<int>(r.width - 16) / 2, r.y + static_cast<int>(r.height - 16) / 2, 16, 16 }, element_state::normal);
|
||||
if(item_renderer::highlight == sta)
|
||||
graph.rectangle(r, false, {0xa0, 0xa0, 0xa0});
|
||||
graph.rectangle(r, false, static_cast<color_rgb>(0xa0a0a0));
|
||||
}
|
||||
|
||||
virtual void close_fly(graph_reference graph, const nana::rectangle& r, bool active, state_t sta)
|
||||
@ -131,8 +131,8 @@ namespace nana
|
||||
|
||||
if (sta == item_renderer::highlight)
|
||||
{
|
||||
::nana::color bgcolor{ 0xCC, 0xD2, 0xDD };
|
||||
::nana::color rect_clr{0x9d, 0xa3, 0xab};
|
||||
::nana::color bgcolor{ static_cast<color_rgb>(0xCCD2DD) };
|
||||
::nana::color rect_clr{ static_cast<color_rgb>(0x9da3ab) };
|
||||
graph.round_rectangle(r, 1, 1, rect_clr, false, {});
|
||||
nana::rectangle draw_r(r);
|
||||
graph.rectangle(draw_r.pare_off(1), false, rect_clr.blend(bgcolor, 0.8));
|
||||
@ -140,7 +140,7 @@ namespace nana
|
||||
graph.rectangle(draw_r.pare_off(1), false, rect_clr.blend(bgcolor, 0.2));
|
||||
}
|
||||
else if (!active)
|
||||
clr = ::nana::color{ 0x92, 0x99, 0xA4 };
|
||||
clr = static_cast<color_rgb>(0x9299a4);
|
||||
|
||||
facade<element::x_icon> x_icon;
|
||||
x_icon.draw(graph, {}, colors::black, { r.x + static_cast<int>(r.width - 16) / 2, r.y + static_cast<int>(r.height - 16) / 2, 16, 16 }, element_state::normal);
|
||||
@ -766,8 +766,6 @@ namespace nana
|
||||
void _m_open_menulister()
|
||||
{
|
||||
menulister_.clear();
|
||||
|
||||
//auto f = std::bind(&layouter::_m_click_menulister, this, std::placeholders::_1); //deprecated
|
||||
auto fn = [this](::nana::menu::item_proxy& ipx)
|
||||
{
|
||||
if (this->activate(ipx.index()))
|
||||
@ -782,14 +780,6 @@ namespace nana
|
||||
menulister_.popup(basis_.wd, r.x, r.bottom());
|
||||
}
|
||||
|
||||
/*
|
||||
void _m_click_menulister(nana::menu::item_proxy& ip) //deprecated
|
||||
{
|
||||
if(this->activate(ip.index()))
|
||||
API::refresh_window(basis_.wd);
|
||||
}
|
||||
*/
|
||||
|
||||
//the begin pos of toolbox
|
||||
int _m_toolbox_pos() const
|
||||
{
|
||||
@ -1018,12 +1008,12 @@ namespace nana
|
||||
int x = _m_itembar_right();
|
||||
if (x > 0)
|
||||
{
|
||||
basis_.graph->line({ x - 2, 0 }, { x - 2, bottom }, { 0x80, 0x80, 0x80 });
|
||||
basis_.graph->line({ x - 1, 0 }, { x - 1, bottom }, {0xf0, 0xf0, 0xf0});
|
||||
basis_.graph->line({ x - 2, 0 }, { x - 2, bottom }, static_cast<color_rgb>(0x808080));
|
||||
basis_.graph->line({ x - 1, 0 }, { x - 1, bottom }, static_cast<color_rgb>(0xf0f0f0));
|
||||
}
|
||||
}
|
||||
|
||||
basis_.graph->set_color({ 0x80, 0x80, 0x80 });
|
||||
basis_.graph->set_color(static_cast<color_rgb>(0x808080));
|
||||
|
||||
int right = static_cast<int>(basis_.graph->width());
|
||||
int end = active_m.r.x + static_cast<int>(active_m.r.width);
|
||||
@ -1362,12 +1352,6 @@ namespace nana
|
||||
{
|
||||
return widget_;
|
||||
}
|
||||
/*
|
||||
::nana::dev::widget_traits<widget>::scheme_type & scheme() //deprecated
|
||||
{
|
||||
return API::scheme(*widget_);
|
||||
}
|
||||
*/
|
||||
|
||||
std::forward_list<item>& items()
|
||||
{
|
||||
|
@ -1491,7 +1491,7 @@ namespace nana
|
||||
impl_->data.trigger_ptr = this;
|
||||
impl_->data.renderer = nana::pat::cloneable<renderer_interface>(internal_renderer());
|
||||
impl_->data.comp_placer = nana::pat::cloneable<compset_placer_interface>(internal_placer());
|
||||
//impl_->adjust.timer.elapse(std::bind(&trigger::_m_deal_adjust, this)); //deprecated
|
||||
|
||||
impl_->adjust.timer.elapse([this]
|
||||
{
|
||||
auto & adjust = impl_->adjust;
|
||||
@ -2151,61 +2151,6 @@ namespace nana
|
||||
API::lazy_refresh();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void trigger::_m_deal_adjust() //deprecated
|
||||
{
|
||||
auto & adjust = impl_->adjust;
|
||||
if(adjust.scroll_timestamp && (nana::system::timestamp() - adjust.scroll_timestamp >= 500))
|
||||
{
|
||||
if(adjust.offset_x_adjust == 0)
|
||||
{
|
||||
if(!impl_->make_adjust(adjust.node ? adjust.node : impl_->shape.first, 1))
|
||||
{
|
||||
adjust.offset_x_adjust = 0;
|
||||
adjust.node = nullptr;
|
||||
adjust.scroll_timestamp = 0;
|
||||
adjust.timer.stop();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
auto & shape = impl_->shape;
|
||||
const int delta = 5;
|
||||
int old = shape.offset_x;
|
||||
|
||||
if(shape.offset_x < adjust.offset_x_adjust)
|
||||
{
|
||||
shape.offset_x += delta;
|
||||
if(shape.offset_x > adjust.offset_x_adjust)
|
||||
shape.offset_x = adjust.offset_x_adjust;
|
||||
}
|
||||
else if(shape.offset_x > adjust.offset_x_adjust)
|
||||
{
|
||||
shape.offset_x -= delta;
|
||||
if(shape.offset_x < adjust.offset_x_adjust)
|
||||
shape.offset_x = adjust.offset_x_adjust;
|
||||
}
|
||||
|
||||
impl_->draw(false);
|
||||
API::update_window(impl_->data.widget_ptr->handle());
|
||||
|
||||
if(impl_->node_state.tooltip)
|
||||
{
|
||||
nana::point pos = impl_->node_state.tooltip->pos();
|
||||
impl_->node_state.tooltip->move(pos.x - shape.offset_x + old, pos.y);
|
||||
}
|
||||
|
||||
if(shape.offset_x == adjust.offset_x_adjust)
|
||||
{
|
||||
adjust.offset_x_adjust = 0;
|
||||
adjust.node = nullptr;
|
||||
adjust.scroll_timestamp = 0;
|
||||
adjust.timer.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
//*/
|
||||
//end class trigger
|
||||
}//end namespace treebox
|
||||
}//end namespace drawerbase
|
||||
|
@ -118,23 +118,10 @@ namespace nana
|
||||
{
|
||||
graphics & graph;
|
||||
int x, endpos;
|
||||
//::nana::color fgcolor; //deprecated
|
||||
unsigned omitted_pixels;
|
||||
nana::unicode_bidi bidi;
|
||||
std::vector<nana::unicode_bidi::entity> reordered;
|
||||
|
||||
/* //deprecated
|
||||
draw_string_omitted(graphics& graph, int x, int endpos, const ::nana::color& fgcolor, bool omitted)
|
||||
: graph(graph), x(x), endpos(endpos), fgcolor(fgcolor)
|
||||
{
|
||||
omitted_pixels = (omitted ? graph.text_extent_size(STR("..."), 3).width : 0);
|
||||
if(endpos - x > static_cast<int>(omitted_pixels))
|
||||
this->endpos -= omitted_pixels;
|
||||
else
|
||||
this->endpos = x;
|
||||
}
|
||||
*/
|
||||
|
||||
draw_string_omitted(graphics& graph, int x, int endpos, bool omitted)
|
||||
: graph(graph), x(x), endpos(endpos)
|
||||
{
|
||||
@ -171,7 +158,7 @@ namespace nana
|
||||
nana::paint::graphics dum_graph({ r.width, r.height });
|
||||
|
||||
dum_graph.bitblt(r, graph, pos);
|
||||
//dum_graph.set_text_color(fgcolor); //deprecated
|
||||
|
||||
dum_graph.set_text_color(graph.palette(true));
|
||||
dum_graph.string({}, i.begin, len);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user