code review

This commit is contained in:
Jinhao
2015-07-24 00:44:35 +08:00
parent 6a93295bcf
commit 0e5c88f121
11 changed files with 152 additions and 126 deletions

View File

@@ -42,7 +42,7 @@ namespace nana
if(_m_check_changing(value_))
{
_m_draw();
refresh(*graph_);
API::update_window(widget_->handle());
}
return v;
@@ -99,18 +99,13 @@ namespace nana
return s;
}
void trigger::refresh(graph_reference)
void trigger::refresh(graph_reference graph)
{
_m_draw();
}
if (false == unknown_)
draw_width_ = static_cast<unsigned>((graph.width() - border * 2) * (double(value_) / max_));
void trigger::_m_draw()
{
if(false == unknown_)
draw_width_ = static_cast<unsigned>((graph_->width() - border * 2) * (double(value_) / max_));
_m_draw_box(*graph_);
_m_draw_progress(*graph_);
_m_draw_box(graph);
_m_draw_progress(graph);
}
void trigger::_m_draw_box(graph_reference graph)