Provides data for the.
draw_item
event.
draw_itemevent is raised by owner draw controls, such as the xtd::forms::list_box and xtd::forms::combo_box controls. It contains all the information that is needed for the user to paint the specified item, including the item index, the xtd::drawing::rectangle, and the xtd::drawing::graphics on which the drawing should be done.
Public Constructors | |
| draw_item_event_args (xtd::drawing::graphics &graphics, const xtd::drawing::font &font, const xtd::drawing::rectangle &rect, xtd::usize index, xtd::forms::draw_item_state state) | |
| Initializes a new instance of the xtd::forms::draw_item_event_args class for the specified control with the specified font, state, surface to draw on, and the bounds to draw within. | |
| draw_item_event_args (xtd::drawing::graphics &graphics, const xtd::drawing::font &font, const xtd::drawing::rectangle &rect, xtd::usize index, xtd::forms::draw_item_state state, const xtd::drawing::color &back_color, const xtd::drawing::color &fore_core) | |
| Initializes a new instance of the xtd::forms::draw_item_event_args class for the specified control with the specified font, state, foreground color, background color, surface to draw on, and the bounds to draw within. | |
Public Properties | |
| auto | back_color () const noexcept -> const xtd::drawing::color & |
| Gets the background color of the item that is being drawn. | |
| auto | bounds () const noexcept -> const xtd::drawing::rectangle & |
| Gets the rectangle that represents the bounds of the item that is being drawn. | |
| auto | font () const noexcept -> const xtd::drawing::font & |
| Gets the font that is assigned to the item being drawn. | |
| auto | fore_color () const noexcept -> const xtd::drawing::color & |
| Gets the foreground color of the of the item being drawn. | |
| auto | graphics () noexcept -> xtd::drawing::graphics & |
| Gets the graphics surface to draw the item on. | |
| auto | index () const noexcept -> xtd::usize |
| Gets the index value of the item that is being drawn. | |
| auto | state () const noexcept -> xtd::forms::draw_item_state |
| Gets the state of the item being drawn. | |
Additional Inherited Members | |
| static const event_args | empty |
| Provides a value to use with events that do not have event data. | |
| event_args ()=default | |
| Initializes a new instance of the event_args class. | |
| object ()=default | |
| Create a new instance of the ultimate base class object. | |
| virtual auto | equals (const object &obj) const noexcept -> bool |
| Determines whether the specified object is equal to the current object. | |
| virtual auto | get_hash_code () const noexcept -> xtd::usize |
| Serves as a hash function for a particular type. | |
| virtual auto | get_type () const noexcept -> type_object |
| Gets the type of the current instance. | |
| template<typename object_t> | |
| auto | memberwise_clone () const -> xtd::unique_ptr_object< object_t > |
| Creates a shallow copy of the current object. | |
| virtual auto | to_string () const -> xtd::string |
| Returns a xtd::string that represents the current object. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are considered equal. | |
| template<typename object_a_t, typename object_b_t> | |
| static auto | reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept -> bool |
| Determines whether the specified object instances are the same instance. | |
| xtd::forms::draw_item_event_args::draw_item_event_args | ( | xtd::drawing::graphics & | graphics, |
| const xtd::drawing::font & | font, | ||
| const xtd::drawing::rectangle & | rect, | ||
| xtd::usize | index, | ||
| xtd::forms::draw_item_state | state ) |
Initializes a new instance of the xtd::forms::draw_item_event_args class for the specified control with the specified font, state, surface to draw on, and the bounds to draw within.
| graphics | The xtd::drawing::graphics surface on which to draw. |
| font | The xtd::drawing::font to use, usually the parent control's Font property. |
| rect | The xtd::drawing::rectangle bounds to draw within. |
| index | The xtd::control::control_collection index value of the item that is being drawn. |
| state | The control's xtd::forms::drawItem_state information. |
| xtd::forms::draw_item_event_args::draw_item_event_args | ( | xtd::drawing::graphics & | graphics, |
| const xtd::drawing::font & | font, | ||
| const xtd::drawing::rectangle & | rect, | ||
| xtd::usize | index, | ||
| xtd::forms::draw_item_state | state, | ||
| const xtd::drawing::color & | back_color, | ||
| const xtd::drawing::color & | fore_core ) |
Initializes a new instance of the xtd::forms::draw_item_event_args class for the specified control with the specified font, state, foreground color, background color, surface to draw on, and the bounds to draw within.
| graphics | The xtd::drawing::graphics surface on which to draw. |
| font | The xtd::drawing::font to use, usually the parent control's Font property. |
| rect | The xtd::drawing::rectangle bounds to draw within. |
| index | The xtd::control::control_collection index value of the item that is being drawn. |
| state | The control's xtd::forms::drawItem_state information. |
|
nodiscardnoexcept |
Gets the background color of the item that is being drawn.
|
nodiscardnoexcept |
Gets the rectangle that represents the bounds of the item that is being drawn.
|
nodiscardnoexcept |
Gets the font that is assigned to the item being drawn.
|
nodiscardnoexcept |
Gets the foreground color of the of the item being drawn.
|
nodiscardnoexcept |
Gets the graphics surface to draw the item on.
|
nodiscardnoexcept |
Gets the index value of the item that is being drawn.
|
nodiscardnoexcept |
Gets the state of the item being drawn.