@@ -14,7 +14,8 @@
|
||||
* leobackes(pr#86,pr#97)
|
||||
* Benjamin Navarro(pr#81)
|
||||
* besh81(pr#130)
|
||||
*
|
||||
* dankan1890(pr#154)
|
||||
*
|
||||
*/
|
||||
|
||||
#include <nana/gui/widgets/listbox.hpp>
|
||||
@@ -3394,6 +3395,7 @@ namespace nana
|
||||
|
||||
int text_top = (r.height - essence_->scheme_ptr->text_height) / 2 + r.y;
|
||||
auto text_color = essence_->scheme_ptr->header_fgcolor.get_color();
|
||||
|
||||
|
||||
auto state = item_state::normal;
|
||||
//check whether grabing an item, if item_spliter_ != npos, that indicates the grab item is a spliter.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* A Menu implementation
|
||||
* Nana C++ Library(http://www.nanapro.org)
|
||||
* Copyright(C) 2009-2015 Jinhao(cnjinhao@hotmail.com)
|
||||
* Copyright(C) 2009-2016 Jinhao(cnjinhao@hotmail.com)
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
@@ -10,6 +10,7 @@
|
||||
* @file: nana/gui/widgets/menu.cpp
|
||||
* @contributors:
|
||||
* kmribti(pr#102)
|
||||
* dankan1890(pr#154)
|
||||
*/
|
||||
|
||||
#include <nana/gui/widgets/menu.hpp>
|
||||
@@ -1120,9 +1121,9 @@ namespace nana
|
||||
delete impl_;
|
||||
}
|
||||
|
||||
auto menu::append(const std::string& text, const menu::event_fn_t& f) -> item_proxy
|
||||
auto menu::append(std::string text_utf8, const menu::event_fn_t& f) -> item_proxy
|
||||
{
|
||||
impl_->mbuilder.data().items.emplace_back(text, f);
|
||||
impl_->mbuilder.data().items.emplace_back(std::move(text_utf8), f);
|
||||
return item_proxy(size() - 1, impl_->mbuilder.data().items.back());
|
||||
}
|
||||
|
||||
@@ -1158,9 +1159,9 @@ namespace nana
|
||||
impl_->mbuilder.data().items.at(index).image = img;
|
||||
}
|
||||
|
||||
void menu::change_text(std::size_t index, const std::string& text)
|
||||
void menu::text(std::size_t index, std::string text_utf8)
|
||||
{
|
||||
impl_->mbuilder.data().items.at(index).text = text;
|
||||
impl_->mbuilder.data().items.at(index).text.swap(text_utf8);
|
||||
}
|
||||
|
||||
bool menu::link(std::size_t index, menu& menu_obj)
|
||||
|
||||
Reference in New Issue
Block a user