2014-12-31 03:16:43 +00:00
|
|
|
//
|
|
|
|
// ACEViewExt.swift
|
|
|
|
// AVRsack
|
|
|
|
//
|
|
|
|
// Created by Matthias Neeracher on 29/12/14.
|
|
|
|
// Copyright (c) 2014 Aere Perennius. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
|
|
|
extension ACEView {
|
2015-03-14 20:15:27 +00:00
|
|
|
class func themeIdByName(themeName: String) -> ACETheme? {
|
2015-11-16 01:56:33 +00:00
|
|
|
for (themeIdx, theme) in (ACEThemeNames.themeNames() as! [String]).enumerate() {
|
2014-12-31 03:16:43 +00:00
|
|
|
if themeName == theme {
|
2015-03-14 20:15:27 +00:00
|
|
|
return ACETheme(rawValue: UInt(themeIdx))
|
2014-12-31 03:16:43 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
class func handlerIdByName(handlerName: String) -> ACEKeyboardHandler? {
|
2015-11-16 01:56:33 +00:00
|
|
|
for (handlerIdx, handler) in (ACEKeyboardHandlerNames.humanKeyboardHandlerNames() as! [String]).enumerate() {
|
2014-12-31 03:16:43 +00:00
|
|
|
if handlerName == handler {
|
|
|
|
return ACEKeyboardHandler(rawValue: UInt(handlerIdx))!
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|