Mana
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members

An icon. More...

#include <icon.h>

Inheritance diagram for Icon:

Public Member Functions

 Icon (const std::string &filename)
 Constructor.
 
 Icon (Image *image=nullptr)
 Constructor, uses an existing Image.
 
 ~Icon () override
 
ImagegetImage () const
 Gets the current Image.
 
void setImage (Image *image)
 Sets the image to display.
 
void draw (gcn::Graphics *g) override
 Draws the Icon.
 

Private Attributes

ResourceRef< ImagemImage
 

Detailed Description

An icon.

Definition at line 35 of file icon.h.

Constructor & Destructor Documentation

◆ Icon() [1/2]

Icon::Icon ( const std::string &  filename)
explicit

Constructor.

Parameters
filenameThe file name of the image to display

Definition at line 29 of file icon.cpp.

◆ Icon() [2/2]

Icon::Icon ( Image image = nullptr)
explicit

Constructor, uses an existing Image.

Definition at line 34 of file icon.cpp.

◆ ~Icon()

Icon::~Icon ( )
overridedefault

Member Function Documentation

◆ draw()

void Icon::draw ( gcn::Graphics *  g)
override

Draws the Icon.

Definition at line 48 of file icon.cpp.

◆ getImage()

Image * Icon::getImage ( ) const
inline

Gets the current Image.

Definition at line 55 of file icon.h.

◆ setImage()

void Icon::setImage ( Image image)

Sets the image to display.

Definition at line 41 of file icon.cpp.

Member Data Documentation

◆ mImage

ResourceRef<Image> Icon::mImage
private

Definition at line 68 of file icon.h.


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