#include <xtd/drawing/colors>
#include <xtd/drawing/pens>
#include <xtd/forms/application>
#include <xtd/forms/form>
#include <xtd/forms/tab_control>
#include <xtd/forms/tab_page>
#include <xtd/cdebug>
class form1 :
public form {
public:
form1() {
text(
"Colored Tab pages example");
controls().push_back(colored_tab_control);
color_image_list.image_size({16, 16});
color_image_list.images().push_back(image_from_color(color_image_list.image_size(),
color));
colored_tab_page->image_index(colored_tab_pages.size()).parent(colored_tab_control).text(
color.
name()).back_color(
color);
colored_tab_pages.push_back(colored_tab_page);
};
colored_tab_control.image_list(color_image_list);
}
private:
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 {
}
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:80
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
xtd::string name() const noexcept
Gets the name of this xtd::drawing::color.
static xtd::drawing::color light_green() noexcept
A system-defined color object.
static xtd::drawing::color light_blue() noexcept
A system-defined color object.
static xtd::drawing::color light_pink() noexcept
A system-defined color object.
static xtd::drawing::color light_yellow() noexcept
A system-defined color object.
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
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
ptr< type_t > new_ptr(args_t &&... args)
The xtd::new_ptr operator creates a xtd::ptr object.
Definition new_ptr.hpp:24
@ g
The G key.
Definition console_key.hpp:100
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
Stores an ordered pair of integers, which specify a height and width.
Definition size.hpp:31