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., 51 Franklin Street, Fifth Floor, Boston, MA 00020 * 02110-1301 USA. 00021 */ 00022 00023 #ifndef AP_COCOADIALOG_PAGENUMBERS_H 00024 #define AP_COCOADIALOG_PAGENUMBERS_H 00025 00026 #include "ut_types.h" 00027 #include "ap_Dialog_PageNumbers.h" 00028 00029 class XAP_CocoaFrame; 00030 class GR_CocoaCairoGraphics; 00031 @class AP_CocoaDialog_PageNumbersController; 00032 @protocol XAP_CocoaDialogProtocol; 00033 00034 class AP_CocoaDialog_PageNumbers : public AP_Dialog_PageNumbers 00035 { 00036 public: 00037 AP_CocoaDialog_PageNumbers(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id dlgid); 00038 virtual ~AP_CocoaDialog_PageNumbers(void); 00039 00040 virtual void runModal(XAP_Frame * pFrame); 00041 00042 static XAP_Dialog * static_constructor(XAP_DialogFactory *, XAP_Dialog_Id dlgid); 00043 00044 void event_OK(void); 00045 void event_Cancel(void); 00046 void event_WindowDelete(void); 00047 void event_PreviewExposed(void); 00048 void event_AlignChanged(AP_Dialog_PageNumbers::tAlign); 00049 void event_HdrFtrChanged(AP_Dialog_PageNumbers::tControl); 00050 00051 private: 00052 AP_Dialog_PageNumbers::tAlign m_recentAlign; 00053 AP_Dialog_PageNumbers::tControl m_recentControl; 00054 GR_CocoaCairoGraphics * m_pG; 00055 AP_CocoaDialog_PageNumbersController * m_dlg; 00056 }; 00057 00058 00059 @interface AP_CocoaDialog_PageNumbersController : NSWindowController <XAP_CocoaDialogProtocol> 00060 { 00061 IBOutlet NSButton * _cancelBtn; 00062 IBOutlet NSButton * _okBtn; 00063 00064 IBOutlet NSBox * _positionBox; 00065 IBOutlet NSBox * _alignmentBox; 00066 IBOutlet NSBox * _previewBox; 00067 00068 IBOutlet NSButtonCell * _headerBtn; 00069 IBOutlet NSButtonCell * _footerBtn; 00070 00071 IBOutlet NSButtonCell * _leftBtn; 00072 IBOutlet NSButtonCell * _centerBtn; 00073 IBOutlet NSButtonCell * _rightBtn; 00074 00075 IBOutlet NSMatrix * _positionMatrix; 00076 IBOutlet NSMatrix * _alignmentMatrix; 00077 00078 IBOutlet XAP_CocoaNSView *_preview; 00079 00080 AP_CocoaDialog_PageNumbers* _xap; 00081 } 00082 - (IBAction)alignmentAction:(id)sender; 00083 - (IBAction)cancelAction:(id)sender; 00084 - (IBAction)okAction:(id)sender; 00085 - (IBAction)positionAction:(id)sender; 00086 - (XAP_CocoaNSView*)preview; 00087 @end 00088 00089 #endif /* AP_COCOADIALOG_PAGENUBMERS_H */