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

ap_CocoaDialog_Columns.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., 51 Franklin Street, Fifth Floor, Boston, MA
00020  * 02110-1301 USA.
00021  */
00022 
00023 #ifndef AP_CocoaDialog_Columns_H
00024 #define AP_CocoaDialog_Columns_H
00025 
00026 #include "ap_Dialog_Columns.h"
00027 
00028 #include "ut_types.h"
00029 #include "ut_string.h"
00030 
00031 class GR_CocoaCairoGraphics;
00032 
00033 class XAP_CocoaFrame;
00034 @class AP_CocoaDialog_ColumnsController;
00035 
00036 /*****************************************************************/
00037 
00038 class AP_CocoaDialog_Columns: public AP_Dialog_Columns
00039 {
00040 public:
00041     AP_CocoaDialog_Columns(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id dlgid);
00042     virtual ~AP_CocoaDialog_Columns(void);
00043 
00044     virtual void            runModal(XAP_Frame * pFrame);
00045     virtual void            enableLineBetweenControl(bool bState = true);
00046 
00047     static XAP_Dialog *     static_constructor(XAP_DialogFactory *, XAP_Dialog_Id dlgid);
00048 
00049     // callbacks can fire these events
00050     void                            doSpaceAfterEntry(void);
00051     void                            doMaxHeightEntry(const char * s);
00052     void                            doHeightSpin(void);
00053     void                            doSpaceAfterSpin(void);
00054     void                            checkLineBetween(void);
00055     void                             colNumberChanged(void);
00056     void                            readSpin(void);
00057     void                            event_Toggle( UT_uint32 icolumns);
00058     void                            event_previewExposed(void);
00059     void            event_OK(void);
00060     void            event_Cancel(void);
00061 
00062     void            incrMaxHeight(bool bIncrement);
00063     void            incrSpaceAfter(bool bIncrement);
00064 
00065 private:
00066     GR_CocoaCairoGraphics * m_pPreviewWidget;
00067 
00068     AP_CocoaDialog_ColumnsController *  m_dlg;
00069 
00070     UT_Dimension        m_Dim_MaxHeight;
00071     UT_Dimension        m_Dim_SpaceAfter;
00072 };
00073 
00074 
00075 @interface AP_CocoaDialog_ColumnsController : NSWindowController <XAP_CocoaDialogProtocol>
00076 {
00077     IBOutlet NSButton *         _cancelBtn;
00078     IBOutlet NSButton *         _okBtn;
00079 
00080     IBOutlet NSButton *         _oneBtn;
00081     IBOutlet NSButton *         _twoBtn;
00082     IBOutlet NSButton *         _threeBtn;
00083 
00084     IBOutlet NSButton *         _useRTLBtn;
00085     IBOutlet NSButton *         _lineBetweenBtn;
00086 
00087     IBOutlet NSStepper *        _maxColSizeStepper;
00088     IBOutlet NSStepper *        _numOfColumnStepper;
00089     IBOutlet NSStepper *        _spaceAfterColStepper;
00090 
00091     IBOutlet NSTextField *      _maxColSizeData;
00092     IBOutlet NSTextField *      _maxColSizeLabel;
00093     IBOutlet NSTextField *      _numColumn2Label;
00094     IBOutlet NSTextField *      _numColumnLabel;
00095     IBOutlet NSTextField *      _numOfColumnData;
00096     IBOutlet NSTextField *      _spaceAfterColData;
00097     IBOutlet NSTextField *      _spaceAfterColLabel;
00098     IBOutlet NSTextField *      _oneLabel;
00099     IBOutlet NSTextField *      _twoLabel;
00100     IBOutlet NSTextField *      _threeLabel;
00101 
00102     IBOutlet NSBox *            _previewBox;
00103 
00104     IBOutlet XAP_CocoaNSView *  _preview;
00105 
00106     AP_CocoaDialog_Columns  *_xap;
00107 }
00108 - (IBAction)cancelAction:(id)sender;
00109 - (IBAction)lineBetweenAction:(id)sender;
00110 - (IBAction)maxColSizeAction:(id)sender;
00111 - (IBAction)maxColSizeStepperAction:(id)sender;
00112 - (IBAction)numOfColAction:(id)sender;
00113 - (IBAction)numOfColStepperAction:(id)sender;
00114 - (IBAction)okAction:(id)sender;
00115 - (IBAction)oneAction:(id)sender;
00116 - (IBAction)spaceAfterColAction:(id)sender;
00117 - (IBAction)spaceAfterColStepperAction:(id)sender;
00118 - (IBAction)threeAction:(id)sender;
00119 - (IBAction)twoAction:(id)sender;
00120 
00121 - (int)colNum;
00122 - (void)setColNum:(int)num;
00123 
00124 - (NSString*)spaceAfter;
00125 - (void)setSpaceAfter:(const char *)str;
00126 - (void)setMaxColHeight:(const char *)str;
00127 - (bool)lineBetween;
00128 - (void)setLineBetween:(bool)b;
00129 - (UT_uint32)columnRTLOrder;
00130 - (void)setColumnRTLOrder:(UT_uint32)val;
00131 
00132 - (XAP_CocoaNSView*)preview;
00133 
00134 @end
00135 
00136 #endif /* AP_CocoaDialog_Columns_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1