Class TNppDockingForm
Unit
NppDockingForms
Declaration
type TNppDockingForm = class(TNppForm)
Description
Default implementation of a docked plugin dialog
Hierarchy
Overview
Fields
Methods
Properties
| Public |
property CmdId: Integer read FCmdId default 0; |
| Published |
property OnDock: TNotifyEvent read FOnDock write FOnDock; |
| Published |
property OnFloat: TNotifyEvent read FOnFloat write FOnFloat; |
Description
Fields
| Protected |
ToolbarData: TToolbarData; |
|
This item has no description. |
| Protected |
NppDefaultDockingMask: Cardinal; |
|
This item has no description. |
Methods
| Public |
constructor Create(AOwner: TNppForm; const DlgId: Integer); reintroduce; overload; virtual; |
|
This item has no description. |
| Public |
constructor Create(const NppParent: TNppPlugin; const DlgId: Integer); reintroduce; overload; virtual; |
|
This item has no description. |
| Public |
destructor Destroy; override; |
|
This item has no description. |
| Public |
procedure Hide; |
|
This item has no description. |
| Public |
procedure RegisterDockingForm(MaskStyle: Cardinal = DWS_DF_CONT_LEFT); |
|
Initializes the ToolbarData member and sends NPPM_DMMREGASDCKDLG.
This sets the style bitmask of the ToolbarData member to the combination of DWS_ADDINFO and the given MaskStyle. If this form's Icon property is set, the TToolbarData.IconTab field is assigned from the icon's Handle, and the DWS_ICONTAB flag will be added to TToolbarData.Mask. - Note
- The initial dock position is saved in
%AppData%\Notepad++\config.xml as a GUIConfig element with the DockingManager attribute; e.g.,
You should delete this between launches when testing different configurations.
Parameters
- MaskStyle [optional]
- one or more bit flags for the TToolbarData.Mask field
|
| Public |
procedure Show; overload; |
|
This item has no description. |
| Public |
procedure Show(const Plugin: TNppPlugin; const DlgMenuId: integer); overload; |
|
This item has no description. |
| Public |
procedure UpdateDisplayInfo; overload; |
|
This item has no description. |
| Public |
procedure UpdateDisplayInfo(Info: String); overload; |
|
This item has no description. |
| Protected |
procedure OnWM_NOTIFY(var msg: TWMNotify); message WM_NOTIFY; |
|
Handles the DMN_FLOAT, DMN_DOCK and DMN_CLOSE Docking Manager messages. - Note
- Because the Docking Manager signals its "children" dialogs through
WM_NOTIFY, which is also broadcast by the Windows runtime, the likelihood of adverse interactions is high. The necessity of hacking your docked dialog's window attributes was discovered by this template's original developer in this discussion thread.
Newer development has tried to improve on Damjan Cvetko's insights, but there is probably no single solution for every use case. So, while many plugins will work fine using this method as is, be prepared to debug and edit this code path if your plugin starts freezing the editor in endless redraw loops.
Parameters
- msg [in, out]
- a
TWMNotify structure (compatible with Windows' NMHDR)
|
Properties
| Public |
property CmdId: Integer read FCmdId default 0; |
|
The menu ID of the plugin command associated with this TNppDockingForm, assigned by Notepad++ during plugin initialization. - Note
- It is
CmdId – not DlgId – that identifies a plugin command when sending API messages to the Notepad++ window. Using TNppPlugin.CmdIdFromDlgId wherever possible is recommended.
|
| Published |
property OnDock: TNotifyEvent read FOnDock write FOnDock; |
|
Optional handler for the DMN_DOCK message.
|
| Published |
property OnFloat: TNotifyEvent read FOnFloat write FOnFloat; |
|
Optional handler for the DMN_FLOAT message.
|