FLTK 1.4.0
|
Rectangle with standard FLTK coordinates (X, Y, W, H). More...
#include <Fl_Rect.H>
Public Member Functions | |
int | b () const |
gets the bottom edge (y + h). More... | |
void | b (int B) |
sets the height based on B and y | |
Fl_Rect () | |
The default constructor creates an empty rectangle (x = y = w = h = 0). | |
Fl_Rect (const Fl_Widget &widget) | |
This constructor creates a rectangle based on a widget's position and size. | |
Fl_Rect (const Fl_Widget *const widget) | |
This constructor creates a rectangle based on a widget's position and size. | |
Fl_Rect (int W, int H) | |
This constructor creates a rectangle with x = y = 0 and the given width and height. | |
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. | |
Fl_Rect (int X, int Y, int W, int H, Fl_Boxtype bt) | |
This constructor creates a rectangle with the given x,y coordinates and the given width and height reduced by the box frame size. More... | |
int | h () const |
gets the height | |
void | h (int H) |
sets the height | |
void | inset (Fl_Boxtype bt) |
Move all edges in by the frame size of box type bt . More... | |
void | inset (int d) |
Move all edges in by d . More... | |
void | inset (int left, int top, int right, int bottom) |
Move all edges in by left , top , right , bottom . More... | |
int | r () const |
gets the right edge (x + w). More... | |
void | r (int R) |
sets the width based on R and x | |
int | w () const |
gets the width | |
void | w (int W) |
sets the width | |
int | x () const |
gets the x coordinate (left edge) | |
void | x (int X) |
sets the x coordinate (left edge) | |
int | y () const |
gets the y coordinate (top edge) | |
void | y (int Y) |
sets the y coordinate (top edge) | |
Friends | |
bool | operator!= (const Fl_Rect &lhs, const Fl_Rect &rhs) |
bool | operator== (const Fl_Rect &lhs, const Fl_Rect &rhs) |
Rectangle with standard FLTK coordinates (X, Y, W, H).
This may be used internally, for overloaded widget constructors and other overloaded methods like fl_measure(), fl_text_extents(), fl_rect(), fl_rectf(), and maybe more.
|
inline |
This constructor creates a rectangle with the given x,y coordinates and the given width and height reduced by the box frame size.
This is the same as using the constructor w/o bt
and subsequently calling inset(bt
).
|
inline |
|
inline |
Move all edges in by the frame size of box type bt
.
Shrinks the rectangle at all sides by the frame width or height of the given box type bt
.
This method uses the frame sizes given by the box type bt
using
If the rectangle is smaller than the frame sizes the result is undefined, i.e. an invalid or empty rectangle.
|
inline |
|
inline |
Move all edges in by left
, top
, right
, bottom
.
Shrinks the rectangle on all sides keeping the center of the rectangle at the same spot.
If any value is negative, the rectangle is enlarged.
Values are not range checked; it is possible to create an invalid or empty rectangle.
|
inline |