Boost.UI
User Interface Boost library
button.hpp
Go to the documentation of this file.
1 // Copyright (c) 2017 Kolya Kosenko
2 
3 // Distributed under the Boost Software License, Version 1.0.
4 // See http://www.boost.org/LICENSE_1_0.txt
5 
7 
8 #ifndef BOOST_UI_BUTTON_HPP
9 #define BOOST_UI_BUTTON_HPP
10 
11 #include <boost/ui/config.hpp>
12 
13 #ifdef BOOST_HAS_PRAGMA_ONCE
14 #pragma once
15 #endif
16 
17 #include <boost/ui/widget.hpp>
18 
19 namespace boost {
20 namespace ui {
21 
28 
29 class BOOST_UI_DECL button : public widget
30 {
31 public:
32  button() {}
33 
36  explicit button(widget& parent, const uistring& label)
37  { create(parent, label); }
38  button& create(widget& parent, const uistring& label);
40 
42  BOOST_UI_DETAIL_HANDLER(press, button);
43 
44 private:
45  void on_press_raw(const boost::function<void()>& handler);
46 
47  class detail_impl;
48 };
49 
50 } // namespace ui
51 } // namespace boost
52 
53 #endif // BOOST_UI_BUTTON_HPP
boost::ui::label
Widget that displays static text.
Definition: label.hpp:26
boost::ui::uistring
Helper class to convert string between UI and application logic only.
Definition: string.hpp:49
config.hpp
Configuration options.
widget.hpp
Widget class.
boost
Boost C++ libraries namespace.
Definition: window.hpp:19
boost::ui::button
Widget with label that generate event when clicked on.
Definition: button.hpp:29
boost::ui::widget
Base class for all widgets.
Definition: widget.hpp:45
boost::ui::button::button
button(widget &parent, const uistring &label)
Creates button with text label with mnemonics.
Definition: button.hpp:36