emit click event by pressing spacebar

This commit is contained in:
Jinhao
2016-02-07 00:49:29 +08:00
parent ca5b2e246e
commit e7cae6d17a
11 changed files with 217 additions and 64 deletions

View File

@@ -1,7 +1,7 @@
/*
* Nana GUI Programming Interface Implementation
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2015 Jinhao(cnjinhao@hotmail.com)
* Copyright(C) 2003-2016 Jinhao(cnjinhao@hotmail.com)
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
@@ -307,6 +307,14 @@ namespace API
}
}
}
void enable_space_click(window wd, bool enable)
{
auto iwd = reinterpret_cast<basic_window*>(wd);
internal_scope_guard lock;
if (restrict::wd_manager().available(iwd))
iwd->flags.space_click_enabled = enable;
}
}//end namespace dev