39 |
* @param (NSPoint)position the position of the button |
* @param (NSPoint)position the position of the button |
40 |
*/ |
*/ |
41 |
- (id) initWithText: (NSString *)text |
- (id) initWithText: (NSString *)text |
42 |
position: (NSPoint)position |
position: (NSPoint)position |
43 |
{ |
{ |
44 |
NSParameterAssert (text); |
NSParameterAssert (text); |
45 |
NSParameterAssert ([text length] != 0); |
NSParameterAssert ([text length] != 0); |
49 |
if (self != nil) |
if (self != nil) |
50 |
{ |
{ |
51 |
UiLabel *label = [[UiLabel alloc] initWithText: text |
UiLabel *label = [[UiLabel alloc] initWithText: text |
52 |
position: NSZeroPoint]; |
position: position]; |
53 |
|
|
54 |
[super addWidget: label]; |
[super addWidget: label]; |
55 |
|
|
68 |
- (id) initWithImageName: (NSString *)imageName |
- (id) initWithImageName: (NSString *)imageName |
69 |
position: (NSPoint)position |
position: (NSPoint)position |
70 |
{ |
{ |
|
NSSize size; |
|
|
|
|
71 |
NSParameterAssert (imageName); |
NSParameterAssert (imageName); |
72 |
NSParameterAssert ([imageName length] != 0); |
NSParameterAssert ([imageName length] != 0); |
73 |
|
|