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

xap_CocoaToolbar_Icons.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiSource Application Framework
00004  * Copyright (C) 1998 AbiSource, Inc.
00005  * Copyright (C) 2001 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 XAP_COCOATOOLBARICONS_H
00024 #define XAP_COCOATOOLBARICONS_H
00025 
00026 #import <Cocoa/Cocoa.h>
00027 
00028 #include "ut_types.h"
00029 
00030 #include "xap_Toolbar_Icons.h"
00031 
00032 /*****************************************************************/
00033 
00034 @class XAP_CocoaToolbarButton;
00035 
00036 @protocol XAP_CocoaButtonController
00037 - (void)menuWillActivate:(NSMenu *)menu forButton:(XAP_CocoaToolbarButton *)button;
00038 @end
00039 
00040 @interface XAP_CocoaToolbarButton : NSButton
00041 {
00042     NSMenu *    m_menu;
00043     id <XAP_CocoaButtonController>  m_controller;
00044 }
00045 - (id)initWithFrame:(NSRect)frameRect;
00046 - (void)setMenu:(NSMenu *)menu withController:(id <XAP_CocoaButtonController>)controller;
00047 - (void)mouseDown:(NSEvent *)theEvent;
00048 - (void)drawRect:(NSRect)aRect;
00049 @end
00050 
00051 class XAP_CocoaToolbar_Icons : public XAP_Toolbar_Icons
00052 {
00053 public:
00054     XAP_CocoaToolbar_Icons(void);
00055     ~XAP_CocoaToolbar_Icons(void);
00056 
00057     NSImage *           getPixmapForIcon(const char * szIconID);  // the ID is an internal AbiWord identifier
00058 
00059     static NSString *   getPNGNameForIcon(const char * szIconID);
00060     static NSString *   getFilenameForIcon(NSString * szIconName); // e.g., the PNGName from the above method
00061 
00062 protected:
00063 };
00064 
00065 #endif /* XAP_COCOATOOLBARICONS_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1