Boost.UI
User Interface Boost library
image_widget.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_IMAGE_WIDGET_HPP
9 #define BOOST_UI_IMAGE_WIDGET_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/image.hpp>
19 
20 namespace boost {
21 namespace ui {
22 
26 
27 class BOOST_UI_DECL image_widget : public widget
28 {
29 public:
30  image_widget() { init(); }
31 
33  explicit image_widget(widget& parent)
34  { init(); create(parent); }
35  image_widget& create(widget& parent);
37 
39  explicit image_widget(widget& parent, const ui::image& img)
40  { init(); create(parent, img); }
41  image_widget& create(widget& parent, const ui::image& img);
43 
45  image_widget& image(const image& img);
46 
48  void clear();
49 
50 private:
51  void init() {}
52 
53  class detail_impl;
54  detail_impl* get_impl();
55  const detail_impl* get_impl() const;
56 };
57 
58 } // namespace ui
59 } // namespace boost
60 
61 #endif // BOOST_UI_IMAGE_WIDGET_HPP
config.hpp
Configuration options.
widget.hpp
Widget class.
boost
Boost C++ libraries namespace.
Definition: window.hpp:19
boost::ui::image_widget
Widget that displays image.
Definition: image_widget.hpp:27
boost::ui::image_widget::image_widget
image_widget(widget &parent, const ui::image &img)
Creates image_widget with image.
Definition: image_widget.hpp:39
image.hpp
Image class.
boost::ui::image_widget::image_widget
image_widget(widget &parent)
Creates image_widget without image.
Definition: image_widget.hpp:33
boost::ui::widget
Base class for all widgets.
Definition: widget.hpp:45
boost::ui::image
Image class.
Definition: image.hpp:28