Skip to content

EmbeddedPluginControl

FoolRunning edited this page Jul 26, 2022 · 10 revisions

Description

A control that can be passed to IWindowPluginHost.ShowEmbeddedUito be embedded/docked in a new child window in Paratext. Note to implementers: Derived concrete classes must have a default constructor so they can be instantiated and restored from their saved states. To get a Mega Menu to appear inside Paratext, add a MenuStrip to this control.

Methods

DoLoad

abstract void DoLoad(IProgressInfo progressInfo)

Will always be called after OnAddedToParent on a separate thread from the main UI thread. Long-running tasks needed for loading should be done here. The control's content will not be visible until this method returns.


GetState

abstract string GetState()

Gets the current state of the control, from which the control must know how to restore itself (when OnAddedToParent is called).


OnAddedToParent

abstract void OnAddedToParent(IPluginChildWindow parent, IWindowPluginHost host, string state)

Called when the control is added to a Paratext child window. Will always be called before DoLoad on the main UI thread.

Parameter Description
parent
host
state When called as a part of restoring from a previous saved state, the state (which came from the call to GetState) will be provided so the control can restore itself. Otherwise it will be null and the control should appear in its default state. Note that if a new version of this control has changed the way its state is saved, it should still be able to restore from older versions of the state.

This page is auto-generated. User edits will be lost when regenerated.

Clone this wiki locally