Boost.UI
User Interface Boost library
line.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_LINE_HPP
9 #define BOOST_UI_LINE_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 
24 
25 class BOOST_UI_DECL line_widget : public widget
26 {
27 protected:
28  line_widget() {}
29 
30 #ifndef DOXYGEN
31  void detail_create(widget& parent, bool horizontal);
32 #endif
33 
34 private:
35  class detail_impl;
36 };
37 
40 
41 class BOOST_UI_DECL hline : public line_widget
42 {
43 public:
44  hline() {}
45 
47  explicit hline(widget& parent)
48  { create(parent); }
49  hline& create(widget& parent)
50  { detail_create(parent, true); return *this; }
52 
53 };
54 
57 
58 class BOOST_UI_DECL vline : public line_widget
59 {
60 public:
61  vline() {}
62 
64  explicit vline(widget& parent)
65  { create(parent); }
66  vline& create(widget& parent)
67  { detail_create(parent, false); return *this; }
69 };
70 
71 } // namespace ui
72 } // namespace boost
73 
74 #endif // BOOST_UI_LINE_HPP
boost::ui::vline
Vertical line widget.
Definition: line.hpp:58
config.hpp
Configuration options.
boost::ui::vline::create
vline & create(widget &parent)
Creates vertical line widget.
Definition: line.hpp:66
widget.hpp
Widget class.
boost
Boost C++ libraries namespace.
Definition: window.hpp:19
boost::ui::hline::create
hline & create(widget &parent)
Creates horizontal line widget.
Definition: line.hpp:49
boost::ui::hline::hline
hline(widget &parent)
Creates horizontal line widget.
Definition: line.hpp:47
boost::ui::hline
Horizontal line widget.
Definition: line.hpp:41
boost::ui::vline::vline
vline(widget &parent)
Creates vertical line widget.
Definition: line.hpp:64
boost::ui::line_widget
Abstract widget that displays horizontal or vertical line.
Definition: line.hpp:25
boost::ui::widget
Base class for all widgets.
Definition: widget.hpp:45