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

Desktop widget, for drawing a background image and color. More...

#include <desktop.h>

Inheritance diagram for Desktop:
Container

Public Member Functions

 Desktop ()
 
 ~Desktop () override
 
void reloadWallpaper ()
 Has to be called after updates have been loaded.
 
void widgetResized (const gcn::Event &) override
 
void draw (gcn::Graphics *graphics) override
 
- Public Member Functions inherited from Container
 Container ()
 
 ~Container () override
 
void drawFrame (gcn::Graphics *graphics) override
 

Private Member Functions

void setBestFittingWallpaper ()
 

Private Attributes

ResourceRef< ImagemWallpaper
 
gcn::Label * mVersionLabel
 

Additional Inherited Members

- Protected Member Functions inherited from Container
LayoutgetLayout ()
 Gets the layout handler for this container.
 
LayoutCellplace (int x, int y, gcn::Widget *wg, int w=1, int h=1)
 Adds a widget to the container and sets it at given cell.
 
ContainerPlacer getPlacer (int x, int y)
 Returns a proxy for adding widgets in an inner table of the layout.
 

Detailed Description

Desktop widget, for drawing a background image and color.

It picks the best fitting background image. If the image doesn't fit, a background color is drawn and the image is centered.

When the desktop widget is resized, the background image is automatically updated.

The desktop also displays the client version in the top-right corner.

Definition at line 47 of file desktop.h.

Constructor & Destructor Documentation

◆ Desktop()

Desktop::Desktop ( )

Definition at line 37 of file desktop.cpp.

◆ ~Desktop()

Desktop::~Desktop ( )
overridedefault

Member Function Documentation

◆ draw()

void Desktop::draw ( gcn::Graphics *  graphics)
override

Definition at line 68 of file desktop.cpp.

◆ reloadWallpaper()

void Desktop::reloadWallpaper ( )

Has to be called after updates have been loaded.

Definition at line 57 of file desktop.cpp.

◆ setBestFittingWallpaper()

void Desktop::setBestFittingWallpaper ( )
private

Definition at line 90 of file desktop.cpp.

◆ widgetResized()

void Desktop::widgetResized ( const gcn::Event &  )
override

Definition at line 63 of file desktop.cpp.

Member Data Documentation

◆ mVersionLabel

gcn::Label* Desktop::mVersionLabel
private

Definition at line 66 of file desktop.h.

◆ mWallpaper

ResourceRef<Image> Desktop::mWallpaper
private

Definition at line 65 of file desktop.h.


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