• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ap_CocoaDialog_Field.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiWord
00004  * Copyright (C) 1998 AbiSource, Inc.
00005  * Copyright (C) 2001, 2003 Hubert Figuiere
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00020  * 02111-1307, USA.
00021  */
00022 
00023 #ifndef AP_COCOADIALOG_FIELD_H
00024 #define AP_COCOADIALOG_FIELD_H
00025 
00026 #include "ap_Dialog_Field.h"
00027 
00028 #import "xap_Cocoa_NSTableUtils.h"
00029 
00030 class XAP_CocoaFrame;
00031 @class AP_CocoaDialog_FieldController;
00032 @protocol XAP_CocoaDialogProtocol;
00033 
00034 /*****************************************************************/
00035 
00036 class AP_CocoaDialog_Field: public AP_Dialog_Field
00037 {
00038 public:
00039     AP_CocoaDialog_Field(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id dlgid);
00040 
00041     static XAP_Dialog *     static_constructor(XAP_DialogFactory *pFactory , XAP_Dialog_Id dlgid);
00042     virtual ~AP_CocoaDialog_Field(void);
00043 
00044     virtual void runModal(XAP_Frame * pFrame);
00045 
00046     void event_OK(void);
00047     void event_Cancel(void);
00048     void types_changed(int row);
00049     void setTypesList(void);
00050     void setFieldsList(void);
00051 
00052 private:
00053     void _populateCategories(void);
00054     XAP_StringListDataSource *m_typeList;
00055     XAP_StringListDataSource *m_fieldList;
00056     AP_CocoaDialog_FieldController* m_dlg;
00057 };
00058 
00059 
00060 
00061 @interface AP_CocoaDialog_FieldController : NSWindowController <XAP_CocoaDialogProtocol>
00062 {
00063     IBOutlet NSButton *_cancelBtn;
00064     IBOutlet NSTextField *_extraParamData;
00065     IBOutlet NSTextField *_extraParamLabel;
00066     IBOutlet NSTextField *_fieldsLabel;
00067     IBOutlet NSTableView *_fieldsList;
00068     IBOutlet NSButton *_okBtn;
00069     IBOutlet NSTextField *_typesLabel;
00070     IBOutlet NSTableView *_typesList;
00071     AP_CocoaDialog_Field *_xap;
00072 }
00073 - (int)selectedType;
00074 - (int)selectedField;
00075 - (NSString*)extraParam;
00076 - (void)setTypeList:(XAP_StringListDataSource*)tl andFieldList:(XAP_StringListDataSource*)fl;
00077 - (void)typesAction:(id)sender;
00078 - (IBAction)cancelAction:(id)sender;
00079 - (IBAction)okAction:(id)sender;
00080 
00081 /* NSTableView delegate methods
00082  */
00083 - (void)tableViewSelectionDidChange:(NSNotification *)aNotification;
00084 @end
00085 
00086 #endif /* AP_COCOADIALOG_FIELD_H */
00087 
00088 
00089 
00090 
00091 
00092 

Generated on Sun May 27 2012 for AbiWord by  doxygen 1.7.1