xtd 0.2.0
Loading...
Searching...
No Matches
nine_segment_display.h
Go to the documentation of this file.
1
4#pragma once
6
7namespace xtd {
8 namespace forms {
26 struct data;
27
28 public:
30
35
37
42 int32 thickness() const noexcept override;
48
50
58 static nine_segment_display create(const drawing::point& location);
63 static nine_segment_display create(const drawing::point& location, const drawing::size& size);
69 static nine_segment_display create(const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
78 static nine_segment_display create(xtd::forms::segments segments, const drawing::point& location);
84 static nine_segment_display create(xtd::forms::segments segments, const drawing::point& location, const drawing::size& size);
91 static nine_segment_display create(xtd::forms::segments segments, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
109 static nine_segment_display create(xtd::forms::segments segments, bool show_back_segment, const drawing::point& location, const drawing::size& size);
117 static nine_segment_display create(xtd::forms::segments segments, bool show_back_segment, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
126 static nine_segment_display create(const control& parent, const drawing::point& location);
132 static nine_segment_display create(const control& parent, const drawing::point& location, const drawing::size& size);
139 static nine_segment_display create(const control& parent, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
150 static nine_segment_display create(const control& parent, xtd::forms::segments segments, const drawing::point& location);
157 static nine_segment_display create(const control& parent, xtd::forms::segments segments, const drawing::point& location, const drawing::size& size);
165 static nine_segment_display create(const control& parent, xtd::forms::segments segments, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
186 static nine_segment_display create(const control& parent, xtd::forms::segments segments, bool show_back_segment, const drawing::point& location, const drawing::size& size);
195 static nine_segment_display create(const control& parent, xtd::forms::segments segments, bool show_back_segment, const drawing::point& location, const drawing::size& size, const xtd::ustring& name);
197
198 protected:
200
206 std::unique_ptr<xtd::object> clone() const override;
207
208 void draw_back_digit(drawing::graphics& graphics) override;
209
213 virtual void draw_segment_h(drawing::graphics& graphics, const drawing::color& color);
214
218 virtual void draw_segment_i(drawing::graphics& graphics, const drawing::color& color);
219
220 void on_paint(paint_event_args& e) override;
222
223 private:
224 std::shared_ptr<data> data_;
225 };
226 }
227}
228
Defines the base class for controls, which are components with visual representation.
Definition control.h:79
virtual drawing::point location() const noexcept
Gets the coordinates of the upper-left corner of the control relative to the upper-left corner of its...
virtual const xtd::ustring & name() const noexcept
Gets the name of the control.
virtual std::optional< control_ref > parent() const noexcept
Gets the parent container of the control.
Represents a nine segment display class.
Definition nine_segment_display.h:25
void draw_back_digit(drawing::graphics &graphics) override
Draw all background digit on specified graphics.
int32 thickness() const noexcept override
Sets thickness of segment.
static nine_segment_display create()
A factory to create an xtd::forms::nine_segment_display.
virtual void draw_segment_h(drawing::graphics &graphics, const drawing::color &color)
Draw segment h on specified graphics with specified color.
void on_paint(paint_event_args &e) override
Raises the xtd::forms::control::paint event.
virtual void draw_segment_i(drawing::graphics &graphics, const drawing::color &color)
Draw segment ion specified graphics with specified color.
nine_segment_display()
Initialize a new instance of nine_segment_display class.
std::unique_ptr< xtd::object > clone() const override
Creates a new object that is a copy of the current instance.
Provides data for the xtd::forms::control::paint event.
Definition paint_event_args.h:28
Represents a seven segment display class.
Definition seven_segment_display.h:30
virtual bool show_back_segment() const noexcept
Gets a value indicate if background segments are shown.
virtual forms::segments value() const noexcept
Gets seven_segment_display value.
Represents text as a sequence of UTF-8 code units.
Definition ustring.h:47
int_least32_t int32
Represents a 32-bit signed integer.
Definition types.h:131
size_t size
Represents a size of any object in bytes.
Definition types.h:197
segments
Specifies how a control anchors to the edges of its container.
Definition segments.h:21
@ e
The E key.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition xtd_about_box.h:12
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::forms::seven_segment_display control.