summaryrefslogtreecommitdiff
path: root/src/gui/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/base')
-rw-r--r--src/gui/base/basiccontainer.cpp12
-rw-r--r--src/gui/base/basiccontainer.hpp4
-rw-r--r--src/gui/base/widgets/container.cpp2
-rw-r--r--src/gui/base/widgets/listbox.cpp2
-rw-r--r--src/gui/base/widgets/scrollarea.cpp10
-rw-r--r--src/gui/base/widgets/scrollarea.hpp6
-rw-r--r--src/gui/base/widgets/textbox.cpp2
7 files changed, 19 insertions, 19 deletions
diff --git a/src/gui/base/basiccontainer.cpp b/src/gui/base/basiccontainer.cpp
index 9f2806016..e854e15ff 100644
--- a/src/gui/base/basiccontainer.cpp
+++ b/src/gui/base/basiccontainer.cpp
@@ -117,9 +117,9 @@ namespace gcn
mWidgets.erase(iter);
}
- Rectangle BasicContainer::getChildrenArea()
+ Rect BasicContainer::getChildrenArea()
{
- return Rectangle(0, 0, getWidth(), getHeight());
+ return Rect(0, 0, getWidth(), getHeight());
}
void BasicContainer::focusNext()
@@ -184,7 +184,7 @@ namespace gcn
Widget *BasicContainer::getWidgetAt(int x, int y)
{
- const Rectangle r = getChildrenArea();
+ const Rect r = getChildrenArea();
if (!r.isPointInRect(x, y))
return nullptr;
@@ -284,7 +284,7 @@ namespace gcn
// draw it before drawing the widget
if (widget->getFrameSize() > 0)
{
- Rectangle rec = widget->getDimension();
+ Rect rec = widget->getDimension();
const int frame = widget->getFrameSize();
const int frame2 = frame * 2;
rec.x -= frame;
@@ -321,9 +321,9 @@ namespace gcn
BLOCK_END("BasicContainer::logicChildren")
}
- void BasicContainer::showWidgetPart(Widget* widget, Rectangle area)
+ void BasicContainer::showWidgetPart(Widget* widget, Rect area)
{
- const Rectangle widgetArea = getChildrenArea();
+ const Rect widgetArea = getChildrenArea();
area.x += widget->getX();
area.y += widget->getY();
diff --git a/src/gui/base/basiccontainer.hpp b/src/gui/base/basiccontainer.hpp
index 6d30db100..e1947c652 100644
--- a/src/gui/base/basiccontainer.hpp
+++ b/src/gui/base/basiccontainer.hpp
@@ -108,7 +108,7 @@ namespace gcn
* itself to be visible.
* @param rectangle The rectangle to be visible.
*/
- virtual void showWidgetPart(Widget* widget, Rectangle area);
+ virtual void showWidgetPart(Widget* widget, Rect area);
// Inherited from Widget
@@ -116,7 +116,7 @@ namespace gcn
virtual void moveToBottom(Widget* widget);
- virtual Rectangle getChildrenArea() A_WARN_UNUSED;
+ virtual Rect getChildrenArea() A_WARN_UNUSED;
virtual void focusNext();
diff --git a/src/gui/base/widgets/container.cpp b/src/gui/base/widgets/container.cpp
index c79f8fcbc..53a900ec4 100644
--- a/src/gui/base/widgets/container.cpp
+++ b/src/gui/base/widgets/container.cpp
@@ -91,7 +91,7 @@ namespace gcn
if (isOpaque())
{
graphics->setColor(getBaseColor());
- graphics->fillRectangle(Rectangle(0, 0, getWidth(), getHeight()));
+ graphics->fillRectangle(Rect(0, 0, getWidth(), getHeight()));
}
drawChildren(graphics);
diff --git a/src/gui/base/widgets/listbox.cpp b/src/gui/base/widgets/listbox.cpp
index 62a3062a5..2e9606f0a 100644
--- a/src/gui/base/widgets/listbox.cpp
+++ b/src/gui/base/widgets/listbox.cpp
@@ -139,7 +139,7 @@ namespace gcn
mSelected = selected;
}
- Rectangle scroll;
+ Rect scroll;
if (mSelected < 0)
scroll.y = 0;
diff --git a/src/gui/base/widgets/scrollarea.cpp b/src/gui/base/widgets/scrollarea.cpp
index 0fc605fa3..665830ce4 100644
--- a/src/gui/base/widgets/scrollarea.cpp
+++ b/src/gui/base/widgets/scrollarea.cpp
@@ -471,19 +471,19 @@ namespace gcn
}
}
- Rectangle ScrollArea::getChildrenArea()
+ Rect ScrollArea::getChildrenArea()
{
- const Rectangle area = Rectangle(0, 0,
+ const Rect area = Rect(0, 0,
mVBarVisible ? (getWidth() - mScrollbarWidth) : getWidth(),
mHBarVisible ? (getHeight() - mScrollbarWidth) : getHeight());
if (area.width < 0 || area.height < 0)
- return Rectangle();
+ return Rect();
return area;
}
- void ScrollArea::showWidgetPart(Widget* widget, Rectangle area)
+ void ScrollArea::showWidgetPart(Widget* widget, Rect area)
{
const Widget *const content = getContent();
if (widget != content)
@@ -539,7 +539,7 @@ namespace gcn
checkPolicies();
}
- void ScrollArea::setDimension(const Rectangle& dimension)
+ void ScrollArea::setDimension(const Rect& dimension)
{
Widget::setDimension(dimension);
checkPolicies();
diff --git a/src/gui/base/widgets/scrollarea.hpp b/src/gui/base/widgets/scrollarea.hpp
index 669ccfbdd..879792019 100644
--- a/src/gui/base/widgets/scrollarea.hpp
+++ b/src/gui/base/widgets/scrollarea.hpp
@@ -345,9 +345,9 @@ namespace gcn
// Inherited from BasicContainer
- virtual void showWidgetPart(Widget* widget, Rectangle area);
+ virtual void showWidgetPart(Widget* widget, Rect area);
- virtual Rectangle getChildrenArea();
+ virtual Rect getChildrenArea();
virtual Widget *getWidgetAt(int x, int y);
@@ -362,7 +362,7 @@ namespace gcn
void setHeight(int height);
- void setDimension(const Rectangle& dimension);
+ void setDimension(const Rect& dimension);
// Inherited from MouseListener
diff --git a/src/gui/base/widgets/textbox.cpp b/src/gui/base/widgets/textbox.cpp
index 04b506c59..f74db9a29 100644
--- a/src/gui/base/widgets/textbox.cpp
+++ b/src/gui/base/widgets/textbox.cpp
@@ -304,7 +304,7 @@ namespace gcn
void TextBox::scrollToCaret()
{
- Rectangle scroll;
+ Rect scroll;
scroll.x = getFont()->getWidth(
mTextRows[mCaretRow].substr(0, mCaretColumn));
scroll.y = getFont()->getHeight() * mCaretRow;