Remove obsolete VisualAge-related files.
[wxWidgets.git] / src / cocoa / NSTableView.mm
1 /////////////////////////////////////////////////////////////////////////////
2 // Name:        src/cocoa/NSTableView.mm
3 // Purpose:     wxCocoaNSTableView / wxCocoaNSTableDataSource
4 // Author:      David Elliott
5 // Modified by:
6 // Created:     2003/08/05
7 // Copyright:   (c) 2003 David Elliott
8 // Licence:     wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 // ============================================================================
12 // declarations
13 // ============================================================================
14
15 // ----------------------------------------------------------------------------
16 // headers
17 // ----------------------------------------------------------------------------
18
19 #include "wx/wxprec.h"
20 #ifndef WX_PRECOMP
21     #include "wx/log.h"
22 #endif // WX_PRECOMP
23
24 #include "wx/cocoa/NSTableDataSource.h"
25 #include "wx/cocoa/NSTableView.h"
26 #import <AppKit/NSTableView.h>
27
28 // ----------------------------------------------------------------------------
29 // globals
30 // ----------------------------------------------------------------------------
31 WX_IMPLEMENT_OBJC_INTERFACE_HASHMAP(NSTableView)
32
33 // ============================================================================
34 // @class wxCocoaNSTableDataSource
35 // ============================================================================
36 @implementation wxCocoaNSTableDataSource : NSObject
37
38 - (int)numberOfRowsInTableView: (NSTableView *)tableView
39 {
40     wxCocoaNSTableView *wxView = wxCocoaNSTableView::GetFromCocoa(tableView);
41     wxCHECK_MSG(wxView, 0, wxT("No associated wx object"));
42     return wxView->CocoaDataSource_numberOfRows();
43 }
44
45 - (id)tableView:(NSTableView *)tableView
46     objectValueForTableColumn: (NSTableColumn *)tableColumn
47     row: (int)rowIndex
48 {
49     wxCocoaNSTableView *wxView = wxCocoaNSTableView::GetFromCocoa(tableView);
50     wxCHECK_MSG(wxView, nil, wxT("No associated wx object"));
51     return wxView->CocoaDataSource_objectForTableColumn(tableColumn,rowIndex);
52 }
53
54 @end // implementation wxCocoaNSTableDataSource
55 WX_IMPLEMENT_GET_OBJC_CLASS(wxCocoaNSTableDataSource,NSObject)
56