GridKit

class GridKit : public HPS::Kit

The GridKit class is a user space object. It is a kit analog to a GridKey.

Public Functions

void Consume(GridKit &in_kit)

Copies the source GridKit into this GridKit and resets the source kit.

Parameters:

in_kit – The source GridKit to consume.

virtual bool Empty() const

Indicates whether this GridKit has any values set on it.

Returns:

true if no values are set on this GridKit, false otherwise.

bool Equals(GridKit const &in_kit) const

Check if the source GridKit is equivalent to this GridKit.

Parameters:

in_kit – The source GridKit to compare to this GridKit.

Returns:

true if the objects are equivalent, false otherwise.

GridKit()

The default constructor creates an empty GridKit object.

GridKit(GridKit &&in_that)

The move constructor creates a GridKit by transferring the underlying object of the rvalue reference to this GridKit.

Parameters:

in_that – An rvalue reference to a GridKit to take the underlying object from.

GridKit(GridKit const &in_kit)

The copy constructor creates a new GridKit object that contains the same settings as the source GridKit.

Parameters:

in_kit – The source GridKit to copy.

inline virtual HPS::Type ObjectType() const

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Returns:

The declared type of the object in question, which may differ from the true, underlying type.

bool operator!=(GridKit const &in_kit) const

Check if the source GridKit is not equivalent to this GridKit.

Parameters:

in_kit – The source GridKit to compare to this GridKit.

Returns:

true if the objects are not equivalent, false otherwise.

GridKit &operator=(GridKit &&in_that)

The move assignment operator transfers the underlying object of the rvalue reference to this GridKit.

Parameters:

in_that – An rvalue reference to a GridKit to take the underlying object from.

Returns:

A reference to this GridKit.

GridKit &operator=(GridKit const &in_kit)

Copies the source GridKit into this GridKit.

Parameters:

in_kit – The source GridKit to copy.

Returns:

A reference to this GridKit.

bool operator==(GridKit const &in_kit) const

Check if the source GridKit is equivalent to this GridKit.

Parameters:

in_kit – The source GridKit to compare to this GridKit.

Returns:

true if the objects are equivalent, false otherwise.

void Set(GridKit const &in_kit)

Copies the source GridKit into this GridKit.

Parameters:

in_kit – The source GridKit to copy.

GridKit &SetFirstCount(int in_first_count)

Sets the first reference count for this GridKit, i.e., the number of grid elements along the vector determined by the first reference point. If the type of the grid is Grid::Type::Quadrilateral, there are three type of behavior depending on if the count is greater than zero, less than zero, or equal to zero. If the count is greater than zero, the count determines the finite number of grid lines which will intersect with the vector determined by the first reference point. If the count is less than zero, the count determines the finite number of grid lines which will intersect with the vector determined by the first reference point and additionally that same number of intersections along the negation of that vector. Lastly, if the count is zero, the grid will extend infinitely along the vector determined by the first reference point and its negation. If the type of the grid is Grid::Type::Radial, there are two types of behavior depending on if the count is greater than zero or equal to zero. If the count is greater than zero, it determines the finite number of circular arcs which will intersect with the radial vectors. If the count is equal to zero, there will be an infinite number of intersections along the radial arcs. Negative counts are invalid in this case.

Parameters:

in_first_count – The count of the number of grid elements along the vector determined by the first reference point.

Returns:

A reference to this GridKit.

GridKit &SetFirstPoint(Point const &in_first_point)

Sets the first reference point for this GridKit. If the type of the grid is Grid::Type::Quadrilateral, this defines the first point along one of the vectors defining the grid (the other vector is determined by the second point). It also determines the spacing between the grid lines along the vector. If the type of the grid is Grid::Type::Radial, this defines the first point along the radius vector which will intersect with the circular grid arcs.

Parameters:

in_first_point – The first reference point for this GridKit.

Returns:

A reference to this GridKit.

GridKit &SetOrigin(Point const &in_origin)

Sets the origin for this GridKit.

Parameters:

in_origin – The origin for this GridKit.

Returns:

A reference to this GridKit.

GridKit &SetPriority(int in_priority)

Assigns a specific drawing priority value to the GridKit. It affects the order in which the contents of this segment are drawn if and only if the rendering algorithm is set to Priority.

See also

SubwindowKit::SetPriority()

Parameters:

in_priority – The drawing priority, higher priority items are drawn on top of lower priority items.

Returns:

A reference to this object.

GridKit &SetSecondCount(int in_second_count)

Sets the second reference count for this GridKit, i.e., the number of grid elements along the vector determined by the second reference point. If the type of the grid is Grid::Type::Quadrilateral, there are three type of behavior depending on if the count is greater than zero, less than zero, or equal to zero. If the count is greater than zero, the count determines the finite number of grid lines which will intersect with the vector determined by the second reference point. If the count is less than zero, the count determines the finite number of grid lines which will intersect with the vector determined by the second reference point and additionally that same number of intersections along the negation of that vector. Lastly, if the count is zero, the grid will extend infinitely along the vector determined by the second reference point and its negation. If the type of the grid is Grid::Type::Radial, the count determines the number of radial vectors for the grid.

Parameters:

in_second_count – The count of the number of grid elements along the vector determined by the second reference point.

Returns:

A reference to this GridKit.

GridKit &SetSecondPoint(Point const &in_second_point)

Sets the second reference point for this GridKit. If the type of the grid Grid::Type::Quadrilateral, this defines the first point along the second vector defining the grid (the other vector is determined by the first point). It also determines the spacing between the grid lines along the vector. If the type of the grid is Grid::Type::Radial, this defines the first point on the first circular arc which intersects with the radial vectors, and determines the spacing of the arcs along the radial vectors.

