**/
/* }}} */
+#include "CyteKit/UCPlatform.h"
+
#include "CyteKit/TableViewCell.h"
#include "iPhonePrivate.h"
+#include <Menes/ObjectHandle.h>
-@implementation CyteTableViewCellContentView
+@implementation CyteTableViewCellContentView {
+ _transient id<CyteTableViewCellDelegate> delegate_;
+}
- (id) initWithFrame:(CGRect)frame {
if ((self = [super initWithFrame:frame]) != nil) {
@end
-@implementation CyteTableViewCell
+@implementation CyteTableViewCell {
+ _H<CyteTableViewCellContentView, 1> content_;
+ bool highlighted_;
+}
+
+- (instancetype) initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseIdentifier {
+ if ((self = [super initWithFrame:frame reuseIdentifier:reuseIdentifier]) != nil) {
+ UIView *content([self contentView]);
+ CGRect bounds([content bounds]);
+
+ self.content = [[[CyteTableViewCellContentView alloc] initWithFrame:bounds] autorelease];
+ [self.content setAutoresizingMask:(UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight)];
+ [content addSubview:self.content];
+
+ [self.content setDelegate:(id<CyteTableViewCellDelegate>)self];
+ } return self;
+}
- (void) _updateHighlightColorsForView:(UIView *)view highlighted:(BOOL)highlighted {
if (view == (UIView *) content_)
[content_ setNeedsDisplay];
}
+- (void) setContent:(CyteTableViewCellContentView *)content {
+ content_ = content;
+}
+
+- (CyteTableViewCellContentView *) content {
+ return content_;
+}
+
+- (bool) highlighted {
+ return highlighted_;
+}
+
@end