Table of Contents

Class FloatingWindowPlugin

Namespace
Whim.FloatingWindow
Assembly
Whim.FloatingWindow.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 FloatingWindowPlugin : IFloatingWindowPlugin, IPlugin
Inheritance
FloatingWindowPlugin
Implements
Inherited Members

Constructors

FloatingWindowPlugin(IContext)

Creates a new instance of the floating window plugin.
public FloatingWindowPlugin(IContext context)

Parameters

context IContext

Properties

FloatingWindows

Mapping of floating windows to the layout engines that they are floating in. This is not exposed outside of this namespace to prevent mutation of the dictionary and sets.
public IReadOnlyDictionary<IWindow, ISet<LayoutEngineIdentity>> FloatingWindows { get; }

Property Value

IReadOnlyDictionary<IWindow, ISet<LayoutEngineIdentity>>

Name

whim.floating_window
public string Name { get; }

Property Value

string

PluginCommands

The commands and keybinds for this plugin. These are registered during PreInitialize().
public IPluginCommands PluginCommands { get; }

Property Value

IPluginCommands

Remarks

Keybindings can be overridden by the user using SetKeybind(string, IKeybind).

Methods

LoadState(JsonElement)

Load the plugin's state from state.
public void LoadState(JsonElement pluginSavedState)

Parameters

pluginSavedState JsonElement

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.

MarkWindowAsDocked(IWindow?)

Mark the given window as a docked window
public void MarkWindowAsDocked(IWindow? window = null)

Parameters

window IWindow

MarkWindowAsDockedInLayoutEngine(IWindow, LayoutEngineIdentity)

Removes the given layout engine from the given window.
public void MarkWindowAsDockedInLayoutEngine(IWindow window, LayoutEngineIdentity layoutEngineIdentity)

Parameters

window IWindow
layoutEngineIdentity LayoutEngineIdentity

MarkWindowAsFloating(IWindow?)

Mark the given window as a floating window
public void MarkWindowAsFloating(IWindow? window = null)

Parameters

window IWindow

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.

ToggleWindowFloating(IWindow?)

Toggle the floating state of the given window.
public void ToggleWindowFloating(IWindow? window = null)

Parameters

window IWindow