void DrawingPageDraw__::Flush() { if(pagei >= 0) { Drawing dw = GetResult(); page.At(pagei).Append(dw); Create(size); } }
void static ShowAlertNative(String title, String message, Array<String> buttons, AlertDelegate* delegate) { CFOptionFlags cfRes; CFStringRef b[3]; for (int i = 0; i<3; ++i) { if (buttons.Length() > i) { b[i] = CFStringCreateWithCString(NULL, buttons.At(i).ToCString<char>(), kCFStringEncodingASCII); } else { b[i] = CFStringCreateWithCString(NULL, "", kCFStringEncodingASCII); } } CFUserNotificationDisplayAlert(0, kCFUserNotificationNoteAlertLevel, NULL, NULL, NULL, CFStringCreateWithCString(NULL, title.ToCString<char>(), kCFStringEncodingASCII), CFStringCreateWithCString(NULL, message.ToCString<char>(), kCFStringEncodingASCII), b[0], b[1], b[2], &cfRes); switch (cfRes) { case kCFUserNotificationDefaultResponse: delegate->Call(0, buttons.At(0)); break; case kCFUserNotificationAlternateResponse: delegate->Call(1, buttons.At(1)); break; case kCFUserNotificationOtherResponse: delegate->Call(2, buttons.At(2)); break; default: break; } }