SubwindowKit

class HPS::SubwindowKit : public HPS::Kit

The HPS::SubwindowKit class is a user space object, useful for carrying a group of attribute settings related to subwindows. Calling HPS::SubwindowKit::GetDefault() will return a kit with values found in this table.

Public Functions

virtual bool Empty() const

Indicates whether this object has any values set on it.

Returns

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

bool Equals(SubwindowKit const &in_kit) const

Check if the source SubwindowKit is equivalent to this object.

Parameters

in_kit – The source SubwindowKit to compare to this object.

Returns

true if the objects are equivalent, false otherwise.

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!=(SubwindowKit const &in_kit) const

Check if the source SubwindowKit is not equivalent to this object.

Parameters

in_kit – The source SubwindowKit to compare to this object.

Returns

true if the objects are not equivalent, false otherwise.

SubwindowKit &operator=(SubwindowKit &&in_that)

The move assignment operator transfers the underlying impl of the rvalue reference to this SubwindowKit thereby avoiding a copy.

Parameters

in_that – An rvalue reference to a SubwindowKit to take the impl from.

Returns

A reference to this SubwindowKit.

SubwindowKit &operator=(SubwindowKit const &in_kit)

Copies the source SubwindowKit into this object.

Parameters

in_kit – The source SubwindowKit to copy.

Returns

A reference to this object.

bool operator==(SubwindowKit const &in_kit) const

Check if the source SubwindowKit is equivalent to this object.

Parameters

in_kit – The source SubwindowKit to compare to this object.

Returns

true if the objects are equivalent, false otherwise.

void Set(SubwindowKit const &in_kit)

Copies the source SubwindowKit into this object.

Parameters

in_kit – The source object to copy.

SubwindowKit &SetBackground(Subwindow::Background in_bg_type, char const *in_definition_name = "")

Controls the type of background to be used for subwindows originating from this segment. This has no effect when applied to segments without a subwindow present.

Parameters
  • in_bg_type – The type of background to be used for subwindows originating from this segment.

  • in_definition_name – the name of a definition to be used in the background. Only relevant if in_bg_type is Image or Cubemap.

Returns

A reference to this object.

SubwindowKit &SetBorder(Subwindow::Border in_border_type)

Controls the type of border, if any, that should be drawn for subwindows originating from this segment. This has no effect when applied to segments without a subwindow present.

Parameters

in_border_type – The type of border, if any, that should be drawn for subwindows originating from this segment.

Returns

A reference to this object.

SubwindowKit &SetModelCompareMode(bool in_state, SegmentKey const &in_source1 = SegmentKey(), SegmentKey const &in_source2 = SegmentKey())

Sets ‘model compare’ rendering mode which displays a visual diff between the two source segments in this subwindow.

Parameters
  • in_state – Toggles compare mode on or off.

  • in_source1 – The first source model.

  • in_source2 – The second source model.

Returns

A reference to this object.

SubwindowKit &SetModelCompareMode(SegmentKey const &in_source1, SegmentKey const &in_source2)

Sets ‘model compare’ rendering mode which displays a visual diff between the two source segments in this subwindow.

Parameters
  • in_source1 – The first source model.

  • in_source2 – The second source model.

Returns

A reference to this object.

SubwindowKit &SetRenderingAlgorithm(Subwindow::RenderingAlgorithm in_hsra)

Determines the algorithm used to remove objects (or parts of objects) that are hidden from view by other objects. This has no effect when applied to segments without a subwindow present.

Parameters

in_hsra – The algorithm used to identify and remove hidden surfaces.

Returns

A reference to this object.

SubwindowKit &SetSubwindow(Rectangle const &in_subwindow_position, IntRectangle const &in_subwindow_offsets, Subwindow::Type in_subwindow_type = Subwindow::Type::Standard)

Defines a portion of the containing window to act as a subwindow. Window segments have an implicit subwindow of -1 to 1 in both x and y directions that cannot be changed. Other segments can be constrained to some portion of that space. Most other subwindow-related settings are only relevant if they are applied on a segment that also contains a subwindow.

Parameters
  • in_subwindow_position – The portion of the containing window that should be reserved for a subwindow. The subwindow is defined in the context of a rectangle extending out a single unit in each direction from the origin. For example, a subwindow rectangle defined as Rectangle(0, 1, -1, 0) would occupy the lower right quarter of the containing window.

  • in_subwindow_offsets – The pixel-space offsets to apply to each side of the given window position.

  • in_subwindow_type – The type of subwindow to create.

