23#ifndef BAGEL_BOFLIB_POINT_H
24#define BAGEL_BOFLIB_POINT_H
26#include "bagel/afxwin.h"
27#include "bagel/boflib/stdinc.h"
28#include "bagel/boflib/object.h"
43 setWinPoint(&stPoint);
48 void setWinPoint(
const POINT *pPoint);
49 POINT GetWinPoint()
const;
51 void operator=(
const POINT &stPoint) {
52 setWinPoint(&stPoint);
55 operator const POINT() {
61 void offset(
int xOffset,
int yOffset);
64 void operator=(
const StPoint &point);
66 bool operator==(
StPoint point)
const;
67 bool operator!=(
StPoint point)
const;
68 void operator+=(
StSize size);
69 void operator-=(
StSize size);
82inline CBofPoint::CBofPoint() {
87inline CBofPoint::CBofPoint(
const int initX,
const int initY) {
92inline CBofPoint::CBofPoint(
const StPoint stPoint) {
97inline CBofPoint::CBofPoint(
const StSize &stSize) {
102inline CBofPoint::CBofPoint(
const CBofPoint &cPoint) {
112inline void CBofPoint::setWinPoint(
const POINT *pPoint) {
113 assert(pPoint !=
nullptr);
114 assert(isValidObject(
this));
120inline POINT CBofPoint::GetWinPoint()
const {
121 assert(isValidObject(
this));
131inline void CBofPoint::offset(
int xOffset,
int yOffset) {
133 assert(isValidObject(
this));
139inline void CBofPoint::offset(StPoint point) {
141 assert(isValidObject(
this));
147inline void CBofPoint::offset(StSize size) {
149 assert(isValidObject(
this));
155inline void CBofPoint::operator=(
const StPoint &point) {
157 assert(isValidObject(
this));
163inline void CBofPoint::operator=(
const CBofPoint &point) {
165 assert(isValidObject(
this));
171inline bool CBofPoint::operator==(StPoint point)
const {
173 assert(isValidObject(
this));
175 return (x == point.x && y == point.y);
178inline bool CBofPoint::operator!=(StPoint point)
const {
180 assert(isValidObject(
this));
182 return (x != point.x || y != point.y);
185inline void CBofPoint::operator+=(StSize size) {
187 assert(isValidObject(
this));
193inline void CBofPoint::operator+=(StPoint point) {
195 assert(isValidObject(
this));
201inline void CBofPoint::operator-=(StPoint point) {
203 assert(isValidObject(
this));
209inline void CBofPoint::operator-=(StSize size) {
211 assert(isValidObject(
this));
217inline CBofPoint CBofPoint::operator+(StSize size)
const {
219 assert(isValidObject(
this));
221 return CBofPoint(x + size.cx, y + size.cy);
224inline CBofPoint CBofPoint::operator+(StPoint point)
const {
226 assert(isValidObject(
this));
228 return CBofPoint(x + point.x, y + point.y);
231inline CBofPoint CBofPoint::operator-(StSize size)
const {
233 assert(isValidObject(
this));
235 return CBofPoint(x - size.cx, y - size.cy);
238inline CBofPoint CBofPoint::operator-(StPoint point)
const {
240 assert(isValidObject(
this));
242 return CBofPoint(x - point.x, y - point.y);
245inline CBofPoint CBofPoint::operator-()
const {
247 assert(isValidObject(
this));
249 return CBofPoint(-x, -y);
Definition: minwindef.h:161