![]() |
ManaPlus
|
#include <skilllistbox.h>
Public Member Functions | |
| SkillListBox (const Widget2 *const widget, SkillModel *const model) | |
| ~SkillListBox () | |
| SkillInfo * | getSelectedInfo () const |
| void | draw (Graphics *const graphics) |
| void | safeDraw (Graphics *const graphics) |
| unsigned int | getRowHeight () const |
| const SkillInfo * | getSkillByEvent (const MouseEvent &event) const |
| void | mouseMoved (MouseEvent &event) |
| void | mouseDragged (MouseEvent &event) |
| void | mousePressed (MouseEvent &event) |
| void | mouseReleased (MouseEvent &event) |
| void | mouseExited (MouseEvent &event) |
Public Member Functions inherited from ListBox | |
| ListBox (const Widget2 *const widget, ListModel *const listModel, const std::string &skin) | |
| ~ListBox () | |
| void | postInit () |
| void | updateAlpha () |
| void | keyPressed (KeyEvent &event) |
| void | mouseWheelMovedUp (MouseEvent &event) |
| void | mouseWheelMovedDown (MouseEvent &event) |
| void | mouseReleased1 (const MouseEvent &event) |
| void | refocus () |
| void | setDistributeMousePressed (const bool b) |
| virtual void | adjustSize () |
| void | logic () |
| virtual int | getSelectionByMouse (const int y) const |
| void | setCenter (const bool b) |
| int | getPressedIndex () const |
| void | setRowHeight (unsigned int n) |
| int | getSelected () const |
| void | setSelected (const int selected) |
| void | setListModel (ListModel *listModel) |
| ListModel * | getListModel () const |
| bool | isWrappingEnabled () const |
| void | setWrappingEnabled (const bool wrappingEnabled) |
| void | addSelectionListener (SelectionListener *const selectionListener) |
| void | removeSelectionListener (SelectionListener *const selectionListener) |
| void | distributeValueChangedEvent () |
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 |
| 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 () |
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) |
Public Member Functions inherited from MouseListener | |
| virtual | ~MouseListener () |
| virtual void | mouseEntered (MouseEvent &event) |
| virtual void | mouseClicked (MouseEvent &event) |
Public Member Functions inherited from KeyListener | |
| virtual | ~KeyListener () |
| virtual void | keyReleased (KeyEvent &event) |
Private Attributes | |
| SkillModel * | mModel |
| Color | mTextColor |
| Color | mTextColor2 |
| Color | mCooldownColor |
| int | mTextPadding |
| int | mSpacing |
| bool | mSkillClicked |
Definition at line 51 of file skilllistbox.h.
|
inline |
Definition at line 54 of file skilllistbox.h.
References Widget::getFont(), Font::getHeight(), Widget2::getThemeColor(), ListBox::mHighlightColor, ListBox::mPadding, ListBox::mRowHeight, and mSpacing.
|
inline |
Definition at line 75 of file skilllistbox.h.
|
inlinevirtual |
Draws the list box.
Reimplemented from ListBox.
Definition at line 92 of file skilllistbox.h.
References Color::a, CAST_S32, SkillInfo::cooldown, data, SkillInfo::data, Font::drawString(), Widget::getFont(), Font::getHeight(), SkillModel::getNumberOfElements(), getRowHeight(), SkillModel::getSkillAt(), Widget::getWidth(), Font::getWidth(), ListBox::mAlpha, mCooldownColor, ListBox::mHighlightColor, ListBox::mListModel, ListBox::mPadding, ListBox::mSelected, mSpacing, mTextColor, mTextColor2, mTextPadding, SkillInfo::skillLevel, SkillInfo::skillLevelWidth, ListBox::updateAlpha(), and y.
Referenced by safeDraw().
|
inlinevirtual |
Reimplemented from ListBox.
Definition at line 181 of file skilllistbox.h.
References ListBox::mRowHeight.
Referenced by draw(), and getSkillByEvent().
|
inline |
Definition at line 80 of file skilllistbox.h.
References ListModel::getNumberOfElements(), ListBox::getSelected(), and ListBox::mListModel.
Referenced by SkillTab::getSelectedInfo().
|
inline |
Definition at line 184 of file skilllistbox.h.
References SkillModel::getNumberOfElements(), getRowHeight(), SkillModel::getSkillAt(), mModel, ListBox::mPadding, Actions::skill(), and y.
Referenced by mouseDragged(), mouseMoved(), and mousePressed().
|
inlinevirtual |
Called when the mouse has moved and the mouse has previously been pressed on the widget.
| event | Describes the event. |
Reimplemented from ListBox.
Definition at line 213 of file skilllistbox.h.
References dragDrop, DragDrop::dragSkill(), getSkillByEvent(), DragDrop::isEmpty(), MouseButton::LEFT, ListBox::mouseDragged(), mSkillClicked, DragDrop::setItem(), DragDrop::setItemData(), Actions::skill(), SKILL_MIN_ID, and DragDropSource::Skills.
|
inlinevirtual |
Called when the mouse has exited the widget area.
| event | Describes the event. |
Reimplemented from MouseListener.
Definition at line 276 of file skilllistbox.h.
References Popup::hide(), and skillPopup.
|
inlinevirtual |
Called when the mouse has moved in the widget area and no mouse button has been pressed (i.e no widget is being dragged).
| event | Describes the event. |
Reimplemented from MouseListener.
Definition at line 195 of file skilllistbox.h.
References dragDrop, getSkillByEvent(), DragDrop::isEmpty(), Viewport::mMouseX, Viewport::mMouseY, MouseListener::mouseMoved(), Popup::position(), SkillPopup::show(), Actions::skill(), skillPopup, and viewport.
|
inlinevirtual |
Called when a mouse button has been pressed on the widget area.
NOTE: A mouse press is NOT equal to a mouse click. Use mouseClickMessage to check for mouse clicks.
| event | Describes the event. |
Reimplemented from ListBox.
Definition at line 238 of file skilllistbox.h.
References SkillModel::getSkillAt(), getSkillByEvent(), Widget::getWidth(), Popup::hide(), MouseButton::LEFT, ListBox::mListModel, ListBox::mousePressed(), ListBox::mPadding, ListBox::mSelected, mSkillClicked, popupMenu, MouseButton::RIGHT, PopupMenu::showSkillLevelPopup(), PopupMenu::showSkillPopup(), Actions::skill(), and skillPopup.
|
inlinevirtual |
Called when a mouse button has been released on the widget area.
| event | Describes the event. |
Reimplemented from ListBox.
Definition at line 271 of file skilllistbox.h.
References ListBox::mouseReleased().
|
inlinevirtual |
|
private |
Definition at line 285 of file skilllistbox.h.
Referenced by draw().
|
private |
Definition at line 282 of file skilllistbox.h.
Referenced by getSkillByEvent(), and ~SkillListBox().
|
private |
Definition at line 288 of file skilllistbox.h.
Referenced by mouseDragged(), and mousePressed().
|
private |
Definition at line 287 of file skilllistbox.h.
Referenced by draw(), and SkillListBox().
|
private |
Definition at line 283 of file skilllistbox.h.
Referenced by draw().
|
private |
Definition at line 284 of file skilllistbox.h.
Referenced by draw().
|
private |
Definition at line 286 of file skilllistbox.h.
Referenced by draw().