#include <xtd/drawing/color_converter>
#include <xtd/forms/application>
#include <xtd/forms/form>
#include <xtd/forms/nine_segment_display>
#include <xtd/forms/timer>
class form1 :
public form {
public:
form1() {
nine_segment_display1.
height(250);
nine_segment_display1.location({(client_size().width - nine_segment_display1.width()) / 2, (client_size().
height - nine_segment_display1.height()) / 2});
nine_segment_display1.parent(*this);
timer1.interval(300_ms);
timer1.enabled(true);
timer1.tick += [&] {
nine_segment_display1.segment_style(segment_styles[(counter / chase.size()) % segment_styles.size()]);
nine_segment_display1.value(chase[counter++ % chase.size()]);
};
text(
"Nine segment display example");
resize += [&] {
nine_segment_display1.left((client_size().
width - nine_segment_display1.width()) / 2);
};
}
private:
int counter = 0;
};
};
};
auto main() -> int {
}
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:80
static xtd::drawing::color average(const xtd::drawing::color &color1, const xtd::drawing::color &color2, double weight) noexcept
Returns the weighted average color between the two given colors.
static const xtd::drawing::color red
Gets a system-defined color that has an ARGB value of 0xFFFF0000. This field is constant.
Definition color.hpp:401
static const xtd::drawing::color black
Gets a system-defined color that has an ARGB value of 0xFF000000. This field is constant.
Definition color.hpp:80
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.hpp:16
The xtd::drawing namespace provides access to GDI+ basic graphics functionality. More advanced functi...
Definition actions_system_images.hpp:10
Contains classes that represent ASCII and Unicode character encodings; abstract base classes for conv...
Definition basic_string_builder.hpp:16
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8