Boost.UI
User Interface Boost library
canvas.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_CANVAS_HPP
9 #define BOOST_UI_CANVAS_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 #include <boost/ui/painter.hpp>
19 
20 namespace boost {
21 namespace ui {
22 
28 
29 class BOOST_UI_DECL canvas : public widget
30 {
31 public:
32  canvas() {}
33 
35  explicit canvas(widget& parent)
36  { create(parent); }
37  canvas& create(widget& parent);
39 
43 
44 private:
45  detail::painter_impl* get_impl();
46 
47 #ifndef DOXYGEN
48  friend class painter;
49 #endif
50 };
51 
52 } // namespace ui
53 } // namespace boost
54 
55 #endif // BOOST_UI_CANVAS_HPP
boost::ui::canvas::canvas
canvas(widget &parent)
Creates canvas widget.
Definition: canvas.hpp:35
config.hpp
Configuration options.
widget.hpp
Widget class.
boost
Boost C++ libraries namespace.
Definition: window.hpp:19
painter.hpp
Painter class.
boost::ui::canvas
Widget for drawing.
Definition: canvas.hpp:29
boost::ui::painter
2D graphics rendering painter
Definition: painter.hpp:69
boost::ui::widget
Base class for all widgets.
Definition: widget.hpp:45