|
Wt
4.13.0
|
An abstract class representing a favicon. More...
#include <Wt/WFavicon.h>
Public Member Functions | |
| virtual std::string | url () const =0 |
| Returns the url to the favicon. | |
| void | update () |
| Sets the favicon in its update state. | |
| void | reset () |
| Sets the favicon in its default state. | |
| bool | isUpdated () const |
| Returns whether the favicon is in its update state or not. | |
Protected Member Functions | |
| virtual void | doUpdate () |
| Updates the favicon. | |
| virtual void | doReset () |
| Resets the favicon. | |
An abstract class representing a favicon.
The favicon of a page is an icon that is used by the browser to represent the page in its user interface. In modern browsers, this is usualy showed on the browser tab of the page.
Changing the favicon of a page can be used to notify the user that something happend on the page without the having to use notifications, which can feel invasive and requires the user's approval to be used. This class is designed with this idea in mind.
A WFavicon can be in 2 states:
The state of the WFavicon can be changed using update() and reset().
|
protectedvirtual |
Resets the favicon.
This is called at the end of reset() and should be overriden to make it clean up what was done in doUpdate().
Reimplemented in Wt::WRasterFavicon.
|
protectedvirtual |
Updates the favicon.
This is called at the end of update() and does nothing by default. You can override this function to make changes to the favicon when update() is called.
If you do so, you will likely want to clean up those changes in doReset().
Reimplemented in Wt::WRasterFavicon.
| bool Wt::WFavicon::isUpdated | ( | ) | const |
| void Wt::WFavicon::reset | ( | ) |
Sets the favicon in its default state.
Sets the favicon in its default state.
If you did any changes in doUpdate(), you should clean up those changes in doReset(), which is called at the end of this function.
| void Wt::WFavicon::update | ( | ) |
Sets the favicon in its update state.
This sets the favicon in its update state.
If you want the favicon to be different in its updated state, you should override doUpdate(), which is called at the end of this function.
|
pure virtual |
Returns the url to the favicon.
This should return the absolute url to the favicon.
Implemented in Wt::WFaviconPair, Wt::WRasterFavicon, Wt::WResourceFavicon, and Wt::WUrlFavicon.