Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_COCOA_TABLE_MODEL_ARRAY_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_TABLE_MODEL_ARRAY_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_COCOA_TABLE_MODEL_ARRAY_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_COCOA_TABLE_MODEL_ARRAY_CONTROLLER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #import <Cocoa/Cocoa.h> | 9 #import <Cocoa/Cocoa.h> |
| 10 | 10 |
| 11 #include "app/table_model_observer.h" | 11 #include "app/table_model_observer.h" |
| 12 #include "base/cocoa_protocols_mac.h" | 12 #include "base/cocoa_protocols_mac.h" |
| 13 #include "base/scoped_nsobject.h" | 13 #include "base/scoped_nsobject.h" |
| 14 #include "base/scoped_ptr.h" | 14 #include "base/scoped_ptr.h" |
| 15 | 15 |
| 16 class RemoveRowsObserverBridge; | 16 class RemoveRowsObserverBridge; |
| 17 class RemoveRowsTableModel; | 17 class RemoveRowsTableModel; |
| 18 @class TableModelArrayController; | 18 @class TableModelArrayController; |
| 19 | 19 |
| 20 // This class functions as an adapter from a RemoveRowsTableModel to a Cocoa | 20 // This class functions as an adapter from a RemoveRowsTableModel to a Cocoa |
| 21 // NSArrayController, to be used with bindings. | 21 // NSArrayController, to be used with bindings. |
|
dmac
2011/01/06 06:04:05
grammar nit: this first sentence needs some work
Bernhard Bauer
2011/01/08 15:41:02
Ok, I hope it sounds a bit less awkward now.
| |
| 22 // It maps the CanRemoveRows method to its canRemove property, and exposes | 22 // It maps the CanRemoveRows method to its canRemove property, and exposes |
| 23 // RemoveRows and RemoveAll as actions (remove: and removeAll:). | 23 // RemoveRows and RemoveAll as actions (remove: and removeAll:). |
| 24 // If the table model has groups, these are inserted into the list of arranged | 24 // If the table model has groups, these are inserted into the list of arranged |
| 25 // objects as group rows. | 25 // objects as group rows. |
| 26 // The designated initializer is the same as for NSArrayController, | 26 // The designated initializer is the same as for NSArrayController, |
| 27 // initWithContent:, but usually this class is instantiated from a nib file. | 27 // initWithContent:, but usually this class is instantiated from a nib file. |
| 28 // Clicking on a group row selects all rows belonging to that group, like it | 28 // Clicking on a group row selects all rows belonging to that group, like it |
| 29 // does in a Windows table_view. | 29 // does in a Windows table_view. |
| 30 // In order to show group rows, this class must be the delegate of the | 30 // In order to show group rows, this class must be the delegate of the |
| 31 // NSTableView. | 31 // NSTableView. |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 45 // groups, it can be nil. | 45 // groups, it can be nil. |
| 46 - (void)bindToTableModel:(RemoveRowsTableModel*)model | 46 - (void)bindToTableModel:(RemoveRowsTableModel*)model |
| 47 withColumns:(NSDictionary*)columns | 47 withColumns:(NSDictionary*)columns |
| 48 groupTitleColumn:(NSString*)groupTitleColumn; | 48 groupTitleColumn:(NSString*)groupTitleColumn; |
| 49 | 49 |
| 50 - (IBAction)removeAll:(id)sender; | 50 - (IBAction)removeAll:(id)sender; |
| 51 | 51 |
| 52 @end | 52 @end |
| 53 | 53 |
| 54 #endif // CHROME_BROWSER_UI_COCOA_TABLE_MODEL_ARRAY_CONTROLLER_H_ | 54 #endif // CHROME_BROWSER_UI_COCOA_TABLE_MODEL_ARRAY_CONTROLLER_H_ |
| 55 | |
| OLD | NEW |