Skip to content

Commit 0df05a6

Browse files
committed
Menus and Shortcuts: open Action for subclassing
`Action` should be an `open` class so that users may subclass it. The class should have all the expected properties at least stubbed.
1 parent b7ee6b4 commit 0df05a6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Sources/SwiftWin32/Menus and Shortcuts/Action.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ extension Action.Identifier {
2121
}
2222

2323
/// A menu element that performs its action in a closure.
24-
public class Action: MenuElement {
24+
open class Action: MenuElement {
2525
// MARK - Creating an Action
2626

2727
/// Creates an action.
@@ -45,29 +45,29 @@ public class Action: MenuElement {
4545
// MARK - Getting Information About the Action
4646

4747
/// The action's title.
48-
public override var title: String {
48+
open override var title: String {
4949
get { super.title }
5050
set { super.title = newValue }
5151
}
5252

5353
/// The action's image.
54-
public override var image: Image? {
54+
open override var image: Image? {
5555
get { super.image }
5656
set { super.image = newValue }
5757
}
5858

5959
/// The unique identifier for the action.
60-
public private(set) var identifier: Action.Identifier
60+
open private(set) var identifier: Action.Identifier
6161

6262
/// An elaborated title that explains the purpose of the action.
63-
public var discoverabilityTitle: String?
63+
open var discoverabilityTitle: String?
6464

6565
/// The attributes indicating the style of the action.
66-
public var attributes: MenuElement.Attributes
66+
open var attributes: MenuElement.Attributes
6767

6868
/// The state of the action.
69-
public var state: MenuElement.State
69+
open var state: MenuElement.State
7070

7171
/// The object responsible for the action handler.
72-
public var sender: Any?
72+
open internal(set) var sender: Any?
7373
}

0 commit comments

Comments
 (0)