| 1 |
/* AbiWord |
| 2 |
* Copyright (C) 2002-2003 Hubert Figuiere |
| 3 |
* |
| 4 |
* This program is free software; you can redistribute it and/or |
| 5 |
* modify it under the terms of the GNU General Public License |
| 6 |
* as published by the Free Software Foundation; either version 2 |
| 7 |
* of the License, or (at your option) any later version. |
| 8 |
* |
| 9 |
* This program is distributed in the hope that it will be useful, |
| 10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 |
* GNU General Public License for more details. |
| 13 |
* |
| 14 |
* You should have received a copy of the GNU General Public License |
| 15 |
* along with this program; if not, write to the Free Software |
| 16 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 17 |
* 02110-1301 USA. |
| 18 |
*/ |
| 19 |
|
| 20 |
|
| 21 |
/* XAP_GenericListChooser_Controller */ |
| 22 |
|
| 23 |
#import <Cocoa/Cocoa.h> |
| 24 |
|
| 25 |
class XAP_GenericListChooser_Proxy |
| 26 |
{ |
| 27 |
public: |
| 28 |
virtual ~XAP_GenericListChooser_Proxy() {} |
| 29 |
virtual void okAction () = 0; |
| 30 |
virtual void cancelAction () = 0; |
| 31 |
virtual void selectAction () = 0; |
| 32 |
}; |
| 33 |
|
| 34 |
|
| 35 |
@interface XAP_GenericListChooser_Controller : NSWindowController |
| 36 |
{ |
| 37 |
IBOutlet NSButton *m_cancelBtn; |
| 38 |
IBOutlet NSBox *m_enclosingBox; |
| 39 |
IBOutlet NSTableView *m_listTable; |
| 40 |
IBOutlet NSButton *m_okBtn; |
| 41 |
XAP_GenericListChooser_Proxy* _proxy; |
| 42 |
} |
| 43 |
+ (XAP_GenericListChooser_Controller *)loadFromNib; |
| 44 |
- (IBAction)cancelClicked:(id)sender; |
| 45 |
- (IBAction)listClicked:(id)sender; |
| 46 |
- (IBAction)okClicked:(id)sender; |
| 47 |
|
| 48 |
/* GUI customization */ |
| 49 |
- (void)setTitle:(NSString*)title; |
| 50 |
- (void)setLabel:(NSString*)label; |
| 51 |
|
| 52 |
/* other */ |
| 53 |
- (void)setXAPProxy:(XAP_GenericListChooser_Proxy*)proxy; |
| 54 |
- (void)setDataSource:(id)obj; |
| 55 |
- (void)setSelected:(int)idx; |
| 56 |
- (int)selected; |
| 57 |
@end |
| 58 |
|
| 59 |
|