Added tab_click event to tabbar control

tab_click event is processed when a tab is clicked
This commit is contained in:
besh81
2018-11-28 16:57:56 +01:00
parent bde0d16243
commit f20ef2dfb6
2 changed files with 59 additions and 16 deletions

View File

@@ -492,9 +492,17 @@ namespace nana
return (trace_.what != trace_.null);
}
bool active_by_trace()
bool active_by_trace(const arg_mouse& arg)
{
return ((trace_.what == trace_.item) && (trace_.item_part != trace_.close)? activate(trace_.u.index) : false);
if((trace_.what == trace_.item) && (trace_.item_part != trace_.close))
{
if(false == evt_agent_->click(arg, trace_.u.index))
return activate(trace_.u.index);
return true;
}
return false;
}
bool release()
@@ -1285,7 +1293,7 @@ namespace nana
{
if(layouter_->press())
{
if(false == layouter_->active_by_trace())
if(false == layouter_->active_by_trace(arg))
layouter_->toolbox_answer(arg);
layouter_->render();
API::dev::lazy_refresh();