00001 /* AbiWord 00002 * Copyright (C) 2002 Dom Lachowicz 00003 * Copyright (C) 2009 Hubert Figuiere 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 00018 * 02110-1301 USA. 00019 */ 00020 00021 #ifndef AP_COCOADIALOG_ANNOTATION_H 00022 #define AP_COCOADIALOG_ANNOTATION_H 00023 00024 #include <Cocoa/Cocoa.h> 00025 00026 #include "xap_CocoaDialog_Utilities.h" 00027 #include "ap_Dialog_Annotation.h" 00028 00029 class XAP_CocoaFrame; 00030 class AP_CocoaDialog_Annotation; 00031 00032 @interface AP_CocoaDialog_AnnotationController : NSWindowController <XAP_CocoaDialogProtocol> 00033 { 00034 IBOutlet NSTextField * _titleLabel; 00035 IBOutlet NSTextField * _authorLabel; 00036 IBOutlet NSTextField * _descLabel; 00037 00038 IBOutlet NSTextField * _titleText; 00039 IBOutlet NSTextField * _authorText; 00040 IBOutlet NSTextView * _descText; 00041 00042 IBOutlet NSButton * _okBtn; 00043 IBOutlet NSButton * _cancelBtn; 00044 IBOutlet NSButton * _replaceBtn; 00045 00046 AP_CocoaDialog_Annotation * _xap; 00047 } 00048 - (IBAction)okAction:(id)sender; 00049 - (IBAction)cancelAction:(id)sender; 00050 - (IBAction)replaceAction:(id)sender; 00051 - (void)setXAPOwner:(XAP_Dialog*)owner; 00052 00053 @end 00054 /*****************************************************************/ 00055 00056 class AP_CocoaDialog_Annotation 00057 : public AP_Dialog_Annotation 00058 { 00059 public: 00060 AP_CocoaDialog_Annotation(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id id); 00061 virtual ~AP_CocoaDialog_Annotation(void); 00062 00063 virtual void runModal(XAP_Frame * pFrame); 00064 00065 static XAP_Dialog * static_constructor(XAP_DialogFactory *, XAP_Dialog_Id id); 00066 00067 private: 00068 AP_CocoaDialog_AnnotationController * m_dlg; 00069 }; 00070 00071 #endif /* AP_COCOADIALOG_ANNOTATION_H */