- Add `Margin` property to `ITheme` - Add `Stop` method to the `Plugin` API - Add `DrawStringNoLeftPadding` and `MeasureStringNoLeftPadding` to `GraphicsExtentions` - Convert most inbuilt components to plugins. - Minor code improvements
41 KiB
DesktopMagicPluginAPI
Contents
- Button
- CheckBox
- Element
- ElementAttribute
- GraphicsExtentions
- DrawStringFixedWidth(graphics,s,font,brush,x,y,width)
- DrawStringFixedWidth(graphics,s,font,brush,point,width)
- DrawStringMonospace(graphics,s,font,brush,x,y)
- DrawStringMonospace(graphics,s,font,brush,point)
- DrawStringNoLeftPadding(graphics,s,font,brush,x,y)
- DrawStringNoLeftPadding(graphics,s,font,brush,point)
- MeasureStringNoLeftPadding(graphics,text,font)
- IPluginData
- ITheme
- IntegerUpDown
- Label
- MouseButton
- Plugin
- RenderQuality
- Slider
- TextBox
Button type
Namespace
DesktopMagicPluginAPI.Inputs
Summary
Represents a button control.
#ctor(value) constructor
Summary
Initializes a new instance of the Button class with the provided value.
Parameters
| Name | Type | Description |
|---|---|---|
| value | System.String | The text caption displayed in the Button control. |
Value property
Summary
Gets or sets the text caption displayed in the Button element.
Click() method
Summary
Parameters
This method has no parameters.
CheckBox type
Namespace
DesktopMagicPluginAPI.Inputs
Summary
Represents a check box control.
#ctor(value) constructor
Summary
Initializes a new instance of the CheckBox class with the provided value.
Parameters
| Name | Type | Description |
|---|---|---|
| value | System.Boolean | A value indicating whether the CheckBox is in the checked state. |
Value property
Summary
Gets or set a value indicating whether the CheckBox is in the checked state.
Element type
Namespace
DesktopMagicPluginAPI.Inputs
Summary
The element base class.
ValueChanged() method
Summary
Parameters
This method has no parameters.
ElementAttribute type
Namespace
DesktopMagicPluginAPI.Inputs
Summary
Marks a Property as element.
#ctor(name,orderIndex) constructor
Summary
Marks a Property as element with the provided name and orderIndex.
Parameters
| Name | Type | Description |
|---|---|---|
| name | System.String | The name of the element. |
| orderIndex | System.Int32 | The order index of the element. |
#ctor(orderIndex) constructor
Summary
Marks a Property as element with the provided orderIndex.
Parameters
| Name | Type | Description |
|---|---|---|
| orderIndex | System.Int32 | The order index of the element. |
#ctor() constructor
Summary
Inherit from parent.
Parameters
This constructor has no parameters.
Name property
Summary
The name of the element.
OrderIndex property
Summary
The order index of the element.
GraphicsExtentions type
Namespace
DesktopMagicPluginAPI.Drawing
Summary
Extensions for the Graphics class.
DrawStringFixedWidth(graphics,s,font,brush,x,y,width) method
Summary
Parameters
| Name | Type | Description |
|---|---|---|
| graphics | System.Drawing.Graphics | Graphics object. |
| s | System.String | String to draw. |
| font | System.Drawing.Font | Font that defines the text format of the string. |
| brush | System.Drawing.Brush | Brush that determines the color and texture of the drawn text. |
| x | System.Single | The x-coordinate of the upper-left corner of the drawn text. |
| y | System.Single | The y-coordinate of the upper-left corner of the drawn text. |
| width | System.Single | The specified width. |
DrawStringFixedWidth(graphics,s,font,brush,point,width) method
Summary
Parameters
| Name | Type | Description |
|---|---|---|
| graphics | System.Drawing.Graphics | Graphics object. |
| s | System.String | String to draw. |
| font | System.Drawing.Font | Font that defines the text format of the string. |
| brush | System.Drawing.Brush | Brush that determines the color and texture of the drawn text. |
| point | System.Drawing.PointF | PointF structure that specifies the upper-left corner of the drawn text. |
| width | System.Single | The specified width. |
DrawStringMonospace(graphics,s,font,brush,x,y) method
Summary
Parameters
| Name | Type | Description |
|---|---|---|
| graphics | System.Drawing.Graphics | Graphics object. |
| s | System.String | String to draw. |
| font | System.Drawing.Font | Font that defines the text format of the string. |
| brush | System.Drawing.Brush | Brush that determines the color and texture of the drawn text. |
| x | System.Single | The x-coordinate of the upper-left corner of the drawn text. |
| y | System.Single | The y-coordinate of the upper-left corner of the drawn text. |
DrawStringMonospace(graphics,s,font,brush,point) method
Summary
Parameters
| Name | Type | Description |
|---|---|---|
| graphics | System.Drawing.Graphics | Graphics object. |
| s | System.String | String to draw. |
| font | System.Drawing.Font | Font that defines the text format of the string. |
| brush | System.Drawing.Brush | Brush that determines the color and texture of the drawn text. |
| point | System.Drawing.PointF | PointF structure that specifies the upper-left corner of the drawn text. |
DrawStringNoLeftPadding(graphics,s,font,brush,x,y) method
Summary
Parameters
| Name | Type | Description |
|---|---|---|
| graphics | System.Drawing.Graphics | Graphics object. |
| s | System.String | String to draw. |
| font | System.Drawing.Font | Font that defines the text format of the string. |
| brush | System.Drawing.Brush | Brush that determines the color and texture of the drawn text. |
| x | System.Single | The x-coordinate of the upper-left corner of the drawn text. |
| y | System.Single | The y-coordinate of the upper-left corner of the drawn text. |
DrawStringNoLeftPadding(graphics,s,font,brush,point) method
Summary
Parameters
| Name | Type | Description |
|---|---|---|
| graphics | System.Drawing.Graphics | Graphics object. |
| s | System.String | String to draw. |
| font | System.Drawing.Font | Font that defines the text format of the string. |
| brush | System.Drawing.Brush | Brush that determines the color and texture of the drawn text. |
| point | System.Drawing.PointF | PointF structure that specifies the upper-left corner of the drawn text. |
MeasureStringNoLeftPadding(graphics,text,font) method
Summary
Returns
Parameters
| Name | Type | Description |
|---|---|---|
| graphics | System.Drawing.Graphics | Graphics object. |
| text | System.String | String to measure. |
| font | System.Drawing.Font | Font that defines the text format of the string. |
IPluginData type
Namespace
DesktopMagicPluginAPI
Summary
Defines properties and methods that provide information about the main application.
Color property
Summary
Gets the current color of the current theme.
Font property
Summary
Gets the current font of the current theme.
PluginName property
Summary
Gets the name of the plugin.
PluginPath property
Summary
Gets the path of the parent directory of the plugin.
Theme property
Summary
Gets the current theme setting of the main application.
WindowPosition property
Summary
Gets the window position of the plugin window.
WindowSize property
Summary
Gets the window size of the plugin window.
UpdateWindow() method
Summary
Updates the plugin window.
Parameters
This method has no parameters.
ITheme type
Namespace
DesktopMagicPluginAPI
Summary
The theme settings of the main application.
BackgroundColor property
Summary
Gets the background color of the current theme.
CornerRadius property
Summary
Gets the corner radius of the current theme.
Font property
Summary
Gets the font of the current theme.
Margin property
Summary
Gets the corner radius of the current theme.
PrimaryColor property
Summary
Gets the primary color of the current theme.
SecondaryColor property
Summary
Gets the secondary color of the current theme.
IntegerUpDown type
Namespace
DesktopMagicPluginAPI.Inputs
Summary
Represents a up-down control.
#ctor(min,max,value) constructor
Summary
Initializes a new instance of the IntegerUpDown class with the provided min value, max value and value.
Parameters
| Name | Type | Description |
|---|---|---|
| min | System.Int32 | The maximum value for the IntegerUpDown element. |
| max | System.Int32 | The minimum value for the IntegerUpDown element. |
| value | System.Int32 | The value assigned to the IntegerUpDown element. |
Exceptions
| Name | Description |
|---|---|
| System.ArgumentException |
Maximum property
Summary
Gets or sets the maximum value for the IntegerUpDown element.
Minimum property
Summary
Gets or sets the minimum value for the IntegerUpDown element.
Value property
Summary
Gets or sets the value assigned to the IntegerUpDown element.
Label type
Namespace
DesktopMagicPluginAPI.Inputs
Summary
Represents a label control.
#ctor(value,bold) constructor
Summary
Initializes a new instance of the Label class with the provided value.
Parameters
| Name | Type | Description |
|---|---|---|
| value | System.String | The text associated with this Label |
| bold | System.Boolean | A value indicating whether the content of the Label is bold or not. |
Bold property
Summary
Gets or set a value indicating whether the content of the Label is bold or not.
Value property
Summary
Gets or sets the text associated with this Label.
MouseButton type
Namespace
DesktopMagicPluginAPI.Inputs
Summary
Mouse Buttons
Left constants
Summary
The left mouse button.
Middle constants
Summary
The middle mouse button.
Right constants
Summary
The right mouse button.
Plugin type
Namespace
DesktopMagicPluginAPI
Summary
The plugin class.
Application property
Summary
Informations about the main application.
RenderQuality property
Summary
Gets or sets the render quality of the bitmap image.
UpdateInterval property
Summary
Gets or sets the interval, expressed in milliseconds, at which to call the Main method.
Main() method
Summary
Occurs when the UpdateInterval elapses.
Returns
Parameters
This method has no parameters.
OnMouseClick(position,mouseButton) method
Summary
Occurs when the window is clicked by the mouse.
Parameters
| Name | Type | Description |
|---|---|---|
| position | System.Drawing.Point | The x- and y-coordinates of the mouse pointer position relative to the plugin window. |
| mouseButton | DesktopMagicPluginAPI.Inputs.MouseButton | The button associated with the event. |
OnMouseMove(position) method
Summary
Occurs when the mouse pointer is moved over the control.
Parameters
| Name | Type | Description |
|---|---|---|
| position | System.Drawing.Point | The x- and y-coordinates of the mouse pointer position relative to the plugin window. |
OnMouseWheel(position,delta) method
Summary
Occurs when the user rotates the mouse wheel while the mouse pointer is over this element.
Parameters
| Name | Type | Description |
|---|---|---|
| position | System.Drawing.Point | The x- and y-coordinates of the mouse pointer position relative to the plugin window. |
| delta | System.Int32 | A value that indicates the amount that the mouse wheel has changed. |
Start() method
Summary
Occurs once when the plugin gets activated.
Parameters
This method has no parameters.
Stop() method
Summary
Occurs once when the plugin gets deactivated.
Parameters
This method has no parameters.
RenderQuality type
Namespace
DesktopMagicPluginAPI.Drawing
Summary
Specifies which render quality is used to display the bitmap images.
High constants
Summary
Slower then Low but produces higher quality output.
Low constants
Summary
Faster then High but produces lower quality output.
Performance constants
Summary
Provides performance benefits over Low
Slider type
Namespace
DesktopMagicPluginAPI.Inputs
Summary
Represents a slider control.
#ctor(min,max,value) constructor
Summary
Initializes a new instance of the Slider class with the provided min value, max value and value.
Parameters
| Name | Type | Description |
|---|---|---|
| min | System.Double | The maximum value for the Slider element. |
| max | System.Double | The minimum value for the Slider element. |
| value | System.Double | The value assigned to the Slider element. |
Maximum property
Summary
Gets or sets the maximum value for the Slider element.
Minimum property
Summary
Gets or sets the minimum value for the Slider element.
Value property
Summary
Gets or sets the value assigned to the Slider element.
TextBox type
Namespace
DesktopMagicPluginAPI.Inputs
Summary
Represents a text box control.
#ctor(value) constructor
Summary
Initializes a new instance of the TextBox class with the provided value.
Parameters
| Name | Type | Description |
|---|---|---|
| value | System.String | The text associated with this control. |
Value property
Summary
Gets or sets the text associated with this TextBox.