docs(context): add missing documentation
This commit is contained in:
parent
90c91c09d4
commit
a57af7413a
@ -1,6 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace XivCommon.Functions.ContextMenu {
|
namespace XivCommon.Functions.ContextMenu {
|
||||||
|
/// <summary>
|
||||||
|
/// The base class for context menu arguments
|
||||||
|
/// </summary>
|
||||||
public abstract class BaseContextMenuArgs {
|
public abstract class BaseContextMenuArgs {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pointer to the context menu addon.
|
/// Pointer to the context menu addon.
|
||||||
|
@ -78,8 +78,19 @@ namespace XivCommon.Functions.ContextMenu {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public event ContextMenuOpenEventDelegate? OpenContextMenu;
|
public event ContextMenuOpenEventDelegate? OpenContextMenu;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The delegate for inventory context menu events.
|
||||||
|
/// </summary>
|
||||||
public delegate void InventoryContextMenuOpenEventDelegate(InventoryContextMenuOpenArgs args);
|
public delegate void InventoryContextMenuOpenEventDelegate(InventoryContextMenuOpenArgs args);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>
|
||||||
|
/// The event that is fired when an inventory context menu is being prepared for opening.
|
||||||
|
/// </para>
|
||||||
|
/// <para>
|
||||||
|
/// Requires the <see cref="Hooks.ContextMenu"/> hook to be enabled.
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
public event InventoryContextMenuOpenEventDelegate? OpenInventoryContextMenu;
|
public event InventoryContextMenuOpenEventDelegate? OpenInventoryContextMenu;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -36,7 +36,7 @@ namespace XivCommon.Functions.ContextMenu {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">the English name of the item, copied to other languages</param>
|
/// <param name="name">the English name of the item, copied to other languages</param>
|
||||||
/// <param name="action">the action to perform on click</param>
|
/// <param name="action">the action to perform on click</param>
|
||||||
public CustomContextMenuItem(string name, T action) {
|
internal CustomContextMenuItem(string name, T action) {
|
||||||
this.NameEnglish = name;
|
this.NameEnglish = name;
|
||||||
this.NameJapanese = name;
|
this.NameJapanese = name;
|
||||||
this.NameFrench = name;
|
this.NameFrench = name;
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace XivCommon.Functions.ContextMenu.Inventory {
|
namespace XivCommon.Functions.ContextMenu.Inventory {
|
||||||
|
/// <summary>
|
||||||
|
/// The base class for inventory context menu arguments
|
||||||
|
/// </summary>
|
||||||
public abstract class BaseInventoryContextMenuArgs {
|
public abstract class BaseInventoryContextMenuArgs {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Pointer to the context menu addon.
|
/// Pointer to the context menu addon.
|
||||||
@ -17,10 +20,19 @@ namespace XivCommon.Functions.ContextMenu.Inventory {
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public string? ParentAddonName { get; }
|
public string? ParentAddonName { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The ID of the item this context menu is for.
|
||||||
|
/// </summary>
|
||||||
public uint ItemId { get; }
|
public uint ItemId { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The amount of the item this context menu is for.
|
||||||
|
/// </summary>
|
||||||
public uint ItemAmount { get; }
|
public uint ItemAmount { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// If the item this context menu is for is high-quality.
|
||||||
|
/// </summary>
|
||||||
public bool ItemHq { get; }
|
public bool ItemHq { get; }
|
||||||
|
|
||||||
internal BaseInventoryContextMenuArgs(IntPtr addon, IntPtr agent, string? parentAddonName, uint itemId, uint itemAmount, bool itemHq) {
|
internal BaseInventoryContextMenuArgs(IntPtr addon, IntPtr agent, string? parentAddonName, uint itemId, uint itemAmount, bool itemHq) {
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
namespace XivCommon.Functions.ContextMenu.Inventory {
|
namespace XivCommon.Functions.ContextMenu.Inventory {
|
||||||
|
/// <summary>
|
||||||
|
/// A custom context menu item for inventory items.
|
||||||
|
/// </summary>
|
||||||
public class InventoryContextMenuItem : CustomContextMenuItem<ContextMenu.InventoryContextMenuItemSelectedDelegate> {
|
public class InventoryContextMenuItem : CustomContextMenuItem<ContextMenu.InventoryContextMenuItemSelectedDelegate> {
|
||||||
|
/// <summary>
|
||||||
|
/// Create a new context menu item for inventory items.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name">the English name of the item, copied to other languages</param>
|
||||||
|
/// <param name="action">the action to perform on click</param>
|
||||||
public InventoryContextMenuItem(string name, ContextMenu.InventoryContextMenuItemSelectedDelegate action) : base(name, action) {
|
public InventoryContextMenuItem(string name, ContextMenu.InventoryContextMenuItemSelectedDelegate action) : base(name, action) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace XivCommon.Functions.ContextMenu.Inventory {
|
namespace XivCommon.Functions.ContextMenu.Inventory {
|
||||||
|
/// <summary>
|
||||||
|
/// The arguments for when an inventory context menu item is selected
|
||||||
|
/// </summary>
|
||||||
public class InventoryContextMenuItemSelectedArgs : BaseInventoryContextMenuArgs {
|
public class InventoryContextMenuItemSelectedArgs : BaseInventoryContextMenuArgs {
|
||||||
internal InventoryContextMenuItemSelectedArgs(IntPtr addon, IntPtr agent, string? parentAddonName, uint itemId, uint itemAmount, bool itemHq) : base(addon, agent, parentAddonName, itemId, itemAmount, itemHq) {
|
internal InventoryContextMenuItemSelectedArgs(IntPtr addon, IntPtr agent, string? parentAddonName, uint itemId, uint itemAmount, bool itemHq) : base(addon, agent, parentAddonName, itemId, itemAmount, itemHq) {
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace XivCommon.Functions.ContextMenu.Inventory {
|
namespace XivCommon.Functions.ContextMenu.Inventory {
|
||||||
|
/// <summary>
|
||||||
|
/// The arguments for when an inventory context menu is opened
|
||||||
|
/// </summary>
|
||||||
public class InventoryContextMenuOpenArgs : BaseInventoryContextMenuArgs {
|
public class InventoryContextMenuOpenArgs : BaseInventoryContextMenuArgs {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Context menu items in this menu.
|
/// Context menu items in this menu.
|
||||||
|
@ -1,5 +1,16 @@
|
|||||||
namespace XivCommon.Functions.ContextMenu {
|
namespace XivCommon.Functions.ContextMenu {
|
||||||
|
/// <summary>
|
||||||
|
/// A custom normal context menu item
|
||||||
|
/// </summary>
|
||||||
public class NormalContextMenuItem : CustomContextMenuItem<ContextMenu.ContextMenuItemSelectedDelegate> {
|
public class NormalContextMenuItem : CustomContextMenuItem<ContextMenu.ContextMenuItemSelectedDelegate> {
|
||||||
|
/// <summary>
|
||||||
|
/// Create a new custom context menu item.
|
||||||
|
/// </summary>
|
||||||
|
/// <summary>
|
||||||
|
/// Create a new context menu item for inventory items.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="name">the English name of the item, copied to other languages</param>
|
||||||
|
/// <param name="action">the action to perform on click</param>
|
||||||
public NormalContextMenuItem(string name, ContextMenu.ContextMenuItemSelectedDelegate action) : base(name, action) {
|
public NormalContextMenuItem(string name, ContextMenu.ContextMenuItemSelectedDelegate action) : base(name, action) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user