TGUI
0.9-dev
|
Public Member Functions | |
~BackendGLFW () | |
Destructor. | |
void | setGuiWindow (BackendGui *gui, GLFWwindow *window) |
Informs the backend which window belongs to the gui. More... | |
void | attachGui (BackendGui *gui) override |
Informs the backend that a new gui object has been created. More... | |
void | detatchGui (BackendGui *gui) override |
Informs the backend that a gui object is being destroyed. More... | |
void | setMouseCursorStyle (Cursor::Type type, const std::uint8_t *pixels, Vector2u size, Vector2u hotspot) override |
Changes the look of a certain mouse cursor by using a bitmap. More... | |
void | resetMouseCursorStyle (Cursor::Type type) override |
Changes the look of a certain mouse cursor back to the system theme. More... | |
void | setMouseCursor (BackendGui *gui, Cursor::Type type) override |
Changes the mouse cursor when the mouse is on top of the window to which the gui is attached. More... | |
bool | isKeyboardModifierPressed (Event::KeyModifier modifierKey) override |
Checks the state for one of the modifier keys. More... | |
void | setClipboard (const String &contents) override |
Changes the contents of the clipboard. More... | |
String | getClipboard () const override |
Returns the contents of the clipboard. More... | |
![]() | |
Backend ()=default | |
Default constructor. | |
virtual | ~Backend ()=default |
Virtual destructor. | |
void | setDestroyOnLastGuiDetatch (bool destroyOnDetatch) |
Informs the backend whether it should destroy itself when the last Gui is detached from it. More... | |
virtual Font | createDefaultFont () |
Creates and returns the default font for all widgets. More... | |
virtual std::shared_ptr< BackendFont > | createFont () |
Creates a new font object. More... | |
virtual std::shared_ptr< BackendText > | createText () |
Creates a new text object. More... | |
virtual std::shared_ptr< BackendTexture > | createTexture () |
Creates a new texture object. More... | |
virtual void | openVirtualKeyboard (const FloatRect &inputRect) |
Opens the virtual keyboard on Android and iOS. More... | |
virtual void | closeVirtualKeyboard () |
Closes the virtual keyboard on Android and iOS. More... | |
virtual std::unique_ptr< std::uint8_t[]> | readFileFromAndroidAssets (const String &filename, std::size_t &fileSize) const |
Uses the AssetManager on Android to read a file and return its contents. More... | |
bool | hasRenderer () const |
Checks whether a renderer has been attached to the backend. More... | |
std::shared_ptr< BackendRenderer > | getRenderer () const |
Returns the renderer. More... | |
virtual void | setRenderer (std::shared_ptr< BackendRenderer > renderer) |
Sets the renderer that the backend should use. More... | |
bool | hasFontBackend () const |
Checks whether a font factory has been attached to the backend. More... | |
std::shared_ptr< BackendFontFactory > | getFontBackend () const |
Returns the font factory. More... | |
virtual void | setFontBackend (std::shared_ptr< BackendFontFactory > fontBackend) |
Sets the font factory that the backend should use. More... | |
|
overridevirtual |
Informs the backend that a new gui object has been created.
gui | Newly created gui |
Implements tgui::Backend.
|
overridevirtual |
Informs the backend that a gui object is being destroyed.
gui | Gui object that is about to be deconstructed |
Implements tgui::Backend.
|
overridevirtual |
|
overridevirtual |
Checks the state for one of the modifier keys.
modifierKey | The modifier key of which the state is being queried |
Implements tgui::Backend.
|
overridevirtual |
Changes the look of a certain mouse cursor back to the system theme.
type | Cursor that should no longer use a custom bitmap |
Implements tgui::Backend.
|
overridevirtual |
Changes the contents of the clipboard.
contents | New contents of the clipboard |
Reimplemented from tgui::Backend.
void tgui::BackendGLFW::setGuiWindow | ( | BackendGui * | gui, |
GLFWwindow * | window | ||
) |
Informs the backend which window belongs to the gui.
gui | Gui that was passed earlier via the attachGui function |
window | The window to associate with this gui |
This function is called by the gui itself when it is given a window.
|
overridevirtual |
Changes the mouse cursor when the mouse is on top of the window to which the gui is attached.
gui | The gui that represents the window for which the mouse cursor should be changed |
type | Which cursor to use |
Implements tgui::Backend.
|
overridevirtual |
Changes the look of a certain mouse cursor by using a bitmap.
type | Cursor that should make use of the bitmap |
pixels | Pointer to an array with 4*size.x*size.y elements, representing the pixels in 32-bit RGBA format |
size | Size of the cursor |
hotspot | Pixel coordinate within the cursor image which will be located exactly at the mouse pointer position |
Implements tgui::Backend.