Returns

A reference to this object.

SubwindowKit &SetSubwindow(Rectangle const &in_subwindow_position, Subwindow::Type in_subwindow_type = Subwindow::Type::Standard)

Defines a portion of the containing window to act as a subwindow. Window segments have an implicit subwindow of -1 to 1 in both x and y directions that cannot be changed. Other segments can be constrained to some portion of that space. Most other subwindow-related settings are only relevant if they are applied on a segment that also contains a subwindow.

Parameters
  • in_subwindow_position – The portion of the containing window that should be reserved for a subwindow. The subwindow is defined in the context of a rectangle extending out a single unit in each direction from the origin. For example, a subwindow rectangle defined as Rectangle(0, 1, -1, 0) would occupy the lower right quarter of the containing window.

  • in_subwindow_type – The type of subwindow to create.

Returns

A reference to this object.

void Show(SubwindowKit &out_kit) const

Copies this object into the given SubwindowKit.

Parameters

out_kit – The SubwindowKit to populate with the contents of this object.

bool ShowBackground(Subwindow::Background &out_bg_type, UTF8 &out_definition_name) const

Shows the window background setting

Parameters
  • out_bg_type – The type of background to be used for subwindows originating from this segment.

  • out_definition_name – the name of a definition to be used in the background.

Returns

true if the setting is valid, false otherwise.

bool ShowBorder(Subwindow::Border &out_border_type) const

Shows the subwindow border setting

Parameters

out_border_type – The type of border, if any, that should be drawn for subwindows originating from this segment.

Returns

true if the setting is valid, false otherwise.

bool ShowModelCompareMode(bool &out_state, SegmentKey &out_source1, SegmentKey &out_source2) const

Shows the model compare setting.

Parameters
  • out_state – The model compare enabled state.

  • out_source1 – The first source model.

  • out_source2 – The second source model.

Returns

true if the setting is valid, false otherwise.

bool ShowRenderingAlgorithm(Subwindow::RenderingAlgorithm &out_hsra) const

Shows the rendering algorithm setting.

Parameters

out_hsra – The algorithm used to identify and remove hidden surfaces.

Returns

true if the setting is valid, false otherwise.

bool ShowSubwindow(Rectangle &out_subwindow_position, IntRectangle &out_subwindow_offsets, Subwindow::Type &out_subwindow_type) const

Shows the subwindow setting.

Parameters
  • out_subwindow_position – The portion of the containing window that should be reserved for a subwindow.

  • out_subwindow_offsets – The pixel-space offsets being applied to the subwindow position.

  • out_subwindow_type – The type of subwindow to create.

Returns

true if the setting is valid, false otherwise.

SubwindowKit()

Initializes an empty kit.

SubwindowKit(SubwindowKit &&in_that)

The move constructor creates a SubwindowKit by transferring the underlying impl of the rvalue reference to this SubwindowKit thereby avoiding a copy and allocation.

Parameters

in_that – An rvalue reference to a SubwindowKit to take the impl from.

SubwindowKit(SubwindowKit const &in_kit)

Copies the kit in_kit into this kit.

SubwindowKit &UnsetBackground()

Removes a subwindow background setting.

Returns

A reference to this object.

SubwindowKit &UnsetBorder()

Removes a subwindow border setting.

Returns

A reference to this object.

SubwindowKit &UnsetEverything()

Removes all settings from this object.

Returns

A reference to this object.

SubwindowKit &UnsetModelCompareMode()

Removes model compare setting.

Returns

A reference to this object.

SubwindowKit &UnsetRenderingAlgorithm()

Removes a rendering algorithm setting.

Returns

A reference to this object.

SubwindowKit &UnsetSubwindow()

Removes a subwindow setting.

Returns

A reference to this object.

virtual ~SubwindowKit()

Destroy this kit.

Public Static Functions

static SubwindowKit GetDefault()

Creates a SubwindowKit which contains the default settings. The returned object will not necessarily have values set for every option, but it will have settings for those options where it is reasonable to have a default.

Returns

A SubwindowKit with the default settings.

Public Static Attributes

static const HPS::Type staticType = HPS::Type::SubwindowKit