WindowInfoKit

class HPS::WindowInfoKit : public HPS::Kit

The WindowInfoKit class is a user space object, useful for carrying a group attribute settings.

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(WindowInfoKit const &in_kit) const

Check if the source WindowInfoKit is equivalent to this object.

Parameters

in_kit – The source WindowInfoKit 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!=(WindowInfoKit const &in_kit) const

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

Parameters

in_kit – The source WindowInfoKit to compare to this object.

Returns

true if the objects are not equivalent, false otherwise.

WindowInfoKit &operator=(WindowInfoKit &&in_that)

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

Parameters

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

Returns

A reference to this WindowInfoKit.

WindowInfoKit &operator=(WindowInfoKit const &in_kit)

Copies the source WindowInfoKit into this object.

Parameters

in_kit – The source WindowInfoKit to copy.

Returns

A reference to this object.

bool operator==(WindowInfoKit const &in_kit) const

Check if the source WindowInfoKit is equivalent to this object.

Parameters

in_kit – The source WindowInfoKit to compare to this object.

Returns

true if the objects are equivalent, false otherwise.

void Set(WindowInfoKit const &in_kit)

Copies the source WindowInfoKit into this object.

Parameters

in_kit – The source object to copy.

WindowInfoKit &SetPhysicalPixels(unsigned int in_width, unsigned int in_height)

Sets the number of pixels in the physical display (monitor, off-screen renderer, printer, etc.).

Parameters
  • in_width – The width of the physical display in pixels.

  • in_height – The height of the physical display in pixels.

Returns

A reference to this object.

WindowInfoKit &SetPhysicalSize(float in_width, float in_height)

Sets the size, in centimeters, of the physical display (monitor, off-screen renderer, printer, etc.).

Parameters
  • in_width – The width of the physical display in centimeters.

  • in_height – The height of the physical display in centimeters.

Returns

A reference to this object.

WindowInfoKit &SetWindowPixels(unsigned int in_width, unsigned int in_height)

Sets the number of pixels in the window.

Parameters
  • in_width – The width of the window in pixels.

  • in_height – The height of the window in pixels.

Returns

A reference to this object.

WindowInfoKit &SetWindowSize(float in_width, float in_height)

Sets the size, in centimeters, of the window.

Parameters
  • in_width – The width of the window in centimeters.

  • in_height – The height of the window in centimeters.

Returns

A reference to this object.

void Show(WindowInfoKit &out_kit) const

Copies this object into the given WindowInfoKit.

Parameters

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

bool ShowPhysicalPixels(unsigned int &out_width, unsigned int &out_height) const

Shows the number of pixels in the physical display (monitor, off-screen renderer, printer, etc.).

Parameters
  • out_width – The width of the physical display in pixels.

  • out_height – The height of the physical display in pixels.

Returns

true if the setting is valid, false otherwise.

bool ShowPhysicalSize(float &out_width, float &out_height) const

Shows the size, in centimeters, of the physical display (monitor, off-screen renderer, printer, etc.).

Parameters
  • out_width – The width of the physical display in centimeters.

  • out_height – The height of the physical display in centimeters.

Returns

true if the setting is valid, false otherwise.

bool ShowPixelAspectRatio(float &out_pixel_aspect) const

Shows the aspect ratio of the window’s pixels. This is computed as the horizontal resolution divided by the vertical resolution.

Parameters

out_pixel_aspect – The aspect ratio of the window defined as width / height in pixels.

Returns

true if the setting is valid, false otherwise.

bool ShowResolution(float &out_horizontal, float &out_vertical) const

Shows both the horizontal and vertical resolution of the window. Resolution is computed as pixels per centimeter. If the size or the pixels are not set, this function will return false.

Parameters
  • out_horizontal – The horizontal resolution of the window.

  • out_vertical – The vertical resolution of the window.

Returns

true if the setting is valid, false otherwise.

bool ShowWindowAspectRatio(float &out_window_aspect) const

Shows the aspect ratio of the window. Aspect ratio is computed as width / height in centimeters.

Parameters

out_window_aspect – The aspect ratio of the window defined as width / height in centimeters.

Returns

true if the setting is valid, false otherwise.

bool ShowWindowPixels(unsigned int &out_width, unsigned int &out_height) const

Shows the number of pixels in the window.

Parameters
  • out_width – The width of the window in pixels.

  • out_height – The height of the window in pixels.

Returns

true if the setting is valid, false otherwise.

bool ShowWindowSize(float &out_width, float &out_height) const

Shows the size, in centimeters, of the window.

Parameters
  • out_width – The width of the window in centimeters.

  • out_height – The height of the window in centimeters.

Returns

true if the setting is valid, false otherwise.

WindowInfoKit &UnsetEverything()

Removes all settings from this object.

Returns

A reference to this object.

WindowInfoKit &UnsetPhysicalPixels()

Unsets the number of pixels in the physical display (monitor, off-screen renderer, printer, etc.).

Returns

A reference to this object.

WindowInfoKit &UnsetPhysicalSize()

Unsets the size, in centimeters, of the physical display (monitor, off-screen renderer, printer, etc.).

Returns

A reference to this object.

WindowInfoKit &UnsetWindowPixels()

Unsets the number of pixels in the window.

Returns

A reference to this object.

WindowInfoKit &UnsetWindowSize()

Unsets the size, in centimeters, of the window.

Returns

A reference to this object.

WindowInfoKit()

Initializes an empty kit.

WindowInfoKit(WindowInfoKit &&in_that)

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

Parameters

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

WindowInfoKit(WindowInfoKit const &in_kit)

Copies the kit in_kit into this kit.

virtual ~WindowInfoKit()

Destroy this kit.

Public Static Attributes

static const HPS::Type staticType = HPS::Type::WindowInfoKit