Wt  4.13.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Wt::WResourceFavicon Class Reference

A WFavicon using a resource. More...

#include <Wt/WResourceFavicon.h>

Inheritance diagram for Wt::WResourceFavicon:
[legend]

Public Member Functions

 WResourceFavicon (const std::shared_ptr< WResource > &resource)
 Constructs a WResourceFavicon.
 
 WResourceFavicon (const std::string &filename, const std::string &mimeType="application/octet-stream")
 Constructs a WResourceFavicon from a file.
 
void setResource (const std::shared_ptr< WResource > &resource)
 Sets the default favicon.
 
WResourceresource () const
 Returns the resource.
 
std::string url () const override
 Returns the url to the favicon.
 
- 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.
 

Additional Inherited Members

- Protected Member Functions inherited from Wt::WFavicon
virtual void doUpdate ()
 Updates the favicon.
 
virtual void doReset ()
 Resets the favicon.
 

Detailed Description

A WFavicon using a resource.

This is a WFavicon that uses a resource for its favicon.

See also
WApplication::setFavicon()

Constructor & Destructor Documentation

◆ WResourceFavicon() [1/2]

Wt::WResourceFavicon::WResourceFavicon ( const std::shared_ptr< WResource > &  resource)

Constructs a WResourceFavicon.

Constructs a WResourceFavicon from a WResource.

◆ WResourceFavicon() [2/2]

Wt::WResourceFavicon::WResourceFavicon ( const std::string &  filename,
const std::string &  mimeType = "application/octet-stream" 
)

Constructs a WResourceFavicon from a file.

This is a constructor that automatically creates a WResourceFavicon of WFileResource using the given filename and MIME type.

By default, the MIME type is application/octet-stream, which lets the browser guess the MIME type.

Member Function Documentation

◆ resource()

WResource * Wt::WResourceFavicon::resource ( ) const

Returns the resource.

See also
setResource()

◆ url()

std::string Wt::WResourceFavicon::url ( ) const
overridevirtual

Returns the url to the favicon.

This should return the absolute url to the favicon.

Implements Wt::WFavicon.