diff options
Diffstat (limited to 'kig/DESIGN')
-rw-r--r-- | kig/DESIGN | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -19,7 +19,7 @@ An ObjectImp represents the current state of an object in Kig. It keeps information about what type of object it is ( e.g. a line, a point, a circle etc. ), and its exact data ( e.g. the center and radius of the circle ). It is *not* in any way aware of how the -object was calculated from its tqparents (e.g. is this a line that is +object was calculated from its parents (e.g. is this a line that is constructed as the parallel of another line, or as the line going through two given points ? ) or how it is drawn on the window ( e.g. the thickness of the line, its color etc. ). @@ -50,21 +50,21 @@ calculating an ObjectImp from other ObjectImp's. It is also a node in the dependency graph of a certain document. E.g. a LineImp can be calculated from the two PointImp's it has to go through; every time either of them moves, this calculation is redone. In this case, there -would be an ObjectCalcer that keeps a reference to its two tqparents ( +would be an ObjectCalcer that keeps a reference to its two parents ( the ObjectCalcer's representing the points ), and that will calculate its ObjectImp value every time it is asked to do so ( i.e. every time -one of its tqparents moves.. ). +one of its parents moves.. ). Because of the complex relations that ObjectCalcer's hold to other ObjectCalcer's and to other classes, they have been made reference-counted. This means that they keep a count internally of how much times a pointer to them is held. If this count reaches 0, this means that nobody needs them anymore, and they delete themselves. -E.g. an ObjectCalcer always keeps a reference to its tqparents, to +E.g. an ObjectCalcer always keeps a reference to its parents, to ensure that those aren't deleted before it is deleted. In the inheritance graph of a document, the lowermost objects keep -references to their tqparents and those keep reference to their tqparents, +references to their parents and those keep reference to their parents, so that all of the top of the graph is kept alive. Of course, someone needs to keep a reference to the bottommost objects in the graph, because otherwise, the entire graph would be deleted. As we will see @@ -76,7 +76,7 @@ At the end of the program, this reference is released, and all the objects are deleted. A special case of an ObjectCalcer is the ObjectConstCalcer. This is -an ObjectCalcer that has no tqparents, and only holds some data. The +an ObjectCalcer that has no parents, and only holds some data. The data is held as an ObjectImp of some type, and it will remain constant, and no calculation needs to be done to get it, it is just returned every time it is needed. @@ -159,9 +159,9 @@ Most of this is handled by the TextType class. 2.1.2 TextType The TextType class is an implementation of an ObjectType. It tqcontains -code specifying how to calculate a TextImp from its tqparents, and for +code specifying how to calculate a TextImp from its parents, and for how it behaves on user input. A text object has at least three -tqparents, and can handle any number of optional arguments. The three +parents, and can handle any number of optional arguments. The three mandatory arguments are an int, which is set to 1 or 0 depending on whether the label needs a surrounding box, a PointImp, containing the location of the text label, and a string containing the text of the @@ -170,7 +170,7 @@ additional argument is used to replace the lowest-numbered of those tokens, with its string representation. The function ObjectImp::fillInNextEscape is used for this. -For example, if a TextType has the following tqparents: +For example, if a TextType has the following parents: a IntImp with value 0 a PointImp with value (0,0) a String with value "This segment is %1 units long." @@ -197,7 +197,7 @@ proud of this design. In the implementation of this, we use the concept of constrained points. This is a point that is attached to a certain curve. It is implemented in Kig by the ConstrainedPointType, which takes a CurveImp -and a DoubleImp as tqparents and calculates a Point from these by using +and a DoubleImp as parents and calculates a Point from these by using the CurveImp::getPoint function. 2.2.2 The Implementation @@ -213,7 +213,7 @@ smallest part of the hierarchy that contains all paths from the first point to the second point. We then determine all objects that are not *on* one of those paths ( meaning that they are not calculated from the first point, or another object that is on one of those paths ), -but that are tqparents of one or more objects that are on those paths. +but that are parents of one or more objects that are on those paths. I call this set of objects the "side of the path" sometimes in the code. The function that finds them is called sideOfTreePath. @@ -260,7 +260,7 @@ does by definition not change. Also, if the constrained point is redefined so that it is no longer constrained to any curve, this is a major problem, because it would tqinvalidate the locus. Another point is that in practice, the locus depends on more objects than its -tqparents alone. This is not a good thing, because it makes it +parents alone. This is not a good thing, because it makes it impossible to optimise drawing of the objects, using the information about which objects depend on which others, because this information is invalid. |