Mana
|
A light version of the Window class. More...
#include <popup.h>
Public Member Functions | |
Popup (const std::string &name=std::string(), SkinType skinType=SkinType::Popup) | |
Constructor. | |
~Popup () override | |
Destructor. | |
void | add (gcn::Widget *widget) override |
void | add (gcn::Widget *widget, int x, int y) override |
void | draw (gcn::Graphics *graphics) override |
Draws the popup. | |
void | drawFrame (gcn::Graphics *graphics) override |
Draws the popup frame. | |
void | setContentSize (int width, int height) |
Sets the size of this popup. | |
void | setLocationRelativeTo (gcn::Widget *widget) |
Sets the location relative to the given widget. | |
void | mouseMoved (gcn::MouseEvent &event) override |
void | setMinWidth (int width) |
Sets the minimum width of the popup. | |
int | getMinWidth () const |
void | setMinHeight (int height) |
Sets the minimum height of the popup. | |
int | getMinHeight () const |
void | setMaxWidth (int width) |
Sets the maximum width of the popup. | |
int | getMaxWidth () const |
void | setMaxHeight (int height) |
Sets the minimum height of the popup. | |
int | getMaxHeight () const |
int | getPadding () const |
Gets the padding of the popup. | |
void | setPadding (int padding) |
void | setPopupName (const std::string &name) |
Sets the name of the popup. | |
const std::string & | getPopupName () const |
void | scheduleDelete () |
Schedule this popup for deletion. | |
gcn::Rectangle | getChildrenArea () override |
void | position (int x, int y) |
Sets the location to display the popup. | |
const Skin & | getSkin () const |
Returns the Skin used by this popup. | |
![]() | |
Container () | |
~Container () override | |
void | drawFrame (gcn::Graphics *graphics) override |
Static Public Member Functions | |
static void | setWindowContainer (WindowContainer *windowContainer) |
Sets the window container to be used by new popups. | |
Private Member Functions | |
void | widgetAdded (gcn::Widget *widget) const |
Private Attributes | |
std::string | mPopupName |
Name of the popup. | |
int | mMinWidth = 100 |
Minimum popup width. | |
int | mMinHeight = 40 |
Minimum popup height. | |
int | mMaxWidth |
Maximum popup width. | |
int | mMaxHeight |
Maximum popup height. | |
int | mPadding |
Holds the padding of the popup. | |
SkinType | mSkinType |
The skin type used when drawing the popup widget. | |
Additional Inherited Members | |
![]() | |
Layout & | getLayout () |
Gets the layout handler for this container. | |
LayoutCell & | place (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. | |
A light version of the Window class.
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.
|
explicit |
|
override |
|
override |
|
override |
|
override |
|
inline |
Gets the padding of the popup.
The padding is the distance between the popup border and the content.
const Skin & Popup::getSkin | ( | ) | const |
|
override |
void Popup::position | ( | int | x, |
int | y | ||
) |
void Popup::scheduleDelete | ( | ) |
void Popup::setContentSize | ( | int | width, |
int | height | ||
) |
void Popup::setLocationRelativeTo | ( | gcn::Widget * | widget | ) |
void Popup::setMaxHeight | ( | int | height | ) |
void Popup::setMaxWidth | ( | int | width | ) |
void Popup::setMinHeight | ( | int | height | ) |
void Popup::setMinWidth | ( | int | width | ) |
|
inline |
|
static |
|
private |
|
private |