Lines Matching refs:pasteboard
27 #import "Pasteboard.h"
66 NSString *WebArchivePboardType = @"Apple Web Archive pasteboard type";
67 NSString *WebSmartPastePboardType = @"NeXT smart paste pasteboard type";
80 } else { // Don't write RTFD to the pasteboard when the copied attributed string has no attachments.
115 Pasteboard* Pasteboard::generalPasteboard()
117 static Pasteboard* pasteboard = new Pasteboard([NSPasteboard generalPasteboard]);
118 return pasteboard;
121 Pasteboard::Pasteboard(NSPasteboard* pboard)
126 void Pasteboard::clear()
131 void Pasteboard::writeSelection(NSPasteboard* pasteboard, NSArray* pasteboardTypes, Range* selectedRange, bool canSmartCopyOrDelete, Frame* frame)
134 Pasteboard::generalPasteboard(); // Initializes pasteboard types.
162 // 4930197: Mail overrides [WebHTMLView pasteboardTypesForSelection] in order to add another type to the pasteboard
164 // we can't call WebCore::Pasteboard's method for setting types.
168 // Don't write RTFD to the pasteboard when the copied attributed string has no attachments.
175 [pasteboard declareTypes:types owner:nil];
178 [pasteboard declareTypes:types owner:nil];
182 // Put HTML on the pasteboard.
186 [pasteboard setData:(NSData *)data.get() forType:WebArchivePboardType];
189 // Put the attributed string on the pasteboard (RTF/RTFD format).
192 [pasteboard setData:RTFDData forType:NSRTFDPboardType];
198 [pasteboard setData:RTFData forType:NSRTFPboardType];
201 // Put plain string on the pasteboard.
210 [pasteboard setString:s forType:NSStringPboardType];
215 [pasteboard setData:nil forType:WebSmartPastePboardType];
219 void Pasteboard::writePlainText(NSPasteboard* pasteboard, const String& text)
222 [pasteboard declareTypes:types owner:nil];
224 [pasteboard setString:text forType:NSStringPboardType];
227 void Pasteboard::writeSelection(Range* selectedRange, bool canSmartCopyOrDelete, Frame* frame)
229 Pasteboard::writeSelection(m_pasteboard.get(), 0, selectedRange, canSmartCopyOrDelete, frame);
232 void Pasteboard::writePlainText(const String& text)
235 Pasteboard::generalPasteboard(); // Initializes pasteboard types.
238 NSPasteboard *pasteboard = m_pasteboard.get();
239 [pasteboard declareTypes:types owner:nil];
241 [pasteboard setString:text forType:NSStringPboardType];
244 void Pasteboard::writeURL(NSPasteboard* pasteboard, NSArray* types, const KURL& url, const String& titleStr, Frame* frame)
247 Pasteboard::generalPasteboard(); // Initializes pasteboard types.
251 [pasteboard declareTypes:types owner:nil];
267 [pasteboard setPropertyList:[NSArray arrayWithObjects:[NSArray arrayWithObject:userVisibleString],
272 [cocoaURL writeToPasteboard:pasteboard];
274 [pasteboard setString:userVisibleString forType:WebURLPboardType];
276 [pasteboard setString:title forType:WebURLNamePboardType];
278 [pasteboard setString:userVisibleString forType:NSStringPboardType];
281 void Pasteboard::writeURL(const KURL& url, const String& titleStr, Frame* frame)
283 Pasteboard::writeURL(m_pasteboard.get(), nil, url, titleStr, frame);
299 void Pasteboard::writeFileWrapperAsRTFDAttachment(NSFileWrapper* wrapper)
310 void Pasteboard::writeImage(Node* node, const KURL& url, const String& title)
339 bool Pasteboard::canSmartReplace()
344 String Pasteboard::plainText(Frame* frame)
384 PassRefPtr<DocumentFragment> Pasteboard::documentFragmentWithImageResource(Frame* frame, PassRefPtr<ArchiveResource> resource)
404 PassRefPtr<DocumentFragment> Pasteboard::documentFragmentWithRtf(Frame* frame, NSString* pboardType)
451 NSURL *Pasteboard::getBestURL(Frame* frame)
489 String Pasteboard::asURL(Frame* frame)
494 PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame* frame, PassRefPtr<Range> context, bool allowPlainText, bool& chosePlainText)
546 // This is a hack to make Microsoft's HTML pasteboard data work. See 3778785.
580 // Only 10.5 and higher support setting and retrieving pasteboard types with UTIs, but we don't believe
581 // that any applications on Tiger put types for which we only have a UTI, like PNG, on the pasteboard.