lemna 0.4.0

A Reactive UI framework for Rust
// Open Iconic
// https://useiconic.com/open

// The MIT License (MIT)
//
//     Copyright (c) 2014 Waybury
//
//     Permission is hereby granted, free of charge, to any person obtaining a copy
//     of this software and associated documentation files (the "Software"), to deal
//     in the Software without restriction, including without limitation the rights
//     to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//     copies of the Software, and to permit persons to whom the Software is
//     furnished to do so, subject to the following conditions:
//
//     The above copyright notice and this permission notice shall be included in
//     all copies or substantial portions of the Software.
//
//     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//     THE SOFTWARE.

pub const ICONS: &[u8] = include_bytes!("../assets/open-iconic.ttf");

#[derive(Debug, Clone, Copy)]
pub enum Icon {
    AccountLogin = 0xe000,
    AccountLogout = 0xe001,
    ActionRedo = 0xe002,
    ActionUndo = 0xe003,
    AlignCenter = 0xe004,
    AlignLeft = 0xe005,
    AlignRight = 0xe006,
    Aperture = 0xe007,
    ArrowBottom = 0xe008,
    ArrowCircleBottom = 0xe009,
    ArrowCircleLeft = 0xe00a,
    ArrowCircleRight = 0xe00b,
    ArrowCircleTop = 0xe00c,
    ArrowLeft = 0xe00d,
    ArrowRight = 0xe00e,
    ArrowThickBottom = 0xe00f,
    ArrowThickLeft = 0xe010,
    ArrowThickRight = 0xe011,
    ArrowThickTop = 0xe012,
    ArrowTop = 0xe013,
    AudioSpectrum = 0xe014,
    Audio = 0xe015,
    Badge = 0xe016,
    Ban = 0xe017,
    BarChart = 0xe018,
    Basket = 0xe019,
    BatteryEmpty = 0xe01a,
    BatteryFull = 0xe01b,
    Beaker = 0xe01c,
    Bell = 0xe01d,
    Bluetooth = 0xe01e,
    Bold = 0xe01f,
    Bolt = 0xe020,
    Book = 0xe021,
    Bookmark = 0xe022,
    Box = 0xe023,
    Briefcase = 0xe024,
    BritishPound = 0xe025,
    Browser = 0xe026,
    Brush = 0xe027,
    Bug = 0xe028,
    Bullhorn = 0xe029,
    Calculator = 0xe02a,
    Calendar = 0xe02b,
    CameraSlr = 0xe02c,
    CaretBottom = 0xe02d,
    CaretLeft = 0xe02e,
    CaretRight = 0xe02f,
    CaretTop = 0xe030,
    Cart = 0xe031,
    Chat = 0xe032,
    Check = 0xe033,
    ChevronBottom = 0xe034,
    ChevronLeft = 0xe035,
    ChevronRight = 0xe036,
    ChevronTop = 0xe037,
    CircleCheck = 0xe038,
    CircleX = 0xe039,
    Clipboard = 0xe03a,
    Clock = 0xe03b,
    CloudDownload = 0xe03c,
    CloudUpload = 0xe03d,
    Cloud = 0xe03e,
    Cloudy = 0xe03f,
    Code = 0xe040,
    Cog = 0xe041,
    CollapseDown = 0xe042,
    CollapseLeft = 0xe043,
    CollapseRight = 0xe044,
    CollapseUp = 0xe045,
    Command = 0xe046,
    CommentSquare = 0xe047,
    Compass = 0xe048,
    Contrast = 0xe049,
    Copywriting = 0xe04a,
    CreditCard = 0xe04b,
    Crop = 0xe04c,
    Dashboard = 0xe04d,
    DataTransferDownload = 0xe04e,
    DataTransferUpload = 0xe04f,
    Delete = 0xe050,
    Dial = 0xe051,
    Document = 0xe052,
    Dollar = 0xe053,
    DoubleQuoteSansLeft = 0xe054,
    DoubleQuoteSansRight = 0xe055,
    DoubleQuoteSerifLeft = 0xe056,
    DoubleQuoteSerifRight = 0xe057,
    Droplet = 0xe058,
    Eject = 0xe059,
    Elevator = 0xe05a,
    Ellipses = 0xe05b,
    EnvelopeClosed = 0xe05c,
    EnvelopeOpen = 0xe05d,
    Euro = 0xe05e,
    Excerpt = 0xe05f,
    ExpandDown = 0xe060,
    ExpandLeft = 0xe061,
    ExpandRight = 0xe062,
    ExpandUp = 0xe063,
    ExternalLink = 0xe064,
    Eye = 0xe065,
    Eyedropper = 0xe066,
    File = 0xe067,
    Fire = 0xe068,
    Flag = 0xe069,
    Flash = 0xe06a,
    Folder = 0xe06b,
    Fork = 0xe06c,
    FullscreenEnter = 0xe06d,
    FullscreenExit = 0xe06e,
    Globe = 0xe06f,
    Graph = 0xe070,
    GridFourUp = 0xe071,
    GridThreeUp = 0xe072,
    GridTwoUp = 0xe073,
    HardDrive = 0xe074,
    Header = 0xe075,
    Headphones = 0xe076,
    Heart = 0xe077,
    Home = 0xe078,
    Image = 0xe079,
    Inbox = 0xe07a,
    Infinity = 0xe07b,
    Info = 0xe07c,
    Italic = 0xe07d,
    JustifyCenter = 0xe07e,
    JustifyLeft = 0xe07f,
    JustifyRight = 0xe080,
    Key = 0xe081,
    Laptop = 0xe082,
    Layers = 0xe083,
    Lightbulb = 0xe084,
    LinkBroken = 0xe085,
    LinkIntact = 0xe086,
    ListRich = 0xe087,
    List = 0xe088,
    Location = 0xe089,
    LockLocked = 0xe08a,
    LockUnlocked = 0xe08b,
    LoopCircular = 0xe08c,
    LoopSquare = 0xe08d,
    Loop = 0xe08e,
    MagnifyingGlass = 0xe08f,
    MapMarker = 0xe090,
    Map = 0xe091,
    MediaPause = 0xe092,
    MediaPlay = 0xe093,
    MediaRecord = 0xe094,
    MediaSkipBackward = 0xe095,
    MediaSkipForward = 0xe096,
    MediaStepBackward = 0xe097,
    MediaStepForward = 0xe098,
    MediaStop = 0xe099,
    MedicalCross = 0xe09a,
    Menu = 0xe09b,
    Microphone = 0xe09c,
    Minus = 0xe09d,
    Monitor = 0xe09e,
    Moon = 0xe09f,
    Move = 0xe0a0,
    MusicalNote = 0xe0a1,
    Paperclip = 0xe0a2,
    Pencil = 0xe0a3,
    People = 0xe0a4,
    Person = 0xe0a5,
    Phone = 0xe0a6,
    PieChart = 0xe0a7,
    Pin = 0xe0a8,
    PlayCircle = 0xe0a9,
    Plus = 0xe0aa,
    PowerStandby = 0xe0ab,
    Print = 0xe0ac,
    Project = 0xe0ad,
    Pulse = 0xe0ae,
    PuzzlePiece = 0xe0af,
    QuestionMark = 0xe0b0,
    Rain = 0xe0b1,
    Random = 0xe0b2,
    Reload = 0xe0b3,
    ResizeBoth = 0xe0b4,
    ResizeHeight = 0xe0b5,
    ResizeWidth = 0xe0b6,
    RssAlt = 0xe0b7,
    Rss = 0xe0b8,
    Script = 0xe0b9,
    ShareBoxed = 0xe0ba,
    Share = 0xe0bb,
    Shield = 0xe0bc,
    Signal = 0xe0bd,
    Signpost = 0xe0be,
    SortAscending = 0xe0bf,
    SortDescending = 0xe0c0,
    Spreadsheet = 0xe0c1,
    Star = 0xe0c2,
    Sun = 0xe0c3,
    Tablet = 0xe0c4,
    Tag = 0xe0c5,
    Tags = 0xe0c6,
    Target = 0xe0c7,
    Task = 0xe0c8,
    Terminal = 0xe0c9,
    Text = 0xe0ca,
    ThumbDown = 0xe0cb,
    ThumbUp = 0xe0cc,
    Timer = 0xe0cd,
    Transfer = 0xe0ce,
    Trash = 0xe0cf,
    Underline = 0xe0d0,
    VerticalAlignBottom = 0xe0d1,
    VerticalAlignCenter = 0xe0d2,
    VerticalAlignTop = 0xe0d3,
    Video = 0xe0d4,
    VolumeHigh = 0xe0d5,
    VolumeLow = 0xe0d6,
    VolumeOff = 0xe0d7,
    Warning = 0xe0d8,
    Wifi = 0xe0d9,
    Wrench = 0xe0da,
    X = 0xe0db,
    Yen = 0xe0dc,
    ZoomIn = 0xe0dd,
    ZoomOut = 0xe0de,
}

impl From<Icon> for char {
    fn from(i: Icon) -> char {
        unsafe { char::from_u32_unchecked(i as u32) }
    }
}

impl From<Icon> for String {
    fn from(i: Icon) -> String {
        String::from_utf16(&[i as u16]).unwrap()
    }
}