41 : x_(0), y_(0), w_(0), h_(0) {}
46 : x_(0), y_(0), w_(W), h_(H) {}
51 : x_(X), y_(Y), w_(W), h_(H) {}
55 : x_(widget.x()), y_(widget.y()), w_(widget.w()), h_(widget.h()) {}
59 : x_(widget->x()), y_(widget->y()), w_(widget->w()), h_(widget->h()) {}
61 int x()
const {
return x_; }
62 int y()
const {
return y_; }
63 int w()
const {
return w_; }
64 int h()
const {
return h_; }
69 int r()
const {
return x_ + w_; }
73 int b()
const {
return y_ + h_; }
75 void x(
int X) { x_ = X; }
76 void y(
int Y) { y_ = Y; }
77 void w(
int W) { w_ = W; }
78 void h(
int H) { h_ = H; }
void w(int W)
sets the width
Definition: Fl_Rect.H:77
int r() const
gets the right edge (x + w).
Definition: Fl_Rect.H:69
Fl_Rect()
The default constructor creates an empty rectangle (x = y = w = h = 0).
Definition: Fl_Rect.H:40
int y() const
gets the y coordinate (top edge)
Definition: Fl_Rect.H:62
int w() const
gets the width
Definition: Fl_Rect.H:63
void y(int Y)
sets the y coordinate (top edge)
Definition: Fl_Rect.H:76
void h(int H)
sets the height
Definition: Fl_Rect.H:78
Fl_Rect(const Fl_Widget &widget)
This constructor creates a rectangle based on a widget's position and size.
Definition: Fl_Rect.H:54
void x(int X)
sets the x coordinate (left edge)
Definition: Fl_Rect.H:75
Fl_Rect(int X, int Y, int W, int H)
This constructor creates a rectangle with the given x,y coordinates and the given width and height...
Definition: Fl_Rect.H:50
int b() const
gets the bottom edge (y + h).
Definition: Fl_Rect.H:73
Rectangle with standard FLTK coordinates (X, Y, W, H).
Definition: Fl_Rect.H:30
Fl_Rect(int W, int H)
This constructor creates a rectangle with x = y = 0 and the given width and height.
Definition: Fl_Rect.H:45
Fl_Rect(const Fl_Widget *const widget)
This constructor creates a rectangle based on a widget's position and size.
Definition: Fl_Rect.H:58
int h() const
gets the height
Definition: Fl_Rect.H:64
int x() const
gets the x coordinate (left edge)
Definition: Fl_Rect.H:61