![]() |
ManaPlus
|
#include <icon.h>
Public Member Functions | |
| Icon (const Widget2 *const widget, const std::string &filename, const AutoRelease autoRelease) | |
| Icon (const Widget2 *const widget, Image *const image, const AutoRelease autoRelease) | |
| ~Icon () | |
| Image * | getImage () const |
| void | setImage (Image *const image) |
| void | draw (Graphics *const g) |
| void | safeDraw (Graphics *const g) |
Public Member Functions inherited from Widget | |
| Widget (const Widget2 *const widget) | |
| ~Widget () | |
| virtual void | drawFrame (Graphics *graphics) |
| virtual void | safeDrawFrame (Graphics *graphics) |
| void | setFrameSize (const unsigned int frameSize) |
| unsigned int | getFrameSize () const |
| virtual void | logic () |
| Widget * | getParent () const |
| void | setWidth (const int width) |
| int | getWidth () const |
| void | setHeight (const int height) |
| int | getHeight () const |
| void | setSize (const int width, const int height) |
| void | setX (const int x) |
| int | getX () const |
| void | setY (const int y) |
| int | getY () const |
| void | setPosition (const int x, const int y) |
| void | setDimension (const Rect &dimension) |
| const Rect & | getDimension () const |
| void | setFocusable (const bool focusable) |
| bool | isFocusable () const |
| virtual bool | isFocused () const |
| void | setEnabled (const bool enabled) |
| bool | isEnabled () const |
| void | setVisible (Visible visible) |
| bool | isVisible () const |
| void | setBaseColor (const Color &color) |
| const Color & | getBaseColor () const |
| void | setForegroundColor (const Color &color) |
| const Color & | getForegroundColor () const |
| void | setBackgroundColor (const Color &color) |
| const Color & | getBackgroundColor () const |
| virtual void | requestFocus () |
| virtual void | requestMoveToTop () |
| virtual void | requestMoveToBottom () |
| virtual void | setFocusHandler (FocusHandler *const focusHandler) |
| FocusHandler * | getFocusHandler () |
| void | addActionListener (ActionListener *const actionListener) |
| void | removeActionListener (ActionListener *const actionListener) |
| void | addDeathListener (WidgetDeathListener *const deathListener) |
| void | removeDeathListener (WidgetDeathListener *const deathListener) |
| void | addMouseListener (MouseListener *const mouseListener) |
| void | removeMouseListener (MouseListener *const mouseListener) |
| void | addKeyListener (KeyListener *const keyListener) |
| void | removeKeyListener (KeyListener *const keyListener) |
| void | addFocusListener (FocusListener *const focusListener) |
| void | removeFocusListener (FocusListener *const focusListener) |
| void | addWidgetListener (WidgetListener *const widgetListener) |
| void | removeWidgetListener (WidgetListener *const widgetListener) |
| void | setActionEventId (const std::string &actionEventId) |
| const std::string & | getActionEventId () const |
| virtual void | getAbsolutePosition (int &x, int &y) const |
| virtual void | setParent (Widget *parent) |
| Font * | getFont () const |
| void | setFont (Font *const font) |
| virtual void | fontChanged () |
| bool | isTabInEnabled () const |
| void | setTabInEnabled (const bool enabled) |
| bool | isTabOutEnabled () const |
| void | setTabOutEnabled (const bool enabled) |
| void | requestModalFocus () |
| virtual void | requestModalMouseInputFocus () |
| virtual void | releaseModalFocus () |
| virtual void | releaseModalMouseInputFocus () |
| virtual bool | isModalFocused () const |
| virtual bool | isModalMouseInputFocused () const |
| virtual Widget * | getWidgetAt (int x, int y) |
| const std::list< MouseListener * > & | getMouseListeners () const A_CONST |
| const std::list< KeyListener * > & | getKeyListeners () const A_CONST |
| const std::list< FocusListener * > & | getFocusListeners () const A_CONST |
| virtual Rect | getChildrenArea () |
| virtual FocusHandler * | getInternalFocusHandler () |
| void | setInternalFocusHandler (FocusHandler *const internalFocusHandler) |
| virtual void | moveToTop (Widget *widget) |
| virtual void | moveToBottom (Widget *widget) |
| virtual void | focusNext () |
| virtual void | focusPrevious () |
| virtual void | showWidgetPart (Widget *const widget, const Rect &area) |
| void | setId (const std::string &id) |
| const std::string & | getId () const |
| virtual void | showPart (const Rect &rectangle) |
| bool | isAllowLogic () const |
| void | setMouseConsume (const bool b) |
| bool | isMouseConsume () const |
| void | setRedraw (const bool b) |
| virtual bool | isSelectable () const |
| void | setSelectable (const bool selectable) |
| void | windowResized () |
| virtual void | postInit () |
Public Member Functions inherited from Widget2 | |
| virtual | ~Widget2 () |
| const Color & | getThemeColor (const ThemeColorIdT type, const unsigned int alpha) const A_INLINE |
| const Color & | getThemeCharColor (const signed char c, bool &valid) const A_INLINE |
| virtual void | setWidget2 (const Widget2 *const widget) |
| void | setPalette (int palette) |
| void | checkPalette () |
| void | setForegroundColor2 (const Color &color) |
| Widget * | getWindow () const |
| virtual void | setWindow (Widget *const window) |
Private Attributes | |
| Image * | mImage |
| AutoRelease | mAutoRelease |
| Icon::Icon | ( | const Widget2 *const | widget, |
| const std::string & | filename, | ||
| const AutoRelease | autoRelease | ||
| ) |
Constructor.
Definition at line 36 of file icon.cpp.
References Widget::mAllowLogic, mImage, and Widget::setSize().
| Icon::Icon | ( | const Widget2 *const | widget, |
| Image *const | image, | ||
| const AutoRelease | autoRelease | ||
| ) |
Constructor, uses an existing Image.
Definition at line 51 of file icon.cpp.
References Widget::mAllowLogic, mImage, and Widget::setSize().
| Icon::~Icon | ( | ) |
Definition at line 66 of file icon.cpp.
References AutoRelease_true, gui, mAutoRelease, mImage, and Gui::removeDragged().
|
virtual |
Draws the Icon.
Implements Widget.
Definition at line 84 of file icon.cpp.
References BLOCK_END, BLOCK_START, Graphics::drawImage(), Rect::height, Widget::mDimension, mImage, and Rect::width.
|
inline |
Gets the current Image.
Definition at line 64 of file icon.h.
References mImage.
Referenced by ItemPopup::setItem(), and ItemPopup::~ItemPopup().
|
virtual |
Implements Widget.
Definition at line 96 of file icon.cpp.
References BLOCK_END, BLOCK_START, Graphics::drawImage(), Rect::height, Widget::mDimension, mImage, and Rect::width.
| void Icon::setImage | ( | Image *const | image | ) |
Sets the image to display.
Definition at line 74 of file icon.cpp.
References mImage, and Widget::setSize().
Referenced by ItemAmountWindow::action(), and ItemPopup::setItem().
|
private |
|
private |
Definition at line 80 of file icon.h.
Referenced by draw(), getImage(), Icon(), safeDraw(), setImage(), and ~Icon().