1 |
/* BColumn.h |
2 |
* |
3 |
* Copyright (C) 2003 Free Software Foundation, Inc. |
4 |
* |
5 |
* Author: Enrico Sersale <enrico@imago.ro> |
6 |
* Date: August 2001 |
7 |
* |
8 |
* This file is part of the GNUstep GWorkspace application |
9 |
* |
10 |
* This program is free software; you can redistribute it and/or modify |
11 |
* it under the terms of the GNU General Public License as published by |
12 |
* the Free Software Foundation; either version 2 of the License, or |
13 |
* (at your option) any later version. |
14 |
* |
15 |
* This program is distributed in the hope that it will be useful, |
16 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
17 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
18 |
* GNU General Public License for more details. |
19 |
* |
20 |
* You should have received a copy of the GNU General Public License |
21 |
* along with this program; if not, write to the Free Software |
22 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
23 |
*/ |
24 |
|
25 |
#ifndef BCOLUMN_H_ |
26 |
#define BCOLUMN_H_ |
27 |
|
28 |
#include <AppKit/NSView.h> |
29 |
|
30 |
@class NSMatrix; |
31 |
@class NSScrollView; |
32 |
@class NSTextField; |
33 |
@class BMatrix; |
34 |
@class BIcon; |
35 |
@class BCell; |
36 |
@class Browser2; |
37 |
|
38 |
@interface BColumn : NSView |
39 |
{ |
40 |
NSScrollView *scroll; |
41 |
BMatrix *matrix; |
42 |
BCell *cellPrototype; |
43 |
NSView *iconView; |
44 |
BIcon *icon; |
45 |
|
46 |
unsigned int styleMask; |
47 |
int cellsHeight; |
48 |
|
49 |
NSString *path; |
50 |
NSString *oldpath; |
51 |
int index; |
52 |
BOOL isLoaded; |
53 |
BOOL isLeaf; |
54 |
|
55 |
Browser2 *browser; |
56 |
|
57 |
id fm; |
58 |
id ws; |
59 |
} |
60 |
|
61 |
- (id)initInBrowser:(Browser2 *)aBrowser |
62 |
atIndex:(int)ind |
63 |
cellPrototype:(BCell *)cell |
64 |
styleMask:(int)mask; |
65 |
|
66 |
- (void)setCurrentPaths:(NSArray *)cpaths; |
67 |
|
68 |
- (void)createRowsInMatrix; |
69 |
|
70 |
- (void)addMatrixCellsWithNames:(NSArray *)names; |
71 |
|
72 |
- (void)addDimmedMatrixCellsWithNames:(NSArray *)names; |
73 |
|
74 |
- (void)removeMatrixCellsWithNames:(NSArray *)names; |
75 |
|
76 |
- (BOOL)selectMatrixCellsWithNames:(NSArray *)names sendAction:(BOOL)act; |
77 |
|
78 |
- (void)selectMatrixCells:(NSArray *)cells sendAction:(BOOL)act; |
79 |
|
80 |
- (BOOL)selectFirstCell; |
81 |
|
82 |
- (BOOL)selectCellWithPrefix:(NSString *)prefix; |
83 |
|
84 |
- (void)selectIcon; |
85 |
|
86 |
- (void)selectAll; |
87 |
|
88 |
- (NSArray *)selection; |
89 |
|
90 |
- (void)lockCellsWithNames:(NSArray *)names; |
91 |
|
92 |
- (void)unLockCellsWithNames:(NSArray *)names; |
93 |
|
94 |
- (void)lock; |
95 |
|
96 |
- (void)unLock; |
97 |
|
98 |
- (void)adjustMatrix; |
99 |
|
100 |
- (void)updateIcon; |
101 |
|
102 |
- (id)cellWithName:(NSString *)name; |
103 |
|
104 |
- (void)setLeaf:(BOOL)value; |
105 |
|
106 |
- (Browser2 *)browser; |
107 |
|
108 |
- (NSMatrix *)cmatrix; |
109 |
|
110 |
- (NSView *)iconView; |
111 |
|
112 |
- (BIcon *)myIcon; |
113 |
|
114 |
- (NSTextField *)iconLabel; |
115 |
|
116 |
- (NSString *)currentPath; |
117 |
|
118 |
- (int)index; |
119 |
|
120 |
- (BOOL)isLoaded; |
121 |
|
122 |
- (BOOL)isSelected; |
123 |
|
124 |
- (BOOL)isLeaf; |
125 |
|
126 |
- (void)doClick:(id)sender; |
127 |
|
128 |
- (void)doDoubleClick:(id)sender; |
129 |
|
130 |
- (unsigned int)draggingEntered:(id <NSDraggingInfo>)sender |
131 |
inMatrixCell:(id)aCell; |
132 |
|
133 |
- (void)concludeDragOperation:(id <NSDraggingInfo>)sender |
134 |
inMatrixCell:(id)aCell; |
135 |
|
136 |
@end |
137 |
|
138 |
@interface BColumn (BIconDelegateMethods) |
139 |
|
140 |
- (void)icon:(BIcon *)sender setFrameOfLabel:(NSTextField *)label; |
141 |
|
142 |
- (void)unselectOtherIcons:(BIcon *)selicon; |
143 |
|
144 |
- (void)unselectNameEditor; |
145 |
|
146 |
- (void)restoreSelectionAfterDndOfIcon:(BIcon *)dndicon; |
147 |
|
148 |
- (void)clickOnIcon:(BIcon *)clicked; |
149 |
|
150 |
- (void)doubleClickOnIcon:(BIcon *)clicked newViewer:(BOOL)isnew; |
151 |
|
152 |
@end |
153 |
|
154 |
#endif // BCOLUMN_H_ |