Class FocusIndicatorPlugin
- Namespace
- Whim.FocusIndicator
- Assembly
- Whim.FocusIndicator.dll
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
public class FocusIndicatorPlugin : IFocusIndicatorPlugin, IPlugin, IDisposable
- Inheritance
-
FocusIndicatorPlugin
- Implements
- Inherited Members
Constructors
FocusIndicatorPlugin(IContext, FocusIndicatorConfig)
Creates a new instance of the focus indicator plugin.
public FocusIndicatorPlugin(IContext context, FocusIndicatorConfig focusIndicatorConfig)
Parameters
context
IContextfocusIndicatorConfig
FocusIndicatorConfig
Properties
Config
The configuration for the focus indicator.
public FocusIndicatorConfig Config { get; }
Property Value
IsVisible
Whether the focus indicator is visible.
public bool IsVisible { get; }
Property Value
Name
whim.focus_indicator
public string Name { get; }
Property Value
PluginCommands
The commands and keybinds for this plugin. These are registered during PreInitialize().
public IPluginCommands PluginCommands { get; }
Property Value
Remarks
Keybindings can be overridden by the user using SetKeybind(string, IKeybind).
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool
LoadState(JsonElement)
Load the plugin's state from
state
.public void LoadState(JsonElement state)
Parameters
state
JsonElement- The plugin's state.
Remarks
State is loaded after PostInitialize() and the user's configuration has been loaded.
Thus, be careful on how you interact with the user's configuration.
PostInitialize()
This method is to be called by the plugin manager.
Initializes the plugin after the rest of the IContext has been initialized.
Put things which rely on the rest of the context here.
public void PostInitialize()
PreInitialize()
This method is to be called by the plugin manager.
Initializes the plugin before the IContext has been initialized.
Put things like event listeners here or adding proxy layout engines
(see AddProxyLayoutEngine(ProxyLayoutEngineCreator)).
public void PreInitialize()
SaveState()
Save the plugin's state as a JsonElement.
public JsonElement? SaveState()
Returns
- JsonElement?
- The plugin's state.
Show(IWindow?)
Shows the focus indicator.
public void Show(IWindow? window = null)
Parameters
window
IWindow- The window to show the focus indicator on. Defaults to the focused window.
Toggle()
Toggles the focus indicator.
public void Toggle()
ToggleEnabled()
Toggles whether the focus indicator is enabled.
public void ToggleEnabled()
Remarks
This prevents the focus indicator from showing based on events. It will
not prevent the focus indicator from being manually shown.
ToggleFade()
Toggles whether the focus indicator fades.
public void ToggleFade()