Parameters:

in_second_point – The second reference point for this GridKit.

Returns:

A reference to this GridKit.

GridKit &SetType(Grid::Type in_type)

Sets the type of this GridKit.

Parameters:

in_type – The type of this GridKit.

Returns:

A reference to this GridKit.

GridKit &SetUserData(intptr_t in_index, ByteArray const &in_data)

Sets user data on this kit.

Parameters:
  • in_index – The index of the user data to set.

  • in_data – The bytes of user data to set.

Returns:

A reference to this kit.

GridKit &SetUserData(intptr_t in_index, size_t in_bytes, byte const in_data[])

Sets user data on this kit.

Parameters:
  • in_index – The index of the user data to set.

  • in_bytes – The number of bytes of user data to set.

  • in_data – The bytes of user data to set.

Returns:

A reference to this kit.

GridKit &SetUserData(IntPtrTArray const &in_indices, ByteArrayArray const &in_data)

Sets user data on this kit.

Parameters:
  • in_indices – An array of user data indices to set.

  • in_data – An array of bytes of user data to set.

Returns:

A reference to this kit.

void Show(GridKit &out_kit) const

Copies this GridKit into the given GridKit.

Parameters:

out_kit – The GridKit to populate with the contents of this GridKit.

bool ShowFirstCount(int &out_first_count) const

Shows the first reference count for this GridKit.

Parameters:

out_first_count – The first reference count for this GridKit.

Returns:

true if a first reference count was set, false otherwise.

bool ShowFirstPoint(Point &out_first_point) const

Shows the first reference point for this GridKit.

Parameters:

out_first_point – The first reference point for this GridKit.

Returns:

true if a first reference point was set, false otherwise.

bool ShowOrigin(Point &out_origin) const

Shows the origin for this GridKit.

Parameters:

out_origin – The origin for this GridKit.

Returns:

true if an origin was set, false otherwise.

bool ShowPriority(int &out_priority) const

Shows the drawing priority.

Parameters:

out_priority – The drawing priority, higher priority items are drawn on top of lower priority items.

Returns:

true if the setting is valid, false otherwise.

bool ShowSecondCount(int &out_second_count) const

Shows the second reference count for this GridKit.

Parameters:

out_second_count – The second reference count for this GridKit.

Returns:

true if a second reference count was set, false otherwise.

bool ShowSecondPoint(Point &out_second_point) const

Shows the second reference point for this GridKit.

Parameters:

out_second_point – The second reference point for this GridKit.

Returns:

true if a second reference point was set, false otherwise.

bool ShowType(Grid::Type &out_type) const

Shows the type for this GridKit.

Parameters:

out_type – The type for this GridKit.

Returns:

true if a type was set, false otherwise.

bool ShowUserData(intptr_t in_index, ByteArray &out_data) const

Shows the user data at a given index for this kit.

Parameters:
  • in_index – The index of the user data to show.

  • out_data – The user data at the given index.

Returns:

true if there is user data at the given index, false otherwise.

bool ShowUserData(IntPtrTArray &out_indices, ByteArrayArray &out_data) const

Shows all user data for this kit.

Parameters:
  • out_indices – An array of all user data indices set on this kit.

  • out_data – An array of all user data set on this kit.

Returns:

true if there is user data on this kit, false otherwise.

size_t ShowUserDataCount() const

Get the number of user data indices set on this kit.

bool ShowUserDataIndices(IntPtrTArray &out_indices) const

Shows the indices of all user data set on this kit.

Parameters:

out_indices – The user data indices set on this kit.

Returns:

The number of user data indices set on this kit.

GridKit &UnsetAllUserData()

Removes all user data from this kit.

Returns:

A reference to this kit.

GridKit &UnsetEverything()

Removes the all settings from this GridKit.

Returns:

A reference to this GridKit.

GridKit &UnsetFirstCount()

Removes the first reference count from this GridKit.

Returns:

A reference to this GridKit.

GridKit &UnsetFirstPoint()

Removes the first reference point from this GridKit.

Returns:

A reference to this GridKit.

GridKit &UnsetOrigin()

Removes the origin from this GridKit.

Returns:

A reference to this GridKit.

GridKit &UnsetPriority()

Removes a drawing priority setting.

Returns:

A reference to this GridKit.

GridKit &UnsetSecondCount()

Removes the second reference count from this GridKit.

Returns:

A reference to this GridKit.

GridKit &UnsetSecondPoint()

Removes the second reference point from this GridKit.

Returns:

A reference to this GridKit.

GridKit &UnsetType()

Removes the type from this GridKit.

Returns:

A reference to this GridKit.

GridKit &UnsetUserData(intptr_t in_index)

Removes the user data at the given index from this kit.

Parameters:

in_index – The index of the user data to remove.

Returns:

A reference to this kit.

GridKit &UnsetUserData(IntPtrTArray const &in_indices)

Removes the user data at the given indices from this kit.

Parameters:

in_indices – The indices of the user data to remove.

Returns:

A reference to this kit.

GridKit &UnsetUserData(size_t in_count, intptr_t const in_indices[])

Removes the user data at the given indices from this kit.

Parameters:
  • in_count – The size of the following array.

  • in_indices – The indices of the user data to remove.

Returns:

A reference to this kit.

virtual ~GridKit()

Public Static Attributes

static const HPS::Type staticType = HPS::Type::GridKit