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

ap_CocoaDialog_Styles.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 1998 AbiSource, Inc.
00003  * Copyright (C) 2001, 2003, 2005, 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_Styles_H
00022 #define AP_CocoaDialog_Styles_H
00023 
00024 #import <Cocoa/Cocoa.h>
00025 #include "ap_Dialog_Columns.h"
00026 
00027 #include "ut_types.h"
00028 #include "ut_string.h"
00029 #import "xap_Cocoa_NSTableUtils.h"
00030 #include "ap_Dialog_Styles.h"
00031 
00032 
00033 class GR_CocoaCairoGraphics;
00034 class XAP_CocoaFrame;
00035 @class AP_CocoaDialog_StylesController;
00036 @class AP_CocoaDialog_StylesModifyController;
00037 
00038 /*****************************************************************/
00039 
00040 class AP_CocoaDialog_Styles: public AP_Dialog_Styles
00041 {
00042 public:
00043     typedef enum _StyleType
00044       {USED_STYLES, ALL_STYLES, USER_STYLES} StyleType;
00045 
00046     AP_CocoaDialog_Styles(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id dlgid);
00047     virtual ~AP_CocoaDialog_Styles(void);
00048 
00049     virtual void            runModal(XAP_Frame * pFrame);
00050 
00051     static XAP_Dialog *     static_constructor(XAP_DialogFactory *, XAP_Dialog_Id dlgid);
00052 
00053     // callbacks can fire these events
00054 
00055     void                            event_paraPreviewExposed(void);
00056     void                            event_charPreviewExposed(void);
00057 
00058     virtual void            event_Apply(void);
00059     virtual void            event_Close(void);
00060 
00061     virtual void event_DeleteClicked(NSString* data);
00062     virtual void event_NewClicked(void);
00063     virtual void event_ModifyClicked(void);
00064     virtual void event_ClistClicked(int row);
00065     virtual void event_ListFilterClicked(const StyleType which);
00066     void new_styleName(void);
00067 
00069 // Modify window
00071 
00072     void         event_Modify_OK(void);
00073     void         event_Modify_Cancel(void);
00074     void         event_ModifyParagraph();
00075     void         event_ModifyFont();
00076     void         event_ModifyNumbering();
00077     void         event_ModifyTabs();
00078     void         event_ModifyLanguage();
00079     void         event_ModifyPreviewExposed();
00080     void         event_RemoveProperty(void);
00081     void         rebuildDeleteProps(void);
00082     void         event_basedOn(void);
00083     void         event_followedBy(void);
00084     void         event_styleType(void);
00085     void         modifyRunModal(void);
00086     void         event_modifySheetDidEnd(int code);
00087     void         setIsNew(bool _isNew) {m_bIsNew = _isNew;}
00088     bool   isNew(void) const { return m_bIsNew;}
00089     const gchar *   getNewStyleName(void) const {return m_newStyleName;}
00090     const gchar *   getBasedonName(void) const {return m_basedonName;}
00091     const gchar *   getFollowedbyName(void) const {return m_followedbyName;}
00092     const gchar *   getStyleType(void) const {return m_styleType;}
00093 
00094 private:
00095     void                _populateWindowData(void);
00096     void                            _populateCList(void);
00097     void                _storeWindowData(void) const;
00098     virtual const char * getCurrentStyle (void) const;
00099     virtual void setDescription (const char * desc) const;
00100 
00101     GR_CocoaCairoGraphics   *       m_pParaPreviewWidget;
00102     GR_CocoaCairoGraphics   *       m_pCharPreviewWidget;
00103 
00104     virtual void setModifyDescription( const char * desc);
00105     bool        _populateModify(void);
00106 
00107     gchar    m_newStyleName[40];
00108     gchar    m_basedonName[40];
00109     gchar    m_followedbyName[40];
00110     gchar    m_styleType[40];
00111     GR_CocoaCairoGraphics   *       m_pAbiPreviewWidget;
00112     int m_whichRow;
00113     StyleType m_whichType;
00114     bool m_bIsNew;
00115     AP_CocoaDialog_StylesController* m_dlg;
00116     AP_CocoaDialog_StylesModifyController* m_modifyDlg;
00117 };
00118 
00119 
00120 
00121 
00122 #endif /* AP_CocoaDialog_Styles_H */
00123 
00124 
00125 
00126 
00127 
00128 
00129 

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1