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.
List of all members
xtd::forms::button_renderer Class Referencefinal

#include <button_renderer.h>

Definition

Provides button control renderer methods.

class forms_export_ button_renderer static_
Inheritance
xtd::static → xtd::forms::style_sheets::button_renderer
Namespace
xtd::forms::style_sheets
Library
xtd.forms

Methods

static void draw_button (xtd::drawing::graphics &graphics, const xtd::drawing::rectangle &bounds)
 Draws a box in the specified bounds. More...
 
static void draw_button (xtd::drawing::graphics &graphics, const xtd::drawing::rectangle &bounds, xtd::forms::flat_style button_style)
 Draws a box in the specified bounds and button style. More...
 
static void draw_button (xtd::drawing::graphics &graphics, const xtd::drawing::rectangle &bounds, xtd::forms::flat_style button_style, xtd::forms::visual_styles::push_button_state button_state, bool default_button)
 Draws a box in the specified bounds, button style and button state. More...
 
static void draw_button (xtd::drawing::graphics &graphics, const xtd::drawing::rectangle &bounds, xtd::forms::flat_style button_style, xtd::forms::visual_styles::push_button_state button_state, bool default_button, const std::optional< xtd::drawing::color > &back_color)
 Draws a box in the specified bounds, button style, button state and background color. More...
 
static void draw_button (xtd::drawing::graphics &graphics, const xtd::drawing::rectangle &bounds, xtd::forms::flat_style button_style, xtd::forms::visual_styles::push_button_state button_state, bool default_button, const std::optional< xtd::drawing::color > &back_color, const xtd::ustring &text, const std::optional< xtd::forms::text_format_flags > &text_flags, const std::optional< xtd::drawing::color > &fore_color, const std::optional< xtd::drawing::font > &font)
 Draws a box in the specified bounds, button style, button state, background color, text, optional text flags, optional foreground color and optional font. More...
 
static void draw_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, xtd::forms::visual_styles::push_button_state &state)
 
static void draw_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, bool focused, xtd::forms::visual_styles::push_button_state &state)
 
static void draw_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, xtd::forms::text_format_flags flags, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, xtd::forms::text_format_flags flags, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, xtd::forms::text_format_flags flags, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state, const std::optional< xtd::drawing::color > &back_color, const std::optional< xtd::drawing::color > &fore_color)
 
static void draw_button (const xtd::ustring &theme, xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, xtd::forms::visual_styles::push_button_state &state)
 
static void draw_button (const xtd::ustring &theme, xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, bool focused, xtd::forms::visual_styles::push_button_state &state)
 
static void draw_button (const xtd::ustring &theme, xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_button (const xtd::ustring &theme, xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_button (const xtd::ustring &theme, xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, xtd::forms::text_format_flags flags, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_button (const xtd::ustring &theme, xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_button (const xtd::ustring &theme, xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, xtd::forms::text_format_flags flags, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_button (const xtd::ustring &theme, xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, xtd::forms::text_format_flags flags, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state, const std::optional< xtd::drawing::color > &back_color, const std::optional< xtd::drawing::color > &fore_color)
 
static void draw_flat_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, xtd::forms::visual_styles::push_button_state &state)
 
static void draw_flat_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, bool focused, xtd::forms::visual_styles::push_button_state &state)
 
static void draw_flat_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_flat_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_flat_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, xtd::forms::text_format_flags flags, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_flat_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_flat_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, xtd::forms::text_format_flags flags, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_flat_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, xtd::forms::text_format_flags flags, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state, const std::optional< xtd::drawing::color > &back_color, const std::optional< xtd::drawing::color > &fore_color, const flat_button_appearance &flat_appearance)
 
static void draw_popup_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, xtd::forms::visual_styles::push_button_state &state)
 
static void draw_popup_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, bool focused, xtd::forms::visual_styles::push_button_state &state)
 
static void draw_popup_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_popup_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_popup_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, xtd::forms::text_format_flags flags, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_popup_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_popup_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, xtd::forms::text_format_flags flags, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state)
 
static void draw_popup_button (xtd::drawing::graphics g, const xtd::drawing::rectangle &bounds, const xtd::ustring &text, const xtd::drawing::font &font, xtd::forms::text_format_flags flags, const xtd::drawing::image &image, const xtd::drawing::rectangle &image_bounds, bool focused, xtd::forms::visual_styles::push_button_state state, const std::optional< xtd::drawing::color > &back_color, const std::optional< xtd::drawing::color > &fore_color, const flat_button_appearance &flat_appearance)
 

