#include <popup.h>
List of all members.
Detailed Description
A rather reduced down version of the
Window class that is particularly suited for popup type functionality that doesn't need to be resized or moved around by the mouse once created, but only needs to display some simple content, like a static message.
Popups, in general, shouldn't also need to update their content once created, although this is not an explicit requirement to use the popup class.
Definition at line 44 of file popup.h.
Constructor & Destructor Documentation
Popup::Popup |
( |
const std::string & |
name = "" , |
|
|
const std::string & |
skin = "graphics/gui/gui.xml" | |
|
) |
| | |
Constructor.
Initializes the title to the given text and hooks itself into the popup container.
- Parameters:
-
| name | A human readable name for the popup. Only useful for debugging purposes. |
| skin | The location where the Popup's skin XML can be found. |
Definition at line 37 of file popup.cpp.
Destructor.
Deletes all the added widgets.
Definition at line 62 of file popup.cpp.
Member Function Documentation
void Popup::setWindowContainer |
( |
WindowContainer * |
windowContainer |
) |
[static] |
Sets the window container to be used by new popups.
Definition at line 71 of file popup.cpp.
void Popup::loadPopupConfiguration |
( |
|
) |
|
Changes the popup's skin to use the skin defined in the saved configuration file.
Definition at line 76 of file popup.cpp.
void Popup::savePopupConfiguration |
( |
|
) |
|
Currently only saves the skin used by the popup so that when the client is reloaded, it can use the saved skin.
Definition at line 92 of file popup.cpp.
void Popup::draw |
( |
gcn::Graphics * |
graphics |
) |
|
void Popup::setContentSize |
( |
int |
width, |
|
|
int |
height | |
|
) |
| | |
Sets the size of this popup.
Definition at line 119 of file popup.cpp.
void Popup::setLocationRelativeTo |
( |
gcn::Widget * |
widget |
) |
|
Sets the location relative to the given widget.
Definition at line 136 of file popup.cpp.
void Popup::setMinWidth |
( |
int |
width |
) |
|
Sets the minimum width of the popup.
Definition at line 148 of file popup.cpp.
int Popup::getMinWidth |
( |
|
) |
const [inline] |
void Popup::setMinHeight |
( |
int |
height |
) |
|
Sets the minimum height of the popup.
Definition at line 153 of file popup.cpp.
int Popup::getMinHeight |
( |
|
) |
const [inline] |
void Popup::setMaxWidth |
( |
int |
width |
) |
|
Sets the maximum width of the popup.
Definition at line 158 of file popup.cpp.
int Popup::getMaxWidth |
( |
|
) |
const [inline] |
void Popup::setMaxHeight |
( |
int |
height |
) |
|
Sets the minimum height of the popup.
Definition at line 163 of file popup.cpp.
int Popup::getMaxHeight |
( |
|
) |
const [inline] |
int Popup::getPadding |
( |
|
) |
const [inline] |
Gets the padding of the popup.
The padding is the distance between the popup border and the content.
- Returns:
- The padding of the popup.
- See also:
- setPadding
Definition at line 130 of file popup.h.
void Popup::setPadding |
( |
int |
padding |
) |
[inline] |
void Popup::setPopupName |
( |
const std::string & |
name |
) |
[inline] |
Sets the name of the popup.
This is only useful for debug purposes.
Definition at line 137 of file popup.h.
const std::string& Popup::getPopupName |
( |
|
) |
const [inline] |
void Popup::scheduleDelete |
( |
|
) |
|
Schedule this popup for deletion.
It will be deleted at the start of the next logic update.
Definition at line 168 of file popup.cpp.
gcn::Rectangle Popup::getChildrenArea |
( |
void |
|
) |
[virtual] |
Member Data Documentation
Name of the popup.
Definition at line 154 of file popup.h.
Default skin path for this popup.
Definition at line 155 of file popup.h.
Minimum popup width.
Definition at line 156 of file popup.h.
Minimum popup height.
Definition at line 157 of file popup.h.
Maximum popup width.
Definition at line 158 of file popup.h.
Maximum popup height.
Definition at line 159 of file popup.h.
Holds the padding of the popup.
Definition at line 160 of file popup.h.
The documentation for this class was generated from the following files: