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

ap_CocoaDialog_Stylist.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiWord
00004  * Copyright (C) 2003 Dom Lachowicz
00005  * Copyright (C) 2004, 2009 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_STYLIST_H
00024 #define AP_COCOADIALOG_STYLIST_H
00025 
00026 #import <Cocoa/Cocoa.h>
00027 
00028 #include "ap_Dialog_Stylist.h"
00029 
00030 class XAP_CocoaFrame;
00031 @class AP_CocoaDialog_Stylist_Controller;
00032 @class StyleNode;
00033 @protocol XAP_CocoaDialogProtocol;
00034 
00035 /*****************************************************************/
00036 
00037 class AP_CocoaDialog_Stylist: public AP_Dialog_Stylist
00038 {
00039 public:
00040     AP_CocoaDialog_Stylist(XAP_DialogFactory * pDlgFactory, XAP_Dialog_Id dlgid);
00041     virtual ~AP_CocoaDialog_Stylist(void);
00042 
00043     virtual void            runModeless(XAP_Frame * pFrame);
00044     virtual void            runModal(XAP_Frame * pFrame);
00045 
00046     static XAP_Dialog *     static_constructor(XAP_DialogFactory *, XAP_Dialog_Id dlgid);
00047     virtual void      setSensitivity(bool bSens);
00048 
00049     // callbacks can fire these events
00050     void            event_Close(void);
00051     void            event_Apply(void);
00052     void            styleClicked(UT_sint32 row, UT_sint32 col);
00053 
00054     virtual void            destroy(void);
00055     virtual void            activate(void);
00056     virtual void            notifyActiveFrame(XAP_Frame * pFrame);
00057     virtual void            setStyleInGUI(void);
00058 
00059     NSMutableArray *        getItems(void) { return m_items; }
00060 
00061 private:
00062     void            _fillTree(void);
00063     void            _populateWindowData(void);
00064 
00065     AP_CocoaDialog_Stylist_Controller * m_dlg;
00066 
00067     NSMutableArray *    m_items;
00068     bool                m_bModal;
00069     bool                m_bDialogClosed;
00070 };
00071 
00072 @interface AP_CocoaDialog_Stylist_Controller : NSWindowController
00073     <XAP_CocoaDialogProtocol>
00074 {
00075     IBOutlet NSButton *_applyBtn;
00076     IBOutlet NSOutlineView *_stylistList;
00077     AP_CocoaDialog_Stylist* _xap;
00078     BOOL _enabled;
00079 }
00080 - (void)refresh;
00081 - (void)selectStyleNode:(StyleNode *)childNode childOf:(StyleNode *)parentNode;
00082 - (IBAction)applyAction:(id)sender;
00083 - (IBAction)outlineAction:(id)sender;
00084 - (IBAction)outlineDoubleAction:(id)sender;
00085 - (void)setSensitivity:(bool)bSens;
00086 @end
00087 
00088 #endif /* AP_COCOADIALOG_STYLIST_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1