![]() |
CatNiP docutest
Sähköinen nuottikirja, HY-TKTKL-OHTUPROJ KESÄ11
|
00001 // 00002 // PlaylistsDelegateDataSource.h 00003 // CatNiP 00004 // 00005 // Delegate and datasource for CatNipViewController's tableviews' when 00006 // LIBRARYTYPE == PLAYLISTS. Uses local data (playlists, currentPlaylist) 00007 // as datasources. 00008 // 00009 // API up to date 28.6.2011 00010 // 00011 #import <Foundation/Foundation.h> 00012 #import "ValueButton.h" 00013 #import "ValueTextField.h" 00014 @class Playlist; 00015 @class CatNiPViewController; 00016 00017 @interface PlaylistsDelegateDataSource: UITableViewController<UITableViewDelegate, UITableViewDataSource, UITextFieldDelegate> 00018 { 00019 NSMutableArray *playlists; 00020 Playlist *currentPlaylist; 00021 ValueTextField *playlistName; 00022 CatNiPViewController *master; 00023 } 00024 00025 @property (retain) ValueTextField *playlistName; 00026 @property (nonatomic, retain) IBOutlet CatNiPViewController *master; 00027 @property (retain) NSMutableArray *playlists; 00028 @property (retain) Playlist *currentPlaylist; 00029 00030 -(id)initWithMaster:(CatNiPViewController *)m; 00031 00032 /*** UITableViewDataSource protocol's functions ***/ 00033 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView; 00034 - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath; 00035 - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath; 00036 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section; 00037 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath; 00038 - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath; 00039 - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath; 00040 00041 // tableView:cellForRowAtIndexPath: behaviour for libraryTableX's cell. Called from datasource protocol function. 00042 - (UITableViewCell *)createTableCellLeft: (NSIndexPath *) indexPath; 00043 - (UITableViewCell *)createTableCellRight: (NSIndexPath *)indexPath; 00044 00045 /*** UITableViewDelegate protocol's functions ***/ 00046 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath; 00047 - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath; 00048 - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section; 00049 - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section; 00050 - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section; 00051 - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section; 00052 - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath; 00053 - (NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath; 00054 00056 - (UIView *)createAccessoryViewForPlaylist:(NSIndexPath *)indexPath; 00057 // tableView:didSelectRowAtIndexPath: behaviour for libraryTableX's cells. Called from UITableViewDelegate 00058 // protocol function. 00059 - (void)didSelectRowAtLeftTable:(NSIndexPath *)indexPath; 00060 - (void)didSelectRowAtRightTable:(NSIndexPath *)indexPath; 00061 00062 00063 00064 -(void)changeLibraryTypeToPlaylists; 00065 -(void)setPlaylistViewContents:(NSIndexPath *)indexPath; 00066 -(void)playlistActivateClicked:(id)button; 00067 00068 @end