class::draw::Progress

class draw::Progress
  : public draw::Drawing

The Progress Class defines the top level object for progress bars etc.

Summary

[Progress](#classdraw_1_1_progress_1ab3254b18f87210aa7d84e61617cfb080)()

sg_color_t background_color() const

drawing_size_t border_thickness() const

u16 maximum() const

Progress & set_background_color(

sg_color_t value
)

Progress & set_border_thickness(

drawing_size_t border_thickness
)

Progress & set_color(

sg_color_t value
)

Progress & set_progress(

u16 value,
u16 maximum
)

u16 value() const

Members

Progress()

sg_color_t background_color() const

Returns the background color.


drawing_size_t border_thickness() const

Returns the border thickness.


u16 maximum() const

Returns the maximum value of the progress.


Progress & set_background_color(

sg_color_t value
)

Sets the background color.

Parameters

  • value The background color value.

If the value is draw::color_transparent(), the background is not drawn.


Progress & set_border_thickness(

drawing_size_t border_thickness
)

Sets the border thickness.

Parameters

  • border_thickness value from 0 to 100 representing a percentage of height/2.

If border_thickness is 50, the border will take up 50% of the top half and 50% of the bottom half of the progress bar.


Progress & set_color(

sg_color_t value
)

Sets the color of the progress.


Progress & set_progress(

u16 value,
u16 maximum
)

Sets the progress.

Parameters

  • value value from 0 to maximum

  • maximum maximum possible for value

Returns

A reference to this object


u16 value() const

Returns the value of the progress.


X

Thanks for Coming!

Subscribe to news and updates