ManaPlus
|
#include <widget.h>
Public Member Functions | |
Widget (const Widget2 *const widget) | |
~Widget () | |
virtual void | draw (Graphics *const graphics)=0 |
virtual void | safeDraw (Graphics *const graphics)=0 |
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) |
Static Public Member Functions | |
static void | setGlobalFont (Font *const font) |
static Font * | getGloablFont () |
static void | cleanGlobalFont () |
static bool | widgetExists (const Widget *const widget) |
static void | distributeWindowResizeEvent () |
static Widget * | callPostInit (Widget *const widget) |
Data Fields | |
Visible | mVisible |
Protected Types | |
typedef std::list< MouseListener * > | MouseListenerList |
typedef MouseListenerList::iterator | MouseListenerIterator |
typedef std::list< KeyListener * > | KeyListenerList |
typedef KeyListenerList::iterator | KeyListenerIterator |
typedef std::list< ActionListener * > | ActionListenerList |
typedef ActionListenerList::iterator | ActionListenerIterator |
typedef std::list< WidgetDeathListener * > | WidgetDeathListenerList |
typedef WidgetDeathListenerList::iterator | WidgetDeathListenerIterator |
typedef std::list< FocusListener * > | FocusListenerList |
typedef FocusListenerList::iterator | FocusListenerIterator |
typedef std::list< WidgetListener * > | WidgetListenerList |
typedef WidgetListenerList::iterator | WidgetListenerIterator |
Protected Member Functions | |
void | distributeActionEvent () |
void | distributeResizedEvent () |
void | distributeMovedEvent () |
void | distributeHiddenEvent () |
void | distributeShownEvent () |
Protected Member Functions inherited from Widget2 | |
Widget2 (const Widget2 *const widget) | |
Protected Attributes | |
MouseListenerList | mMouseListeners |
KeyListenerList | mKeyListeners |
ActionListenerList | mActionListeners |
WidgetDeathListenerList | mDeathListeners |
FocusListenerList | mFocusListeners |
WidgetListenerList | mWidgetListeners |
Color | mForegroundColor |
Color | mBackgroundColor |
Color | mBaseColor |
Rect | mDimension |
std::string | mActionEventId |
std::string | mId |
FocusHandler * | mFocusHandler |
FocusHandler * | mInternalFocusHandler |
Widget * | mParent |
Font * | mCurrentFont |
unsigned int | mFrameSize |
bool | mFocusable |
bool | mTabIn |
bool | mTabOut |
bool | mEnabled |
bool | mAllowLogic |
bool | mMouseConsume |
bool | mRedraw |
bool | mSelectable |
Protected Attributes inherited from Widget2 | |
int | mPaletteOffset |
Widget * | mWindow |
Color | mForegroundColor2 |
Static Protected Attributes | |
static Font * | mGlobalFont = 0 |
Static Private Attributes | |
static std::list< Widget * > | mAllWidgets |
static std::set< Widget * > | mAllWidgetsSet |
Friends | |
class | BasicContainer |
Abstract class for widgets of Guichan. It contains basic functions every widget should have.
NOTE: Functions begining with underscore "_" should not be overloaded unless you know what you are doing
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
explicit |
Constructor. Resets member variables. Noteable, a widget is not focusable as default, therefore, widgets that are supposed to be focusable should overide this default in their own constructor.
Definition at line 85 of file widget.cpp.
References mAllWidgets, and mAllWidgetsSet.
Widget::~Widget | ( | ) |
Default destructor.
Definition at line 118 of file widget.cpp.
References FOR_EACH, mAllWidgets, mAllWidgetsSet, mDeathListeners, and setFocusHandler().
void Widget::addActionListener | ( | ActionListener *const | actionListener | ) |
Adds an action listener to the widget. When an action event is fired by the widget the action listeners of the widget will get notified.
actionListener | The action listener to add. |
Definition at line 252 of file widget.cpp.
References mActionListeners.
Referenced by SetupItemTextField::action(), SetupItemIntTextField::action(), Setup_Video::action(), ChangeEmailDialog::action(), ChangePasswordDialog::action(), CharSelectDialog::action(), EditServerDialog::action(), LoginDialog::action(), RegisterDialog::action(), ShopWindow::action(), WidgetGroup::addButton(), SkillDialog::addDefaultTab(), EmoteWindow::addListeners(), TabbedArea::addTab(), CharSelectDialog::askPasswordForDeletion(), DialogsManager::attributeChanged(), Button::Button(), GameModifiers::changeAwayMode(), PincodeManager::changePincode(), CharacterDisplay::CharacterDisplay(), CharCreateDialog::CharCreateDialog(), ChatWindow::ChatWindow(), CheckBox::CheckBox(), InventoryWindow::combineItems(), SetupItemCheckBox::createControls(), SetupItemTextField::createControls(), SetupItemIntTextField::createControls(), SetupItemLabel::createControls(), SetupItemDropDown::createControls(), SetupItemDropDownStr::createControls(), SetupItemSlider::createControls(), SetupItemSlider2::createControls(), SetupItemSliderList::createControls(), SetupQuickItem::createControls(), SetupActionDropDown::createControls(), NpcDialog::createSkinControls(), DropDown::DropDown(), EditServerDialog::EditServerDialog(), EquipmentWindow::EquipmentWindow(), ItemLinkHandler::handleCommandLink(), ItemLinkHandler::handleHttpLink(), PopupMenu::handleLink(), BuyDialog::init(), InventoryWindow::InventoryWindow(), SocialGuildTab::invite(), SocialPartyTab::invite(), ItemAmountWindow::ItemAmountWindow(), SocialGuildTab::leave(), SocialPartyTab::leave(), SkillDialog::loadXmlFile(), LoginDialog::LoginDialog(), NpcDialog::NpcDialog(), InputActionReplayListener::openDialog(), OutfitWindow::OutfitWindow(), PincodeDialog::PincodeDialog(), DialogsManager::playerDeath(), SellDialog::postInit(), EquipmentWindow::postInit(), TextSelectDialog::postInit(), SliderList::postInit2(), EAthena::FamilyRecv::processAskForChild(), ShopWindow::processRequest(), EAthena::SkillRecv::processSkillWarpPoint(), EAthena::SkillRecv::processSkillWarpPoint2(), Ea::TradeRecv::processTradeRequestContinue(), QuestsWindow::QuestsWindow(), RegisterDialog::RegisterDialog(), NpcSellDialog::sellAction(), PincodeManager::setNewPincode(), Setup_Colors::Setup_Colors(), Setup_Input::Setup_Input(), Setup_Joystick::Setup_Joystick(), Setup_Relations::Setup_Relations(), Setup_Theme::Setup_Theme(), Setup_Video::Setup_Video(), ShopWindow::ShopWindow(), SocialWindow::showGuildInvite(), SocialWindow::showPartyInvite(), Game::slowLogic(), TextCommandEditor::TextCommandEditor(), TextField::TextField(), PincodeManager::updateState(), SkillDialog::useSkillDefault(), SkillDialog::useSkillPosition(), and SkillDialog::useSkillTarget().
void Widget::addDeathListener | ( | WidgetDeathListener *const | deathListener | ) |
Adds a death listener to the widget. When a death event is fired by the widget the death listeners of the widget will get notified.
deathListener | The death listener to add. |
Definition at line 262 of file widget.cpp.
References mDeathListeners.
void Widget::addFocusListener | ( | FocusListener *const | focusListener | ) |
Adds a focus listener to the widget. When a focus event is fired by the widget the key listeners of the widget will get notified.
focusListener | The focus listener to add. |
Definition at line 282 of file widget.cpp.
References mFocusListeners.
Referenced by ChatInput::ChatInput(), DropDown::DropDown(), Button::init(), MailEditWindow::MailEditWindow(), and TextField::TextField().
void Widget::addKeyListener | ( | KeyListener *const | keyListener | ) |
Adds a key listener to the widget. When a key event is fired by the widget the key listeners of the widget will get notified.
keyListener | The key listener to add. |
Definition at line 272 of file widget.cpp.
References mKeyListeners.
Referenced by CharacterViewNormal::CharacterViewNormal(), CharacterViewSmall::CharacterViewSmall(), CharCreateDialog::CharCreateDialog(), CharSelectDialog::CharSelectDialog(), ChatWindow::ChatWindow(), CheckBox::CheckBox(), DropDown::DropDown(), EditServerDialog::EditServerDialog(), GuiTable::GuiTable(), Button::init(), Slider::init(), InventoryWindow::InventoryWindow(), ItemAmountWindow::ItemAmountWindow(), ItemContainer::ItemContainer(), ListBox::ListBox(), LoginDialog::LoginDialog(), PopupList::postInit(), QuitDialog::QuitDialog(), RadioButton::RadioButton(), RegisterDialog::RegisterDialog(), ServerDialog::ServerDialog(), TabbedArea::TabbedArea(), TextBox::TextBox(), TextField::TextField(), UpdaterWindow::UpdaterWindow(), and WorldSelectDialog::WorldSelectDialog().
void Widget::addMouseListener | ( | MouseListener *const | mouseListener | ) |
Adds a mouse listener to the widget. When a mouse event is fired by the widget the mouse listeners of the widget will get notified.
mouseListener | The mouse listener to add. |
Definition at line 292 of file widget.cpp.
References mMouseListeners.
Referenced by BrowserBox::BrowserBox(), CharacterDisplay::CharacterDisplay(), CheckBox::CheckBox(), DropDown::DropDown(), EmotePage::EmotePage(), EmoteWindow::EmoteWindow(), GuiTable::GuiTable(), HorizontContainer::HorizontContainer(), Button::init(), Label::init(), Slider::init(), Tab::init(), PlayerBox::init(), ItemAmountWindow::ItemAmountWindow(), ItemContainer::ItemContainer(), ListBox::ListBox(), MiniStatusWindow::MiniStatusWindow(), PopupMenu::PopupMenu(), ItemPopup::postInit(), SkillPopup::postInit(), SpellPopup::postInit(), TextBoxPopup::postInit(), TextPopup::postInit(), PopupList::postInit(), SliderList::postInit2(), RadioButton::RadioButton(), ScrollArea::ScrollArea(), ServerDialog::ServerDialog(), ShortcutContainer::ShortcutContainer(), SkillRectangleListBox::SkillRectangleListBox(), StaticBrowserBox::StaticBrowserBox(), TabbedArea::TabbedArea(), TextBox::TextBox(), TextField::TextField(), Viewport::Viewport(), Window::Window(), and WindowMenu::WindowMenu().
void Widget::addWidgetListener | ( | WidgetListener *const | widgetListener | ) |
Adds a widget listener to the widget. When a widget event is fired by the widget the key listeners of the widget will get notified.
widgetListener | The widget listener to add. |
Definition at line 302 of file widget.cpp.
References mWidgetListeners.
Referenced by BrowserBox::BrowserBox(), CharacterDisplay::CharacterDisplay(), Desktop::Desktop(), EmotePage::EmotePage(), FlowContainer::FlowContainer(), HorizontContainer::HorizontContainer(), Button::init(), Tab::init(), ItemContainer::ItemContainer(), LayoutHelper::LayoutHelper(), Popup::Popup(), TabbedArea::postInit(), ProgressBar::ProgressBar(), Label::setParent(), Button::setParent(), CheckBox::setParent(), RadioButton::setParent(), TextField::setParent(), SetupTab::SetupTab(), ShortcutContainer::ShortcutContainer(), StatsPage::StatsPage(), StatsPageBasic::StatsPageBasic(), VertContainer::VertContainer(), WidgetGroup::WidgetGroup(), and Window::Window().
|
inlinestatic |
|
protected |
Distributes an action event to all action listeners of the widget.
Definition at line 493 of file widget.cpp.
References FOR_EACH, mActionEventId, and mActionListeners.
Referenced by DropDown::action(), GuiTableActionListener::action(), SliderList::action(), ConfirmDialog::action(), OkDialog::action(), PincodeDialog::action(), TextDialog::action(), TextSelectDialog::action(), TextField::handleNormalKeys(), DropDown::hideDrop(), GuiTable::keyPressed(), IntTextField::keyPressed(), ListBox::keyPressed(), RadioButton::keyPressed(), Slider::keyPressed(), TextField::keyPressed(), Button::keyReleased(), RadioButton::mouseClicked(), Slider::mouseDragged(), AvatarListBox::mousePressed(), CharacterDisplay::mousePressed(), EmotePage::mousePressed(), GuiTable::mousePressed(), Slider::mousePressed(), Button::mouseReleased(), PlayerBox::mouseReleased(), SkillRectangleListBox::mouseReleased(), ListBox::mouseReleased1(), Slider::mouseWheelMovedDown(), Slider::mouseWheelMovedUp(), TextField::signalEvent(), CheckBox::toggleSelected(), and DropDown::updateSelection().
|
protected |
Distributes hidden events to all of the widget's listeners.
Definition at line 484 of file widget.cpp.
References FOR_EACH, and mWidgetListeners.
Referenced by setVisible().
|
protected |
Distributes moved events to all of the widget's listeners.
Definition at line 475 of file widget.cpp.
References FOR_EACH, and mWidgetListeners.
Referenced by setDimension().
|
protected |
Distributes resized events to all of the widget's listeners.
Definition at line 466 of file widget.cpp.
References FOR_EACH, and mWidgetListeners.
Referenced by setDimension(), and CharacterDisplay::update().
|
protected |
Distributes shown events to all of the widget's listeners.
Definition at line 502 of file widget.cpp.
References FOR_EACH, and mWidgetListeners.
Referenced by setVisible().
|
static |
Definition at line 355 of file widget.cpp.
References FOR_EACH, and mAllWidgets.
Referenced by Gui::videoResized().
|
pure virtual |
Draws the widget. It is called by the parent widget when it is time for the widget to draw itself. The graphics object is set up so that all drawing is relative to the widget, i.e coordinate (0,0) is the top left corner of the widget. It is not possible to draw outside of a widget's dimension.
graphics | aA graphics object to draw with. |
Implemented in EmoteShortcutContainer, AvatarListBox, Viewport, Viewport, OutfitWindow, MiniStatusWindow, Minimap, EquipmentWindow, CutInWindow, ConnectionDialog, ChatWindow, Window, VirtShortcutContainer, TextPreview, TextField, TextBox, Tab, TabbedArea, StaticBrowserBox, SpellShortcutContainer, SliderList, Slider, SkillRectangleListBox, SkillListBox, ShopListBox, ServersListBox, ScrollArea, RadioButton, ProgressIndicator, ProgressBar, Popup, PlayerBox, PasswordField, ListBox, Label, ItemShortcutContainer, ItemContainer, GuiTable, ExtendedListBox, EmotePage, DropDown, Desktop, ColorPage, CheckBox, Button, BrowserBox, BasicContainer2, DebugWindow, and Icon.
Referenced by GuiTable::draw().
|
inlinevirtual |
Called when a widget is given a chance to draw a frame around itself. The frame is not considered a part of the widget, it only allows a frame to be drawn around the widget, thus a frame will never be included when calculating if a widget should receive events from user input. Also a widget's frame will never be included when calculating a widget's position.
The size of the frame is calculated using the widget's frame size. If a widget has a frame size of 10 pixels than the area the drawFrame function can draw to will be the size of the widget with an additional extension of 10 pixels in each direction.
An example when drawFrame is a useful function is if a widget needs a glow around itself.
graphics | A graphics object to draw with. |
Reimplemented in TextField, ScrollArea, PlayerBox, and DropDown.
|
inlinevirtual |
|
inlinevirtual |
|
inlinevirtual |
|
virtual |
Gets the absolute position on the screen for the widget.
x | The absolute x coordinate will be stored in this parameter. |
y | The absolute y coordinate will be stored in this parameter. |
Definition at line 312 of file widget.cpp.
References getAbsolutePosition(), getChildrenArea(), mDimension, mParent, Rect::x, x, Rect::y, and y.
Referenced by Gui::distributeMouseEvent(), DropDown::dropDown(), getAbsolutePosition(), BrowserBox::getTextAtPos(), StaticBrowserBox::getTextAtPos(), Gui::getWidgetAt(), Gui::handleMouseMoved(), Gui::handleMousePressed(), Gui::handleMouseReleased(), Gui::handleMouseWheelMovedDown(), Gui::handleMouseWheelMovedUp(), Window::setLocationHorisontallyRelativeTo(), Popup::setLocationRelativeTo(), Window::setLocationRelativeTo(), and ChatWindow::updateVisibility().
|
inline |
Gets the action event identifier of the widget.
Definition at line 605 of file widget.h.
References mActionEventId.
Referenced by SetupItem::action(), SetupItemTextField::action(), SetupItemIntTextField::action(), PincodeDialog::action(), TextDialog::action(), SetupItem::getActionEventId(), CharCreateDialog::keyPressed(), CharSelectDialog::keyPressed(), EditServerDialog::keyPressed(), LoginDialog::keyPressed(), QuitDialog::keyPressed(), RegisterDialog::keyPressed(), ServerDialog::keyPressed(), UpdaterWindow::keyPressed(), WorldSelectDialog::keyPressed(), WindowMenu::loadButtons(), ServerDialog::mouseClicked(), TabStrip::nextTab(), TabStrip::prevTab(), MiniStatusWindow::saveBars(), WindowMenu::saveButtons(), and PopupMenu::showPopup().
|
inline |
Gets the background color.
Definition at line 433 of file widget.h.
References mBackgroundColor.
|
inline |
Gets the base color.
Definition at line 399 of file widget.h.
References mBaseColor.
|
virtual |
Gets the area of the widget occupied by the widget's children. By default this method returns an empty rectangle as not all widgets are containers. If you want to make a container this method should return the area where the children resides. This method is used when drawing children of a widget when computing clip rectangles for the children.
An example of a widget that overloads this method is ScrollArea. A ScrollArea has a view of its contant and that view is the children area. The size of a ScrollArea's children area might vary depending on if the scroll bars of the ScrollArea is shown or not.
Reimplemented in MiniStatusWindow, Window, ScrollArea, Popup, GuiTable, DropDown, and BasicContainer.
Definition at line 451 of file widget.cpp.
Referenced by getAbsolutePosition(), and TextBox::keyPressed().
|
inline |
Gets the dimension of the widget. The dimension is relative to the widget's parent.
Definition at line 317 of file widget.h.
References mDimension.
Referenced by Pincode::addButtons(), GuiTable::draw(), GuiTable::getWidgetAt(), Gui::handleMouseMoved(), Window::mouseDragged(), GuiTable::safeDraw(), and TabbedArea::widgetResized().
|
inline |
Gets the focus handler used.
WARNING: This function is used internally and should not be called or overloaded unless you know what you are doing.
Definition at line 474 of file widget.h.
References mFocusHandler.
Referenced by GuiTable::installActionListeners().
const std::list< FocusListener * > & Widget::getFocusListeners | ( | ) | const |
Gets the focus listeners of the widget.
Definition at line 446 of file widget.cpp.
References mFocusListeners.
Referenced by FocusHandler::distributeFocusGainedEvent(), and FocusHandler::distributeFocusLostEvent().
Font * Widget::getFont | ( | ) | const |
Gets the font set for the widget. If no font has been set, the global font will be returned. If no global font has been set, the default font will be returend.
Definition at line 331 of file widget.cpp.
References mCurrentFont, and mGlobalFont.
Referenced by BrowserBox::addRow(), StaticBrowserBox::addRow(), DropDown::adjustHeight(), TextField::adjustHeight(), Button::adjustSize(), CheckBox::adjustSize(), Label::adjustSize(), RadioButton::adjustSize(), TextBox::adjustSize(), TextField::adjustSize(), TextPreview::adjustSize(), BrowserBox::calcHeight(), ColorPage::ColorPage(), BrowserBox::draw(), Button::draw(), CheckBox::draw(), ColorPage::draw(), DropDown::draw(), ExtendedListBox::draw(), ItemContainer::draw(), ItemShortcutContainer::draw(), Label::draw(), ListBox::draw(), RadioButton::draw(), ServersListBox::draw(), ShopListBox::draw(), SkillListBox::draw(), SkillRectangleListBox::draw(), SpellShortcutContainer::draw(), StaticBrowserBox::draw(), TextBox::draw(), TextField::draw(), VirtShortcutContainer::draw(), EquipmentWindow::draw(), AvatarListBox::draw(), TextBox::drawCaret(), Viewport::drawPath(), TextField::fixScroll(), SliderList::getMaxLabelWidth(), ServersListBox::getRowHeight(), InventoryWindow::InventoryWindow(), ItemPopup::ItemPopup(), TextBox::keyPressed(), Label::Label(), ListBox::ListBox(), AvatarListBox::mousePressed(), SkillRectangleListBox::mousePressed(), TextBox::mousePressed(), TextField::mousePressed(), NpcDialog::NpcDialog(), OkDialog::OkDialog(), PincodeDialog::PincodeDialog(), StatusPopup::postInit(), TextBoxPopup::postInit(), TextPopup::postInit(), ConfirmDialog::postInit(), ProgressBar::ProgressBar(), Label::resizeTo(), Button::safeDraw(), ItemContainer::safeDraw(), ItemShortcutContainer::safeDraw(), SpellShortcutContainer::safeDraw(), VirtShortcutContainer::safeDraw(), EquipmentWindow::safeDraw(), AvatarListBox::safeDraw(), TextBox::scrollToCaret(), ItemPopup::setItem(), SpeechBubble::setText(), TextBox::setTextWrapped(), Setup_Colors::Setup_Colors(), ShopListBox::ShopListBox(), BeingPopup::show(), TextPopup::show(), SkillPopup::show(), SkillListBox::SkillListBox(), SkillPopup::SkillPopup(), SkillRectangleListBox::SkillRectangleListBox(), TextDialog::TextDialog(), TradeWindow::TradeWindow(), and StaticBrowserBox::updateHeight().
|
inline |
Gets the foreground color.
Definition at line 416 of file widget.h.
References mForegroundColor.
|
inline |
Gets the size of the widget's frame. The frame is not considered a part of the widget, it only allows a frame to be drawn around the widget, thus a frame will never be included when calculating if a widget should receive events from user input. Also a widget's frame will never be included when calculating a widget's position.
A frame size of 0 means that the widget has no frame. The default frame size is 0.
Definition at line 184 of file widget.h.
References mFrameSize.
Referenced by TabbedArea::adjustSize(), ChatWindow::adjustTabSize(), DropDown::drawFrame(), DropDown::dropDown(), ScrollArea::getHorizontalMaxScroll(), ScrollArea::getVerticalMaxScroll(), ScrollArea::logic(), DropDown::safeDrawFrame(), ScrollArea::showWidgetPart(), and TabbedArea::widgetResized().
|
inlinestatic |
|
inline |
Gets the height of the widget.
Definition at line 240 of file widget.h.
References Rect::height, and mDimension.
Referenced by VertContainer::add2(), WindowMenu::addButton(), TabbedArea::addTab(), DropDown::adjustHeight(), TextField::adjustHeight(), CheckBox::adjustSize(), TabbedArea::adjustSize(), Tab::adjustSize(), TextPreview::adjustSize(), TabbedArea::adjustTabPositions(), ChatWindow::adjustTabSize(), TabbedArea::adjustWidget(), BeingPopup::BeingPopup(), ChangeEmailDialog::ChangeEmailDialog(), CharCreateDialog::CharCreateDialog(), ScrollArea::checkPolicies(), GuiTable::draw(), Slider::draw(), TextBox::draw(), Viewport::draw(), CheckBox::drawBox(), RadioButton::drawBox(), TextBox::drawCaret(), DropDown::dropDown(), EditServerDialog::EditServerDialog(), EquipmentWindow::EquipmentWindow(), ScrollArea::getChildrenArea(), TabbedArea::getContainerHeight(), ScrollArea::getVerticalMarkerDimension(), ScrollArea::getVerticalMaxScroll(), Gui::handleMouseMoved(), BuySellDialog::init(), Window::loadWindowState(), Window::mouseDragged(), ChatWindow::mouseDragged(), ShortcutWindow::mouseDragged(), OkDialog::OkDialog(), LayoutArray::place(), ConfirmDialog::postInit(), EditDialog::postInit(), EquipmentWindow::postInit(), SetupWindow::postInit(), ProgressBar::ProgressBar(), EquipmentWindow::recalcSize(), CharacterViewNormal::resize(), CharacterViewSmall::resize(), Window::resizeToContent(), GuiTable::safeDraw(), Slider::safeDraw(), ChatTab::scroll(), ServerDialog::ServerDialog(), StaticTableModel::set(), CharCreateDialog::setAttributes(), Desktop::setBestFittingWallpaper(), CharCreateDialog::setButtonsPosition(), SpellPopup::setItem(), Popup::setLocationRelativeTo(), Window::setLocationRelativeTo(), SpeechBubble::setText(), ShopListBox::ShopListBox(), TextBoxPopup::show(), TextPopup::show(), PopupList::show(), PopupMenu::showPopup(), StatusWindow::StatusWindow(), StatusPopup::update(), MiniStatusWindow::updateBars(), WindowMenu::updateButtons(), StatsClanTab::updateClan(), RelationClanTab::updateClan(), SliderList::updateLabel(), ChatWindow::updateVisibility(), StatusPopup::view(), Desktop::widgetResized(), FlowContainer::widgetResized(), StatsPage::widgetResized(), StatsPageBasic::widgetResized(), TabbedArea::widgetResized(), SetupTabScroll::widgetResized(), EmoteWindow::widgetResized(), and SetupWindow::widgetResized().
|
inline |
Definition at line 919 of file widget.h.
References mId.
Referenced by RequestTradeListener::action(), MiniStatusWindow::mouseMoved(), and PopupMenu::showPopup().
|
virtual |
Gets the internal focus handler used.
Definition at line 456 of file widget.cpp.
References mInternalFocusHandler.
Referenced by Gui::getKeyEventSource().
const std::list< KeyListener * > & Widget::getKeyListeners | ( | ) | const |
Gets the key listeners of the widget.
Definition at line 441 of file widget.cpp.
References mKeyListeners.
Referenced by Gui::distributeKeyEvent().
const std::list< MouseListener * > & Widget::getMouseListeners | ( | ) | const |
Gets the mouse listeners of the widget.
Definition at line 436 of file widget.cpp.
References mMouseListeners.
Referenced by Gui::distributeMouseEvent().
|
inline |
Gets the widget's parent container.
Definition at line 202 of file widget.h.
References mParent.
Referenced by CharSelectDialog::action(), Window::center(), Window::centerHorisontally(), FocusHandler::checkForWindow(), Gui::distributeKeyEvent(), Gui::distributeMouseEvent(), Gui::handleModalFocusReleased(), Gui::handleMouseMoved(), TextBox::keyPressed(), Window::mousePressed(), ConfirmDialog::postInit(), PincodeDialog::postInit(), QuitDialog::postInit(), SkillDialog::postInit(), TextDialog::postInit(), WhoIsOnline::postInit(), and TextBox::setTextWrapped().
|
inlinevirtual |
Gets a widget from a certain position in the widget. This function is used to decide which gets mouse input, thus it can be overloaded to change that behaviour.
NOTE: This always returns NULL if the widget is not a container.
x | The x coordinate of the widget to get. |
y | The y coordinate of the widget to get. |
Reimplemented in ScrollArea, GuiTable, and BasicContainer.
Definition at line 792 of file widget.h.
Referenced by Gui::getWidgetAt().
|
inline |
Gets the width of the widget.
Definition at line 221 of file widget.h.
References mDimension, and Rect::width.
Referenced by HorizontContainer::add(), VertContainer::add2(), WindowMenu::addButton(), BrowserBox::addRow(), StaticBrowserBox::addRow(), TabbedArea::addTab(), WidgetGroup::addWidget(), CheckBox::adjustSize(), TabbedArea::adjustSize(), Tab::adjustSize(), TextField::adjustSize(), TabbedArea::adjustTabPositions(), ChatWindow::adjustTabSize(), TabbedArea::adjustWidget(), ChangeEmailDialog::ChangeEmailDialog(), CharacterViewNormal::CharacterViewNormal(), CharCreateDialog::CharCreateDialog(), CharSelectDialog::CharSelectDialog(), ChatWindow::ChatWindow(), ScrollArea::checkPolicies(), GuiTable::draw(), ServersListBox::draw(), SkillListBox::draw(), Slider::draw(), TextBox::draw(), Viewport::draw(), AvatarListBox::draw(), EditServerDialog::EditServerDialog(), SetupItem::fixFirstItemSize(), ScrollArea::getChildrenArea(), ScrollArea::getHorizontalMarkerDimension(), ScrollArea::getHorizontalMaxScroll(), Gui::handleMouseMoved(), Slider::init(), BuyDialog::init(), BuySellDialog::init(), InventoryWindow::InventoryWindow(), ItemAmountWindow::ItemAmountWindow(), Window::loadWindowState(), NpcDialog::logic(), ChatWindow::mouseDragged(), ShortcutWindow::mouseDragged(), SkillListBox::mousePressed(), Client::moveButtons(), OkDialog::OkDialog(), PincodeDialog::PincodeDialog(), LayoutArray::place(), SellDialog::postInit(), ConfirmDialog::postInit(), EditDialog::postInit(), EquipmentWindow::postInit(), SetupWindow::postInit(), CharacterViewNormal::resize(), CharacterViewSmall::resize(), SliderList::resize(), Window::resizeToContent(), GuiTable::safeDraw(), Slider::safeDraw(), AvatarListBox::safeDraw(), ServerDialog::ServerDialog(), StaticTableModel::set(), Desktop::setBestFittingWallpaper(), CharCreateDialog::setButtonsPosition(), ItemPopup::setItem(), SpellPopup::setItem(), Window::setLocationHorisontallyRelativeTo(), Popup::setLocationRelativeTo(), Window::setLocationRelativeTo(), SpeechBubble::setText(), Setup_Colors::Setup_Colors(), BeingPopup::show(), TextBoxPopup::show(), TextPopup::show(), SkillPopup::show(), PopupList::show(), PopupMenu::showPopup(), SkillDialog::SkillDialog(), StatusWindow::StatusWindow(), TextDialog::TextDialog(), StatusPopup::update(), CharacterDisplay::update(), TabbedArea::updateArrowEnableState(), MiniStatusWindow::updateBars(), WindowMenu::updateButtons(), SliderList::updateLabel(), ChatWindow::updateTabsMargin(), TabbedArea::updateTabsWidth(), ChatWindow::updateVisibility(), TabbedArea::updateVisibleTabsWidth(), Game::videoResized(), SpellPopup::view(), StatusPopup::view(), Desktop::widgetResized(), FlowContainer::widgetResized(), StatsPage::widgetResized(), StatsPageBasic::widgetResized(), TabbedArea::widgetResized(), SetupTabScroll::widgetResized(), VertContainer::widgetResized(), EmoteWindow::widgetResized(), InventoryWindow::widgetResized(), and SetupWindow::widgetResized().
|
inline |
Gets the x coordinate of the widget. The coordinate is relative to the widget's parent.
Definition at line 269 of file widget.h.
References mDimension, and Rect::x.
Referenced by ChangeEmailDialog::ChangeEmailDialog(), PopupMenu::handleLink(), InventoryWindow::mouseClicked(), Window::mouseDragged(), ChatWindow::mouseDragged(), ShortcutWindow::mouseDragged(), EquipmentWindow::mouseMoved(), WindowMenu::mousePressed(), EquipmentWindow::mousePressed(), MiniStatusWindow::mousePressed(), ConfirmDialog::postInit(), Window::resizeToContent(), CharCreateDialog::setButtonsPosition(), PopupMenu::showGMPopup(), PopupMenu::showMuteCommands(), PopupMenu::showPlayerMenu(), ScrollArea::showWidgetPart(), and MiniStatusWindow::updateBars().
|
inline |
Gets the y coordinate of the widget. The coordinate is relative to the widget's parent.
Definition at line 288 of file widget.h.
References mDimension, and Rect::y.
Referenced by ChangeEmailDialog::ChangeEmailDialog(), PopupMenu::handleLink(), InventoryWindow::mouseClicked(), Window::mouseDragged(), ChatWindow::mouseDragged(), ShortcutWindow::mouseDragged(), EquipmentWindow::mouseMoved(), WindowMenu::mousePressed(), EquipmentWindow::mousePressed(), MiniStatusWindow::mousePressed(), Window::resizeToContent(), PopupMenu::showGMPopup(), PopupMenu::showMuteCommands(), PopupMenu::showPlayerMenu(), ScrollArea::showWidgetPart(), StatusPopup::update(), MiniStatusWindow::updateBars(), and TabbedArea::widgetResized().
|
inline |
bool Widget::isEnabled | ( | ) | const |
Checks if the widget is enabled. A disabled widget will never recieve mouse or key events.
Definition at line 375 of file widget.cpp.
References isVisible(), and mEnabled.
Referenced by Setup_Video::action(), Gui::distributeKeyEvent(), Gui::distributeMouseEvent(), Button::draw(), isFocusable(), and Button::safeDraw().
bool Widget::isFocusable | ( | ) | const |
Checks if a widget is focsable.
Definition at line 199 of file widget.cpp.
References isEnabled(), isVisible(), and mFocusable.
Referenced by GuiTable::getWidgetAt(), Gui::handleKeyInput(), ListBox::refocus(), requestFocus(), FocusHandler::tabNext(), and FocusHandler::tabPrevious().
|
virtual |
Checks if the widget is focused.
Definition at line 184 of file widget.cpp.
References FocusHandler::isFocused(), and mFocusHandler.
Referenced by DropDown::draw(), TextBox::draw(), TextField::draw(), TextField::fixScroll(), TradeWindow::isInpupFocused(), ChatWindow::isInputFocused(), InventoryWindow::isInputFocused(), NpcDialog::isInputFocused(), NpcDialog::isTextInputFocused(), TabbedArea::keyPressed(), GuiTable::mouseWheelMovedDown(), GuiTable::mouseWheelMovedUp(), ChatWindow::requestChatFocus(), Button::safeDraw(), setFocusable(), setVisible(), and ChatWindow::toggleChatFocus().
|
virtual |
Checks if the widget or it's parent has modal focus.
Definition at line 408 of file widget.cpp.
References FocusHandler::getModalFocused(), isModalFocused(), mFocusHandler, and mParent.
Referenced by Gui::distributeKeyEvent(), Gui::distributeMouseEvent(), Gui::handleMousePressed(), isModalFocused(), FocusHandler::requestModalFocus(), FocusHandler::tabNext(), and FocusHandler::tabPrevious().
|
virtual |
Checks if the widget or it's parent has modal mouse input focus.
Definition at line 422 of file widget.cpp.
References FocusHandler::getModalMouseInputFocused(), isModalMouseInputFocused(), mFocusHandler, and mParent.
Referenced by Gui::distributeKeyEvent(), Gui::distributeMouseEvent(), Gui::getMouseEventSource(), and isModalMouseInputFocused().
|
inline |
|
inlinevirtual |
Reimplemented in ScrollArea.
Definition at line 945 of file widget.h.
References mSelectable.
Referenced by Gui::getWidgetAt(), and ScrollArea::isSelectable().
|
inline |
Checks if tab in is enabled. Tab in means that you can set focus to this widget by pressing the tab button. If tab in is disabled then the focus handler will skip this widget and focus the next in its focus order.
Definition at line 688 of file widget.h.
References mTabIn.
Referenced by FocusHandler::tabNext(), and FocusHandler::tabPrevious().
|
inline |
Checks if tab out is enabled. Tab out means that you can lose focus to this widget by pressing the tab button. If tab out is disabled then the FocusHandler ignores tabbing and focus will stay with this widget.
Definition at line 712 of file widget.h.
References mTabOut.
Referenced by FocusHandler::tabNext(), and FocusHandler::tabPrevious().
|
inline |
Checks if the widget is visible.
Definition at line 378 of file widget.h.
References isVisible(), mParent, mVisible, and Visible_true.
Referenced by Gui::handleMouseMoved(), isEnabled(), isFocusable(), isVisible(), ScrollArea::logic(), ChatInput::processVisible(), ChatWindow::requestChatFocus(), ChatWindow::toggleChatFocus(), and ChatWindow::updateVisibility().
|
inlinevirtual |
Called for all widgets in the gui each time Gui::logic is called. You can do logic stuff here like playing an animation.
Reimplemented in Viewport, Viewport, WhoIsOnline, UpdaterWindow, ServerDialog, NpcDialog, MiniStatusWindow, CutInWindow, CharCreateDialog, TargetDebugTab, StatDebugTab, NetDebugTab, MapDebugTab, DebugTab, TabbedArea, ScrollArea, ProgressIndicator, ProgressBar, ListBox, ItemContainer, and BasicContainer.
Definition at line 193 of file widget.h.
Referenced by ChatWindow::adjustTabSize(), Gui::logic(), ItemContainer::logic(), ScrollArea::logic(), and TextBox::setTextWrapped().
|
inlinevirtual |
Moves a widget in this widget to the bottom of this widget. The moved widget will be drawn below all other widgets in this widget.
widget | The widget to move to the bottom. |
Reimplemented in GuiTable, and BasicContainer.
Definition at line 877 of file widget.h.
Referenced by GuiTable::moveToBottom(), and requestMoveToBottom().
|
inlinevirtual |
Moves a widget to the top of this widget. The moved widget will be drawn above all other widgets in this widget.
widget | The widget to move to the top. |
Reimplemented in GuiTable, and BasicContainer.
Definition at line 867 of file widget.h.
Referenced by Window::mousePressed(), GuiTable::moveToTop(), ConfirmDialog::postInit(), PincodeDialog::postInit(), TextDialog::postInit(), and requestMoveToTop().
|
inlinevirtual |
Reimplemented in WorldSelectDialog, WhoIsOnline, UpdaterWindow, TextSelectDialog, TextDialog, TextCommandEditor, SocialWindow, SkillDialog, ShopWindow, SetupWindow, ServerInfoWindow, ServerDialog, RegisterDialog, QuitDialog, PincodeDialog, NpcDialog, LoginDialog, ItemAmountWindow, InventoryWindow, EquipmentWindow, EmoteWindow, EditServerDialog, EditDialog, DidYouKnowWindow, DebugWindow, ConnectionDialog, ConfirmDialog, ClanWindow, ChatWindow, CharSelectDialog, Window, TabbedArea, SellDialog, PopupList, Popup, ListBox, Desktop, TextPopup, TextBoxPopup, StatusPopup, SpellPopup, SpeechBubble, SkillPopup, PopupMenu, ItemPopup, and BeingPopup.
Definition at line 957 of file widget.h.
Referenced by callPostInit().
|
virtual |
Releases modal focus. Modal focus will only be released if the widget has modal focus.
Definition at line 394 of file widget.cpp.
References mFocusHandler, and FocusHandler::releaseModalFocus().
Referenced by PopupList::focusGained(), PopupList::mouseReleased(), setFocusHandler(), and Window::setModal().
|
virtual |
Releases modal mouse input focus. Modal mouse input focus will only be released if the widget has modal mouse input focus.
Definition at line 401 of file widget.cpp.
References mFocusHandler, and FocusHandler::releaseModalMouseInputFocus().
void Widget::removeActionListener | ( | ActionListener *const | actionListener | ) |
Removes an added action listener from the widget.
actionListener | The action listener to remove. |
Definition at line 257 of file widget.cpp.
References mActionListeners.
Referenced by GuiTableActionListener::~GuiTableActionListener().
void Widget::removeDeathListener | ( | WidgetDeathListener *const | deathListener | ) |
Removes an added death listener from the widget.
deathListener | The death listener to remove. |
Definition at line 267 of file widget.cpp.
References mDeathListeners.
void Widget::removeFocusListener | ( | FocusListener *const | focusListener | ) |
Removes an added focus listener from the widget.
focusListener | The focus listener to remove. |
Definition at line 287 of file widget.cpp.
References mFocusListeners.
Referenced by PopupList::~PopupList().
void Widget::removeKeyListener | ( | KeyListener *const | keyListener | ) |
Removes an added key listener from the widget.
keyListener | The key listener to remove. |
Definition at line 277 of file widget.cpp.
References mKeyListeners.
Referenced by CharacterViewNormal::~CharacterViewNormal(), CharacterViewSmall::~CharacterViewSmall(), and PopupList::~PopupList().
void Widget::removeMouseListener | ( | MouseListener *const | mouseListener | ) |
Removes an added mouse listener from the widget.
mouseListener | The mouse listener to remove. |
Definition at line 297 of file widget.cpp.
References mMouseListeners.
Referenced by Label::~Label().
void Widget::removeWidgetListener | ( | WidgetListener *const | widgetListener | ) |
Removes an added widget listener from the widget.
widgetListener | The widget listener to remove. |
Definition at line 307 of file widget.cpp.
References mWidgetListeners.
Referenced by Button::setWindow(), CheckBox::setWindow(), Label::setWindow(), RadioButton::setWindow(), TextField::setWindow(), Button::~Button(), CheckBox::~CheckBox(), Label::~Label(), LayoutHelper::~LayoutHelper(), Pincode::~Pincode(), RadioButton::~RadioButton(), TextField::~TextField(), and Window::~Window().
|
virtual |
Requests focus for the widget. A widget will only recieve focus if it is focusable.
Reimplemented in GuiTable, and CharacterDisplay.
Definition at line 204 of file widget.cpp.
References isFocusable(), mFocusHandler, and FocusHandler::requestFocus().
Referenced by EditServerDialog::action(), WrongDataNoticeListener::action(), ChangeEmailDialog::ChangeEmailDialog(), ChangePasswordDialog::ChangePasswordDialog(), PincodeManager::changePincode(), CharCreateDialog::CharCreateDialog(), DropDown::dropDown(), UpdaterWindow::enable(), ChatInput::focusLost(), Client::focusWindow(), Gui::handleMousePressed(), BuySellDialog::init(), TabbedArea::mousePressed(), OkDialog::OkDialog(), NpcDialog::parseListItems(), CharSelectDialog::postInit(), ConfirmDialog::postInit(), EditDialog::postInit(), EditServerDialog::postInit(), LoginDialog::postInit(), NpcDialog::postInit(), PincodeDialog::postInit(), QuitDialog::postInit(), RegisterDialog::postInit(), ServerDialog::postInit(), TextDialog::postInit(), UpdaterWindow::postInit(), WorldSelectDialog::postInit(), ChatWindow::requestChatFocus(), GuiTable::requestFocus(), PincodeManager::setNewPincode(), SellDialog::setVisible(), BuyDialog::setVisible(), BuySellDialog::setVisible(), TextSelectDialog::setVisible(), and PincodeManager::updateState().
void Widget::requestModalFocus | ( | ) |
Requests modal focus. When a widget has modal focus, only that widget and it's children may recieve input.
Exception | if another widget already has modal focus. |
Definition at line 380 of file widget.cpp.
References mFocusHandler, and FocusHandler::requestModalFocus().
Referenced by PincodeDialog::postInit(), QuitDialog::postInit(), TextDialog::postInit(), Window::setModal(), PopupList::show(), and Window::Window().
|
virtual |
Requests modal mouse input focus. When a widget has modal input focus that widget will be the only widget receiving input even if the input occurs outside of the widget and no matter what the input is.
Exception | if another widget already has modal focus. |
Definition at line 387 of file widget.cpp.
References mFocusHandler, and FocusHandler::requestModalMouseInputFocus().
|
virtual |
Requests a move to the bottom in the parent widget.
Definition at line 219 of file widget.cpp.
References moveToBottom(), and mParent.
Referenced by Game::Game().
|
virtual |
Requests a move to the top in the parent widget.
Definition at line 213 of file widget.cpp.
References moveToTop(), and mParent.
Referenced by FocusHandler::checkForWindow(), DropDown::dropDown(), ChatTab::handleHelp(), ItemLinkHandler::handleHelpLink(), ItemLinkHandler::handleSearchLink(), Popup::position(), EAthena::MailRecv::processMailOpen(), QuestsWindow::selectQuest(), TextBoxPopup::show(), TextPopup::show(), CutInWindow::show(), PopupList::show(), Actions::showHelpPage(), Actions::showHideWindow(), PopupMenu::showPopup(), Game::slowLogic(), SpellPopup::view(), and StatusPopup::view().
|
pure virtual |
Implemented in EmoteShortcutContainer, AvatarListBox, Viewport, Viewport, OutfitWindow, MiniStatusWindow, Minimap, EquipmentWindow, CutInWindow, ConnectionDialog, ChatWindow, Window, VirtShortcutContainer, TextPreview, TextField, TextBox, Tab, TabbedArea, StaticBrowserBox, SpellShortcutContainer, SliderList, Slider, SkillRectangleListBox, SkillListBox, ShopListBox, ServersListBox, ScrollArea, RadioButton, ProgressIndicator, ProgressBar, Popup, PlayerBox, PasswordField, ListBox, Label, ItemShortcutContainer, ItemContainer, GuiTable, ExtendedListBox, EmotePage, DropDown, Desktop, ColorPage, CheckBox, Button, BrowserBox, BasicContainer2, DebugWindow, and Icon.
Referenced by GuiTable::safeDraw().
|
inlinevirtual |
|
inline |
Sets the action event identifier of the widget. The identifier is used to be able to identify which action has occured.
NOTE: An action event identifier should not be used to identify a certain widget but rather a certain event in your application. Several widgets can have the same action event identifer.
actionEventId | The action event identifier. |
Definition at line 596 of file widget.h.
References mActionEventId.
Referenced by Setup_Video::action(), ConfirmDialog::action(), OkDialog::action(), PincodeDialog::action(), TextDialog::action(), WidgetGroup::addButton(), SkillDialog::addDefaultTab(), CharSelectDialog::askPasswordForDeletion(), Button::Button(), ChangeEmailDialog::ChangeEmailDialog(), ChangePasswordDialog::ChangePasswordDialog(), PincodeManager::changePincode(), CharacterDisplay::CharacterDisplay(), CharCreateDialog::CharCreateDialog(), ChatWindow::ChatWindow(), CheckBox::CheckBox(), MiniStatusWindow::createBar(), SetupItemIntTextField::createControls(), SetupItemDropDown::createControls(), SetupItemDropDownStr::createControls(), SetupItemSlider::createControls(), SetupItemSlider2::createControls(), SetupActionDropDown::createControls(), NpcDialog::createSkinControls(), DropDown::DropDown(), EquipmentWindow::EquipmentWindow(), PopupMenu::handleLink(), BuyDialog::init(), InventoryWindow::InventoryWindow(), SocialGuildTab::invite(), SocialPartyTab::invite(), ItemAmountWindow::ItemAmountWindow(), SkillDialog::loadXmlFile(), LoginDialog::LoginDialog(), NpcDialog::NpcDialog(), OutfitWindow::OutfitWindow(), PincodeDialog::PincodeDialog(), SellDialog::postInit(), EmoteWindow::postInit(), EquipmentWindow::postInit(), TextSelectDialog::postInit(), SliderList::postInit2(), QuestsWindow::QuestsWindow(), RegisterDialog::RegisterDialog(), PincodeManager::setNewPincode(), TradeWindow::setStatus(), Setup_Colors::Setup_Colors(), Setup_Input::Setup_Input(), Setup_Joystick::Setup_Joystick(), Setup_Relations::Setup_Relations(), Setup_Theme::Setup_Theme(), Setup_Video::Setup_Video(), ShopWindow::ShopWindow(), TextCommandEditor::TextCommandEditor(), TextField::TextField(), SocialWindow::updateMenu(), PincodeManager::updateState(), SkillDialog::useSkillDefault(), SkillDialog::useSkillPosition(), and SkillDialog::useSkillTarget().
|
inline |
Sets the background color.
color | The background Color. |
Definition at line 425 of file widget.h.
References mBackgroundColor.
Referenced by Setup_Relations::Setup_Relations().
|
inline |
Sets the base color of the widget.
color | The baseground color. |
Definition at line 390 of file widget.h.
References mBaseColor.
void Widget::setDimension | ( | const Rect & | dimension | ) |
Sets the dimension of the widget. The dimension is relative to the widget's parent.
dimension | The dimension of the widget. |
Definition at line 169 of file widget.cpp.
References distributeMovedEvent(), distributeResizedEvent(), Rect::height, mDimension, Rect::width, Rect::x, and Rect::y.
Referenced by CharCreateDialog::CharCreateDialog(), ClanWindow::ClanWindow(), GuiTable::draw(), EquipmentWindow::EquipmentWindow(), InfoClanTab::InfoClanTab(), MapDebugTab::MapDebugTab(), Window::mouseDragged(), NetDebugTab::NetDebugTab(), WhoIsOnline::postInit(), LayoutCell::reflow(), DebugTab::resize(), GuiTable::safeDraw(), ScrollArea::setDimension(), TabbedArea::setDimension(), setHeight(), setPosition(), setSize(), Setup_Audio::Setup_Audio(), Setup_Chat::Setup_Chat(), Setup_Colors::Setup_Colors(), Setup_Input::Setup_Input(), Setup_Joystick::Setup_Joystick(), Setup_Misc::Setup_Misc(), Setup_Mods::Setup_Mods(), Setup_Perfomance::Setup_Perfomance(), Setup_Players::Setup_Players(), Setup_Quick::Setup_Quick(), Setup_Relations::Setup_Relations(), Setup_Theme::Setup_Theme(), Setup_Touch::Setup_Touch(), Setup_Video::Setup_Video(), Setup_Visual::Setup_Visual(), setWidth(), setX(), setY(), StatDebugTab::StatDebugTab(), TargetDebugTab::TargetDebugTab(), WindowMenu::updateButtons(), EquipmentWindow::updatePage(), and WindowMenu::WindowMenu().
|
inline |
Sets the widget to enabled, or not. A disabled widget will never recieve mouse or key events.
enabled | True if widget should be enabled, false otherwise. |
Definition at line 352 of file widget.h.
References mEnabled.
Referenced by Setup_Input::action(), Setup_Video::action(), BuyDialog::action(), ChangeEmailDialog::action(), ChangePasswordDialog::action(), CharCreateDialog::action(), EditServerDialog::action(), RegisterDialog::action(), SkillDialog::action(), TradeWindow::action(), WhoIsOnline::action(), WorldSelectDialog::action(), ShopWindow::announce(), Setup_Video::apply(), Setup_Video::cancel(), ServerDialog::connectToSelectedServer(), UpdaterWindow::enable(), MailEditWindow::focusLost(), BuyDialog::init(), IntTextField::IntTextField(), LoginDialog::keyPressed(), RegisterDialog::keyPressed(), MailEditWindow::MailEditWindow(), Setup_Input::newKeyCallback(), PincodeDialog::PincodeDialog(), SellDialog::postInit(), EquipmentWindow::postInit(), LoginDialog::postInit(), RegisterDialog::postInit(), TextSelectDialog::postInit(), WhoIsOnline::postInit(), LoginDialog::prepareUpdate(), MailWindow::refreshMails(), TradeWindow::reset(), NpcSellDialog::sellManyItems(), SetupWindow::setInGame(), MailWindow::setLastPage(), CharSelectDialog::setLocked(), EquipmentWindow::setSelected(), TradeWindow::setStatus(), Setup_Joystick::setTempEnabled(), MailEditWindow::setTo(), Setup_Colors::Setup_Colors(), Setup_Input::Setup_Input(), Setup_Joystick::Setup_Joystick(), Setup_Video::Setup_Video(), SkillDialog::SkillDialog(), WhoIsOnline::slowLogic(), CharCreateDialog::unlock(), ChangeDisplay::update(), TabbedArea::updateArrowEnableState(), PincodeDialog::updateButtons(), InventoryWindow::updateButtons(), SellDialog::updateButtonsAndLabels(), BuyDialog::updateButtonsAndLabels(), ShopWindow::updateButtonsAndLabels(), TextSelectDialog::updateButtonsAndLabels(), Setup_Colors::updateGradType(), Setup_Theme::updateInfo(), UpdaterWindow::UpdaterWindow(), CharCreateDialog::updateSliders(), CharSelectDialog::updateState(), SkillDialog::updateTabSelection(), ShopWindow::updateTimes(), MailEditWindow::validatedTo(), Setup_Colors::valueChanged(), ServerDialog::valueChanged(), and WorldSelectDialog::WorldSelectDialog().
void Widget::setFocusable | ( | const bool | focusable | ) |
Sets the widget to be fosusable, or not.
focusable | True if the widget should be focusable, false otherwise. |
Definition at line 192 of file widget.cpp.
References FocusHandler::focusNone(), isFocused(), mFocusable, and mFocusHandler.
Referenced by WindowMenu::addButton(), BrowserBox::BrowserBox(), CharSelectDialog::CharSelectDialog(), CheckBox::CheckBox(), DropDown::DropDown(), GuiTable::GuiTable(), Button::init(), Slider::init(), Tab::init(), ItemContainer::ItemContainer(), ListBox::ListBox(), NpcDialog::NpcDialog(), PopupList::PopupList(), Gui::postInit(), RadioButton::RadioButton(), StaticBrowserBox::StaticBrowserBox(), TabbedArea::TabbedArea(), TextBox::TextBox(), TextField::TextField(), Viewport::Viewport(), and WindowMenu::WindowMenu().
|
virtual |
Sets the focus handler to be used.
WARNING: This function is used internally and should not be called or overloaded unless you know what you are doing.
focusHandler | The focus handler to use. |
Reimplemented in GuiTable, and BasicContainer.
Definition at line 238 of file widget.cpp.
References FocusHandler::add(), mFocusHandler, releaseModalFocus(), and FocusHandler::remove().
Referenced by BasicContainer::setFocusHandler(), GuiTable::setFocusHandler(), Gui::setTop(), and ~Widget().
void Widget::setFont | ( | Font *const | font | ) |
Sets the font for the widget. If NULL is passed, the global font will be used.
font | The font to set for the widget. |
Definition at line 349 of file widget.cpp.
References fontChanged(), and mCurrentFont.
Referenced by BeingPopup::BeingPopup(), NpcDialog::createSkinControls(), DidYouKnowWindow::DidYouKnowWindow(), HelpWindow::HelpWindow(), ItemPopup::ItemPopup(), NpcDialog::NpcDialog(), ServerInfoWindow::ServerInfoWindow(), Tab::setLabelFont(), Setup_Input::Setup_Input(), BeingPopup::show(), SkillPopup::SkillPopup(), SpeechBubble::SpeechBubble(), and SpellPopup::SpellPopup().
|
inline |
Sets the foreground color.
color | The foreground color. |
Definition at line 408 of file widget.h.
References mForegroundColor.
|
inline |
Sets the size of the widget's frame. The frame is not considered a part of the widget, it only allows a frame to be drawn around the widget, thus a frame will never be included when calculating if a widget should receive events from user input. Also a widget's frame will never be included when calculating a widget's position.
A frame size of 0 means that the widget has no frame. The default frame size is 0.
frameSize | The size of the widget's frame. |
Definition at line 168 of file widget.h.
References mFrameSize.
Referenced by Button::init(), Slider::init(), Tab::init(), PlayerBox::init(), ScrollArea::setOpaque(), TextBox::TextBox(), TextField::TextField(), and Window::Window().
|
static |
Sets the global font to be used by default for all widgets.
font | The global font. |
Definition at line 338 of file widget.cpp.
References FOR_EACH, mAllWidgets, and mGlobalFont.
Referenced by Gui::postInit().
void Widget::setHeight | ( | const int | height | ) |
Sets the height of the widget.
height | The height of the widget. |
Definition at line 140 of file widget.cpp.
References Rect::height, mDimension, and setDimension().
Referenced by VertContainer::add2(), BrowserBox::addRow(), DropDown::adjustHeight(), ItemContainer::adjustHeight(), TextField::adjustHeight(), Button::adjustSize(), CheckBox::adjustSize(), ColorPage::adjustSize(), ExtendedListBox::adjustSize(), Label::adjustSize(), ListBox::adjustSize(), RadioButton::adjustSize(), ShopListBox::adjustSize(), TextBox::adjustSize(), TextPreview::adjustSize(), CharacterDisplay::CharacterDisplay(), CharacterViewNormal::CharacterViewNormal(), CharacterViewSmall::CharacterViewSmall(), CharCreateDialog::CharCreateDialog(), BrowserBox::clearRows(), StaticBrowserBox::clearRows(), ColorPage::ColorPage(), SetupItemSlider::createControls(), SetupItemSlider2::createControls(), NpcDialog::createSkinControls(), BrowserBox::draw(), SkillRectangleListBox::draw(), DropDown::DropDown(), HorizontContainer::HorizontContainer(), ItemAmountWindow::ItemAmountWindow(), Label::Label(), ScrollArea::logic(), NpcDialog::logic(), NpcDialog::NpcDialog(), EmoteWindow::postInit(), ProgressBar::ProgressBar(), GuiTable::recomputeDimensions(), Label::resizeTo(), Window::saveWindowState(), ScrollArea::setHeight(), TabbedArea::setHeight(), Minimap::setMap(), TextPopup::show(), NpcDialog::showAvatar(), SkillRectangleListBox::SkillRectangleListBox(), SliderList::SliderList(), TextCommandEditor::TextCommandEditor(), StatusPopup::update(), BrowserBox::updateHeight(), WidgetGroup::WidgetGroup(), FlowContainer::widgetResized(), and ShortcutContainer::widgetResized().
|
inline |
Sets an id of a widget. An id can be useful if a widget needs to be identified in a container. For example, if widgets are created by an XML document, a certain widget can be retrieved given that the widget has an id.
id | The id to set to the widget. |
Definition at line 916 of file widget.h.
References mId.
Referenced by MiniStatusWindow::createBar().
void Widget::setInternalFocusHandler | ( | FocusHandler *const | internalFocusHandler | ) |
Sets the internal focus handler. An internal focus handler is needed if both a widget in the widget and the widget itself should be foucsed at the same time.
focusHandler | The internal focus handler to be used. |
Definition at line 461 of file widget.cpp.
References mInternalFocusHandler.
Referenced by BasicContainer::setInternalFocusHandler().
|
inline |
Definition at line 936 of file widget.h.
References mMouseConsume.
Referenced by PopupList::PopupList().
|
inlinevirtual |
Sets the parent of the widget. A parent must be a BasicContainer.
WARNING: This function is used internally and should not be called or overloaded unless you know what you are doing.
parent | The parent of the widget. |
Reimplemented in TextField, RadioButton, CheckBox, Button, and Label.
Definition at line 626 of file widget.h.
References mParent.
Referenced by Label::setParent(), Button::setParent(), CheckBox::setParent(), RadioButton::setParent(), TextField::setParent(), and GuiTableActionListener::~GuiTableActionListener().
void Widget::setPosition | ( | const int | x, |
const int | y | ||
) |
Sets position of the widget. The position is relative to the widget's parent.
x | The x coordinate of the widget. |
y | The y coordinate of the widget. |
Definition at line 161 of file widget.cpp.
References mDimension, setDimension(), Rect::x, x, Rect::y, and y.
Referenced by HorizontContainer::add(), VertContainer::add2(), WindowMenu::addButton(), Pincode::addButtons(), BeingPopup::addLabels(), ShortcutWindow::addTab(), WidgetGroup::addWidget(), BasicContainer2::addXY(), TabbedArea::adjustSize(), TabbedArea::adjustTabPositions(), ChatWindow::adjustTabSize(), BeingPopup::BeingPopup(), ChangeEmailDialog::ChangeEmailDialog(), CharCreateDialog::CharCreateDialog(), ChatWindow::ChatWindow(), NpcDialog::createSkinControls(), Tab::init(), BuySellDialog::init(), ItemPopup::ItemPopup(), Window::loadWindowState(), ScrollArea::logic(), Window::mouseDragged(), ChatWindow::mouseDragged(), ShortcutWindow::mouseDragged(), Client::moveButtons(), OkDialog::OkDialog(), PopupList::PopupList(), Popup::position(), TextPopup::postInit(), ConfirmDialog::postInit(), EditDialog::postInit(), EmoteWindow::postInit(), EquipmentWindow::postInit(), SetupWindow::postInit(), Window::resetToDefaultSize(), CharacterViewSmall::resize(), SliderList::resize(), CharCreateDialog::setButtonsPosition(), ScrollArea::setContent(), ItemPopup::setItem(), SpellPopup::setItem(), Window::setLocationHorisontallyRelativeTo(), Popup::setLocationRelativeTo(), Window::setLocationRelativeTo(), SpeechBubble::setText(), ShortcutWindow::ShortcutWindow(), TextBoxPopup::show(), TextPopup::show(), SkillPopup::show(), CutInWindow::show(), PopupList::show(), PopupMenu::showPopup(), SkillPopup::SkillPopup(), MiniStatusWindow::updateBars(), WindowMenu::updateButtons(), StatsClanTab::updateClan(), RelationClanTab::updateClan(), SliderList::updateLabel(), Game::videoResized(), SpellPopup::view(), StatusPopup::view(), TabbedArea::widgetResized(), and SetupWindow::widgetResized().
|
inline |
Definition at line 942 of file widget.h.
References mRedraw.
Referenced by ShortcutWindow::widgetMoved().
|
inline |
Definition at line 948 of file widget.h.
References mSelectable.
Referenced by AttrDisplay::AttrDisplay(), ClanWindow::ClanWindow(), DebugTab::DebugTab(), DebugWindow::DebugWindow(), EquipmentWindow::EquipmentWindow(), InfoClanTab::InfoClanTab(), Label::init(), InventoryWindow::InventoryWindow(), Pincode::Pincode(), SetupWindow::postInit(), SocialWindow::postInit(), WhoIsOnline::postInit(), RelationClanTab::RelationClanTab(), SetupTab::SetupTab(), SetupTabScroll::SetupTabScroll(), ShopWindow::ShopWindow(), SkillDialog::SkillDialog(), StatsClanTab::StatsClanTab(), StatsPage::StatsPage(), StatsPageBasic::StatsPageBasic(), and StatusWindow::StatusWindow().
void Widget::setSize | ( | const int | width, |
const int | height | ||
) |
Sets the size of the widget.
width | The width of the widget. |
height | The height of the widget. |
Definition at line 367 of file widget.cpp.
References Rect::height, mDimension, setDimension(), and Rect::width.
Referenced by FlowContainer::add(), VertContainer::add2(), TabbedArea::addTab(), Pincode::adjustSize(), TabbedArea::adjustSize(), Tab::adjustSize(), ChatWindow::adjustTabSize(), TabbedArea::adjustWidget(), AttrDisplay::AttrDisplay(), Game::Game(), Icon::Icon(), Window::loadWindowState(), WhoIsOnline::postInit(), Gui::postInit(), ProgressBar::ProgressBar(), ProgressIndicator::ProgressIndicator(), LayoutHelper::reflowLayout(), Window::resetToDefaultSize(), Window::resizeToContent(), WindowManager::resizeVideo(), Popup::setContentSize(), Window::setContentSize(), Icon::setImage(), TabbedArea::setSize(), CutInWindow::show(), Client::stateGame(), Client::stateGame1(), StaticBrowserBox::updateHeight(), WhoIsOnline::updateSize(), Game::videoResized(), Desktop::widgetResized(), ScrollArea::widgetResized(), StatsPage::widgetResized(), StatsPageBasic::widgetResized(), TabbedArea::widgetResized(), and EmoteWindow::widgetResized().
|
inline |
Sets tab in enabled, or not. Tab in means that you can set focus to this widget by pressing the tab button. If tab in is disabled then the FocusHandler will skip this widget and focus the next in its focus order.
enabled | True if tab in should be enabled, false otherwise. |
Definition at line 700 of file widget.h.
References mTabIn.
|
inline |
Sets tab out enabled. Tab out means that you can lose focus to this widget by pressing the tab button. If tab out is disabled then the FocusHandler ignores tabbing and focus will stay with this widget.
enabled | True if tab out should be enabled, false otherwise. |
Definition at line 724 of file widget.h.
References mTabOut.
void Widget::setVisible | ( | Visible | visible | ) |
Sets the widget to be visible, or not.
visible | True if widget should be visible, false otherwise. |
Definition at line 225 of file widget.cpp.
References distributeHiddenEvent(), distributeShownEvent(), FocusHandler::focusNone(), isFocused(), mFocusHandler, mVisible, Visible_false, and Visible_true.
Referenced by ChatWindow::action(), LoginDialog::action(), SkillDialog::addDefaultTab(), SkillDialog::addSkill(), ChatWindow::adjustTabSize(), CharacterViewNormal::CharacterViewNormal(), CharacterViewSmall::CharacterViewSmall(), CharCreateDialog::CharCreateDialog(), CharSelectDialog::CharSelectDialog(), ChatWindow::ChatWindow(), PopupList::focusGained(), ItemLinkHandler::handleItemLink(), PopupMenu::handleLink(), Popup::hide(), PopupManager::hideBeingPopup(), DropDown::hideDrop(), PopupManager::hidePopupMenu(), PopupManager::hideTextPopup(), MiniStatusWindow::loadBars(), WindowMenu::loadButtons(), SkillDialog::loadXmlFile(), LoginDialog::LoginDialog(), CharacterDisplay::mouseExited(), EmoteShortcutContainer::mouseExited(), ItemContainer::mouseExited(), ItemShortcutContainer::mouseExited(), SpellShortcutContainer::mouseExited(), VirtShortcutContainer::mouseExited(), EquipmentWindow::mouseExited(), ItemAmountWindow::mouseExited(), ItemPopup::mouseMoved(), SkillPopup::mouseMoved(), SpellPopup::mouseMoved(), TextBoxPopup::mouseMoved(), TextPopup::mouseMoved(), CharacterDisplay::mouseMoved(), EmoteShortcutContainer::mouseMoved(), ItemContainer::mouseMoved(), ItemShortcutContainer::mouseMoved(), ShopListBox::mouseMoved(), SpellShortcutContainer::mouseMoved(), VirtShortcutContainer::mouseMoved(), EquipmentWindow::mouseMoved(), EquipmentWindow::mousePressed(), PopupList::mouseReleased(), NpcDialog::NpcDialog(), Popup::Popup(), Popup::position(), MailViewWindow::removeMoney(), CharCreateDialog::setAttributes(), EquipmentWindow::setSelected(), Window::setVisible(), ChatInput::setVisible(), CharacterViewSmall::show(), BeingPopup::show(), TextBoxPopup::show(), TextPopup::show(), PopupList::show(), MiniStatusWindow::showBar(), PopupMenu::showChangePos(), TextCommandEditor::showControls(), PopupMenu::showPopup(), TabbedArea::updateArrowEnableState(), MailViewWindow::updateAttachButton(), EquipmentWindow::updatePage(), Setup_Colors::valueChanged(), SpellPopup::view(), StatusPopup::view(), CharacterDisplay::widgetHidden(), EmoteShortcutContainer::widgetHidden(), ItemShortcutContainer::widgetHidden(), SpellShortcutContainer::widgetHidden(), VirtShortcutContainer::widgetHidden(), InventoryWindow::widgetHidden(), InventoryWindow::widgetResized(), and WindowMenu::WindowMenu().
void Widget::setWidth | ( | const int | width | ) |
Sets the width of the widget.
width | The width of the widget. |
Definition at line 133 of file widget.cpp.
References mDimension, setDimension(), and Rect::width.
Referenced by StaticBrowserBox::addRow(), Button::adjustSize(), CheckBox::adjustSize(), Label::adjustSize(), PopupList::adjustSize(), RadioButton::adjustSize(), SliderList::adjustSize(), TextBox::adjustSize(), TextField::adjustSize(), ChatWindow::adjustTabSize(), AvatarListBox::AvatarListBox(), BrowserBox::calcHeight(), ChangeEmailDialog::ChangeEmailDialog(), CharacterDisplay::CharacterDisplay(), CharacterViewNormal::CharacterViewNormal(), CharCreateDialog::CharCreateDialog(), CharSelectDialog::CharSelectDialog(), BrowserBox::clearRows(), StaticBrowserBox::clearRows(), SetupItemTextField::createControls(), SetupItemIntTextField::createControls(), SetupItemDropDown::createControls(), SetupItemDropDownStr::createControls(), SetupItemSlider::createControls(), SetupItemSlider2::createControls(), SetupActionDropDown::createControls(), NpcDialog::createSkinControls(), SkillRectangleListBox::draw(), AvatarListBox::draw(), DropDown::dropDown(), DropDown::DropDown(), SetupItem::fixFirstItemSize(), BuyDialog::init(), IntTextField::IntTextField(), ItemAmountWindow::ItemAmountWindow(), Label::Label(), ListBox::ListBox(), ScrollArea::logic(), NpcDialog::logic(), MailEditWindow::MailEditWindow(), NpcDialog::NpcDialog(), SellDialog::postInit(), EditDialog::postInit(), EmoteWindow::postInit(), QuestsWindow::QuestsWindow(), EquipmentWindow::recalcSize(), GuiTable::recomputeDimensions(), SliderList::resize(), Label::resizeTo(), AvatarListBox::safeDraw(), Window::saveWindowState(), ItemPopup::setItem(), Minimap::setMap(), Setup_Colors::Setup_Colors(), Setup_Video::Setup_Video(), ScrollArea::setWidth(), TabbedArea::setWidth(), TextPopup::show(), NpcDialog::showAvatar(), PopupMenu::showPopup(), SkillRectangleListBox::SkillRectangleListBox(), TextCommandEditor::TextCommandEditor(), TradeWindow::TradeWindow(), StatusPopup::update(), WhoIsOnline::updateSize(), and FlowContainer::widgetResized().
void Widget::setX | ( | const int | x | ) |
Sets the x coordinate of the widget. The coordinate is relateive to the widget's parent.
x | The x coordinate of the widget. |
Definition at line 147 of file widget.cpp.
References mDimension, setDimension(), Rect::x, and x.
void Widget::setY | ( | const int | y | ) |
Sets the y coordinate of the widget. The coordinate is relative to the widget's parent.
y | The y coordinate of the widget. |
Definition at line 154 of file widget.cpp.
References mDimension, setDimension(), Rect::y, and y.
|
virtual |
Shows a certain part of a widget in the widget's parent. Used when widgets want a specific part to be visible in its parent. An example is a TextArea that wants a specific part of its text to be visible when a TextArea is a child of a ScrollArea.
rectangle | The rectangle to be shown. |
Definition at line 511 of file widget.cpp.
References mParent, and showWidgetPart().
Referenced by ChatTab::scroll(), TextBox::scrollToCaret(), NpcSellDialog::sellOneItem(), and ListBox::setSelected().
Tries to show a specific part of a widget by moving it. Used if the widget should act as a container.
widget | The target widget. |
area | The area to show. |
Reimplemented in ScrollArea, and BasicContainer.
Definition at line 903 of file widget.h.
Referenced by showPart().
|
static |
Checks if a widget exists or not, that is if it still exists an instance of the object.
widget | The widget to check. |
Definition at line 361 of file widget.cpp.
References mAllWidgetsSet.
Referenced by Gui::distributeKeyEvent(), Gui::distributeMouseEvent(), PopupMenu::handleLink(), Gui::handleModalFocusGained(), Gui::handleModalFocusReleased(), Gui::handleMouseMoved(), and Gui::~Gui().
void Widget::windowResized | ( | ) |
|
friend |
|
protected |
Holds the action event of the widget.
Definition at line 1106 of file widget.h.
Referenced by WidgetGroup::addButton(), distributeActionEvent(), getActionEventId(), PlayerBox::mouseReleased(), and setActionEventId().
|
protected |
Holds the action listeners of the widget.
Definition at line 1034 of file widget.h.
Referenced by WidgetGroup::action(), EditDialog::action(), addActionListener(), distributeActionEvent(), and removeActionListener().
|
protected |
Definition at line 1160 of file widget.h.
Referenced by BrowserBox::BrowserBox(), CheckBox::CheckBox(), DropDown::DropDown(), EmotePage::EmotePage(), GuiTable::GuiTable(), Icon::Icon(), Button::init(), Label::init(), Slider::init(), PlayerBox::init(), isAllowLogic(), ItemContainer::ItemContainer(), Pincode::Pincode(), PopupList::PopupList(), RadioButton::RadioButton(), ShortcutContainer::ShortcutContainer(), SliderList::SliderList(), StaticBrowserBox::StaticBrowserBox(), TabStrip::TabStrip(), TextBox::TextBox(), TextField::TextField(), and TextPreview::TextPreview().
|
staticprivate |
Holds a list of all instances of widgets.
Definition at line 1177 of file widget.h.
Referenced by distributeWindowResizeEvent(), setGlobalFont(), Widget(), and ~Widget().
|
staticprivate |
Definition at line 1179 of file widget.h.
Referenced by Widget(), widgetExists(), and ~Widget().
|
protected |
Holds the background color of the widget.
Definition at line 1091 of file widget.h.
Referenced by BrowserBox::BrowserBox(), Desktop::Desktop(), BrowserBox::draw(), GuiTable::draw(), ProgressBar::draw(), ShopListBox::draw(), StaticBrowserBox::draw(), TextBox::draw(), OutfitWindow::draw(), ProgressBar::getBackgroundColor(), getBackgroundColor(), GuiTable::GuiTable(), ProgressBar::logic(), OutfitWindow::OutfitWindow(), ProgressBar::ProgressBar(), GuiTable::safeDraw(), ProgressBar::safeDraw(), OutfitWindow::safeDraw(), ProgressBar::setBackgroundColor(), setBackgroundColor(), ShopListBox::ShopListBox(), and StaticBrowserBox::StaticBrowserBox().
|
protected |
Holds the base color of the widget.
Definition at line 1096 of file widget.h.
Referenced by BasicContainer2::draw(), getBaseColor(), BasicContainer2::safeDraw(), and setBaseColor().
|
protected |
|
protected |
Holds the death listeners of the widget.
Definition at line 1049 of file widget.h.
Referenced by addDeathListener(), removeDeathListener(), and ~Widget().
|
protected |
Holds the dimension of the widget.
Definition at line 1101 of file widget.h.
Referenced by VertContainer::add2(), Window::adjustPositionAfterResize(), PopupList::adjustSize(), TabbedArea::adjustSize(), Window::adjustSizeToScreen(), BrowserBox::calcHeight(), ScrollArea::calcHMarker(), ScrollArea::calcVMarker(), ClanWindow::ClanWindow(), DebugWindow::DebugWindow(), Icon::draw(), DebugWindow::draw(), BasicContainer2::draw(), BrowserBox::draw(), Button::draw(), ColorPage::draw(), Desktop::draw(), DropDown::draw(), EmotePage::draw(), ExtendedListBox::draw(), GuiTable::draw(), Label::draw(), ListBox::draw(), PlayerBox::draw(), Popup::draw(), ProgressBar::draw(), ProgressIndicator::draw(), ShopListBox::draw(), Slider::draw(), SliderList::draw(), StaticBrowserBox::draw(), Tab::draw(), TextPreview::draw(), Window::draw(), DropDown::drawButton(), DropDown::drawFrame(), PlayerBox::drawFrame(), ScrollArea::drawFrame(), TextField::drawFrame(), ScrollArea::drawHMarker(), ScrollArea::drawVMarker(), DropDown::dropDown(), Window::ensureOnScreen(), TextField::fixScroll(), getAbsolutePosition(), BasicContainer::getChildrenArea(), DropDown::getChildrenArea(), GuiTable::getChildrenArea(), Popup::getChildrenArea(), Window::getChildrenArea(), MiniStatusWindow::getChildrenArea(), getDimension(), ScrollArea::getDownButtonDimension(), getHeight(), ScrollArea::getHorizontalBarDimension(), ScrollArea::getHorizontalMarkerDimension(), EmotePage::getIndexFromGrid(), ScrollArea::getLeftButtonDimension(), Window::getResizeHandles(), ScrollArea::getRightButtonDimension(), ItemContainer::getSlotByXY(), ItemContainer::getSlotIndex(), ScrollArea::getUpButtonDimension(), ScrollArea::getVerticalBarDimension(), ScrollArea::getVerticalMarkerDimension(), getWidth(), Window::getWindowArea(), getX(), getY(), Window::loadWindowState(), ScrollArea::logic(), Slider::markerPositionToValue(), Slider::mouseDragged(), Window::mouseDragged(), WindowMenu::mouseMoved(), InventoryWindow::mouseMoved(), Minimap::mouseMoved(), MiniStatusWindow::mouseMoved(), Slider::mousePressed(), DropDown::mouseReleased(), Popup::position(), CharacterViewSmall::resize(), Icon::safeDraw(), DebugWindow::safeDraw(), BasicContainer2::safeDraw(), Button::safeDraw(), EmotePage::safeDraw(), GuiTable::safeDraw(), Popup::safeDraw(), ProgressBar::safeDraw(), ProgressIndicator::safeDraw(), Slider::safeDraw(), SliderList::safeDraw(), Tab::safeDraw(), Window::safeDraw(), DropDown::safeDrawFrame(), PlayerBox::safeDrawFrame(), ScrollArea::safeDrawFrame(), TextField::safeDrawFrame(), Window::saveWindowState(), Desktop::setBestFittingWallpaper(), Window::setDefaultSize(), setDimension(), setHeight(), Window::setLocationHorisontallyRelativeTo(), Popup::setLocationRelativeTo(), Window::setLocationRelativeTo(), Minimap::setMap(), setPosition(), Window::setResizable(), setSize(), Window::setVisible(), setWidth(), setX(), setY(), TextBoxPopup::show(), TextPopup::show(), PopupList::show(), TabbedArea::updateArrowEnableState(), BrowserBox::updateHeight(), StaticBrowserBox::updateHeight(), SliderList::updateLabel(), ItemContainer::updateSize(), Slider::valueToMarkerPosition(), SpellPopup::view(), ScrollArea::widgetResized(), ShortcutContainer::widgetResized(), TabbedArea::widgetResized(), Window::widgetResized(), ClanWindow::widgetResized(), DebugWindow::widgetResized(), and EmoteWindow::widgetResized().
|
protected |
True if the widget is enabled, false otherwise.
Definition at line 1158 of file widget.h.
Referenced by CheckBox::drawBox(), RadioButton::drawBox(), isEnabled(), and setEnabled().
|
protected |
True if the widget focusable, false otherwise.
Definition at line 1143 of file widget.h.
Referenced by isFocusable(), and setFocusable().
|
protected |
Holds the focus handler used by the widget.
Definition at line 1116 of file widget.h.
Referenced by ChatWindow::action(), getFocusHandler(), isFocused(), isModalFocused(), isModalMouseInputFocused(), ListBox::refocus(), releaseModalFocus(), releaseModalMouseInputFocus(), GuiTable::requestFocus(), requestFocus(), requestModalFocus(), requestModalMouseInputFocus(), setFocusable(), setFocusHandler(), setVisible(), and Window::widgetHidden().
|
protected |
Holds the focus listeners of the widget.
Definition at line 1064 of file widget.h.
Referenced by addFocusListener(), getFocusListeners(), and removeFocusListener().
|
protected |
Holds the foreground color of the widget.
Definition at line 1086 of file widget.h.
Referenced by AvatarListBox::AvatarListBox(), BrowserBox::BrowserBox(), BrowserBox::calcHeight(), CheckBox::CheckBox(), CheckBox::draw(), DropDown::draw(), ExtendedListBox::draw(), ItemShortcutContainer::draw(), Label::draw(), ListBox::draw(), ProgressBar::draw(), RadioButton::draw(), ServersListBox::draw(), ShopListBox::draw(), SpellShortcutContainer::draw(), TextBox::draw(), TextField::draw(), Window::draw(), AvatarListBox::draw(), TextBox::drawCaret(), DropDown::DropDown(), getForegroundColor(), Label::init(), ListBox::ListBox(), ProgressBar::ProgressBar(), RadioButton::RadioButton(), ItemShortcutContainer::safeDraw(), ProgressBar::safeDraw(), SpellShortcutContainer::safeDraw(), Window::safeDraw(), AvatarListBox::safeDraw(), ProgressBar::setColor(), Label::setForegroundColor(), TextBox::setForegroundColor(), setForegroundColor(), BrowserBox::setForegroundColorAll(), Label::setForegroundColorAll(), StaticBrowserBox::setForegroundColorAll(), TextBox::setForegroundColorAll(), EmoteShortcutContainer::setSkin(), ItemShortcutContainer::setSkin(), SpellShortcutContainer::setSkin(), ShopListBox::ShopListBox(), ShortcutContainer::ShortcutContainer(), StaticBrowserBox::StaticBrowserBox(), TextBox::TextBox(), TextField::TextField(), StaticBrowserBox::updateHeight(), and Window::Window().
|
protected |
Holds the frame size of the widget.
Definition at line 1138 of file widget.h.
Referenced by TabbedArea::addTab(), TabbedArea::adjustWidget(), PlayerBox::draw(), PlayerBox::drawFrame(), ScrollArea::drawFrame(), TextField::drawFrame(), DropDown::DropDown(), getFrameSize(), PlayerBox::init(), PlayerBox::safeDrawFrame(), ScrollArea::safeDrawFrame(), TextField::safeDrawFrame(), setFrameSize(), TextField::TextField(), ScrollArea::widgetResized(), and TabbedArea::widgetResized().
|
staticprotected |
Holds the global font used by the widget.
Definition at line 1171 of file widget.h.
Referenced by cleanGlobalFont(), getFont(), getGloablFont(), and setGlobalFont().
|
protected |
|
protected |
Holds the focus handler used by the widget. NULL if no internal focus handler is used.
Definition at line 1122 of file widget.h.
Referenced by getInternalFocusHandler(), and setInternalFocusHandler().
|
protected |
Holds the key listeners of the widget.
Definition at line 1019 of file widget.h.
Referenced by addKeyListener(), getKeyListeners(), and removeKeyListener().
|
protected |
Definition at line 1162 of file widget.h.
Referenced by isMouseConsume(), ListBox::mousePressed(), ScrollArea::mouseReleased(), and setMouseConsume().
|
protected |
Holds the mouse listeners of the widget.
Definition at line 1009 of file widget.h.
Referenced by addMouseListener(), getMouseListeners(), and removeMouseListener().
|
protected |
Holds the parent of the widget. NULL if the widget has no parent.
Definition at line 1128 of file widget.h.
Referenced by AvatarListBox::draw(), DropDown::dropDown(), getAbsolutePosition(), getParent(), isModalFocused(), isModalMouseInputFocused(), isVisible(), requestMoveToBottom(), requestMoveToTop(), AvatarListBox::safeDraw(), setParent(), showPart(), and PopupList::~PopupList().
|
protected |
Definition at line 1164 of file widget.h.
Referenced by Button::draw(), EmotePage::draw(), ItemContainer::draw(), Popup::draw(), ProgressBar::draw(), ScrollArea::draw(), Slider::draw(), Tab::draw(), Window::draw(), ShortcutContainer::drawBackground(), ScrollArea::drawFrame(), Popup::hide(), ProgressBar::logic(), ScrollArea::mouseDragged(), Slider::mouseEntered(), Slider::mouseExited(), Popup::mouseMoved(), ScrollArea::mouseReleased(), Popup::position(), ScrollArea::safeDraw(), ProgressBar::setBackgroundColor(), ItemContainer::setCellBackgroundImage(), Popup::setContentSize(), Tab::setFlash(), Tab::setFlashTabColor(), Tab::setHighlightedTabColor(), Tab::setLabelFont(), Popup::setLocationRelativeTo(), Tab::setPlayerFlashTabColor(), ProgressBar::setProgress(), ProgressBar::setProgressPalette(), setRedraw(), EquipmentWindow::setSelected(), Tab::setSelectedTabColor(), Window::setSticky(), Tab::setTabColor(), Slider::setValue(), ScrollArea::updateCalcFlag(), ItemContainer::updateMatrix(), EquipmentWindow::updatePage(), ItemContainer::updateSize(), Button::widgetHidden(), Window::widgetHidden(), Button::widgetMoved(), EmotePage::widgetMoved(), ItemContainer::widgetMoved(), Popup::widgetMoved(), ProgressBar::widgetMoved(), ScrollArea::widgetMoved(), ShortcutContainer::widgetMoved(), Tab::widgetMoved(), Window::widgetMoved(), Button::widgetResized(), EmotePage::widgetResized(), Popup::widgetResized(), ProgressBar::widgetResized(), ScrollArea::widgetResized(), ShortcutContainer::widgetResized(), Tab::widgetResized(), Window::widgetResized(), and windowResized().
|
protected |
Definition at line 1166 of file widget.h.
Referenced by isSelectable(), TextBox::setEditable(), and setSelectable().
|
protected |
True if the widget has tab in enabled, false otherwise.
Definition at line 1148 of file widget.h.
Referenced by isTabInEnabled(), and setTabInEnabled().
|
protected |
True if the widget has tab in enabled, false otherwise.
Definition at line 1153 of file widget.h.
Referenced by isTabOutEnabled(), and setTabOutEnabled().
Visible Widget::mVisible |
True if the widget visible, false otherwise.
Definition at line 963 of file widget.h.
Referenced by ChatWindow::action(), TabbedArea::addTab(), TabbedArea::adjustTabPositions(), ChatWindow::adjustTabSize(), CheckBox::drawBox(), RadioButton::drawBox(), PopupList::focusGained(), Popup::isPopupVisible(), isVisible(), Window::isWindowVisible(), ChatWindow::keyPressed(), BasicContainer::logic(), MiniStatusWindow::saveBars(), WindowMenu::saveButtons(), QuestsWindow::selectQuest(), TabbedArea::setSelectedTabDefault(), Window::setVisible(), setVisible(), PopupMenu::showPopup(), MiniStatusWindow::updateBars(), WindowMenu::updateButtons(), ChatWindow::updateTabsMargin(), TabbedArea::updateTabsWidth(), TabbedArea::updateVisibleTabsWidth(), TabbedArea::widgetResized(), MiniStatusWindow::~MiniStatusWindow(), and WindowMenu::~WindowMenu().
|
protected |
Holds the widget listeners of the widget.
Definition at line 1076 of file widget.h.
Referenced by addWidgetListener(), distributeHiddenEvent(), distributeMovedEvent(), distributeResizedEvent(), distributeShownEvent(), and removeWidgetListener().