ManaPlus
|
#include <rect.h>
Public Member Functions | |
Rect () | |
Rect (const int x_, const int y_, const int width_, const int height_) | |
Rect (const Rect &r) | |
Rect & | operator= (const Rect &r) |
virtual | ~Rect () |
void | setAll (const int x0, const int y0, const int width0, const int height0) |
bool | isIntersecting (const Rect &rectangle) const |
bool | isPointInRect (const int x_, const int y_) const |
Data Fields | |
int | x |
int | y |
int | width |
int | height |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Checks if a point is inside the rectangle
x_ | The x coordinate of the point. |
y_ | The y coordinate of the point. |
Definition at line 197 of file rect.h.
References height, width, x, and y.
Referenced by ShortcutContainer::getIndexFromGrid(), OutfitWindow::getIndexFromGrid(), EquipmentWindow::getItem(), Window::getResizeHandles(), BasicContainer::getWidgetAt(), GuiTable::getWidgetAt(), Gui::handleMouseMoved(), Window::mousePressed(), EquipmentWindow::mousePressed(), EquipmentWindow::mouseReleased(), and TouchManager::processEvent().
|
inline |
int Rect::height |
Holds the height of the rectangle.
Definition at line 224 of file rect.h.
Referenced by Pincode::addButtons(), Window::adjustPositionAfterResize(), PopupList::adjustSize(), TabbedArea::adjustSize(), Window::adjustSizeToScreen(), ChatWindow::adjustTabSize(), ScrollArea::calcHBar(), ScrollArea::calcHMarker(), ScrollArea::calcVBar(), ScrollArea::calcVMarker(), ClanWindow::ClanWindow(), DebugWindow::DebugWindow(), Icon::draw(), DebugWindow::draw(), BasicContainer2::draw(), BrowserBox::draw(), Button::draw(), Desktop::draw(), DropDown::draw(), GuiTable::draw(), Label::draw(), PlayerBox::draw(), Popup::draw(), ProgressBar::draw(), ProgressIndicator::draw(), Slider::draw(), StaticBrowserBox::draw(), Tab::draw(), TextPreview::draw(), Window::draw(), Minimap::draw2(), DropDown::drawButton(), TextField::drawCaret(), BasicContainer::drawChildren(), DropDown::drawFrame(), PlayerBox::drawFrame(), ScrollArea::drawFrame(), TextField::drawFrame(), ScrollArea::drawHBar(), ScrollArea::drawHMarker(), TouchManager::drawText(), ScrollArea::drawVBar(), ScrollArea::drawVMarker(), DropDown::dropDown(), Window::ensureOnScreen(), BasicContainer::getChildrenArea(), DropDown::getChildrenArea(), GuiTable::getChildrenArea(), Popup::getChildrenArea(), ScrollArea::getChildrenArea(), Window::getChildrenArea(), MiniStatusWindow::getChildrenArea(), ScrollArea::getDownButtonDimension(), Widget::getHeight(), ScrollArea::getHorizontalBarDimension(), ScrollArea::getHorizontalMarkerDimension(), EmotePage::getIndexFromGrid(), ScrollArea::getLeftButtonDimension(), Window::getResizeHandles(), ScrollArea::getRightButtonDimension(), ScrollArea::getVerticalBarDimension(), ScrollArea::getVerticalMarkerDimension(), ScrollArea::getVerticalMaxScroll(), Window::getWindowArea(), isIntersecting(), isPointInRect(), TextBox::keyPressed(), Window::loadWindowState(), ScrollArea::logic(), Slider::markerPositionToValue(), ScrollArea::mouseDragged(), Slider::mouseDragged(), Window::mouseDragged(), Slider::mousePressed(), DropDown::mouseReleased(), operator=(), Popup::position(), EquipmentWindow::postInit(), Graphics::pushClipArea(), Window::redraw(), CharacterViewSmall::resize(), Icon::safeDraw(), DebugWindow::safeDraw(), BasicContainer2::safeDraw(), Button::safeDraw(), GuiTable::safeDraw(), Popup::safeDraw(), ProgressBar::safeDraw(), ProgressIndicator::safeDraw(), Slider::safeDraw(), Tab::safeDraw(), Window::safeDraw(), BasicContainer::safeDrawChildren(), DropDown::safeDrawFrame(), PlayerBox::safeDrawFrame(), ScrollArea::safeDrawFrame(), TextField::safeDrawFrame(), Window::saveWindowState(), ChatTab::scroll(), TextBox::scrollToCaret(), NpcSellDialog::sellOneItem(), setAll(), Desktop::setBestFittingWallpaper(), Window::setDefaultSize(), Widget::setDimension(), Widget::setHeight(), Popup::setLocationRelativeTo(), Window::setLocationRelativeTo(), Minimap::setMap(), Window::setResizable(), ListBox::setSelected(), Widget::setSize(), Window::setVisible(), TextBoxPopup::show(), TextPopup::show(), PopupList::show(), BasicContainer::showWidgetPart(), ScrollArea::updateCalcFlag(), SliderList::updateLabel(), WhoIsOnline::updateSize(), Slider::valueToMarkerPosition(), SpellPopup::view(), LayoutHelper::widgetResized(), ScrollArea::widgetResized(), TabbedArea::widgetResized(), Window::widgetResized(), ClanWindow::widgetResized(), DebugWindow::widgetResized(), EmoteWindow::widgetResized(), and SetupWindow::widgetResized().
int Rect::width |
Holds the width of the rectangle.
Definition at line 219 of file rect.h.
Referenced by VertContainer::add2(), Pincode::addButtons(), Window::adjustPositionAfterResize(), PopupList::adjustSize(), TabbedArea::adjustSize(), Window::adjustSizeToScreen(), ChatWindow::adjustTabSize(), ScrollArea::calcHBar(), BrowserBox::calcHeight(), ScrollArea::calcHMarker(), ScrollArea::calcVBar(), 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(), SliderList::draw(), StaticBrowserBox::draw(), Tab::draw(), TextPreview::draw(), Window::draw(), Minimap::draw2(), DropDown::drawButton(), BasicContainer::drawChildren(), DropDown::drawFrame(), PlayerBox::drawFrame(), ScrollArea::drawFrame(), TextField::drawFrame(), ScrollArea::drawHBar(), ScrollArea::drawHMarker(), TouchManager::drawText(), ScrollArea::drawVBar(), ScrollArea::drawVMarker(), DropDown::dropDown(), Window::ensureOnScreen(), TextField::fixScroll(), BasicContainer::getChildrenArea(), DropDown::getChildrenArea(), GuiTable::getChildrenArea(), Popup::getChildrenArea(), ScrollArea::getChildrenArea(), Window::getChildrenArea(), MiniStatusWindow::getChildrenArea(), ScrollArea::getDownButtonDimension(), ScrollArea::getHorizontalBarDimension(), ScrollArea::getHorizontalMarkerDimension(), ScrollArea::getHorizontalMaxScroll(), EmotePage::getIndexFromGrid(), Window::getResizeHandles(), ScrollArea::getRightButtonDimension(), ItemContainer::getSlotByXY(), ItemContainer::getSlotIndex(), ScrollArea::getUpButtonDimension(), ScrollArea::getVerticalBarDimension(), ScrollArea::getVerticalMarkerDimension(), Widget::getWidth(), Window::getWindowArea(), isIntersecting(), isPointInRect(), Window::loadWindowState(), ScrollArea::logic(), Slider::markerPositionToValue(), ScrollArea::mouseDragged(), Window::mouseDragged(), Slider::mousePressed(), DropDown::mouseReleased(), operator=(), Popup::position(), EquipmentWindow::postInit(), Graphics::pushClipArea(), Window::redraw(), CharacterViewSmall::resize(), Icon::safeDraw(), DebugWindow::safeDraw(), BasicContainer2::safeDraw(), Button::safeDraw(), EmotePage::safeDraw(), GuiTable::safeDraw(), Popup::safeDraw(), ProgressBar::safeDraw(), ProgressIndicator::safeDraw(), SliderList::safeDraw(), Tab::safeDraw(), Window::safeDraw(), BasicContainer::safeDrawChildren(), DropDown::safeDrawFrame(), PlayerBox::safeDrawFrame(), ScrollArea::safeDrawFrame(), TextField::safeDrawFrame(), Window::saveWindowState(), TextBox::scrollToCaret(), setAll(), Desktop::setBestFittingWallpaper(), Window::setDefaultSize(), Widget::setDimension(), Window::setLocationHorisontallyRelativeTo(), Popup::setLocationRelativeTo(), Window::setLocationRelativeTo(), Minimap::setMap(), Window::setResizable(), Widget::setSize(), Window::setVisible(), Widget::setWidth(), TextBoxPopup::show(), TextPopup::show(), PopupList::show(), BasicContainer::showWidgetPart(), TabbedArea::updateArrowEnableState(), ScrollArea::updateCalcFlag(), BrowserBox::updateHeight(), StaticBrowserBox::updateHeight(), SliderList::updateLabel(), ItemContainer::updateSize(), WhoIsOnline::updateSize(), Slider::valueToMarkerPosition(), SpellPopup::view(), LayoutHelper::widgetResized(), ScrollArea::widgetResized(), ShortcutContainer::widgetResized(), TabbedArea::widgetResized(), Window::widgetResized(), ClanWindow::widgetResized(), DebugWindow::widgetResized(), EmoteWindow::widgetResized(), and SetupWindow::widgetResized().
int Rect::x |
Holds the x coordinate of the rectangle.
Definition at line 209 of file rect.h.
Referenced by Window::adjustPositionAfterResize(), Window::adjustSizeToScreen(), ScrollArea::calcButton(), ScrollArea::calcHBar(), ScrollArea::calcHMarker(), ScrollArea::calcVBar(), ScrollArea::calcVMarker(), Window::draw(), ScrollArea::drawButton(), BasicContainer::drawChildren(), ScrollArea::drawHBar(), ScrollArea::drawHMarker(), ScrollArea::drawVBar(), ScrollArea::drawVMarker(), Window::ensureOnScreen(), Widget::getAbsolutePosition(), Window::getResizeHandles(), BasicContainer::getWidgetAt(), Widget::getX(), isIntersecting(), isPointInRect(), Window::isResizeAllowed(), Window::loadWindowState(), ScrollArea::mouseDragged(), Window::mouseDragged(), WindowMenu::mouseMoved(), InventoryWindow::mouseMoved(), Minimap::mouseMoved(), MiniStatusWindow::mouseMoved(), ScrollArea::mousePressed(), operator=(), Graphics::pushClipArea(), TouchManager::resize(), Window::safeDraw(), BasicContainer::safeDrawChildren(), Window::saveWindowState(), Minimap::screenToMap(), TextBox::scrollToCaret(), setAll(), Window::setDefaultSize(), Widget::setDimension(), Window::setLocationHorisontallyRelativeTo(), Popup::setLocationRelativeTo(), Window::setLocationRelativeTo(), Minimap::setMap(), Widget::setPosition(), Window::setResizable(), Widget::setX(), and Window::widgetResized().
int Rect::y |
Holds the x coordinate of the rectangle.
Definition at line 214 of file rect.h.
Referenced by Window::adjustPositionAfterResize(), Window::adjustSizeToScreen(), ScrollArea::calcButton(), ScrollArea::calcHBar(), ScrollArea::calcHMarker(), ScrollArea::calcVBar(), ScrollArea::calcVMarker(), BrowserBox::draw(), GuiTable::draw(), StaticBrowserBox::draw(), Window::draw(), ScrollArea::drawButton(), BasicContainer::drawChildren(), ScrollArea::drawHBar(), ScrollArea::drawHMarker(), ScrollArea::drawVBar(), ScrollArea::drawVMarker(), Window::ensureOnScreen(), Widget::getAbsolutePosition(), Window::getResizeHandles(), BasicContainer::getWidgetAt(), Widget::getY(), isIntersecting(), isPointInRect(), Window::isResizeAllowed(), Window::loadWindowState(), ScrollArea::mouseDragged(), Window::mouseDragged(), WindowMenu::mouseMoved(), InventoryWindow::mouseMoved(), Minimap::mouseMoved(), MiniStatusWindow::mouseMoved(), ScrollArea::mousePressed(), operator=(), Graphics::pushClipArea(), TouchManager::resize(), GuiTable::safeDraw(), Window::safeDraw(), BasicContainer::safeDrawChildren(), Window::saveWindowState(), Minimap::screenToMap(), ChatTab::scroll(), TextBox::scrollToCaret(), NpcSellDialog::sellOneItem(), setAll(), Window::setDefaultSize(), Widget::setDimension(), Popup::setLocationRelativeTo(), Window::setLocationRelativeTo(), Minimap::setMap(), Widget::setPosition(), Window::setResizable(), ListBox::setSelected(), Widget::setY(), and Window::widgetResized().