GMUserView is an abstract class used to centralize some methods that (almost) every Class from the Graphical Module are using.
It inherits from the UserView class.
Its main usage is to provide common functions to it's children, notably the .drawFrame
method that is used to draw the background of the widgets, and allow communication between the .drawFunc
and the GMStyle associated to the widget.
It can be used to draw an empty frame, but it is designed as if each of it's method was internal.
Creates a new instance of GMUserView.
This will be an empty view, and as such doesn't really makes sense.
a GMUserView instance.
Sets or gets the GMStyle associated to the widget.
Sets or gets wether the border of the widget should be apparent.
Sets or gets wether the background of the widget should be apparent.
Sets wether both the background and the border of the widget should be apparent.
Associate the default GMStyle to this instance. Used at initialisation.
The function that draws every border of the widget.
The function that draws the background of the widget. The background color must be passed explicitely as argument.
The function that draws the background of the widget, then every border. The background color must be passed explicitely as argument.
Returns the surface of the widget that can be interacted with as a Rect, i.e. the size of the widget minus the borders sizes.
a Rect
A function that allows to display text in a rectangular portion of the widget.
The following methods are getters that allow communication with the associated GMStyle in the context of the drawFunc
.