#include <wg_point.h>
Screen coordinates are assumed, where the origin is in the top left corner of the screen and Y increases in the downward direction
Definition at line 38 of file wg_point.h.
wGui::CPoint::CPoint | ( | const int | x, | |
const int | y | |||
) | [inline] |
Initialize the point to (x, y)
x | X coordinate | |
y | Y coordinate |
Definition at line 47 of file wg_point.h.
void wGui::CPoint::SetX | ( | const int | x | ) | [inline] |
Set the X coordinate
x | X coordinate |
Definition at line 57 of file wg_point.h.
References m_XPos.
Referenced by wGui::CEditBox::GetIndexFromPoint(), wGui::CRenderedString::GetMetrics(), operator+(), operator-(), and wGui::CPopupMenu::Show().
void wGui::CPoint::SetY | ( | const int | y | ) | [inline] |
Set the Y coordinate
y | Y coordinate |
Definition at line 61 of file wg_point.h.
References m_YPos.
Referenced by wGui::CTextBox::Draw(), wGui::CRenderedString::GetMetrics(), operator+(), operator-(), and wGui::CPopupMenu::Show().
int wGui::CPoint::XPos | ( | void | ) | const [inline] |
Gets the X coordinate
Definition at line 65 of file wg_point.h.
References m_XPos.
Referenced by wGui::CTextBox::Draw(), wGui::CEditBox::Draw(), wGui::CPainter::DrawHLine(), wGui::CPainter::DrawLine(), wGui::CPainter::DrawPoint(), wGui::CPainter::DrawVLine(), wGui::CMessageBox::FitToText(), wGui::CEditBox::GetIndexFromPoint(), wGui::CTextBox::HandleMessage(), wGui::CRect::HitTest(), wGui::CTextBox::OnMouseButtonDown(), wGui::CRect::operator+(), operator+(), wGui::CRect::operator-(), operator-(), operator=(), wGui::CTextBox::PrepareWindowText(), wGui::CPainter::ReadPoint(), wGui::CApplication::SetMousePosition(), wGui::CPopupMenu::Show(), and wGui::CMenu::UpdateCachedRects().
int wGui::CPoint::YPos | ( | void | ) | const [inline] |
Gets the Y coordinate
Definition at line 69 of file wg_point.h.
References m_YPos.
Referenced by wGui::CTextBox::Draw(), wGui::CPainter::DrawHLine(), wGui::CPainter::DrawLine(), wGui::CPainter::DrawPoint(), wGui::CPainter::DrawVLine(), wGui::CMessageBox::FitToText(), wGui::CTextBox::HandleMessage(), wGui::CRect::HitTest(), wGui::CTextBox::OnMouseButtonDown(), wGui::CListBox::OnMouseButtonDown(), wGui::CListBox::OnMouseButtonUp(), wGui::CRect::operator+(), operator+(), wGui::CRect::operator-(), operator-(), operator=(), wGui::CPainter::ReadPoint(), wGui::CApplication::SetMousePosition(), wGui::CPopupMenu::Show(), and wGui::CPopupMenu::UpdateCachedRects().
bool wGui::CPoint::leftof | ( | const CPoint & | p | ) | const [inline] |
Indicates if a point is to the left of the point
Definition at line 88 of file wg_point.h.
References m_XPos.
bool wGui::CPoint::rightof | ( | const CPoint & | p | ) | const [inline] |
Indicates if a point is to the right of the point
Definition at line 92 of file wg_point.h.
References m_XPos.
bool wGui::CPoint::above | ( | const CPoint & | p | ) | const [inline] |
Indicates if a point is above the point
Definition at line 96 of file wg_point.h.
References m_YPos.
bool wGui::CPoint::below | ( | const CPoint & | p | ) | const [inline] |
Indicates if a point is below the point
Definition at line 100 of file wg_point.h.
References m_YPos.
std::wstring wGui::CPoint::ToString | ( | void | ) | const [inline] |
Gives a string representation of the coordinates
Definition at line 104 of file wg_point.h.
References stdex::itoa(), m_XPos, and m_YPos.