1 #ifndef __DW_TYPES_HH__
2 #define __DW_TYPES_HH__
4 #ifndef __INCLUDED_FROM_DW_CORE_HH__
5 # error Do not include this file directly, use "core.hh" instead.
78 Rectangle (
int x,
int y,
int width,
int height);
84 bool isEmpty () {
return width <= 0 || height <= 0; };
95 Circle (
int x,
int y,
int radius);
116 return x1 * y2 - x2 * y1;
119 bool linesCross0(
int ax1,
int ay1,
int ax2,
int ay2,
120 int bx1,
int by1,
int bx2,
int by2);
121 bool linesCross(
int ax1,
int ay1,
int ax2,
int ay2,
122 int bx1,
int by1,
int bx2,
int by2);
269 widgetsProcessedAsInterruption =
275 {
delete widgetsProcessedAsInterruption; }
279 return widgetsProcessedAsInterruption->contains (&key);
285 return widgetsProcessedAsInterruption->put (key);
301 this->toplevelArea = *toplevelArea;
319 #endif // __DW_TYPES_HH__
Base class for dw::core::DrawingContext and dw::core::GettingWidgetAtPointContext.
Definition: types.hh:261
int x
Definition: types.hh:165
static void intoStringBuffer(Content *content, lout::misc::StringBuffer *sb)
Definition: types.cc:279
const char * text
Definition: types.hh:236
short type
Definition: types.hh:233
static void maskIntoStringBuffer(Type mask, lout::misc::StringBuffer *sb)
Definition: types.cc:327
void draw(core::View *view, core::style::Style *style, int x, int y)
Definition: types.cc:41
Set at the top when getting the widget at the point.
Definition: types.hh:312
A class for fast concatenation of a large number of strings.
Definition: misc.hh:565
Abstract interface for different shapes.
Definition: types.hh:58
~Polygon()
Definition: types.cc:131
int zOfVectorProduct(int x1, int y1, int x2, int y2)
Return the z-coordinate of the vector product of two vectors, whose z-coordinate is 0 (so that x and ...
Definition: types.hh:115
int y
Definition: types.hh:93
dw::core::Shape implemtation for simple rectangles.
Definition: types.hh:69
static Content::Type maskForSelection(bool followReferences)
Definition: types.cc:271
Type
Definition: types.hh:199
void addWidgetProcessedAsInterruption(Widget *widget)
Definition: types.hh:282
WidgetReference * widgetReference
Definition: types.hh:238
int maxy
Definition: types.hh:108
dw::core::Shape implemtation for polygons.
Definition: types.hh:104
int minWidth
Definition: types.hh:181
reference to a widget out of flow (OOF); this widget (containing this content) is only the generator ...
Definition: types.hh:217
lout::misc::SimpleVector< Point > * points
Definition: types.hh:107
int maxWidth
Definition: types.hh:182
This is the base class for many other classes, which defines very common virtual methods.
Definition: object.hh:24
virtual bool isPointWithin(int x, int y)=0
int y
Definition: types.hh:52
int x
Definition: types.hh:72
bool linesCross(int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2, int by2)
Return, whether the line, limited by (ax1, ay1) and (ax2, ay2), crosses the line, limited by (bx1...
Definition: types.cc:189
dw::core::Shape implemtation for simple circles.
Definition: types.hh:90
bool space
Definition: types.hh:234
int x
Definition: types.hh:93
Iterator< T > iterator()
Definition: container.hh:416
int minWidthIntrinsic
Definition: types.hh:183
widget in normal flow, so that this widget (containing this content) is both container (parent) and g...
Definition: types.hh:207
bool intersectsWith(Rectangle *otherRect, Rectangle *dest)
Definition: types.cc:53
widget out of flow (OOF); this widget (containing this content) is only the container (parent)...
Definition: types.hh:212
StackingProcessingContext()
Definition: types.hh:268
can be used internally, but should never be exposed, e. g. by iterators
Definition: types.hh:222
DrawingContext(Rectangle *toplevelArea)
Definition: types.hh:300
int width
Definition: types.hh:174
Typed version of container::untyped::HashSet.
Definition: container.hh:492
bool isEmpty()
Definition: types.hh:84
int adjustmentWidth
Definition: types.hh:185
virtual void draw(core::View *view, core::style::Style *style, int x, int y)=0
int width
Definition: types.hh:167
Represents the allocation, i.e. actual position and size of a dw::core::Widget.
Definition: types.hh:163
HPosition
Definition: types.hh:15
static void print(Content *content)
Definition: types.cc:344
VPosition
Definition: types.hh:25
int x
Definition: types.hh:51
Rectangle toplevelArea
Definition: types.hh:297
bool isSubsetOf(Rectangle *otherRect)
Definition: types.cc:78
void draw(core::View *view, core::style::Style *style, int x, int y)
Definition: types.cc:106
int minx
Definition: types.hh:108
Polygon()
Definition: types.cc:124
Rectangle * getToplevelArea()
Definition: types.hh:304
lout::container::typed::Iterator< Rectangle > rectangles()
Definition: types.hh:153
bool isPointWithin(int x, int y)
Definition: types.cc:87
Set at the top when drawing.
Definition: types.hh:294
bool isPointWithin(int x, int y)
Definition: types.cc:115
Simple (simpler than container::untyped::Vector and container::typed::Vector) template based vector...
Definition: misc.hh:93
bool linesCross0(int ax1, int ay1, int ax2, int ay2, int bx1, int by1, int bx2, int by2)
Return, whether the line, limited by (ax1, ay1) and (ax2, ay2), crosses the unlimited line...
Definition: types.cc:173
Widget * getWidget()
Definition: types.hh:249
int radius
Definition: types.hh:93
lout::container::typed::HashSet< lout::object::TypedPointer< Widget > > * widgetsProcessedAsInterruption
Definition: types.hh:265
int ascent
Definition: types.hh:168
HighlightLayer
Definition: types.hh:42
static void printMask(Type mask)
Definition: types.cc:351
int height
Definition: types.hh:75
int maxWidthIntrinsic
Definition: types.hh:184
void draw(core::View *view, core::style::Style *style, int x, int y)
Definition: types.cc:139
int breakSpace
Definition: types.hh:239
Dw is in this namespace, or sub namespaces of this one.
Definition: alignedtablecell.cc:28
An interface to encapsulate platform dependent drawing.
Definition: view.hh:16
void addPoint(int x, int y)
Definition: types.cc:156
bool hasWidgetBeenProcessedAsInterruption(Widget *widget)
Definition: types.hh:277
int descent
Definition: types.hh:176
int width
Definition: types.hh:74
void clear()
Definition: types.hh:149
Typed version of container::untyped::Iterator.
Definition: container.hh:373
Widget * widget
Definition: types.hh:237
int maxx
Definition: types.hh:108
int descent
Definition: types.hh:169
ScrollCommand
Definition: types.hh:35
Rectangle()
Definition: types.hh:77
void clear()
Definition: container.hh:469
Region()
Definition: types.cc:223
lout::container::typed::List< Rectangle > * rectangleList
Definition: types.hh:143
int y
Definition: types.hh:73
~Region()
Definition: types.cc:228
void addRectangle(Rectangle *r)
Add a rectangle to the region and combine it with existing rectangles if possible. The number of rectangles is forced to be less than 16 by combining excessive rectangles.
Definition: types.cc:239
Typed version of container::untyped::List.
Definition: container.hh:463
bool isPointWithin(int x, int y)
Definition: types.cc:200
A typed version of object::Pointer.
Definition: object.hh:115
~StackingProcessingContext()
Definition: types.hh:274
int ascent
Definition: types.hh:175
int miny
Definition: types.hh:108
int y
Definition: types.hh:166
Circle(int x, int y, int radius)
Definition: types.cc:96