#include <xtd/forms/application>
#include <xtd/forms/form>
#include <xtd/forms/progress_bar>
#include <xtd/forms/status_bar>
#include <xtd/forms/timer>
#include <xtd/drawing/pens>
namespace status_bar_example {
class form1 :
public form {
public:
form1() {
text(
"Status bar example");
client_size({820, 500});
status_bar1.parent(*this);
status_bar1.panels().push_back_range({status_bar_panel1, status_bar_panel2, status_bar_panel3, status_bar_panel4});
status_bar1.show_panels(true);
status_bar_panel1.tool_tip_text("Status one tool tip text");
timer1.interval_milliseconds(50);
timer1.tick += [&] {
progress_bar1.value(progress_bar1.value() < progress_bar1.maximum() ? progress_bar1.value() + 1 : progress_bar1.minimum());
};
timer1.enabled(true);
}
private:
auto colored_bitmap =
bitmap{16, 16};
g.fill_ellipse(
solid_brush(
color), 0, 0, colored_bitmap.width(), colored_bitmap.height());
g.draw_ellipse(
pens::black(), 0, 0, colored_bitmap.width() - 1, colored_bitmap.height() - 1);
return colored_bitmap;
}
};
}
auto main() -> int {
}
Encapsulates a GDI+ bitmap, which consists of the pixel data for a graphics image and its attributes....
Definition bitmap.hpp:26
Represents an ARGB (alpha, red, green, blue) color.
Definition color.hpp:46
static const xtd::drawing::color light_green
Gets a system-defined color that has an ARGB value of 0xFF90EE90. This field is constant.
Definition color.hpp:263
static graphics from_image(const xtd::drawing::image &image)
Creates a new xtd::drawing::graphics from the specified xtd::drawing::image.
static xtd::drawing::pen black()
A system-defined pen object with a width of 1.
Defines a xtd::drawing::brush of a single color. Brushes are used to fill graphics shapes,...
Definition solid_brush.hpp:29
@ g
The G key.
Definition console_key.hpp:100
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