styleColors.js

basePathForIcons = 'dFrame/Styles/colors/'

basePathForCommonIcons = 'dFrame/images/common/'

DFrameAPI.preLoadImagesForButtonImage('CloseDFrame', basePathForCommonIcons,'close-off-02.gif', 'close-on-02.gif', 'close-off-02.gif', 'close-on-02.gif')

DFrameAPI.preLoadImagesForButtonImage('arrows', basePathForCommonIcons,'menuArrow-Close.gif', '', 'menuArrow-Open.gif', '')

col1 = '#313031'

col2 = '#639a9c'

col3 = '#ffcf63'

col4 = '#9c9a31'

//===============================================================================

// buttonStyle |

//===============================================================================

var buttonStyle = new ButtonStyle ()

buttonStyle.setBordersWidth (1)

buttonStyle.setBordersColor('black')

buttonStyle.setActivateOn ('UP')

buttonStyle.setTextNormal ('#000000')

buttonStyle.setBgNormal (col2)

buttonStyle.setBordersNormal (true)

buttonStyle.copyStyle('Normal', 'Roll')

buttonStyle.setTextRoll('yellow')

buttonStyle.setBgRoll('gray')

buttonStyle.copyStyle('Roll', 'Down')

buttonStyle.copyStyle('Roll', 'Selected')

buttonStyle.copyStyle('Roll', 'RollSelected')

//===============================================================================

// menuStyle |

//===============================================================================

var menuStyle = new MenuStyle ()

menuStyle.setBordersWidth([1, 1])

menuStyle.setBordersColor('black')

menuStyle.setItemsSpacing (0)

menuStyle.setBackgroundColor(col2)

menuStyle.setArrowImage('arrows')

//-----------------------------------------------------------------------

// default Button Style |

//-----------------------------------------------------------------------

var x = new ButtonStyle(buttonStyle)

menuStyle.setDefaultButtonStyle(x)

//-----------------------------------------------------------------------

// itemsStyle |

//-----------------------------------------------------------------------

var x = new ButtonStyle(buttonStyle)

x.setAutoWidth('MENU')

x.setWidth([150,100])

x.setAutoHeight('IMAGE')

x.setBordersWidth (1)

x.setBordersColor('black')

x.setActivateOn ('Down');

x.setLabelHAlign('LEFT')

x.setLabelLeftMargin([45, 22])

x.setLabelVAlign('CENTER')

x.setBgNormal (col3)

x.setImageNormal([basePathForIcons+'big-Off.gif', basePathForIcons+'small-Off-01.gif'])

//x.setImageNormal(basePathForIcons+'big-Off.gif')

x.copyStyle('Normal', 'Roll')

x.setImageRoll([basePathForIcons+'big-On.gif',basePathForIcons+'small-On-01.gif'])

//x.setImageRoll(basePathForIcons+'big-On.gif')

x.copyStyle('Roll', 'Down')

x.copyStyle('Roll', 'Selected')

x.copyStyle('Roll', 'RollSelected')

menuStyle.setItemsStyle(x)

//===============================================================================

// barStyle |

//===============================================================================

var barStyle = new BarStyle ()

barStyle.setPos ('TOP')

barStyle.setWidth(190)

barStyle.setBackgroundColor(col2)

barStyle.setWidth(0)

barStyle.setHeight(30)

barStyle.setBordersWidth(1)

barStyle.setBordersColor(col3)

barStyle.setItemsHSpacing(10)

//-----------------------------------------------------------------------

// default Button and /Menu Styles |

//-----------------------------------------------------------------------

barStyle.setDefaultButtonStyle(buttonStyle)

barStyle.setDefaultMenuStyle(menuStyle)

//===============================================================================

// dFrameStyle |

//===============================================================================

var dFrameStyle = new DFrameStyle ()

dFrameStyle.setPos ([0,0,100,100])

dFrameStyle.setBackgroundColor (col4)

dFrameStyle.setContentBgColor (col3)

dFrameStyle.setBordersWidth(1)

dFrameStyle.setBordersColor (col1)

dFrameStyle.setMBordersWidth(10)

dFrameStyle.setIBordersWidth(2)

dFrameStyle.setIBordersColor (col2)

dFrameStyle.setIBordersType('')

dFrameStyle.setTitleBar(true)

dFrameStyle.setScrollType ('scroll')

//-----------------------------------------------------------------------

// default Bar Style |

//-----------------------------------------------------------------------

dFrameStyle.setDefaultBarStyle(barStyle)

//-----------------------------------------------------------------------

// defaul tTask Bar Style |

//-----------------------------------------------------------------------

var x = new ButtonStyle(buttonStyle)

x.setBordersWidth(0)

x.setAutoWidth('IMAGE')

x.setImageNormal(basePathForIcons+'taskBar-Selected.jpg')

x.copyStyle('Normal', 'Roll')

x.copyStyle('Normal', 'Down')

x.copyStyle('Normal', 'Selected')

x.setImageSelected(basePathForIcons+'taskBar-Normal.jpg')

x.copyStyle('Normal', 'RollSelected')

var y = new BarStyle(barStyle)

y.setDefaultButtonStyle(x)

y.setPos ('TOP')

y.setHeight(30)

y.setItemsHSpacing(1)

y.setItemsVAlign('BOTTOM')

dFrameStyle.setDefaultTaskBarStyle(y)

//-----------------------------------------------------------------------

// default Context Menu Style !

//-----------------------------------------------------------------------

var x = new MenuStyle(menuStyle)

x.setIsTree(true)

menuStyle.setBordersWidth([1, 1])

dFrameStyle.setDefaultContextMenuStyle(x)

//===============================================================================

// defaultTitleBarStyle |

//===============================================================================

var x = new BarStyle(barStyle)

x.setBackgroundColor('#737110')

x.setBordersWidth(0)

x.setBordersHMargin(5)

x.setBordersVMargin(0)

x.setHeight(25)

x.setAutoHeight('')

x.setButtonImage('CloseDFrame', 'thisDFrame.closeFrame()')

var y = x.getDefaultButtonStyle()

y.setHeight(0)

y.setBordersWidth(0)

y.setLabelTopMargin(1)

y.setLabelBottomMargin(1)

y.setBgNormal(null)

y.setTextNormal('white')

y.setBosNormal(true)

dFrameStyle.setDefaultTitleBarStyle(x)