add contribution information
This commit is contained in:
parent
32333c0900
commit
6378c3bf3c
@ -1,13 +1,15 @@
|
|||||||
/**
|
/**
|
||||||
* A Button Implementation
|
* A Button Implementation
|
||||||
* Nana C++ Library(http://www.nanapro.org)
|
* Nana C++ Library(http://www.nanapro.org)
|
||||||
* Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com)
|
* Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com)
|
||||||
*
|
*
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
* http://www.boost.org/LICENSE_1_0.txt)
|
* http://www.boost.org/LICENSE_1_0.txt)
|
||||||
*
|
*
|
||||||
* @file: nana/gui/widgets/button.hpp
|
* @file: nana/gui/widgets/button.hpp
|
||||||
|
* @contributor
|
||||||
|
* besh81(pr#361)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef NANA_GUI_WIDGET_BUTTON_HPP
|
#ifndef NANA_GUI_WIDGET_BUTTON_HPP
|
||||||
@ -90,7 +92,12 @@ namespace nana{
|
|||||||
button(window, const char* caption, bool visible = true);
|
button(window, const char* caption, bool visible = true);
|
||||||
button(window, const nana::rectangle& = rectangle(), bool visible = true);
|
button(window, const nana::rectangle& = rectangle(), bool visible = true);
|
||||||
|
|
||||||
button& icon(const nana::paint::image&);
|
/// Shows an icon in front of caption
|
||||||
|
/**
|
||||||
|
* @param image Icon to be shown. If image is empty, the current icon is erased from the button.
|
||||||
|
* @return the reference of *this.
|
||||||
|
*/
|
||||||
|
button& icon(const nana::paint::image& image);
|
||||||
button& enable_pushed(bool);
|
button& enable_pushed(bool);
|
||||||
bool pushed() const;
|
bool pushed() const;
|
||||||
button& pushed(bool);
|
button& pushed(bool);
|
||||||
|
@ -381,11 +381,8 @@ namespace nana{ namespace drawerbase
|
|||||||
{
|
{
|
||||||
if(img.empty())
|
if(img.empty())
|
||||||
{
|
{
|
||||||
if(attr_.icon)
|
delete attr_.icon;
|
||||||
{
|
attr_.icon = nullptr;
|
||||||
delete attr_.icon;
|
|
||||||
attr_.icon = 0;
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user