]> err.no Git - sope/blob - sopex/Samples/WOxExtTest/TabView.m
git-svn-id: http://svn.opengroupware.org/SOPE/trunk@1201 e4a50df8-12e2-0310-a44c...
[sope] / sopex / Samples / WOxExtTest / TabView.m
1 /*
2   Copyright (C) 2000-2003 SKYRIX Software AG
3
4   This file is part of OGo
5
6   OGo is free software; you can redistribute it and/or modify it under
7   the terms of the GNU Lesser General Public License as published by the
8   Free Software Foundation; either version 2, or (at your option) any
9   later version.
10
11   OGo is distributed in the hope that it will be useful, but WITHOUT ANY
12   WARRANTY; without even the implied warranty of MERCHANTABILITY or
13   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
14   License for more details.
15
16   You should have received a copy of the GNU Lesser General Public
17   License along with OGo; see the file COPYING.  If not, write to the
18   Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
19   02111-1307, USA.
20 */
21 // $Id: TabView.m 1 2004-08-20 11:17:52Z znek $
22
23 #import <NGObjWeb/WOComponent.h>
24
25 @interface TabView : WOComponent
26 {
27   id bgColor;
28   id leftCornerIcon;
29   id rightCornerIcon;
30   id selection;
31 }
32 @end
33
34 #include "common.h"
35
36 @implementation TabView
37
38 - (id)init {
39   if ((self = [super init])) {
40     [self takeValue:@"persons" forKey:@"selection"];
41     [self takeValue:@"#FCF8DF" forKey:@"bgColor"];
42   }
43   return self;
44 }
45 - (void)dealloc {
46   [self->bgColor         release];
47   [self->rightCornerIcon release];
48   [self->leftCornerIcon  release];
49   [self->selection       release];
50   [super dealloc];
51 }
52
53 /* accessors */
54
55 - (void)setBgColor:(id)_col {
56   ASSIGN(self->bgColor, _col);
57 }
58 - (id)bgColor {
59   return self->bgColor;
60 }
61
62 - (void)setRightCornerIcon:(id)_icon {
63   ASSIGN(self->rightCornerIcon, _icon);
64 }
65 - (id)rightCornerIcon {
66   return self->rightCornerIcon;
67 }
68
69 - (void)setLeftCornerIcon:(id)_icon {
70   ASSIGN(self->leftCornerIcon, _icon);
71 }
72 - (id)leftCornerIcon {
73   return self->leftCornerIcon;
74 }
75
76 - (void)setSelection:(id)_col {
77   ASSIGN(self->selection, _col);
78 }
79 - (id)selection {
80   return self->selection;
81 }
82
83 /* actions */
84
85 - (id)increaseClicks {
86   int clicks;
87
88   //[self debugWithFormat:@"increasing clicks .."];
89   
90   clicks = [[self valueForKey:@"clicks"] intValue];
91   clicks++;
92   
93   [self takeValue:[NSNumber numberWithInt:clicks] forKey:@"clicks"];
94   
95   return nil;
96 }
97
98 @end /* TabView */