The Battle for Wesnoth  1.17.10+dev
Public Member Functions | List of all members
tooltips::manager Class Reference

#include <tooltips.hpp>

Inheritance diagram for tooltips::manager:

Public Member Functions

 manager ()
 
 ~manager ()
 
virtual void layout () override
 Finalize the size and position of the drawable and its children, and invalidate any regions requiring redraw. More...
 
virtual bool expose (const rect &region) override
 Draw the portion of the drawable intersecting region to the screen. More...
 
virtual rect screen_location () override
 The location of the TLD on the screen, in drawing coordinates. More...
 
- Public Member Functions inherited from gui2::top_level_drawable
virtual void update ()
 Update state and any parameters that may effect layout, or any of the later stages. More...
 
virtual void render ()
 Perform any internal rendering necessary to prepare the drawable. More...
 

Additional Inherited Members

- Protected Member Functions inherited from gui2::top_level_drawable
 top_level_drawable ()
 
virtual ~top_level_drawable ()
 
 top_level_drawable (const top_level_drawable &)
 
top_level_drawableoperator= (const top_level_drawable &)
 
 top_level_drawable (top_level_drawable &&)
 
top_level_drawableoperator= (top_level_drawable &&)
 

Detailed Description

Definition at line 25 of file tooltips.hpp.

Constructor & Destructor Documentation

◆ manager()

tooltips::manager::manager ( )

Definition at line 131 of file tooltips.cpp.

References tooltips::clear_tooltips().

◆ ~manager()

tooltips::manager::~manager ( )

Definition at line 137 of file tooltips.cpp.

References tooltips::clear_tooltips().

Member Function Documentation

◆ expose()

bool tooltips::manager::expose ( const rect region)
overridevirtual

Draw the portion of the drawable intersecting region to the screen.

TLDs must not invalidate regions during expose. Only drawing must occur, with no modification of layout.

Implementation of this interface is mandatory.

Parameters
regionThe region to expose, in absolute draw-space coordinates.
Returns
True if anything was drawn, false otherwise.

Implements gui2::top_level_drawable.

Definition at line 155 of file tooltips.cpp.

References gui2::dialogs::tip::tip, gui2::settings::tips, and tooltip.

◆ layout()

void tooltips::manager::layout ( )
overridevirtual

Finalize the size and position of the drawable and its children, and invalidate any regions requiring redraw.

Visibly changed screen locations should be invalidated using draw_manager::invalidate_region(), both in the previous location and in the new location if different.

TLDs must not perform any actual drawing during layout.

This interface is optional.

Reimplemented from gui2::top_level_drawable.

Definition at line 145 of file tooltips.cpp.

References gui2::settings::tips.

◆ screen_location()

rect tooltips::manager::screen_location ( )
overridevirtual

The location of the TLD on the screen, in drawing coordinates.

This will be used to determine the region (if any) to expose.

Implementation of this interface is mandatory.

Implements gui2::top_level_drawable.

Definition at line 169 of file tooltips.cpp.

References gui2::settings::tips.


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