WindowKey
-
class HPS::WindowKey : public HPS::SegmentKey
The WindowKey class is a smart pointer to a database object. Windows are special segments that are backed by a driver instance and a physical window. Some operations and attributes can only be performed or set from window keys. The WindowKey class itself is a base class for more specific window types (application windows, off-screen windows, stand-alone windows).
Subclassed by HPS::ApplicationWindowKey, HPS::OffScreenWindowKey, HPS::StandAloneWindowKey
Public Functions
-
bool ConvertCoordinate(Coordinate::Space in_space, Point const &in_point, Coordinate::Space in_output_space, Point &out_point) const
Converts the point in_point from in_space to in_output_space using the transforms associated with this window. Returns success.
-
size_t FindFonts(FontSearchResults &out_results) const
Searches the system for fonts.
- Parameters
out_results – Out parameter that contains results of the font search
- Returns
The number of fonts found
-
size_t FindHighlights(HighlightSearchOptionsKit const &in_options, HighlightSearchResults &out_results) const
Searches for any highlights under this WindowKey.
- Parameters
in_options – Search options constraining what type of highlights to look for. If this is empty, all highlights will be returned.
out_results – The key paths under the window that are highlighted with the given search options.
- Returns
The number of highlighted key paths found.
-
size_t FindHighlights(KeyPath const &in_key_path, HPS::HighlightSearch::Scope in_scope, HighlightSearchOptionsKit const &in_options, HighlightSearchResults &out_results) const
Searches for any highlights under this WindowKey.
- Parameters
in_key_path – The key path to scope this highlight search by.
in_scope – Determines how the scope is interpreted during a highlight search.
in_options – Search options constraining what type of highlights to look for. If this is empty, all highlights will be returned.
out_results – The key paths under the window that are highlighted with the given search options.
- Returns
The number of highlighted key paths found.
-
DebuggingControl GetDebuggingControl()
Returns a control that allows the user to manipulate and query details of the debugging attribute on this segment.
-
DebuggingControl const GetDebuggingControl() const
Returns a control that allows the user to manipulate and query details of the debugging attribute on this segment.
-
EventDispatcher &GetEventDispatcher()
Returns a control that allows the user to interact with events in various ways.
-
EventDispatcher const &GetEventDispatcher() const
Returns a control that allows the user to interact with events in various ways.
-
HighlightControl GetHighlightControl()
Returns a control that allows the user to highlight segments or geometry in this window.
-
HighlightControl const GetHighlightControl() const
Returns a control that allows the user to highlight segments or geometry in this window.
-
PostProcessEffectsControl GetPostProcessEffectsControl()
Returns a control that allows the user to manipulate and query details of the post-process effects attribute on this segment.
-
PostProcessEffectsControl const GetPostProcessEffectsControl() const
Returns a control that allows the user to manipulate and query details of the post-process effects attribute on this segment.
-
SelectionControl GetSelectionControl()
Returns a control that allows the user to perform selections in this window.
-
SelectionControl const GetSelectionControl() const
Returns a control that allows the user to perform selections in this window.
-
SelectionOptionsControl GetSelectionOptionsControl()
Returns a control that allows the user to manipulate and query details of the selection options on this window.
-
SelectionOptionsControl const GetSelectionOptionsControl() const
Returns a control that allows the user to manipulate and query details of the selection options on this window.
-
UpdateOptionsControl GetUpdateOptionsControl()
Returns a control that allows the user to change update options in this window.
-
UpdateOptionsControl const GetUpdateOptionsControl() const
Returns a control that allows the user to change update options in this window.
-
WindowInfoControl const GetWindowInfoControl() const
Returns a control that allows the user to query various window properties, including size, aspect ratio, resolution, etc.
-
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.
-
WindowKey &operator=(WindowKey &&in_that)
The move assignment operator transfers the underlying impl of the rvalue reference to this WindowKey thereby avoiding a copy.
-
WindowKey &SetDebugging(DebuggingKit const &in_kit)
Sets the debugging attributes designated by in_kit on this segment.
-
WindowKey &SetDriverEventHandler(DriverEventHandler const &in_handler, intptr_t in_type)
Sets the specified driver event handler as the handler for the specified driver event type on this window.
- Parameters
in_handler – Driver event handler to be set.
in_type – Type of driver event to add the handler for.
-
WindowKey &SetPostProcessEffects(PostProcessEffectsKit const &in_kit)
Sets the post-process effects attributes designated by in_kit on this segment.
-
WindowKey &SetSelectionOptions(SelectionOptionsKit const &in_kit)
Sets the options that will be used by default for selections performed from this window. Note: these options cannot be unset.
-
WindowKey &SetUpdateOptions(HPS::UpdateOptionsKit const &in_kit)
Sets the options that will be used by default for update options performed from this window. Note: these options cannot be unset.
-
bool ShowDebugging(DebuggingKit &out_kit) const
Shows the debugging attribute settings on this segment.
- Returns
False if no debugging attribute settings exist on this segment.
-
bool ShowPostProcessEffects(PostProcessEffectsKit &out_kit) const
Shows the post-process effects attribute settings on this segment. Returns false if no post-process effects attribute settings exist on this segment.
-
bool ShowSelectionOptions(SelectionOptionsKit &out_kit) const
Shows the options that will be used by default for selections performed from this window.
-
bool ShowSnapshot(ImageKit &out_kit) const
Shows the current display as an image. Note: this will return false if an Update was never made or if the window key has framebuffer retention disabled.
- Parameters
out_kit – An image kit to show the display into.
- Returns
true if able to show display into ImageKit, false otherwise.
-
bool ShowUpdateOptions(HPS::UpdateOptionsKit &out_kit) const
Shows the options that will be used by default for update options performed from this window.
-
bool ShowWindowInfo(WindowInfoKit &out_kit) const
-
WindowKey &UnsetDriverEventHandler(intptr_t in_type)
Unsets the driver event handler for the specified driver event type on this window.
- Parameters
in_type – Type of driver event to remove the handler for
-
void Update()
Performs a default update in this window, redrawing and refreshing the display.
-
void Update(UpdateOptionsKit const &in_kit)
Performs an update in this window, redrawing and refreshing the display using the options in the UpdateOptionsKit.
- Parameters
in_kit – Allows the user to control how thorough an update should be.
-
void Update(Window::UpdateType in_type, Time in_time_limit = -1)
Performs an update in this window within the specified amount of time, redrawing and refreshing the display based on the Window::UpdateType value. Key behavioral notes regarding a timed-update:
Geometry deferral/omission
View-dependent shadows will not be drawn (view-independent shadows will be drawn.)
Transparent geometry will be deferred and processed after the rest of the scene.
If static tree + lmv is enabled, text and lines will be deferred and drawn after opaque facetted geometry
Non-incremental rendering modes/attributes
A timed update requires Visualize to interrupt the rendering process. However, certain types of rendering modes/attributes cannot be interrupted because they are ‘non-incremental’. - If your application wishes to use such modes/attributes alongside fixed-framerate, it will need to make a decision about whether Fixed-framerate is preferred. They include: - HiddenLine and FastHiddenLine rendering algorithms
Transparency that is drawn using ‘depth peeling’. (All depth-peeled transparent geometry will be processed once it is started.)
- Parameters
in_control – Allows the user to control how thorough this update should be.
in_time_limit – Specifies the desired maximum time this update should take.
-
UpdateNotifier UpdateWithNotifier()
Performs a default update in this window, redrawing and refreshing the display.
- Returns
A UpdateNotifier object that can be used to find out information about the update.
-
UpdateNotifier UpdateWithNotifier(HPS::UpdateOptionsKit const &in_kit)
Performs a default update in this window, redrawing and refreshing the display.
- Returns
A UpdateNotifier object that can be used to find out information about the update.
-
UpdateNotifier UpdateWithNotifier(Window::UpdateType in_type, Time in_time_limit = -1)
Performs an update in this window, redrawing and refreshing the display.
- Parameters
in_type – Allows the user to control how thorough an update should be.
in_time_limit – Specifies a maximum time this update should take.
- Returns
A UpdateNotifier object that can be used to find out information about the update.
-
WindowKey()
An uninitialized key refers to no database object and Type() will return Type::None.
-
WindowKey(Key const &in_key)
Shares a reference to a database object referred to by in_that. If the key assignment is invalid, this key will revert to an uninitialized state.
-
WindowKey(WindowKey &&in_that)
The move constructor creates a WindowKey by transferring the underlying impl of the rvalue reference to this WindowKey thereby avoiding a copy and allocation.
- Parameters
in_that – An rvalue reference to a WindowKey to take the impl from.
-
WindowKey(WindowKey const &in_window)
Shares a reference to a database object referred to by in_window.
-
~WindowKey()
Releases a reference to a database object but does not destroy the database object.
Public Static Attributes
-
static const HPS::Type staticType = HPS::Type::WindowKey
-
bool ConvertCoordinate(Coordinate::Space in_space, Point const &in_point, Coordinate::Space in_output_space, Point &out_point) const