xtd 1.0.0
Loading...
Searching...
No Matches
sixteen_segment_display.hpp
Go to the documentation of this file.
1
4#pragma once
6
7namespace xtd {
8 namespace forms {
28 struct data;
29 public:
31
36
38
43 [[nodiscard]] auto thickness() const noexcept -> xtd::int32 override;
49
51
55 [[nodiscard]] static auto create() -> sixteen_segment_display;
59 [[nodiscard]] static auto create(const xtd::drawing::point& location) -> sixteen_segment_display;
64 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size) -> sixteen_segment_display;
70 [[nodiscard]] static auto create(const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> sixteen_segment_display;
74 [[nodiscard]] static auto create(xtd::forms::segments segments) -> sixteen_segment_display;
79 [[nodiscard]] static auto create(xtd::forms::segments segments, const xtd::drawing::point& location) -> sixteen_segment_display;
85 [[nodiscard]] static auto create(xtd::forms::segments segments, const xtd::drawing::point& location, const xtd::drawing::size& size) -> sixteen_segment_display;
92 [[nodiscard]] static auto create(xtd::forms::segments segments, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> sixteen_segment_display;
103 [[nodiscard]] static auto create(xtd::forms::segments segments, bool show_back_segment, const xtd::drawing::point& location) -> sixteen_segment_display;
110 [[nodiscard]] static auto create(xtd::forms::segments segments, bool show_back_segment, const xtd::drawing::point& location, const xtd::drawing::size& size) -> sixteen_segment_display;
118 [[nodiscard]] static auto create(xtd::forms::segments segments, bool show_back_segment, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> sixteen_segment_display;
122 [[nodiscard]] static auto create(const xtd::forms::control& parent) -> sixteen_segment_display;
127 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location) -> sixteen_segment_display;
133 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size) -> sixteen_segment_display;
140 [[nodiscard]] static auto create(const xtd::forms::control& parent, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> sixteen_segment_display;
145 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::forms::segments segments) -> sixteen_segment_display;
151 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::forms::segments segments, const xtd::drawing::point& location) -> sixteen_segment_display;
158 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::forms::segments segments, const xtd::drawing::point& location, const xtd::drawing::size& size) -> sixteen_segment_display;
166 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::forms::segments segments, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> sixteen_segment_display;
179 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::forms::segments segments, bool show_back_segment, const xtd::drawing::point& location) -> sixteen_segment_display;
187 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::forms::segments segments, bool show_back_segment, const xtd::drawing::point& location, const xtd::drawing::size& size) -> sixteen_segment_display;
196 [[nodiscard]] static auto create(const xtd::forms::control& parent, xtd::forms::segments segments, bool show_back_segment, const xtd::drawing::point& location, const xtd::drawing::size& size, const xtd::string& name) -> sixteen_segment_display;
198
199 protected:
201
203 auto draw_back_digit(xtd::drawing::graphics& graphics) -> void override;
204
205 auto draw_segment_a(xtd::drawing::graphics& graphics, const xtd::drawing::color& color) -> void override;
206
210 virtual auto draw_segment_a1(xtd::drawing::graphics& graphics, const xtd::drawing::color& color) -> void;
211
215 virtual auto draw_segment_a2(xtd::drawing::graphics& graphics, const xtd::drawing::color& color) -> void;
216
217 auto draw_segment_d(xtd::drawing::graphics& graphics, const xtd::drawing::color& color) -> void override;
218
222 virtual auto draw_segment_d1(xtd::drawing::graphics& graphics, const xtd::drawing::color& color) -> void;
223
227 virtual auto draw_segment_d2(xtd::drawing::graphics& graphics, const xtd::drawing::color& color) -> void;
228
232 auto draw_segment_i(xtd::drawing::graphics& graphics, const xtd::drawing::color& color) -> void override;
233
237 auto draw_segment_l(xtd::drawing::graphics& graphics, const xtd::drawing::color& color) -> void override;
238
239 auto on_paint(xtd::forms::paint_event_args& e) -> void override;
241
242 private:
243 xtd::sptr<data> data_;
244 };
245 }
246}
Defines the base class for controls, which are components with visual representation.
Definition control.hpp:81
virtual auto size() const noexcept -> xtd::drawing::size
Gets the height and width of the control.
virtual auto parent() const noexcept -> std::optional< xtd::forms::control_ref >
Gets the parent container of the control.
virtual auto name() const noexcept -> const xtd::string &
Gets the name of the control.
virtual auto location() const noexcept -> xtd::drawing::point
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
Represents a nine segment display class.
Definition fourteen_segment_display.hpp:27
Provides data for the xtd::forms::control::paint event.
Definition paint_event_args.hpp:26
Represents a seven segment display class.
Definition seven_segment_display.hpp:32
virtual auto show_back_segment() const noexcept -> bool
Gets a value indicate if background segments are shown.
virtual auto value() const noexcept -> xtd::forms::segments
Gets seven_segment_display value.
sixteen_segment_display()
Initialize a new instance of sixteen_segment_display class.
auto draw_segment_a(xtd::drawing::graphics &graphics, const xtd::drawing::color &color) -> void override
Draw segment a on specified graphics with specified color.
auto draw_back_digit(xtd::drawing::graphics &graphics) -> void override
Draw all background digit on specified graphics.
auto on_paint(xtd::forms::paint_event_args &e) -> void override
Raises the xtd::forms::control::paint event.
virtual auto draw_segment_a1(xtd::drawing::graphics &graphics, const xtd::drawing::color &color) -> void
Draw segment a1 on specified graphics with specified color.
auto draw_segment_l(xtd::drawing::graphics &graphics, const xtd::drawing::color &color) -> void override
Draw segment l on specified graphics with specified color.
virtual auto draw_segment_a2(xtd::drawing::graphics &graphics, const xtd::drawing::color &color) -> void
Draw segment a2 on specified graphics with specified color.
static auto create() -> sixteen_segment_display
A factory to create an xtd::forms::sixteen_segment_display.
virtual auto draw_segment_d2(xtd::drawing::graphics &graphics, const xtd::drawing::color &color) -> void
Draw segment d2 on specified graphics with specified color.
auto thickness() const noexcept -> xtd::int32 override
Sets thickness of segment.
virtual auto draw_segment_d1(xtd::drawing::graphics &graphics, const xtd::drawing::color &color) -> void
Draw segment d1 on specified graphics with specified color.
auto draw_segment_i(xtd::drawing::graphics &graphics, const xtd::drawing::color &color) -> void override
Draw segment i on specified graphics with specified color.
auto draw_segment_d(xtd::drawing::graphics &graphics, const xtd::drawing::color &color) -> void override
Draw segment d on specified graphics with specified color.
Contains xtd::forms::fourteen_segment_display control.
xtd::shared_ptr_object< type_t > sptr
The xtd::sptr object is a shared pointer.
Definition sptr.hpp:25
std::int32_t int32
Represents a 32-bit signed integer.
Definition int32.hpp:25
segments
Specifies how a control anchors to the edges of its container.
Definition segments.hpp:23
@ e
The E key.
Definition keys.hpp:207
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition texts.hpp:219
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
constexpr auto data() const noexcept -> const_pointer
Gets direct access to the underlying contiguous storage.
Definition read_only_span.hpp:197