AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <CaptionPresenter.h>
Public Member Functions | |
CaptionPresenterInterface methods | |
void | onCaptionActivity (const captions::CaptionFrame &captionFrame, avsCommon::avs::FocusState focusState) override |
std::pair< bool, int > | getWrapIndex (const captions::CaptionLine &captionLine) override |
Public Member Functions inherited from alexaClientSDK::captions::CaptionPresenterInterface | |
virtual | ~CaptionPresenterInterface ()=default |
Static Public Member Functions | |
static std::shared_ptr< captions::CaptionPresenterInterface > | createCaptionPresenterInterface (const std::shared_ptr< captions::CaptionManagerInterface > &captionManager) |
Sample implementation of CaptionPresenterInterface
that measures text and prints captions content to console.
|
static |
Factory method that returns a new instance of CaptionPresenterInterface
.
captionManager | The CaptionManagerInterface to which we should add this new CaptionPresenterInterface . If null or if disabled, the CaptionPresenter is still created to satisfy manufactory exports, but will not be added to the CaptionManager. |
CaptionPresenterInterface
.
|
overridevirtual |
Determine the display width of the line of text as it would be displayed on a screen.
This function should apply the styles to the text present in the CaptionLine
and measure the width as it would be displayed on the screen. If the text is too wide to fit on the display, then return true, along with the character index in captionLine of where the text becomes too wide to fit. This function should also return quickly, as it is potentially called many times to find the correct text wrap points.
captionLine | The line of caption text with the styles that apply to that text. application's display and needs to wrap to a new line. |
Implements alexaClientSDK::captions::CaptionPresenterInterface.
|
overridevirtual |
Handles a request to show or hide a CaptionFrame
.
captionFrame | The CaptionFrame which is to be acted upon based on the action described by activityType. |
activityType | The FocusState to indicate whether to bring the caption to the foreground (show), send them to the background (hide). |
Implements alexaClientSDK::captions::CaptionPresenterInterface.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0