GuiMark (class)
public abstract GuiMark
Import from: CURL.GUI.STANDARD. Defined in package CURL.GUI.BASE.
Direct Known Subclasses: DefaultBoxGuiMark, SimpleGuiMark

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.

Properties
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

Methods
before-child?:Is this mark located before a specific child?
public abstract {GuiMark.before-child? g:Graphic}:bool
clone:return a copy of this GuiMark
public abstract {GuiMark.clone}:GuiMark
compare:Compare the position of this GuiMark to another GuiMark.
public {GuiMark.compare gm:GuiMark}:GraphicalOrder
compare-at-target:Is this mark before, after, or equal to another GuiMark which points to the same Graphic?
protected abstract {GuiMark.compare-at-target}:GraphicalOrder
current-location:Get a graphical location of this GuiMark
public {GuiMark.current-location
start-of-region?:bool
}:(x:Distance, y:Distance)
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.
public abstract {GuiMark.move-after-child g:Graphic}:GuiMark
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-before-child g:Graphic}:GuiMark
move-to-leading-edge:Move this GuiMark to the leading edge position in its Graphic.
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 {GuiMark.move-to-point x:Distance, y:Distance}:bool
move-to-trailing-edge:Move this GuiMark to the trailing edge position in its Graphic.
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
Methods inherited from Object: object-describe, object-describe-for-debugging, object-serialize




Property Details
at-leading-edge? (accessor)
accessor public abstract GuiMark.at-leading-edge?:bool

Is this GuiMark positioned at the far leading edge of its Graphic?



at-trailing-edge? (accessor)
accessor public abstract GuiMark.at-trailing-edge?:bool

Is this GuiMark positioned at the far trailing edge of its Graphic?



graphic (accessor)
accessor public abstract GuiMark.graphic:Graphic

The Graphic this mark refers to.



next-child (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.


prev-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.


valid? (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 Details
before-child? (method)
public abstract {GuiMark.before-child? g:Graphic}:bool

Is this mark located before a specific child?

g: A child Graphic of self.target If g is not a child of self.target, a GuiMarkComparisonException will be thrown.


clone (method)
public abstract {GuiMark.clone}:GuiMark

return a copy of this GuiMark



compare (method)
public {GuiMark.compare gm:GuiMark}:GraphicalOrder

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

Overriding

Not normally overridden. Instead, developers should override GuiMark.compare-at-target.


compare-at-target (method)
protected abstract {GuiMark.compare-at-target}:GraphicalOrder

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

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.


current-location (method)
public {GuiMark.current-location
start-of-region?:bool
}:(x:Distance, y:Distance)

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.


ensure-valid (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.


move-after-child (method)
public abstract {GuiMark.move-after-child g:Graphic}:GuiMark

Move this GuiMark to the position immediately following child Graphic g. If g not found, move to the trailing edge.

g: A child Graphic of self.target If g is not a child of self.target, a GuiMarkComparisonException will be thrown.


move-before-child (method)
public abstract {GuiMark.move-before-child g:Graphic}:GuiMark

Move this GuiMark to the position immediately preceding child Graphic g. If g not found, move to the leading edge.

g: A child Graphic of self.target If g is not a child of self.target, a GuiMarkComparisonException will be thrown.

Returns

A reference to self.


move-to-leading-edge (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.


move-to-point (method)
public {GuiMark.move-to-point x:Distance, y:Distance}:bool

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.


move-to-trailing-edge (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.


next-mark (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.


path-intersects? (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

Overriding

Not normally overridden.
Introduced in: version 7.0


prev-mark (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.