mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
Add target/action
This commit is contained in:
parent
bfa9f0c1c2
commit
dae6b91c99
2 changed files with 22 additions and 0 deletions
|
@ -37,6 +37,8 @@ extern "C" {
|
|||
@interface NSSwitch : NSControl
|
||||
{
|
||||
NSControlStateValue _state;
|
||||
id _target;
|
||||
SEL _action;
|
||||
}
|
||||
|
||||
- (void) setState: (NSControlStateValue)s;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue