#import <Cocoa/Cocoa.h>#include "ut_types.h"#include "ut_string.h"#include "ut_string_class.h"#include "ut_assert.h"#include "ut_debugmsg.h"#include "xap_App.h"#include "xap_Prefs.h"#include "xap_Toolbar_Layouts.h"#include "xap_CocoaDialog_Utilities.h"#include "xap_EncodingManager.h"#include "ap_Dialog_Id.h"#include "ap_Prefs_SchemeIds.h"#include "ap_Strings.h"#import "ap_CocoaDialog_Options.h"Defines | |
| #define | DEFINE_GET_SET_BOOL(button) |
| #define | DEFINE_GET_SET_BOOL_D(button) |
| #define | DEFINE_GET_SET_TEXT(widget) |
| #define | DEFINE_GET_SET_BOOL_DUMMY(Bool) |
| #define DEFINE_GET_SET_BOOL | ( | button | ) |
bool AP_CocoaDialog_Options::_gather##button(void) { \ UT_ASSERT(ctrl->m_checkbutton##button); \ return ([ctrl->m_checkbutton##button state] == NSOnState); } \ void AP_CocoaDialog_Options::_set##button(bool b) { \ UT_ASSERT(ctrl->m_checkbutton##button); \ [ctrl->m_checkbutton##button setState:(b?NSOnState:NSOffState)]; }
| #define DEFINE_GET_SET_BOOL_D | ( | button | ) |
bool AP_CocoaDialog_Options::_gather##button(void) { \ return false; } \ void AP_CocoaDialog_Options::_set##button(bool) { \ }
| #define DEFINE_GET_SET_BOOL_DUMMY | ( | Bool | ) |
| #define DEFINE_GET_SET_TEXT | ( | widget | ) |
char * AP_CocoaDialog_Options::_gather##widget() { \ UT_ASSERT(ctrl->m_text##widget)); \ return [[ctrl->m_text##widget stringValue] UTF8String]; } \ \ void AP_CocoaDialog_Options::_set##widget(const char *t) { \ UT_ASSERT(ctrl->m_text##widget); \ [ctrl->m_text##widget setStringValue:[NSString stringWithCString:t encoding:NSUTF8StringEncoding]]; \ }
1.7.1