xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Go to the documentation of this file.
1 #pragma once
5 #include "control.h"
8 namespace xtd {
10  namespace forms {
20  class forms_export_ font_picker : public control {
21  public:
26  font_picker();
35  const drawing::color& color() const {return color_;}
40  control& color(const drawing::color& color);
42  drawing::size default_size() const override {return {100, 25};}
46  drawing::font font() const override {return font_;}
50  control& font(const drawing::font& font) override;
62  protected:
66  forms::create_params create_params() const override;
70  void on_font_changed(const event_args& e) override;
72  void on_handle_created(const event_args& e) override;
77  void wnd_proc(message& message) override;
80  private:
81  void wm_click(message& message);
82  drawing::color color_;
83  drawing::font font_ = default_font();
84  };
85  }
86 }
drawing::font font() const override
Gets the selected font.
Definition: font_picker.h:46
Defines a particular format for text, including font face, size, and style attributes. This class cannot be inherited.
Definition: font.h:39
Represents the base class for classes that contain event data, and provides a value to use for events...
Definition: event_args.h:18
event< font_picker, event_handler > font_changed
Occurs when the value of the font property changes.
Definition: font_picker.h:59
Stores an ordered pair of integers, which specify a height and width.
Definition: size.h:25
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Represents a picker control that displays available fonts along with controls.
Definition: font_picker.h:20
const drawing::color & color() const
Gets the color selected by the user.
Definition: font_picker.h:35
Represents an ARGB (alpha, red, green, blue) color.
Definition: color.h:39
Represents an event.
Definition: event.h:21
Implements a Windows message.
Definition: message.h:25
Defines the base class for controls, which are components with visual representation.
Definition: control.h:68
Contains xtd::forms::control control.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
drawing::size default_size() const override
Gets the default size of the control.
Definition: font_picker.h:42