#[non_exhaustive]pub enum TopToolbarAction {
Show 26 variants
Host(String),
None,
OpenQuickSearch,
OpenSymbolSearch,
OpenCompare,
IntervalSelected(Timeframe),
ChartStyleSelected(ChartType),
OpenIndicators,
AddIndicator(String),
SaveIndicatorTemplate,
ApplyIndicatorTemplate(String),
CreateAlert,
ToggleReplay,
Undo,
Redo,
TakeScreenshot,
CopyImage,
OpenImage,
CopyImageLink,
Publish,
ToggleTrading,
OpenSettings,
Save,
ToggleFullscreen,
ThemeToggle,
Layout(LayoutAction),
}Expand description
Actions emitted by the top toolbar
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Host(String)
A registered host button or dropdown item was chosen.
None
No action taken
OpenQuickSearch
Open the command palette for actions, settings, drawing tools and studies.
OpenSymbolSearch
Open symbol search dialog
OpenCompare
Open compare/add symbol dialog
IntervalSelected(Timeframe)
Chart interval chosen in the interval menu, a preset or a custom interval
ChartStyleSelected(ChartType)
Chart style chosen in the chart-type menu.
OpenIndicators
Open indicators dialog
AddIndicator(String)
Ask the host to add the study registered under this name, chosen among
TopToolbar::favorite_indicators.
SaveIndicatorTemplate
Ask the host to save the current indicator set.
ApplyIndicatorTemplate(String)
Ask the host to apply the saved indicator set with this id.
CreateAlert
Create a new price alert
ToggleReplay
Toggle replay mode on/off
Undo
Undo last action
Redo
Redo last undone action
TakeScreenshot
Capture a chart screenshot
CopyImage
Capture the chart with Chart::export_png and deliver the
decoded image to the clipboard, for example with egui::Context::copy_image.
OpenImage
Capture the chart and open the rendered image in a new browser tab or native viewer. The host owns the image URL or local file and its lifetime.
CopyImageLink
Publish the captured image through the host’s service and copy its returned URL.
Offered only with TopToolbarState::can_publish_image.
Publish
Ask the host to publish the chart: capture it with
Chart::export_image and share or post the image
through the host’s own service.
ToggleTrading
Open or close the order ticket, for example with
Trading::toggle_ticket.
OpenSettings
Open settings dialog
Save
Save current chart layout
ToggleFullscreen
Toggle fullscreen mode
ThemeToggle
Toggle light/dark theme
Layout(LayoutAction)
Layout management actions
Trait Implementations§
Source§impl Clone for TopToolbarAction
impl Clone for TopToolbarAction
Source§fn clone(&self) -> TopToolbarAction
fn clone(&self) -> TopToolbarAction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TopToolbarAction
impl Debug for TopToolbarAction
Source§impl PartialEq for TopToolbarAction
impl PartialEq for TopToolbarAction
impl StructuralPartialEq for TopToolbarAction
Auto Trait Implementations§
impl Freeze for TopToolbarAction
impl RefUnwindSafe for TopToolbarAction
impl Send for TopToolbarAction
impl Sync for TopToolbarAction
impl Unpin for TopToolbarAction
impl UnsafeUnpin for TopToolbarAction
impl UnwindSafe for TopToolbarAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more