xtd 0.2.0
sixteen_segment_display.h
Go to the documentation of this file.
1 #pragma once
6 
7 namespace xtd {
8  namespace forms {
26  struct data;
27  public:
29 
34 
36 
41  int32 thickness() const noexcept override;
47 
49 
51  using control::create;
68  static sixteen_segment_display create(const control& parent, xtd::forms::segments segments, bool show_back_segment = true, const drawing::point& location = {-1, -1}, const drawing::size& size = {-1, -1}, const xtd::ustring& name = xtd::ustring::empty_string);
70 
71  protected:
73 
75  void draw_back_digit(drawing::graphics& graphics) override;
76 
77  void draw_segment_a(drawing::graphics& graphics, const drawing::color& color) override;
78 
82  virtual void draw_segment_a1(drawing::graphics& graphics, const drawing::color& color);
83 
87  virtual void draw_segment_a2(drawing::graphics& graphics, const drawing::color& color);
88 
89  void draw_segment_d(drawing::graphics& graphics, const drawing::color& color) override;
90 
94  virtual void draw_segment_d1(drawing::graphics& graphics, const drawing::color& color);
95 
99  virtual void draw_segment_d2(drawing::graphics& graphics, const drawing::color& color);
100 
104  void draw_segment_i(drawing::graphics& graphics, const drawing::color& color) override;
105 
109  void draw_segment_l(drawing::graphics& graphics, const drawing::color& color) override;
110 
111  void on_paint(paint_event_args& e) override;
113 
114  private:
115  std::shared_ptr<data> data_;
116  };
117  }
118 }
void draw_segment_d(drawing::graphics &graphics, const drawing::color &color) override
Draw segment d on specified graphics with specified color.
Represents a sixteen segment display class.
Definition: sixteen_segment_display.h:25
void draw_segment_i(drawing::graphics &graphics, const drawing::color &color) override
Draw segment i on specified graphics with specified color.
Represents a nine segment display class.
Definition: fourteen_segment_display.h:25
int32 thickness() const noexcept override
Sets thickness of segment.
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition: point.h:54
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:31
virtual void draw_segment_a2(drawing::graphics &graphics, const drawing::color &color)
Draw segment a2 on specified graphics with specified color.
virtual void draw_segment_d1(drawing::graphics &graphics, const drawing::color &color)
Draw segment d1 on specified graphics with specified color.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
virtual void draw_segment_a1(drawing::graphics &graphics, const drawing::color &color)
Draw segment a1 on specified graphics with specified color.
virtual const xtd::ustring & name() const noexcept
Gets the name of the control.
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
segments
Specifies how a control anchors to the edges of its container.
Definition: segments.h:21
static control create(const drawing::point &location={-1, -1}, const drawing::size &size={-1, -1}, const xtd::ustring &name=xtd::ustring::empty_string)
A factory to create a specified control with specified location, size, and name.
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.
Contains xtd::forms::fourteen_segment_display control.
Represents an ARGB (alpha, red, green, blue) color.
Definition: color.h:45
Provides data for the xtd::forms::control::paint event.
Definition: paint_event_args.h:28
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...
Defines the base class for controls, which are components with visual representation.
Definition: control.h:78
sixteen_segment_display()
Initialize a new instance of sixteen_segment_display class.
virtual std::optional< control_ref > parent() const noexcept
Gets the parent container of the control.
int_least32_t int32
Represents a 32-bit signed integer.
Definition: types.h:129
virtual void draw_segment_d2(drawing::graphics &graphics, const drawing::color &color)
Draw segment d2 on specified graphics with specified color.
void draw_back_digit(drawing::graphics &graphics) override
Draw all background digit on specified graphics.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
static const ustring empty_string
Represents the empty string.
Definition: ustring.h:53
void on_paint(paint_event_args &e) override
Raises the xtd::forms::control::paint event.
Represents a seven segment display class.
Definition: seven_segment_display.h:30
Defines an object used to draw lines and curves. This class cannot be inherited.
Definition: graphics.h:70
void draw_segment_l(drawing::graphics &graphics, const drawing::color &color) override
Draw segment l on specified graphics with specified color.
static sixteen_segment_display create(xtd::forms::segments segments, bool show_back_segment=true, const drawing::point &location={-1, -1}, const drawing::size &size={-1, -1}, const xtd::ustring &name=xtd::ustring::empty_string)
A factory to create an xtd::forms::sixteen_segment_display with specified color, location, size, and name.
void draw_segment_a(drawing::graphics &graphics, const drawing::color &color) override
Draw segment a on specified graphics with specified color.
size_t size
Represents a size of any object in bytes.
Definition: types.h:195