Member Function Documentation

◆ draw_button() [1/5]

static void xtd::forms::button_renderer::draw_button ( xtd::drawing::graphics graphics,
const xtd::drawing::rectangle bounds 
)
static

Draws a box in the specified bounds.

Parameters
graphicsThe Graphics used to draw a button.
boundsThe xtd::drawing::rectangle that specifies the bounds of the button.
graphicsThe Graphics used to draw a button control.
boundsThe xtd::drawing::rectangle that specifies the bounds of the button control.

◆ draw_button() [2/5]

static void xtd::forms::button_renderer::draw_button ( xtd::drawing::graphics graphics,
const xtd::drawing::rectangle bounds,
xtd::forms::flat_style  button_style 
)
static

Draws a box in the specified bounds and button style.

Parameters
graphicsThe Graphics used to draw a button.
boundsThe xtd::drawing::rectangle that specifies the bounds of the button.
graphicsThe Graphics used to draw a button control.
boundsThe xtd::drawing::rectangle that specifies the bounds of the button control.
button_stylethe flat style appearance of the button control.

◆ draw_button() [3/5]

static void xtd::forms::button_renderer::draw_button ( xtd::drawing::graphics graphics,
const xtd::drawing::rectangle bounds,
xtd::forms::flat_style  button_style,
xtd::forms::visual_styles::push_button_state  button_state,
bool  default_button 
)
static

Draws a box in the specified bounds, button style and button state.

Parameters
graphicsThe Graphics used to draw a button.
boundsThe xtd::drawing::rectangle that specifies the bounds of the button.
graphicsThe Graphics used to draw a button control.
boundsThe xtd::drawing::rectangle that specifies the bounds of the button control.
button_stylethe flat style appearance of the button control.
button_stateThe visual state of a button that is drawn with visual styles.

◆ draw_button() [4/5]

static void xtd::forms::button_renderer::draw_button ( xtd::drawing::graphics graphics,
const xtd::drawing::rectangle bounds,
xtd::forms::flat_style  button_style,
xtd::forms::visual_styles::push_button_state  button_state,
bool  default_button,
const std::optional< xtd::drawing::color > &  back_color 
)
static

Draws a box in the specified bounds, button style, button state and background color.

Parameters
graphicsThe Graphics used to draw a button.
boundsThe xtd::drawing::rectangle that specifies the bounds of the button.
graphicsThe Graphics used to draw a button control.
boundsThe xtd::drawing::rectangle that specifies the bounds of the button control.
button_stylethe flat style appearance of the button control.
button_stateThe visual state of a button that is drawn with visual styles.
back_colorThe background color for the button control.
Remarks
The parameter back_color is set only if they are different from its default value; otherwise std::nullopt.

◆ draw_button() [5/5]

static void xtd::forms::button_renderer::draw_button ( xtd::drawing::graphics graphics,
const xtd::drawing::rectangle bounds,
xtd::forms::flat_style  button_style,
xtd::forms::visual_styles::push_button_state  button_state,
bool  default_button,
const std::optional< xtd::drawing::color > &  back_color,
const xtd::ustring text,
const std::optional< xtd::forms::text_format_flags > &  text_flags,
const std::optional< xtd::drawing::color > &  fore_color,
const std::optional< xtd::drawing::font > &  font 
)
static

Draws a box in the specified bounds, button style, button state, background color, text, optional text flags, optional foreground color and optional font.

Parameters
graphicsThe Graphics used to draw a button.
boundsThe xtd::drawing::rectangle that specifies the bounds of the button.
graphicsThe xtd::drawing::graphics used to draw a button control.
boundsThe xtd::drawing::rectangle that specifies the bounds of the button control.
button_stylethe flat style appearance of the button control.
button_stateThe visual state of a button that is drawn with visual styles.
back_colorThe background color for the button control.
textThe text of the button control.
text_flagsContains the display and layout information for text strings.
fore_colorThe foreground color for the button control.
fontThe font of the text for the button control.
Remarks
The parameter back_color is set only if they are different from its default value; otherwise std::nullopt.

The documentation for this class was generated from the following file: