24 |
#include <Foundation/NSException.h> |
#include <Foundation/NSException.h> |
25 |
#include <Foundation/NSGeometry.h> |
#include <Foundation/NSGeometry.h> |
26 |
|
|
27 |
|
#include "Interface/UiInterface.h" |
28 |
#include "Interface/UiFrame.h" |
#include "Interface/UiFrame.h" |
29 |
|
|
30 |
/** |
/** |
31 |
* UiFrame implementation |
* UiFrame is a top level container with is include in a UiInterface. |
32 |
*/ |
*/ |
33 |
@implementation UiFrame |
@implementation UiFrame |
34 |
|
|
35 |
/** |
/** |
36 |
* UiFrame initialisation |
* Initializes the frame with the given interface. |
|
* @param (UiFrame *) frame, it can be a nil frame if it has no parent |
|
37 |
*/ |
*/ |
38 |
- (id) initWithParent: (UiFrame *) frame |
- (id) initWithInterface: (UiInterface *)interface |
39 |
{ |
{ |
40 |
self = [super initWithPosition: NSZeroPoint]; |
NSParameterAssert (interface); |
41 |
|
|
42 |
|
self = [super initWithPosition: NSZeroPoint]; |
43 |
if (self != nil) |
if (self != nil) |
44 |
{ |
{ |
45 |
_parent = frame; |
_interface = RETAIN(interface); |
46 |
} |
} |
47 |
|
|
48 |
return self; |
return self; |
49 |
} |
} |
50 |
|
|
51 |
|
- (void) dealloc |
52 |
|
{ |
53 |
|
RELEASE(_interface); |
54 |
|
|
55 |
|
[super dealloc]; |
56 |
|
} |
57 |
|
|
58 |
|
/** |
59 |
|
* Returns the interface the frame is attached to. |
60 |
|
*/ |
61 |
|
- (UiInterface *) interface |
62 |
|
{ |
63 |
|
return _interface; |
64 |
|
} |
65 |
|
|
66 |
@end |
@end |