Debian Codegraph @

src/af/xap/cocoa/xap_CocoaDialog_Utilities.h

raw
1 /* AbiWord
2 * Copyright (C) 2002-2005 Hubert Figuiere
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 * 02110-1301 USA.
18 */
19
20
21 #ifndef __XAP_COCOADIALOG_UTILS_H__
22 #define __XAP_COCOADIALOG_UTILS_H__
23
24 #include <string>
25
26 #import <Cocoa/Cocoa.h>
27
28 #include "ut_string_class.h"
29
30 #include "xap_Strings.h"
31
32 class XAP_Dialog;
33
34 void SetNSControlLabel (id control, const UT_UTF8String &label);
35 void SetNSControlLabel (id control, const std::string &label);
36 void LocalizeControl (id control, const XAP_StringSet * pSS, XAP_String_Id stringId);
37 NSString* LocalizedString (const XAP_StringSet * pSS, XAP_String_Id stringId);
38 void AppendLocalizedMenuItem (NSPopUpButton* menu, const XAP_StringSet * pSS, XAP_String_Id stringId, int tag);
39 void _convertLabelToMac (char * buf, size_t bufSize, const char * label);
40
41 @protocol XAP_CocoaDialogProtocol
42
43 /* load the nib for the CocoaDialog */
44 - (id)initFromNib;
45
46 /* assign the controller an XAP object */
47 - (void)setXAPOwner:(XAP_Dialog *)owner;
48 /* discard that XAP because Life of Controller might be longer than the XAP Object */
49 - (void)discardXAP;
50
51 @end
52 #endif