Class SliceLayoutPlugin
- Namespace
- Whim.SliceLayout
- Assembly
- Whim.SliceLayout.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 SliceLayoutPlugin : ISliceLayoutPlugin, IPlugin
- Inheritance
-
SliceLayoutPlugin
- Implements
- Inherited Members
Constructors
SliceLayoutPlugin(IContext)
Create a new SliceLayoutPlugin.
public SliceLayoutPlugin(IContext context)
Parameters
context
IContext
Properties
DemoteFocusActionName
The name of the action that demotes the focus in the stack to the next-lower slice.
public string DemoteFocusActionName { get; }
Property Value
DemoteWindowActionName
The name of the action that demotes a window in the stack to the next-lower slice.
public string DemoteWindowActionName { get; }
Property Value
Name
whim.slice_layout
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).
PromoteFocusActionName
The name of the action that promotes the focus in the stack to the next-higher slice.
public string PromoteFocusActionName { get; }
Property Value
PromoteWindowActionName
The name of the action that promotes a window in the stack to the next-higher slice.
public string PromoteWindowActionName { get; }
Property Value
WindowInsertionType
The type of insertion to use when adding a window to a slice.
public WindowInsertionType WindowInsertionType { get; set; }
Property Value
Methods
DemoteFocusInStack(IWindow?)
Demotes the focus to the next slice with a higher order - see Order.
public void DemoteFocusInStack(IWindow? window = null)
Parameters
window
IWindow- The current window. If null, then LastFocusedWindow is used.
DemoteWindowInStack(IWindow?)
Demotes the given window in the stack.
public void DemoteWindowInStack(IWindow? window = null)
Parameters
window
IWindow- The window to demote. If null, then LastFocusedWindow is used.
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()
PromoteFocusInStack(IWindow?)
Promotes the focus to the next slice with a lower order - see Order.
public void PromoteFocusInStack(IWindow? window = null)
Parameters
window
IWindow- The current window. If null, then LastFocusedWindow is used.
PromoteWindowInStack(IWindow?)
Promotes the given window in the stack.
public void PromoteWindowInStack(IWindow? window = null)
Parameters
window
IWindow- The window to promote. If null, then LastFocusedWindow is used.
SaveState()
Save the plugin's state as a JsonElement.
public JsonElement? SaveState()
Returns
- JsonElement?
- The plugin's state.