#include <widget.hpp>
Inheritance diagram for gcn::Widget:
Contains basic widget functions every widget should have. Widgets should inherit from this class and implements it's functions.
NOTE: Functions begining with underscore "_" should not be overloaded unless you know what you are doing.
Definition at line 93 of file widget.hpp.
Public Member Functions | |
Widget () | |
Constructor. | |
virtual | ~Widget () |
Default destructor. | |
virtual void | draw (Graphics *graphics)=0 |
Draws the Widget. | |
virtual void | drawBorder (Graphics *graphics) |
Draws a the Widget border. | |
virtual void | logic () |
Called for all Widgets in the gui each time Gui::logic is called. | |
virtual BasicContainer * | getParent () const |
Gets the Widget parent container. | |
virtual void | setWidth (int width) |
Sets the width of the Widget in pixels. | |
virtual int | getWidth () const |
Gets the width of the Widget in pixels. | |
virtual void | setHeight (int height) |
Sets the height of the Widget in pixels. | |
virtual int | getHeight () const |
Gets the height of the Widget in pixels. | |
virtual void | setSize (int width, int height) |
Sets the size of the Widget. | |
virtual void | setX (int x) |
Set the Widget x coordinate. | |
virtual int | getX () const |
Gets the Widget x coordinate. | |
virtual void | setY (int y) |
Set the Widget y coordinate. | |
virtual int | getY () const |
Gets the Widget y coordinate. | |
virtual void | setPosition (int x, int y) |
Sets the Widget position. | |
virtual void | setDimension (const Rectangle &dimension) |
Sets the dimension of the Widget. | |
virtual void | setBorderSize (unsigned int borderSize) |
Sets the size of the border, or the width if you so like. | |
virtual unsigned int | getBorderSize () const |
Gets the size of the border, or the width if you so like. | |
virtual const Rectangle & | getDimension () const |
Gets the dimension of the Widget. | |
virtual void | setFocusable (bool focusable) |
Sets a Widgets focusability. | |
virtual bool | isFocusable () const |
Checks whether the Widget is focusable. | |
virtual bool | hasFocus () const |
Checks if the Widget has focus. | |
virtual void | setEnabled (bool enabled) |
Sets the Widget to be disabled or enabled. | |
virtual bool | isEnabled () const |
Checks if a Widget is disabled or not. | |
virtual void | lostFocus () |
Called if the Widget looses focus. | |
virtual void | gotFocus () |
Called if the Widget recieves focus. | |
virtual bool | hasMouse () const |
Checks if the Widget has the mouse. | |
virtual void | setVisible (bool visible) |
Sets the Widget to be visible. | |
virtual bool | isVisible () const |
Checks if the Widget is visible. | |
virtual void | setBaseColor (const Color &color) |
Sets the base color. | |
virtual const Color & | getBaseColor () const |
Gets the base color. | |
virtual void | setForegroundColor (const Color &color) |
Sets the foreground color. | |
virtual const Color & | getForegroundColor () const |
Gets the foreground color. | |
virtual void | setBackgroundColor (const Color &color) |
Sets the background color. | |
virtual const Color & | getBackgroundColor () const |
Gets the background color. | |
virtual void | _mouseInputMessage (const MouseInput &mouseInput) |
Called when a Widget recieves a MouseInput. | |
virtual void | _keyInputMessage (const KeyInput &keyInput) |
Called when a Widget recieves a KeyInput. | |
virtual void | _mouseInMessage () |
Called when the mouse enters the Widget area. | |
virtual void | _mouseOutMessage () |
Called when the mouse leaves the Widget area. | |
virtual void | requestFocus () |
Requests focus for the Widget. | |
virtual void | requestMoveToTop () |
Requests a move to the top in the parent Widget. | |
virtual void | requestMoveToBottom () |
Requests a move to the bottom in the parent Widget. | |
virtual void | _setFocusHandler (FocusHandler *focusHandler) |
Sets the FocusHandler to be used. | |
virtual FocusHandler * | _getFocusHandler () |
Gets the FocusHandler used. | |
virtual void | addActionListener (ActionListener *actionListener) |
Adds an ActionListener to the Widget. | |
virtual void | removeActionListener (ActionListener *actionListener) |
Removes an added ActionListener from the Widget. | |
virtual void | addMouseListener (MouseListener *mouseListener) |
Adds a MouseListener to the Widget. | |
virtual void | removeMouseListener (MouseListener *mouseListener) |
Removes an added MouseListener from the Widget. | |
virtual void | addKeyListener (KeyListener *keyListener) |
Adds a KeyListener to the Widget. | |
virtual void | removeKeyListener (KeyListener *keyListener) |
Removes an added KeyListener from the Widget. | |
virtual void | setEventId (const std::string &eventId) |
Sets the event identifier of the Widget. | |
virtual const std::string & | getEventId () const |
Gets the event identifier. | |
virtual void | getAbsolutePosition (int &x, int &y) const |
Gets the absolute position on the screen for the Widget. | |
virtual void | _setParent (BasicContainer *parent) |
Sets the parent of the Widget. | |
Font * | getFont () const |
Gets the font used. | |
virtual void | setFont (Font *font) |
Sets the font. | |
virtual void | fontChanged () |
Called when the font has changed. | |
virtual bool | isTabInEnabled () const |
Check if tab in is enabled. | |
virtual void | setTabInEnabled (bool enabled) |
Sets tab in enabled. | |
virtual bool | isTabOutEnabled () const |
Checks if tab out is enabled. | |
virtual void | setTabOutEnabled (bool enabled) |
Sets tab out enabled. | |
virtual bool | isDragged () const |
Checks if the Widget is dragged. | |
virtual void | requestModalFocus () |
Requests modal focus. | |
virtual void | releaseModalFocus () |
Releases modal focus. | |
virtual bool | hasModalFocus () const |
Checks if the Widget or it's parent has modal focus. | |
Static Public Member Functions | |
static void | setGlobalFont (Font *font) |
Sets the global font to be used by default for all Widgets. | |
static bool | widgetExists (const Widget *widget) |
Checks whether a Widget exists or not, that is if it still exists an instance of the object. | |
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 |
Protected Member Functions | |
void | generateAction () |
Generates an action to the Widget's ActionListeners. | |
Protected Attributes | |
MouseListenerList | mMouseListeners |
KeyListenerList | mKeyListeners |
ActionListenerList | mActionListeners |
Color | mForegroundColor |
Color | mBackgroundColor |
Color | mBaseColor |
FocusHandler * | mFocusHandler |
BasicContainer * | mParent |
Rectangle | mDimension |
unsigned int | mBorderSize |
std::string | mEventId |
int | mClickTimeStamp |
int | mClickCount |
int | mClickButton |
bool | mHasMouse |
bool | mFocusable |
bool | mVisible |
bool | mTabIn |
bool | mTabOut |
bool | mEnabled |
Font * | mCurrentFont |
Static Protected Attributes | |
static DefaultFont | mDefaultFont |
static Font * | mGlobalFont = NULL |
static std::list< Widget * > | mWidgets |
|
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 72 of file widget.cpp. |
|
Gets the FocusHandler used. WARNING: This function is used internally and should not be called or overloaded unless you know what you are doing.
Definition at line 318 of file widget.cpp. Referenced by gcn::Container::add(), gcn::Window::setContent(), and gcn::ScrollArea::setContent(). |
|
Called when a Widget recieves a KeyInput. WARNING: This function is used internally to handle all key messages. Don't call or overload it unless you know what you are doing.
Reimplemented in gcn::DropDown. Definition at line 469 of file widget.cpp. References gcn::FocusHandler::getModalFocused(), and hasModalFocus(). Referenced by gcn::DropDown::_keyInputMessage(), and gcn::Gui::logic(). |
|
Called when the mouse enters the Widget area. WARNING: This function is used internally to handle mouse in messages. Don't call or overload this function unless you know what you are doing. Definition at line 502 of file widget.cpp. Referenced by gcn::Window::_mouseInputMessage(), gcn::ScrollArea::_mouseInputMessage(), gcn::Container::_mouseInputMessage(), and gcn::Gui::logic(). |
|
Called when a Widget recieves a MouseInput. WARNING: This function is used internally to handle all mouse messages. Don't call or overload it unless you know what you are doing.
Reimplemented in gcn::Container, gcn::DropDown, gcn::ScrollArea, and gcn::Window. Definition at line 353 of file widget.cpp. References gcn::FocusHandler::dragNone(), gcn::FocusHandler::getModalFocused(), hasModalFocus(), hasMouse(), isDragged(), gcn::FocusHandler::requestDrag(), and requestFocus(). Referenced by gcn::Window::_mouseInputMessage(), gcn::ScrollArea::_mouseInputMessage(), gcn::DropDown::_mouseInputMessage(), gcn::Container::_mouseInputMessage(), and gcn::Gui::logic(). |
|
Called when the mouse leaves the Widget area. WARNING: This function is used internally be to handle mouse out messages. Don't call or overload this function unless you know what you are doing. Reimplemented in gcn::Container, gcn::ScrollArea, and gcn::Window. Definition at line 518 of file widget.cpp. Referenced by gcn::Window::_mouseInputMessage(), gcn::ScrollArea::_mouseInputMessage(), gcn::Container::_mouseInputMessage(), gcn::Window::_mouseOutMessage(), gcn::ScrollArea::_mouseOutMessage(), gcn::Container::_mouseOutMessage(), and gcn::Gui::logic(). |
|
Sets the FocusHandler to be used. WARNING: This function is used internally and should not be called or overloaded unless you know what you are doing.
Reimplemented in gcn::Container, gcn::ScrollArea, and gcn::Window. Definition at line 302 of file widget.cpp. References gcn::FocusHandler::add(), releaseModalFocus(), and gcn::FocusHandler::remove(). Referenced by gcn::Window::_setFocusHandler(), gcn::ScrollArea::_setFocusHandler(), gcn::Container::_setFocusHandler(), gcn::Container::clear(), gcn::Container::remove(), gcn::Window::setContent(), gcn::ScrollArea::setContent(), gcn::Gui::setTop(), and ~Widget(). |
|
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.
Definition at line 106 of file widget.cpp. Referenced by gcn::Container::clear(), gcn::DropDown::DropDown(), gcn::Container::remove(), gcn::Window::setContent(), gcn::ScrollArea::setContent(), and gcn::DropDown::setScrollArea(). |
|
Adds an ActionListener to the Widget. When an action is triggered by the Widget, the action function in all the Widget's ActionListeners will be called.
Definition at line 323 of file widget.cpp. Referenced by gcn::DropDown::DropDown(), and gcn::DropDown::setListBox(). |
|
Adds a KeyListener to the Widget. When a key message is recieved, it will be sent to the Widget's KeyListeners.
Definition at line 333 of file widget.cpp. Referenced by gcn::Button::Button(), gcn::CheckBox::CheckBox(), gcn::DropDown::DropDown(), gcn::ListBox::ListBox(), gcn::RadioButton::RadioButton(), gcn::Slider::Slider(), gcn::TextBox::TextBox(), and gcn::TextField::TextField(). |
|
Adds a MouseListener to the Widget. When a mouse message is recieved, it will be sent to the Widget's MouseListeners.
Definition at line 343 of file widget.cpp. Referenced by gcn::Button::Button(), gcn::CheckBox::CheckBox(), gcn::DropDown::DropDown(), gcn::ListBox::ListBox(), gcn::RadioButton::RadioButton(), gcn::ScrollArea::ScrollArea(), gcn::Slider::Slider(), gcn::TextBox::TextBox(), gcn::TextField::TextField(), and gcn::Window::Window(). |
|
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 Widgets dimension.
Implemented in gcn::Button, gcn::CheckBox, gcn::Container, gcn::DropDown, gcn::Icon, gcn::Label, gcn::ListBox, gcn::RadioButton, gcn::ScrollArea, gcn::TextBox, gcn::TextField, and gcn::Window. Referenced by gcn::ScrollArea::draw(), gcn::Gui::draw(), gcn::Window::drawContent(), and gcn::ScrollArea::drawContent(). |
|
Draws a the Widget border. A border is drawn around a Widget. The width and height of the border is therefore the Widgets height+2*bordersize. Think of a painting that has a certain size, the border surrounds the painting.
Reimplemented in gcn::Button, gcn::CheckBox, gcn::Container, gcn::DropDown, gcn::Icon, gcn::Label, gcn::ListBox, gcn::RadioButton, gcn::ScrollArea, gcn::TextBox, gcn::TextField, and gcn::Window. Definition at line 127 of file widget.hpp. Referenced by gcn::ScrollArea::draw(), and gcn::Gui::draw(). |
|
Called when the font has changed. If the change is global, this function will only be called if the Widget don't have a font already set. Reimplemented in gcn::TextBox, and gcn::TextField. Definition at line 553 of file widget.hpp. Referenced by setFont(). |
|
Gets the absolute position on the screen for the Widget.
Definition at line 529 of file widget.cpp. References getParent(), gcn::Rectangle::x, and gcn::Rectangle::y. Referenced by gcn::Gui::logic(). |
|
Gets the background color.
Definition at line 297 of file widget.cpp. Referenced by gcn::TextField::draw(), gcn::TextBox::draw(), gcn::ScrollArea::draw(), gcn::ListBox::draw(), gcn::DropDown::draw(), gcn::TextBox::drawBorder(), gcn::RadioButton::drawBox(), and gcn::CheckBox::drawBox(). |
|
|
Gets the size of the border, or the width if you so like. The size is the number of pixels that the border extends outside the Widget. Border size = 0 means no border.
Definition at line 172 of file widget.cpp. Referenced by gcn::Window::draw(), gcn::ScrollArea::draw(), gcn::Gui::draw(), gcn::Window::drawBorder(), gcn::TextField::drawBorder(), gcn::TextBox::drawBorder(), gcn::ScrollArea::drawBorder(), gcn::RadioButton::drawBorder(), gcn::ListBox::drawBorder(), gcn::Label::drawBorder(), gcn::Icon::drawBorder(), gcn::DropDown::drawBorder(), gcn::Container::drawBorder(), gcn::CheckBox::drawBorder(), gcn::Button::drawBorder(), gcn::ScrollArea::getHorizontalMaxScroll(), gcn::ScrollArea::getVerticalMaxScroll(), and gcn::ScrollArea::logic(). |
|
Gets the dimension of the Widget. It is relative to it's parent.
Definition at line 177 of file widget.cpp. Referenced by gcn::Window::_mouseInputMessage(), gcn::ScrollArea::draw(), gcn::Gui::draw(), gcn::DropDown::draw(), gcn::Button::draw(), gcn::Container::getDrawSize(), and gcn::Gui::logic(). |
|
Gets the event identifier.
Definition at line 182 of file widget.cpp. |
|
Gets the font used. If no font has been set, the global font will be returned instead. If no global font has been set, the default font will be returend. ugly default.
Definition at line 556 of file widget.cpp. Referenced by gcn::TextField::adjustHeight(), gcn::DropDown::adjustHeight(), gcn::TextField::adjustSize(), gcn::TextBox::adjustSize(), gcn::RadioButton::adjustSize(), gcn::ListBox::adjustSize(), gcn::Label::adjustSize(), gcn::CheckBox::adjustSize(), gcn::Button::adjustSize(), gcn::Window::draw(), gcn::TextField::draw(), gcn::TextBox::draw(), gcn::RadioButton::draw(), gcn::ListBox::draw(), gcn::Label::draw(), gcn::DropDown::draw(), gcn::CheckBox::draw(), gcn::Button::draw(), gcn::TextBox::drawCaret(), gcn::TextField::fixScroll(), gcn::TextBox::keyPress(), gcn::Label::Label(), gcn::TextField::mousePress(), gcn::TextBox::mousePress(), gcn::ListBox::mousePress(), gcn::TextBox::scrollToCaret(), and gcn::ListBox::setSelected(). |
|
Gets the foreground color.
Definition at line 287 of file widget.cpp. Referenced by gcn::Window::draw(), gcn::TextField::draw(), gcn::TextBox::draw(), gcn::RadioButton::draw(), gcn::ListBox::draw(), gcn::Label::draw(), gcn::DropDown::draw(), gcn::CheckBox::draw(), gcn::Button::draw(), gcn::RadioButton::drawBox(), gcn::CheckBox::drawBox(), gcn::DropDown::drawButton(), gcn::TextField::drawCaret(), gcn::TextBox::drawCaret(), gcn::ScrollArea::drawDownButton(), gcn::ScrollArea::drawLeftButton(), gcn::Slider::drawMarker(), gcn::ScrollArea::drawRightButton(), and gcn::ScrollArea::drawUpButton(). |
|
|
Gets the Widget parent container.
Definition at line 111 of file widget.cpp. Referenced by gcn::DropDown::adjustHeight(), gcn::DropDown::dropDown(), getAbsolutePosition(), hasModalFocus(), isVisible(), gcn::TextBox::keyPress(), gcn::Window::mousePress(), gcn::ScrollArea::moveToBottom(), gcn::DropDown::moveToBottom(), gcn::ScrollArea::moveToTop(), gcn::DropDown::moveToTop(), gcn::TextBox::scrollToCaret(), gcn::ListBox::setSelected(), and ~Widget(). |
|
|
Gets the Widget x coordinate. It is relative to it's parent.
Definition at line 141 of file widget.cpp. References gcn::Rectangle::x. Referenced by gcn::Window::_mouseInputMessage(), gcn::ScrollArea::_mouseInputMessage(), gcn::Container::_mouseInputMessage(), gcn::Gui::logic(), and gcn::Window::mouseMotion(). |
|
Gets the Widget y coordinate. It is relative to it's parent.
Definition at line 151 of file widget.cpp. References gcn::Rectangle::y. Referenced by gcn::Window::_mouseInputMessage(), gcn::ScrollArea::_mouseInputMessage(), gcn::DropDown::_mouseInputMessage(), gcn::Container::_mouseInputMessage(), gcn::DropDown::adjustHeight(), gcn::Gui::logic(), and gcn::Window::mouseMotion(). |
|
Checks if the Widget has focus.
Definition at line 192 of file widget.cpp. References gcn::FocusHandler::hasFocus(). Referenced by gcn::DropDown::_mouseInputMessage(), gcn::TextField::draw(), gcn::TextBox::draw(), gcn::RadioButton::draw(), gcn::DropDown::draw(), gcn::CheckBox::draw(), gcn::Button::draw(), gcn::Slider::drawMarker(), gcn::TextField::fixScroll(), setFocusable(), and setVisible(). |
|
Checks if the Widget has the mouse.
Definition at line 202 of file widget.cpp. Referenced by gcn::Window::_mouseInputMessage(), _mouseInputMessage(), gcn::ScrollArea::_mouseInputMessage(), gcn::Window::_mouseOutMessage(), gcn::ScrollArea::_mouseOutMessage(), gcn::Button::isPressed(), gcn::Gui::logic(), gcn::Window::mousePress(), gcn::TextField::mousePress(), gcn::TextBox::mousePress(), gcn::ListBox::mousePress(), gcn::DropDown::mousePress(), gcn::Button::mousePress(), gcn::ScrollArea::mouseWheelDown(), and gcn::ScrollArea::mouseWheelUp(). |
|
Checks if the Widget is dragged. Dragged means that the mouse button has been pressed down over the Widget and the mouse has been moved.
Definition at line 643 of file widget.cpp. References gcn::FocusHandler::isDragged(). Referenced by _mouseInputMessage(). |
|
Checks if a Widget is disabled or not.
Definition at line 638 of file widget.cpp. References isVisible(). Referenced by isFocusable(). |
|
Checks whether the Widget is focusable.
Definition at line 217 of file widget.cpp. References isEnabled(), and isVisible(). Referenced by gcn::Gui::logic(), and requestFocus(). |
|
Check 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 FocusHandler will skip this widget and focus the next in its focus order.
Definition at line 607 of file widget.cpp. |
|
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 617 of file widget.cpp. Referenced by gcn::FocusHandler::tabNext(), and gcn::FocusHandler::tabPrevious(). |
|
Checks if the Widget is visible.
Definition at line 260 of file widget.cpp. References getParent(). Referenced by isEnabled(), and isFocusable(). |
|
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 gcn::Container, gcn::DropDown, gcn::ListBox, gcn::ScrollArea, and gcn::Window. Definition at line 135 of file widget.hpp. Referenced by gcn::Window::logic(), gcn::ScrollArea::logic(), and gcn::Gui::logic(). |
|
Releases modal focus. Modal focus will only be released if the Widget has the modal focus. Definition at line 663 of file widget.cpp. References gcn::FocusHandler::releaseModalFocus(). Referenced by _setFocusHandler(). |
|
Removes an added ActionListener from the Widget.
Definition at line 328 of file widget.cpp. References gcn::FocusHandler::remove(). Referenced by gcn::DropDown::setListBox(), and gcn::DropDown::~DropDown(). |
|
Removes an added KeyListener from the Widget.
Definition at line 338 of file widget.cpp. References gcn::FocusHandler::remove(). |
|
Removes an added MouseListener from the Widget.
Definition at line 348 of file widget.cpp. References gcn::FocusHandler::remove(). |
|
Requests focus for the Widget. A Widget will only recieve focus if it is focusable. Definition at line 222 of file widget.cpp. References isFocusable(), and gcn::FocusHandler::requestFocus(). Referenced by _mouseInputMessage(). |
|
Requests modal focus. When a widget has modal focus, only that Widget and it's children may recieve input. If some other Widget already has modal focus, an exception will be thrown.
Definition at line 653 of file widget.cpp. References gcn::FocusHandler::requestModalFocus(). |
|
Sets the background color.
Reimplemented in gcn::DropDown. Definition at line 292 of file widget.cpp. Referenced by gcn::DropDown::setBackgroundColor(). |
|
Sets the base color. The base color is the background color for many Widgets like the Button and Contianer Widgets.
Reimplemented in gcn::DropDown. Definition at line 272 of file widget.cpp. Referenced by gcn::DropDown::setBaseColor(). |
|
Sets the size of the border, or the width if you so like. The size is the number of pixels that the border extends outside the Widget. Border size = 0 means no border.
Definition at line 167 of file widget.cpp. Referenced by gcn::Button::Button(), gcn::DropDown::DropDown(), gcn::Slider::Slider(), gcn::TextBox::TextBox(), gcn::TextField::TextField(), and gcn::Window::Window(). |
|
Sets the dimension of the Widget. It is relative to it's parent.
Definition at line 162 of file widget.cpp. |
|
Sets the Widget to be disabled or enabled. A disabled Widget will never recieve mouse or key input.
Definition at line 633 of file widget.cpp. |
|
Sets the event identifier of the Widget. The event identifier is used to be able to identify which Widget generated an action when an action has occured. NOTE: An 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 event identifer.
Definition at line 187 of file widget.cpp. |
|
Sets a Widgets focusability.
Definition at line 207 of file widget.cpp. References gcn::FocusHandler::focusNone(), and hasFocus(). Referenced by gcn::Button::Button(), gcn::CheckBox::CheckBox(), gcn::DropDown::DropDown(), gcn::ListBox::ListBox(), gcn::RadioButton::RadioButton(), gcn::Slider::Slider(), gcn::TextBox::TextBox(), and gcn::TextField::TextField(). |
|
Sets the font. If font is NULL, the global font will be used.
Definition at line 585 of file widget.cpp. References fontChanged(). |
|
Sets the foreground color.
Reimplemented in gcn::DropDown. Definition at line 282 of file widget.cpp. Referenced by gcn::DropDown::setForegroundColor(). |
|
Sets the global font to be used by default for all Widgets.
Definition at line 571 of file widget.cpp. |
|
Sets the height of the Widget in pixels.
Definition at line 126 of file widget.cpp. References gcn::Rectangle::height. Referenced by gcn::TextField::adjustHeight(), gcn::DropDown::adjustHeight(), gcn::TextBox::adjustSize(), gcn::RadioButton::adjustSize(), gcn::ListBox::adjustSize(), gcn::Label::adjustSize(), gcn::CheckBox::adjustSize(), gcn::Button::adjustSize(), gcn::Icon::Icon(), gcn::Label::Label(), and setSize(). |
|
Sets the Widget position. It is relative to it's parent.
Definition at line 156 of file widget.cpp. References gcn::Rectangle::x, and gcn::Rectangle::y. Referenced by gcn::DropDown::adjustHeight(), gcn::ScrollArea::logic(), gcn::Window::mouseMotion(), and gcn::Window::repositionContent(). |
|
Sets the size of the Widget.
Definition at line 627 of file widget.cpp. References setHeight(), and setWidth(). Referenced by gcn::Window::resizeToContent(). |
|
Sets tab in enabled. 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.
Definition at line 612 of file widget.cpp. |
|
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.
Definition at line 622 of file widget.cpp. |
|
Sets the Widget to be visible.
Definition at line 251 of file widget.cpp. References gcn::FocusHandler::focusNone(), and hasFocus(). |
|
Sets the width of the Widget in pixels.
Definition at line 116 of file widget.cpp. References gcn::Rectangle::width. Referenced by gcn::DropDown::adjustHeight(), gcn::TextField::adjustSize(), gcn::TextBox::adjustSize(), gcn::RadioButton::adjustSize(), gcn::Label::adjustSize(), gcn::CheckBox::adjustSize(), gcn::Button::adjustSize(), gcn::DropDown::DropDown(), gcn::Icon::Icon(), gcn::Label::Label(), gcn::ListBox::ListBox(), and setSize(). |
|
Set the Widget x coordinate. It is relateive to it's parent.
Definition at line 136 of file widget.cpp. References gcn::Rectangle::x. |
|
Set the Widget y coordinate. It is relative to it's parent.
Definition at line 146 of file widget.cpp. References gcn::Rectangle::y. |
|
Checks whether a Widget exists or not, that is if it still exists an instance of the object.
Definition at line 591 of file widget.cpp. Referenced by gcn::DropDown::~DropDown(). |