remove paint::gadget

This commit is contained in:
Jinhao
2015-08-20 01:09:29 +08:00
parent 4323977908
commit 42443dcafd
27 changed files with 1024 additions and 763 deletions

View File

@@ -14,7 +14,6 @@
#include <nana/gui/widgets/categorize.hpp>
#include <nana/gui/widgets/float_listbox.hpp>
#include <nana/gui/element.hpp>
//#include <nana/paint/gadget.hpp> //deprecated
#include <nana/gui/widgets/detail/tree_cont.hpp>
#include <stdexcept>

View File

@@ -11,7 +11,6 @@
*/
#include <nana/gui/widgets/checkbox.hpp>
//#include <nana/paint/gadget.hpp> //deprecated
#include <nana/paint/text_renderer.hpp>
#include <nana/gui/element.hpp>
#include <algorithm>

View File

@@ -12,7 +12,6 @@
#include <nana/gui/widgets/date_chooser.hpp>
#include <nana/gui/element.hpp>
//#include <nana/paint/gadget.hpp> //deprecated
#include <nana/system/platform.hpp>
#include <sstream>

View File

@@ -12,7 +12,6 @@
#include <nana/gui/widgets/menu.hpp>
#include <nana/system/platform.hpp>
#include <nana/paint/gadget.hpp>
#include <nana/gui/element.hpp>
#include <nana/gui/wvl.hpp>
#include <nana/paint/text_renderer.hpp>

View File

@@ -2250,7 +2250,7 @@ namespace nana{ namespace widgets
break;
case keyboard::os_end:
if (caret.y != nlines - 1) {
caret.y = nlines - 1;
caret.y = static_cast<decltype(caret.y)>(nlines - 1);
changed = true;
}
break;
@@ -2265,7 +2265,7 @@ namespace nana{ namespace widgets
}else {
if (caret.y != 0) {
--caret.y;
caret.x = textbase_.getline(caret.y).size();
caret.x = static_cast<decltype(caret.x)>(textbase_.getline(caret.y).size());
changed = true;
}
}
@@ -2309,7 +2309,7 @@ namespace nana{ namespace widgets
break;
case keyboard::os_end:
if (caret.x < lnsz) {
caret.x = lnsz;
caret.x = static_cast<decltype(caret.x)>(lnsz);
changed = true;
}
break;

View File

@@ -97,7 +97,7 @@ namespace nana
{
int x = r.x + (static_cast<int>(r.width) - 14) / 2;
int y = r.y + (static_cast<int>(r.height) - 14) / 2;
::nana::color clr;
switch(sta)
@@ -114,12 +114,10 @@ namespace nana
graph.rectangle(r, true, bgcolor_);
facade<element::cross> cross;
cross.draw(graph, {}, clr, { x, y, 14, 6 }, element_state::normal);
//nana::paint::gadget::cross(graph, x, y, 14, 6, clr); //deprecated
}
virtual void close(graph_reference graph, const nana::rectangle& r, state_t sta)
{
//nana::paint::gadget::close_16_pixels(graph, r.x + (r.width - 16) / 2, r.y + (r.height - 16) / 2, 1, colors::black); //deprecated
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)
@@ -144,8 +142,6 @@ namespace nana
else if (!active)
clr = ::nana::color{ 0x92, 0x99, 0xA4 };
//gadget::close_16_pixels(graph, r.x - (16 - r.width) / 2, r.y - (16 - r.height) / 2, 1, clr); //deprecated
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);
@@ -153,19 +149,16 @@ namespace nana
virtual void back(graph_reference graph, const nana::rectangle& r, state_t sta)
{
//using namespace nana::paint::gadget; //deprecated
_m_draw_arrow(graph, r, sta, direction::west);
}
virtual void next(graph_reference graph, const nana::rectangle& r, state_t sta)
{
//using namespace nana::paint::gadget; //deprecated
_m_draw_arrow(graph, r, sta, direction::east);
}
virtual void list(graph_reference graph, const nana::rectangle& r, state_t sta)
{
//using namespace nana::paint::gadget; //deprecated
_m_draw_arrow(graph, r, sta, direction::south);
}
private:
@@ -1448,7 +1441,6 @@ namespace nana
private:
void _m_calc_metrics(graph_reference graph, std::forward_list<item>& items)
{
const auto height_px = graph.height();
std::vector<unsigned> pxs;
unsigned pixels = 0;