#import <Cocoa/Cocoa.h>#include "xap_CocoaDialog_Utilities.h"Functions | |
| void | _SetNSControlLabel (id control, const char *label) |
| void | SetNSControlLabel (id control, const UT_UTF8String &label) |
| set the label of a NSControl | |
| void | SetNSControlLabel (id control, const std::string &label) |
| void | LocalizeControl (id control, const XAP_StringSet *pSS, XAP_String_Id stringId) |
| NSString * | LocalizedString (const XAP_StringSet *pSS, XAP_String_Id stringId) |
| void | AppendLocalizedMenuItem (NSPopUpButton *menu, const XAP_StringSet *pSS, XAP_String_Id stringId, int tag) |
| void | _convertLabelToMac (char *buf, size_t bufSize, const char *label) |
| void _convertLabelToMac | ( | char * | buf, | |
| size_t | bufSize, | |||
| const char * | label | |||
| ) |
Strip the '&' from the label
| buf | the result buffer | |
| bufSize | the allocated size for buf | |
| label | the label to convert as an UT_String |
References UT_ASSERT.
Referenced by _SetNSControlLabel(), and EV_CocoaMenu::convertToString.
| void _SetNSControlLabel | ( | id | control, | |
| const char * | label | |||
| ) |
References _convertLabelToMac().
Referenced by SetNSControlLabel().
| void AppendLocalizedMenuItem | ( | NSPopUpButton * | menu, | |
| const XAP_StringSet * | pSS, | |||
| XAP_String_Id | stringId, | |||
| int | tag | |||
| ) |
Append a menu item to the popup button
| menu | the popup button | |
| pSS | the string set | |
| stringId | the string id |
References LocalizedString().
Referenced by AP_CocoaDialog_Lists::_fillFontMenu, and AP_CocoaDialog_ListsController::windowDidLoad.
| void LocalizeControl | ( | id | control, | |
| const XAP_StringSet * | pSS, | |||
| XAP_String_Id | stringId | |||
| ) |
Localize a control with a string from a string set
| control | the control AppKit object | |
| pSS | the string set | |
| stringID | the string ID from the string set SetNSControlLabel |
References XAP_StringSet::getValueUTF8(), label, and SetNSControlLabel().
Referenced by XAP_CocoaDlg_Insert_SymbolController::windowDidLoad, AP_CocoaDialog_OptionsController::windowDidLoad, AP_CocoaDialog_ListsController::windowDidLoad, and AP_CocoaDialog_BreakController::windowDidLoad.
| NSString* LocalizedString | ( | const XAP_StringSet * | pSS, | |
| XAP_String_Id | stringId | |||
| ) |
Fetch a string from the string set and return a NSString
| pSS | the string set | |
| stringId | the string id |
References XAP_StringSet::getValueUTF8(), and label.
Referenced by AP_CocoaDialog_Lists::_fillBulletedStyleMenu, AP_CocoaDialog_Lists::_fillNoneStyleMenu, AP_CocoaDialog_Lists::_fillNumberedStyleMenu, AppendLocalizedMenuItem(), XAP_CocoaDialog_MessageBox::runModal(), XAP_CocoaDialog_Encoding::runModal(), and AP_CocoaDialog_Insert_DateTime::runModal().
| void SetNSControlLabel | ( | id | control, | |
| const std::string & | label | |||
| ) |
References _SetNSControlLabel().
| void SetNSControlLabel | ( | id | control, | |
| const UT_UTF8String & | label | |||
| ) |
set the label of a NSControl
| control | the control AppKit object | |
| label | UT_UTF8String to set. It is a well formed XP label that will be converted. |
References _SetNSControlLabel(), and UT_UTF8String::utf8_str().
Referenced by LocalizeControl(), XAP_OpenSavePanel_AccessoryController::setFileTypeLabel:, and XAP_CocoaWidget::setLabel().
1.7.1