Exemplo n.º 1
0
bool DataTransfer::hasDropZoneType(const String& keyword) {
  if (keyword.startsWith("file:"))
    return hasFileOfType(keyword.substring(5));

  if (keyword.startsWith("string:"))
    return hasStringOfType(keyword.substring(7));

  return false;
}
Exemplo n.º 2
0
bool Clipboard::hasDropZoneType(const String& keyword)
{
    if (keyword.length() < 3 || keyword[1] != ':')
        return false;
        
    switch (keyword[0]) {
    case 'f':
        return hasFileOfType(keyword.substring(2));
    case 's':
        return hasStringOfType(keyword.substring(2));
    default:
        return false;
    }
}