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

xap_CocoaDialog_Utilities.h

Go to the documentation of this file.
00001 /* AbiWord
00002  * Copyright (C) 2002-2005 Hubert Figuiere
00003  *
00004  * This program is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU General Public License
00006  * as published by the Free Software Foundation; either version 2
00007  * of the License, or (at your option) any later version.
00008  *
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017  * 02110-1301 USA.
00018  */
00019 
00020 
00021 #ifndef __XAP_COCOADIALOG_UTILS_H__
00022 #define __XAP_COCOADIALOG_UTILS_H__
00023 
00024 #include <string>
00025 
00026 #import <Cocoa/Cocoa.h>
00027 
00028 #include "ut_string_class.h"
00029 
00030 #include "xap_Strings.h"
00031 
00032 class XAP_Dialog;
00033 
00034 void SetNSControlLabel (id control, const UT_UTF8String &label);
00035 void SetNSControlLabel (id control, const std::string &label);
00036 void LocalizeControl (id control, const XAP_StringSet * pSS, XAP_String_Id stringId);
00037 NSString* LocalizedString (const XAP_StringSet * pSS, XAP_String_Id stringId);
00038 void AppendLocalizedMenuItem (NSPopUpButton* menu, const XAP_StringSet * pSS, XAP_String_Id stringId, int tag);
00039 void _convertLabelToMac (char * buf, size_t bufSize, const char * label);
00040 
00041 @protocol XAP_CocoaDialogProtocol
00042 
00043 /* load the nib for the CocoaDialog */
00044 - (id)initFromNib;
00045 
00046 /* assign the controller an XAP object */
00047 - (void)setXAPOwner:(XAP_Dialog *)owner;
00048 /* discard that XAP because Life of Controller might be longer than the XAP Object */
00049 - (void)discardXAP;
00050 
00051 @end
00052 #endif

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1