30 typedef std::function<void()>
GThunk;
SwingConstants
Constants for alignments and icon positions.
Definition: gtypes.h:159
This struct contains real-valued x, y, width, and height fields.
Definition: gtypes.h:293
string toString() const
Converts the GDimension to a string in the form "(</code><i>width</i><code>,</code> <i>height</i><cod...
Definition: gtypes.cpp:40
friend std::ostream & operator<<(std::ostream &os, const GDimension &dim)
Writes the GDimension to the given output stream.
Definition: gtypes.cpp:46
double height
Definition: gtypes.h:65
HorizontalAlignment
The supported kinds of horizontal alignment of a widget or onscreen object.
Definition: gtypes.h:136
bool operator>=(const GTableIndex &loc1, const GTableIndex &loc2)
Definition: gtable.cpp:1089
bool intersects(const GRectangle &other) const
Returns true if this rectangle and the given other rectangle overlap.
Definition: gtypes.cpp:253
std::function< int()> GThunkInt
An alias for a function wrapper around a function with no parameters and an int return (such as main(...
Definition: gtypes.h:36
friend bool operator>=(const GRectangle &r1, const GRectangle &r2)
Relational operators that compare rectangles by x, y, then width, then height.
Definition: gtypes.cpp:302
friend bool operator<=(const GRectangle &r1, const GRectangle &r2)
Relational operators that compare rectangles by x, y, then width, then height.
Definition: gtypes.cpp:294
string toString() const
Converts the GRectangle to a string in the form "(</code><i>x</i><code>,</code> <i>y</i><code>,</code> <i>width</i><code>,</code> <i>height</i><code>)".
Definition: gtypes.cpp:265
GDimension()
Definition: gtypes.cpp:38
double x
Definition: gtypes.h:222
friend bool operator>(const GPoint &p1, const GPoint &p2)
Relational operators that compare points by x-coordinate and then by y-coordinate.
Definition: gtypes.cpp:182
friend std::ostream & operator<<(std::ostream &out, const GPoint &p)
Writes the given point to the given output stream.
Definition: gtypes.cpp:161
std::ostream & operator<<(std::ostream &out, const GEvent &event)
Writes the given event to the given output stream.
Definition: gevent.cpp:494
bool operator>(const GTableIndex &loc1, const GTableIndex &loc2)
Definition: gtable.cpp:1085
HorizontalAlignment toHorizontalAlignment(string alignmentStr)
Converts a string such as "Center" or "Left" into an alignment value.
Definition: gtypes.cpp:100
double y
Definition: gtypes.h:223
friend bool operator>=(const GPoint &p1, const GPoint &p2)
Relational operators that compare points by x-coordinate and then by y-coordinate.
Definition: gtypes.cpp:186
friend bool operator<(const GRectangle &r1, const GRectangle &r2)
Relational operators that compare rectangles by x, y, then width, then height.
Definition: gtypes.cpp:287
string toString() const
Converts the GPoint to a string in the form "(</code><i>x</i><code>,</code> <i>y</i><code>)".
Definition: gtypes.cpp:155
string toString(HorizontalAlignment alignment)
Converts an alignment value into a string such as "Center" or "Left".
Definition: gtypes.cpp:80
GDimension operator*(const GDimension &d, double scale)
Multiplies the width and height of the given GDimension object by the given scale factor and returns ...
Definition: gtypes.cpp:76
friend bool operator<=(const GPoint &p1, const GPoint &p2)
Relational operators that compare points by x-coordinate and then by y-coordinate.
Definition: gtypes.cpp:178
friend bool operator<(const GPoint &p1, const GPoint &p2)
Relational operators that compare points by x-coordinate and then by y-coordinate.
Definition: gtypes.cpp:174
bool operator==(const GTableIndex &loc1, const GTableIndex &loc2)
Definition: gtable.cpp:1077
friend bool operator==(const GPoint &p1, const GPoint &p2)
Compares two GPoint objects for equality.
Definition: gtypes.cpp:165
friend bool operator>=(const GDimension &d1, const GDimension &d2)
Relational operators that compare two GDimension objects by width and then by height.
Definition: gtypes.cpp:72
double width
Definition: gtypes.h:64
friend bool operator>(const GRectangle &r1, const GRectangle &r2)
Relational operators that compare rectangles by x, y, then width, then height.
Definition: gtypes.cpp:298
double height
Definition: gtypes.h:369
friend bool operator==(const GDimension &d1, const GDimension &d2)
Compares two GDimension objects for equality.
Definition: gtypes.cpp:50
friend bool operator!=(const GRectangle &r1, const GRectangle &r2)
Compares two rectangles for inequality.
Definition: gtypes.cpp:283
bool operator<=(const GTableIndex &loc1, const GTableIndex &loc2)
Definition: gtable.cpp:1073
Qt::Alignment toQtAlignment(HorizontalAlignment alignment)
Converts our alignment values into Qt alignment constants.
Definition: gtypes.cpp:113
friend bool operator!=(const GPoint &p1, const GPoint &p2)
Compares two GPoint objects for inequality.
Definition: gtypes.cpp:170
VerticalAlignment toVerticalAlignment(string alignmentStr)
Converts a string such as "Middle" or "Top" into an alignment value.
Definition: gtypes.cpp:127
bool operator<(const GTableIndex &loc1, const GTableIndex &loc2)
Relational operators for comparing table locations.
Definition: gtable.cpp:1068
This struct contains real-valued width and height fields.
Definition: gtypes.h:43
double width
Definition: gtypes.h:368
GPoint()
Definition: gtypes.cpp:153
friend std::ostream & operator<<(std::ostream &os, const GRectangle &rect)
Writes the given rectangle to the given output stream.
Definition: gtypes.cpp:271
friend bool operator>(const GDimension &d1, const GDimension &d2)
Relational operators that compare two GDimension objects by width and then by height.
Definition: gtypes.cpp:68
GRectangle enlargedBy(double amount)
Returns a new rectangle with its boundaries shifted outward by the given amount on all 4 sides...
Definition: gtypes.cpp:249
GRectangle(double x=0, double y=0, double width=0, double height=0)
Creates a GRectangle object with the specified position and size.
Definition: gtypes.cpp:202
friend GDimension operator*(const GDimension &d, double scale)
Multiplies the width and height of the given GDimension object by the given scale factor and returns ...
Definition: gtypes.cpp:76
This struct contains real-valued x and y fields.
Definition: gtypes.h:202
bool isEmpty() const
Returns true if the rectangle is empty, meaning that it has a width and height that are both 0 or neg...
Definition: gtypes.cpp:261
bool contains(double x, double y) const
Returns true if the rectangle contains the given point.
Definition: gtypes.cpp:234
friend GPoint operator*(const GPoint &p, double scale)
Multiplies the x and y coordinates of the given point by the given scale factor and returns the scale...
Definition: gtypes.cpp:190
friend bool operator!=(const GDimension &d1, const GDimension &d2)
Compares two GDimension objects for inequality.
Definition: gtypes.cpp:55
double x
Definition: gtypes.h:366
friend bool operator<=(const GDimension &d1, const GDimension &d2)
Relational operators that compare two GDimension objects by width and then by height.
Definition: gtypes.cpp:64
double y
Definition: gtypes.h:367
friend bool operator==(const GRectangle &r1, const GRectangle &r2)
Compares two rectangles for equality.
Definition: gtypes.cpp:276
bool operator!=(const GTableIndex &loc1, const GTableIndex &loc2)
Definition: gtable.cpp:1081
std::function< void()> GThunk
An alias for a function wrapper around a void function with no parameters and no return.
Definition: gtypes.h:30
friend bool operator<(const GDimension &d1, const GDimension &d2)
Relational operators that compare two GDimension objects by width and then by height.
Definition: gtypes.cpp:59
VerticalAlignment
The supported kinds of vertical alignment of a widget or onscreen object.
Definition: gtypes.h:147