Add target/action

This commit is contained in:
Gregory John Casamento 2020-04-17 07:40:40 -04:00
parent bfa9f0c1c2
commit dae6b91c99
2 changed files with 22 additions and 0 deletions

View file

@ -37,6 +37,8 @@ extern "C" {
@interface NSSwitch : NSControl
{
NSControlStateValue _state;
id _target;
SEL _action;
}
- (void) setState: (NSControlStateValue)s;

View file

@ -48,6 +48,26 @@
return _state;
}
- (void) setAction: (SEL)action
{
_action = action;
}
- (SEL) action
{
return _action;
}
- (void) setTarget: (id)target
{
_target = target;
}
- (id) target
{
return _target;
}
- (void) drawRect: (NSRect)rect
{
[[GSTheme theme] drawSwitchInRect: rect