(class)
public abstract GuiMark
Marker of hierarchical position in the graphical hierarchy.
Overriding
All constructors for subclasses of this object should call the method
GuiMark.move-to-leading-edge before returning in order to initialize themselves to point to the leading edge of the graphic to which they refer.
| at-leading-edge?: | Is this GuiMark positioned at the far leading edge of its Graphic? |
accessor public abstract GuiMark.at-leading-edge?:
bool
| at-trailing-edge?: | Is this GuiMark positioned at the far trailing edge of its Graphic? |
accessor public abstract GuiMark.at-trailing-edge?:
bool
| graphic: | The Graphic this mark refers to. |
accessor public abstract GuiMark.graphic:
Graphic
| next-child: | The next child Graphic after this GuiMark. Identifies the "slot" between children in which this GuiMark is positioned. |
accessor public abstract GuiMark.next-child:#
Graphic
| prev-child: | The previous child Graphic before this GuiMark. Identifies the "slot" between children in which this GuiMark is positioned. |
accessor public abstract GuiMark.prev-child:#
Graphic
| valid?: | Is this GuiMark in a valid state?. Changes to the underlying graphical hierarchy can invalidate a GuiMark. Users of the GuiMark should query this before attempting any methods on the GuiMark, or risk InvalidGuiMarkExceptions. |
accessor public abstract GuiMark.valid?:
bool
| clone: | return a copy of this GuiMark |
| public abstract | {GuiMark.clone}:GuiMark |
| compare: | Compare the position of this GuiMark to another GuiMark. |
| compare-at-target: | Is this mark before, after, or equal to another GuiMark which points to the same Graphic? |
| ensure-valid: | Create and throw exception if GuiMark is not valid. |
| public | {GuiMark.ensure-valid method-name:String}:void |
| move-after-child: | Move this GuiMark to the position immediately following child Graphic g. If g not found, move to the trailing edge. |
| move-before-child: | Move this GuiMark to the position immediately preceding child Graphic g. If g not found, move to the leading edge. |
| public abstract | {GuiMark.move-to-leading-edge}:GuiMark |
| move-to-point: | Move this GuiMark to the semantic position associated with the local coordinates given. |
| public abstract | {GuiMark.move-to-trailing-edge}:GuiMark |
| next-mark: | Get the mark at the position immediately following this mark. |
| public | {GuiMark.next-mark descend-to-child?:bool = false}:#GuiMark |
| path-intersects?: | Does the path to this GuiMark from the root pass through a given Graphic? |
| public | {GuiMark.path-intersects?}:(answer:bool, child-at-intersection:#Graphic) |
| prev-mark: | Get a mark at the position immediately preceding this mark. |
| public | {GuiMark.prev-mark descend-to-child?:bool = false}:#GuiMark |
(accessor)
accessor public abstract GuiMark.at-leading-edge?:
bool Is this GuiMark positioned at the far leading edge of its Graphic?
(accessor)
accessor public abstract GuiMark.at-trailing-edge?:
bool Is this GuiMark positioned at the far trailing edge of its Graphic?
(accessor)
accessor public abstract GuiMark.graphic:
Graphic The Graphic this mark refers to.
(accessor)
accessor public abstract GuiMark.next-child:#
Graphic The next child Graphic after this GuiMark. Identifies the "slot" between children in which this GuiMark is positioned.
Returns
A GuiMark referring to the area between children a and b would return b here. A value of null indicates a position after the last child.
(accessor)
accessor public abstract GuiMark.prev-child:#
Graphic The previous child Graphic before this GuiMark. Identifies the "slot" between children in which this GuiMark is positioned.
Returns
A GuiMark referring to the area between children a and b would return a here. A value of null indicates a position before the first child.
(accessor)
accessor public abstract GuiMark.valid?:
bool Is this GuiMark in a valid state?. Changes to the underlying graphical hierarchy can invalidate a GuiMark. Users of the GuiMark should query this before attempting any methods on the GuiMark, or risk InvalidGuiMarkExceptions.
(method)
Is this mark located before a specific child?
(method)
| public abstract | {GuiMark.clone}:GuiMark |
return a copy of this GuiMark
(method)
Compare the position of this GuiMark to another GuiMark.
gm: The second
GuiMark to be considered. If
gm.graphic and
self.graphic are not in the same graphic hierarchy, a
GuiMarkComparisonException will be thrown.
Returns
- returns GraphicalOrder.before if self is before gm
- returns GraphicalOrder.equal if self is positionally equivalent to gm
- returns GraphicalOrder.after if self is after of gm
Overriding
(method)
Is this mark before, after, or equal to another GuiMark which points to the same Graphic?
gm: The second GuiMark to be considered. This should be of the same concrete type as self and reference the same Graphic; otherwise an error will result.
Returns
- returns GraphicalOrder.before if self is before of gm
- returns GraphicalOrder.equal if self is positionally equivalent to gm
- returns GraphicalOrder.after if self is after gm
Programming Notes
Should not be called directly. Instead, consider calling
GuiMark.compare However, authors of subclasses of
GuiMark are likely to want to override inherited implementations of this method.
(method)
Get a graphical location of this GuiMark
start-of-region?: A boolean that indicates whether the mark is being used as the start mark or end-mark of a region (typically a
GuiRange).
Programming Notes
The purpose of this method is to provide a rough way to describe the physical location of a GuiMark. This is particularly useful for the purposes of scrolling to it. However, remember that a GuiMark is primarily a logical position in the graphic hierarchy. In particular, no guarantees can be made that this method will return the same values for semantically equivalent GuiMarks, nor for the same GuiMark through time.
(method)
| public | {GuiMark.ensure-valid method-name:String}:void |
Create and throw exception if GuiMark is not valid.
method-name: Typically name of the method from which this method is called. This
String is part of the exception text and so helps in debugging.
(method)
Move this GuiMark to the position immediately following child Graphic g. If g not found, move to the trailing edge.
(method)
Move this GuiMark to the position immediately preceding child Graphic g. If g not found, move to the leading edge.
Returns
A reference to self.
(method)
| public abstract | {GuiMark.move-to-leading-edge}:GuiMark |
Move this GuiMark to the leading edge position in its Graphic.
Returns
a reference to self.
(method)
Move this GuiMark to the semantic position associated with the local coordinates given.
Returns
boolean indicating whether the mark could be successfully moved to the requested point. If false, the marks position will have been left unchanged.
(method)
| public abstract | {GuiMark.move-to-trailing-edge}:GuiMark |
Move this GuiMark to the trailing edge position in its Graphic.
Returns
a reference to self.
(method)
| public | {GuiMark.next-mark descend-to-child?:bool = false}:#GuiMark |
Get the mark at the position immediately following this mark.
descend-to-child?: A boolean indicating whether to return a mark in a graphical child of the Graphic referred to by this mark.
Returns
A newly allocated GuiMark, or null if no such mark can be found.
(method)
| public | {GuiMark.path-intersects?}:(answer:bool, child-at-intersection:#Graphic) |
Does the path to this GuiMark from the root pass through a given Graphic?
g: The Graphic to be considered.
Returns
- answer, a boolean which true if there is intersection is found.
- child-at-intersection, a Graphic which is the child of g followed by the path to self.graphic. If answer is false, or self.graphic is equal to g, this should be null.
Overriding
Not normally overridden.
Introduced in:
version 7.0
(method)
| public | {GuiMark.prev-mark descend-to-child?:bool = false}:#GuiMark |
Get a mark at the position immediately preceding this mark.
descend-to-child?: A boolean indicating whether to return a mark in a graphical child of the Graphic referred to by this mark.
Returns
A newly allocated GuiMark, or null if no such mark can be found.