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-02-14 16:43:20 +00:00
|
|
|
for (themeIdx, theme) in enumerate(ACEThemeNames.themeNames() as! [String]) {
|
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-02-14 16:43:20 +00:00
|
|
|
for (handlerIdx, handler) in enumerate(ACEKeyboardHandlerNames.humanKeyboardHandlerNames() as! [String]) {
|
2014-12-31 03:16:43 +00:00
|
|
|
if handlerName == handler {
|
|
|
|
return ACEKeyboardHandler(rawValue: UInt(handlerIdx))!
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|