|
Wt
4.13.0
|
A WFavicon using a WRasterImage as resource. More...
#include <Wt/WRasterFavicon.h>
Public Member Functions | |
| WRasterFavicon (std::shared_ptr< WAbstractDataInfo > info, const WLength &width=256, const WLength &height=256, const std::string &type="png") | |
| Constructs a WRasterFavicon. | |
| void | setdefaultFavicon (std::shared_ptr< WAbstractDataInfo > info) |
| Sets the default favicon. | |
| std::shared_ptr< WAbstractDataInfo > | defaultFavicon () const |
| Returns the data info of the default favicon. | |
| std::string | url () const override |
| Returns the url to the favicon. | |
| void | setOutlineBrush (const WBrush &brush) |
| Sets the brush used to paint the outline of the circle. | |
| WBrush | outlineBrush () const |
| Returns the brush used to paint the outline of the circle. | |
| void | setFillBrush (const WBrush &brush) |
| Sets the brush used to fill the circle. | |
| WBrush | fillBrush () const |
| Returns the brush used to fill the circle. | |
Public Member Functions inherited from Wt::WFavicon | |
| 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 | |
| WRasterImage * | favicon () const |
| Returns the WRasterImage. | |
| void | doUpdate () override |
| Updates the favicon. | |
| void | doReset () override |
| Resets the favicon. | |
A WFavicon using a WRasterImage as resource.
This is a WFavicon that uses a WRasterImage as resource.
In its default state, it shows an image present in the docroot, and in its updated state, it shows the same image with a circle.
|
explicit |
Constructs a WRasterFavicon.
Constructs a WRasterFavicon of given image type, width, and height and using the image described by info as default favicon.
By default, type is "png" and width and height are of 256 pixels.
"image/" type. | std::shared_ptr< WAbstractDataInfo > Wt::WRasterFavicon::defaultFavicon | ( | ) | const |
Returns the data info of the default favicon.
|
overrideprotectedvirtual |
Resets the favicon.
Clear the WRasterImage and repaint the default favicon on it.
Reimplemented from Wt::WFavicon.
|
overrideprotectedvirtual |
Updates the favicon.
Draw the circle on the WRasterImage.
You can override this function to change what is drawn on the favicon when update is called.
Reimplemented from Wt::WFavicon.
|
protected |
Returns the WRasterImage.
| WBrush Wt::WRasterFavicon::fillBrush | ( | ) | const |
Returns the brush used to fill the circle.
| WBrush Wt::WRasterFavicon::outlineBrush | ( | ) | const |
Returns the brush used to paint the outline of the circle.
| void Wt::WRasterFavicon::setdefaultFavicon | ( | std::shared_ptr< WAbstractDataInfo > | info | ) |
Sets the default favicon.
Sets the image described by info as the new default favicon.
Sets the brush used to fill the circle.
This sets the brush used to the circle added to the favicon when in updated state.
Sets the brush used to paint the outline of the circle.
This sets the brush used to paint the outline of the circle added to the favicon when in updated state.
|
overridevirtual |
Returns the url to the favicon.
This returns the url to the WRasterImage, updating the WRasterImage will therefor automatically update the favicon on the client side.
Implements Wt::WFavicon.