1 /*
2    Project: LaternaMagica
3    FileTable.h
4 
5    Copyright (C) 2006-2013 Riccardo Mottola
6 
7    Author: Riccardo Mottola
8 
9    Created: 2006-01-16
10 
11    This application is free software; you can redistribute it and/or
12    modify it under the terms of the GNU General Public
13    License as published by the Free Software Foundation; either
14    version 2 of the License, or (at your option) any later version.
15 
16    This application is distributed in the hope that it will be useful,
17    but WITHOUT ANY WARRANTY; without even the implied warranty of
18    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
19    Library General Public License for more details.
20 
21    You should have received a copy of the GNU General Public
22    License along with this library; if not, write to the Free
23    Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
24 */
25 
26 // The Data Source implementation for the TableView
27 
28 #import <AppKit/AppKit.h>
29 
30 @class LMImage;
31 @class AppController;
32 
33 #if !defined (GNUSTEP) &&  (MAC_OS_X_VERSION_MAX_ALLOWED <= MAC_OS_X_VERSION_10_4)
34 #define NSUInteger unsigned
35 #define NSInteger int
36 #endif
37 
38 @interface FileTable : NSObject
39 {
40   /* files that will not be added */
41   NSArray *filesToIgnore;
42 
43   NSMutableArray *images;
44 
45   IBOutlet AppController *appController;
46 }
47 
48 - (BOOL)addPathAndRecurse: (NSString*)path;
49 - (void)addPath:(NSString *)filename;
50 - (LMImage *)imageAtIndex :(NSUInteger)index;
51 - (NSString *)pathAtIndex :(NSUInteger)index;
52 - (NSUInteger)imageCount;
53 
54 /** removes an element at given index */
55 - (void)removeObjectAtIndex:(NSUInteger)index;
56 
57 /** shuffles the elements randomly */
58 - (void)scrambleObjects;
59 
60 
61 @end
62