Definition at line 14 of file IWidget.h.
Public Member Functions | |
IWidget () | |
virtual int | getW () const =0 |
virtual int | getH () const =0 |
virtual void | setShift (const V2 &shift) |
virtual void | setTip (const std::string &tip) |
void | mouseButton (const MouseStroke &stroke) |
Call own_mouseButton when stroke is inside own body. | |
std::string | getTip (const V2 &loc) |
Returns own_getTip when location is inside own body. | |
bool | isInside (const V2 &loc) |
Test whether location is inside this widget. | |
Protected Member Functions | |
virtual void | own_mouseButton (const MouseStroke &) |
virtual std::string | own_getTip (const V2 &) |
Protected Attributes | |
V2 | m_shift |
std::string | m_tip |
|
Definition at line 22 of file IWidget.h. 00022 : m_shift(0, 0) {}
|
|
Implemented in HBox, Slider, VBox, WiContainer, WiPicture, WiSpace, and WiStatusBar. |
|
Returns own_getTip when location is inside own body.
Definition at line 29 of file IWidget.cpp. 00030 { 00031 std::string result; 00032 if (isInside(loc)) { 00033 result = own_getTip(loc); 00034 } 00035 return result; 00036 }
|
|
Implemented in HBox, Slider, VBox, WiContainer, WiPicture, WiSpace, and WiStatusBar. |
|
Test whether location is inside this widget.
Definition at line 44 of file IWidget.cpp. 00045 { 00046 V2 inside = loc.minus(m_shift); 00047 return (inside.getX() >= 0 && inside.getX() < getW() 00048 && inside.getY() >= 0 && inside.getY() < getH()); 00049 }
|
|
Call own_mouseButton when stroke is inside own body.
Definition at line 18 of file IWidget.cpp. 00019 { 00020 if (isInside(stroke.getLoc())) { 00021 own_mouseButton(stroke); 00022 } 00023 }
|
|
Reimplemented in WiBox. Definition at line 20 of file IWidget.h. 00020 { return m_tip; }
|
|
Reimplemented in RadioBox, WiBox, WiButton, and WiContainer. Definition at line 19 of file IWidget.h. 00019 {}
|
|
Reimplemented in HBox, VBox, and WiContainer. Definition at line 25 of file IWidget.h. 00025 { m_shift = shift; }
|
|
Definition at line 26 of file IWidget.h. 00026 { m_tip = tip; }
|
|
|
|
|