#  Created byMartin.cz
#  Copyright (c) Martin Strohalm. All rights reserved.

# import modules
import wx
from ...enums import *


WX_LINE_CAP = {
    LINE_CAP.BUTT: wx.CAP_BUTT,
    LINE_CAP.SQUARE: wx.CAP_PROJECTING,
    LINE_CAP.ROUND: wx.CAP_ROUND}

WX_LINE_JOIN = {
    LINE_JOIN.BEVEL: wx.JOIN_BEVEL,
    LINE_JOIN.MITER: wx.JOIN_MITER,
    LINE_JOIN.ROUND: wx.JOIN_ROUND}

WX_LINE_STYLE = {
    LINE_STYLE.CUSTOM: wx.PENSTYLE_USER_DASH,
    LINE_STYLE.SOLID: wx.PENSTYLE_SOLID,
    LINE_STYLE.DOTTED: DASH_VALUES.DOTTED,
    LINE_STYLE.DASHED: DASH_VALUES.DASHED,
    LINE_STYLE.DASHDOTTED: DASH_VALUES.DASHDOTTED}

WX_FILL_STYLE = {
    FILL_STYLE.TRANS: wx.BRUSHSTYLE_TRANSPARENT,
    FILL_STYLE.SOLID: wx.BRUSHSTYLE_SOLID}

WX_FILL_RULE = {
    FILL_RULE.EVENODD: wx.ODDEVEN_RULE,
    FILL_RULE.WINDING: wx.WINDING_RULE}

WX_FONT_FAMILY = {
    FONT_FAMILY.SERIF: wx.FONTFAMILY_ROMAN,
    FONT_FAMILY.SANS: wx.FONTFAMILY_SWISS,
    FONT_FAMILY.MONO: wx.FONTFAMILY_TELETYPE}

WX_FONT_STYLE = {
    FONT_STYLE.NORMAL: wx.FONTSTYLE_NORMAL,
    FONT_STYLE.ITALIC: wx.FONTSTYLE_ITALIC}

WX_FONT_WEIGHT = {
    FONT_WEIGHT.NORMAL: wx.FONTWEIGHT_NORMAL,
    FONT_WEIGHT.LIGHT: wx.FONTWEIGHT_LIGHT,
    FONT_WEIGHT.BOLD: wx.FONTWEIGHT_BOLD,
    FONT_WEIGHT.BLACK: wx.FONTWEIGHT_BOLD,
    FONT_WEIGHT.HEAVY: wx.FONTWEIGHT_BOLD,
    FONT_WEIGHT.SEMIBOLD: wx.FONTWEIGHT_BOLD,
    FONT_WEIGHT.MEDIUM: wx.FONTWEIGHT_NORMAL,
    FONT_WEIGHT.ULTRALIGHT: wx.FONTWEIGHT_LIGHT,
    FONT_WEIGHT.THIN: wx.FONTWEIGHT_LIGHT}

WX_CURSORS = {
    CURSOR.BLANK: wx.CURSOR_BLANK,
    CURSOR.ARROW: wx.CURSOR_ARROW,
    CURSOR.HAND: wx.CURSOR_HAND,
    CURSOR.SIZEWE: wx.CURSOR_SIZEWE,
    CURSOR.SIZENS: wx.CURSOR_SIZENS}

WX_KEYS = {
    KEY.TAB: wx.WXK_TAB,
    KEY.RETURN: wx.WXK_RETURN,
    KEY.CTRL: wx.WXK_CONTROL,
    KEY.SHIFT: wx.WXK_SHIFT,
    KEY.ALT: wx.WXK_ALT,
    KEY.ESC: wx.WXK_ESCAPE,
    KEY.SPACE: wx.WXK_SPACE,
    KEY.PAGEUP: wx.WXK_PAGEUP,
    KEY.PAGEDOWN: wx.WXK_PAGEDOWN,
    KEY.END: wx.WXK_END,
    KEY.HOME: wx.WXK_HOME,
    KEY.LEFT: wx.WXK_LEFT,
    KEY.UP: wx.WXK_UP,
    KEY.RIGHT: wx.WXK_RIGHT,
    KEY.DOWN: wx.WXK_DOWN,
    KEY.DELETE: wx.WXK_DELETE,
    KEY.F1: wx.WXK_F1,
    KEY.F2: wx.WXK_F2,
    KEY.F3: wx.WXK_F3,
    KEY.F4: wx.WXK_F4,
    KEY.F5: wx.WXK_F5,
    KEY.F6: wx.WXK_F6,
    KEY.F7: wx.WXK_F7,
    KEY.F8: wx.WXK_F8,
    KEY.F9: wx.WXK_F9,
    KEY.F10: wx.WXK_F10,
    KEY.F11: wx.WXK_F11,
    KEY.F12: wx.WXK_F12}

WX_RASTER_TYPES = {
    '.bmp': wx.BITMAP_TYPE_BMP,
    '.jpg': wx.BITMAP_TYPE_JPEG,
    '.jpeg': wx.BITMAP_TYPE_JPEG,
    '.png': wx.BITMAP_TYPE_PNG,
    '.pcx': wx.BITMAP_TYPE_PCX,
    '.pnm': wx.BITMAP_TYPE_PNM,
    '.tif': wx.BITMAP_TYPE_TIFF,
    '.tiff': wx.BITMAP_TYPE_TIFF,
    '.xpm': wx.BITMAP_TYPE_XPM,
    '.ico': wx.BITMAP_TYPE_ICO,
    '.cur': wx.BITMAP_TYPE_CUR}
