Refined code
refined code and implemented select all(ctrl+a) for text_editor
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
* Graphics Gadget Implementation
|
||||
* Copyright(C) 2003-2013 Jinhao(cnjinhao@hotmail.com)
|
||||
* Nana C++ Library(http://www.nanapro.org)
|
||||
* Copyright(C) 2003-2014 Jinhao(cnjinhao@hotmail.com)
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -260,60 +261,6 @@ namespace gadget
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
void cross(graphics& graph, int x, int y, uint32_t size, uint32_t thickness, ::nana::color_t color) //deprecated
|
||||
{
|
||||
if (thickness + 2 <= size)
|
||||
{
|
||||
int gap = (size - thickness) / 2;
|
||||
|
||||
nana::point ps[12];
|
||||
ps[0].x = x + gap;
|
||||
ps[1].x = ps[0].x + thickness - 1;
|
||||
ps[1].y = ps[0].y = y;
|
||||
|
||||
ps[2].x = ps[1].x;
|
||||
ps[2].y = y + gap;
|
||||
|
||||
ps[3].x = ps[2].x + gap;
|
||||
ps[3].y = ps[2].y;
|
||||
|
||||
ps[4].x = ps[3].x;
|
||||
ps[4].y = ps[3].y + thickness - 1;
|
||||
|
||||
ps[5].x = ps[1].x;
|
||||
ps[5].y = ps[4].y;
|
||||
|
||||
ps[6].x = ps[5].x;
|
||||
ps[6].y = ps[5].y + gap;
|
||||
|
||||
ps[7].x = x + gap;
|
||||
ps[7].y = ps[6].y;
|
||||
|
||||
ps[8].x = ps[7].x;
|
||||
ps[8].y = ps[4].y;
|
||||
|
||||
ps[9].x = x;
|
||||
ps[9].y = ps[4].y;
|
||||
|
||||
ps[10].x = x;
|
||||
ps[10].y = y + gap;
|
||||
|
||||
ps[11].x = x + gap;
|
||||
ps[11].y = y + gap;
|
||||
|
||||
nana::color_t dkcolor = graph.mix(color, 0x0, 0.5); //deprecated
|
||||
|
||||
for (int i = 0; i < 11; ++i)
|
||||
graph.line(ps[i], ps[i + 1], dkcolor);
|
||||
graph.line(ps[11], ps[0], dkcolor);
|
||||
|
||||
graph.rectangle(ps[10].x + 1, ps[10].y + 1, (gap << 1) + thickness - 2, thickness - 2, color, true);
|
||||
graph.rectangle(ps[0].x + 1, ps[0].y + 1, thickness - 2, (gap << 1) + thickness - 2, color, true);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
void cross(graphics& graph, int x, int y, uint32_t size, uint32_t thickness, const ::nana::expr_color& color)
|
||||
{
|
||||
if (thickness + 2 <= size)
|
||||
|
||||
Reference in New Issue
Block a user