Fix default ui start
[forms.git] / F / F_Region.H
blob4ff8bcfba387cf26f6a16a80dfa95830a20063a5
2 #ifndef _F_REGION_H_
3 #define _F_REGION_H_
5 #include <F_Point.H>
6 #include <F_Rect.H>
8 namespace F {
10 class F_Region : public F_Point, public F_Rect {
12  public:
14   F_Region (F_Point &lu, F_Rect &r) : F_Point(lu), F_Rect(r) { }
15   F_Region (dim_t w, dim_t h) : F_Point(0, 0), F_Rect(w, h) { }
16   F_Region (coord_t x, coord_t y, dim_t w, dim_t h) : F_Point(x, y), F_Rect(w, h) { }
17   F_Region (const F_Region &p) : F_Point(p.x(), p.y()), F_Rect(p.w(), p.h()) { }
18   ~F_Region() { }
19   // ÐÅÒÅÓÅÞÅÎÉÅ ÇÒÁÎÉÃ
20   bool intersects(const F_Region &r) { return false; }
21   // ÓÏÄÅÒÖÉÔ ×ÎÕÔÒÉ
22   bool contains(const F_Region &r) { return false; }
23   // ÓÏÄÅÒÖÉÔ ÔÏÞËÕ ×ÎÕÔÒÉ
24   inline bool inside(const F_Point &p) {
25     if ((p.x() >= x()) && (p.x() < (x() + w())) && (p.y() >= y()) &&
26       (p.y() < (y() + h())))
27         return true;
28     else
29         return false;
30   }
31  };
34 #endif