3639{
3641 DWORD retLength = 0;
3642
3643 if (styleItem ==
Toolbar) strcpy(styleElement,
"toolbar");
3644 else if (styleItem ==
ToolbarBorder) strcpy(styleElement,
"toolbar.border");
3645 else if (styleItem ==
ToolbarLabel) strcpy(styleElement,
"toolbar.label");
3646 else if (styleItem ==
ToolbarWindowLabel) strcpy(styleElement,
"toolbar.windowLabel");
3647 else if (styleItem ==
ToolbarClock) strcpy(styleElement,
"toolbar.clock");
3648 else if (styleItem ==
ToolbarButton) strcpy(styleElement,
"toolbar.button");
3650 else if (styleItem ==
MenuTitle) strcpy(styleElement,
"menu.title");
3651 else if (styleItem ==
MenuFrame) strcpy(styleElement,
"menu.frame");
3652 else if (styleItem ==
MenuFrameBorder) strcpy(styleElement,
"menu.frame.border");
3653 else if (styleItem ==
MenuActive) strcpy(styleElement,
"menu.active");
3654 else if (styleItem ==
MenuGrip) strcpy(styleElement,
"menu.grip");
3655 else if (styleItem ==
MenuIndicator) strcpy(styleElement,
"menu.indicator");
3656 else if (styleItem ==
MenuSeparator) strcpy(styleElement,
"menu.separator");
3657
3658 else if (styleItem ==
Dock) strcpy(styleElement,
"dock");
3659 else if (styleItem ==
DockBorder) strcpy(styleElement,
"dock.border");
3660 else if (styleItem ==
WindowTitleFocus) strcpy(styleElement,
"window.title.focus");
3661 else if (styleItem ==
WindowTitleUnfocus) strcpy(styleElement,
"window.title.unfocus");
3662 else if (styleItem ==
WindowLabelFocus) strcpy(styleElement,
"window.label.focus");
3663 else if (styleItem ==
WindowLabelUnfocus) strcpy(styleElement,
"window.label.unfocus");
3664 else if (styleItem ==
WindowButtonFocus) strcpy(styleElement,
"window.button.focus");
3667 else if (styleItem ==
WindowGripFocus) strcpy(styleElement,
"window.grip.focus");
3668 else if (styleItem ==
WindowGripUnfocus) strcpy(styleElement,
"window.grip.unfocus");
3669 else if (styleItem ==
WindowHandleFocus) strcpy(styleElement,
"window.handle.focus");
3672 else return;
3673
3674
3675
3676 strcpy(writeBuffer, styleElement);
3677 strcat(writeBuffer, ".appearance:");
3679 else
3680 {
3682 {
3685 else strcat(writeBuffer, " Flat");
3686 }
3687
3688 if (styleItem->
type ==
B_SOLID) strcat(writeBuffer,
" Solid");
3689 else
3690 {
3692 {
3693 strcat(writeBuffer, " Gradient");
3694 }
3695
3696 switch (styleItem->
type)
3697 {
3698 case B_HORIZONTAL: { strcat(writeBuffer,
" Horizontal");
break; }
3699 case B_VERTICAL: { strcat(writeBuffer,
" Vertical");
break; }
3700 case B_DIAGONAL: { strcat(writeBuffer,
" Diagonal");
break; }
3701 case B_CROSSDIAGONAL: { strcat(writeBuffer,
" CrossDiagonal");
break; }
3702 case B_PIPECROSS: { strcat(writeBuffer,
" Pipecross");
break; }
3703 case B_ELLIPTIC: { strcat(writeBuffer,
" Elliptic");
break; }
3704 case B_RECTANGLE: { strcat(writeBuffer,
" Rectangle");
break; }
3705 case B_PYRAMID: { strcat(writeBuffer,
" Pyramid");
break; }
3708 case B_SPLITSOLID: { strcat(writeBuffer,
" SplitSolid");
break; }
3710 case B_SPLITVERTICAL: { strcat(writeBuffer,
" SplitVertical");
break; }
3712 case B_SUPERVERTICAL: { strcat(writeBuffer,
" SuperVertical");
break; }
3713 default: break;
3714 }
3715 }
3716
3718 {
3720 {
3722 else strcat(writeBuffer, " Bevel1");
3723 }
3724
3725 if (styleItem->
interlaced) strcat(writeBuffer,
" Interlaced");
3726 }
3727 }
3728 strcat(writeBuffer, "\r\n");
3729 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3730
3731
3732
3733 char colorString[10];
3734
3736 {
3737 strcpy(writeBuffer, styleElement);
3738 if (styleItem->
type ==
B_SOLID) strcat(writeBuffer,
".color:");
3739 else strcat(writeBuffer, ".color1:");
3740 sprintf(colorString, " #%02x%02x%02x\r\n", GetRValue(styleItem->Color1), GetGValue(styleItem->Color1), GetBValue(styleItem->Color1));
3741 strcat(writeBuffer, colorString);
3742 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3743
3745 {
3746 strcpy(writeBuffer, styleElement);
3747 strcat(writeBuffer, ".color2:");
3748 sprintf(colorString, " #%02x%02x%02x\r\n", GetRValue(styleItem->Color2), GetGValue(styleItem->Color2), GetBValue(styleItem->Color2));
3749 strcat(writeBuffer, colorString);
3750 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3751
3753 {
3754 strcpy(writeBuffer, styleElement);
3755 strcat(writeBuffer, ".color3:");
3756 sprintf(colorString,
" #%02x%02x%02x\r\n", GetRValue(styleItem->
Color3), GetGValue(styleItem->
Color3), GetBValue(styleItem->
Color3));
3757 strcat(writeBuffer, colorString);
3758 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3759
3760 strcpy(writeBuffer, styleElement);
3761 strcat(writeBuffer, ".color4:");
3762 sprintf(colorString,
" #%02x%02x%02x\r\n", GetRValue(styleItem->
Color4), GetGValue(styleItem->
Color4), GetBValue(styleItem->
Color4));
3763 strcat(writeBuffer, colorString);
3764 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3765
3767 {
3768 strcpy(writeBuffer, styleElement);
3769 strcat(writeBuffer, ".color5:");
3770 sprintf(colorString,
" #%02x%02x%02x\r\n", GetRValue(styleItem->
Color5), GetGValue(styleItem->
Color5), GetBValue(styleItem->
Color5));
3771 strcat(writeBuffer, colorString);
3772 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3773
3774 strcpy(writeBuffer, styleElement);
3775 strcat(writeBuffer, ".color6:");
3776 sprintf(colorString,
" #%02x%02x%02x\r\n", GetRValue(styleItem->
Color6), GetGValue(styleItem->
Color6), GetBValue(styleItem->
Color6));
3777 strcat(writeBuffer, colorString);
3778 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3779
3780 strcpy(writeBuffer, styleElement);
3781 strcat(writeBuffer, ".color7:");
3782 sprintf(colorString,
" #%02x%02x%02x\r\n", GetRValue(styleItem->
Color7), GetGValue(styleItem->
Color7), GetBValue(styleItem->
Color7));
3783 strcat(writeBuffer, colorString);
3784 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3785
3786 strcpy(writeBuffer, styleElement);
3787 strcat(writeBuffer, ".color8:");
3788 sprintf(colorString,
" #%02x%02x%02x\r\n", GetRValue(styleItem->
Color8), GetGValue(styleItem->
Color8), GetBValue(styleItem->
Color8));
3789 strcat(writeBuffer, colorString);
3790 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3791 }
3792 }
3793 }
3794 }
3795
3796
3797
3803 {
3805 else sprintf(writeBuffer,
"%s.font: %s/%d/", styleElement, styleItem->
Font, styleItem->
FontHeight);
3806 if (styleItem->
FontWeight == FW_BOLD) strcat(writeBuffer,
"Bold\r\n");
3807 else strcat(writeBuffer, "Normal\r\n");
3808 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3809
3810 strcpy(writeBuffer, styleElement);
3811 strcat(writeBuffer, ".alignment: ");
3812 if (styleItem->
Justify == DT_LEFT) strcat(writeBuffer,
"Left\r\n");
3813 else if (styleItem->
Justify == DT_RIGHT) strcat(writeBuffer,
"Right\r\n");
3814 else strcat(writeBuffer, "Center\r\n");
3815 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3816 }
3817
3823 {
3824 strcpy(writeBuffer, styleElement);
3825 strcat(writeBuffer, ".textColor:");
3826 sprintf(colorString,
" #%02x%02x%02x\r\n", GetRValue(styleItem->
TextColor), GetGValue(styleItem->
TextColor), GetBValue(styleItem->
TextColor));
3827 strcat(writeBuffer, colorString);
3828 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3829
3831 {
3832 strcpy(writeBuffer, styleElement);
3833 strcat(writeBuffer, ".outlineColor:");
3835 strcat(writeBuffer, colorString);
3836 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3837 }
3838
3840 {
3841 strcpy(writeBuffer, styleElement);
3842 strcat(writeBuffer, ".shadowColor:");
3844 strcat(writeBuffer, colorString);
3845 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3846 }
3847 }
3848
3849
3851 {
3852 strcpy(writeBuffer, styleElement);
3853 strcat(writeBuffer, ".disabledColor:");
3855 strcat(writeBuffer, colorString);
3856 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3857 }
3858
3859
3860
3862 {
3863 strcpy(writeBuffer, styleElement);
3864 strcat(writeBuffer, ".picColor:");
3865 sprintf(colorString, " #%02x%02x%02x\r\n", GetRValue(styleItem->PicColor), GetGValue(styleItem->PicColor), GetBValue(styleItem->PicColor));
3866 strcat(writeBuffer, colorString);
3867 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3868 }
3869
3871 {
3872 strcpy(writeBuffer, styleElement);
3873 strcat(writeBuffer, ".bulletColor:");
3874 sprintf(colorString, " #%02x%02x%02x\r\n", GetRValue(styleItem->BulletColor), GetGValue(styleItem->BulletColor), GetBValue(styleItem->BulletColor));
3875 strcat(writeBuffer, colorString);
3876 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3877 }
3878
3879
3880
3882 {
3884 else sprintf(writeBuffer,
"%s.marginWidth: %d\r\n", styleElement, styleItem->
marginWidth);
3885 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3886
3888 {
3890 else sprintf(writeBuffer,
"%s.borderWidth: %d\r\n", styleElement, styleItem->
borderWidth);
3891 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3892
3894 {
3895 strcpy(writeBuffer, styleElement);
3896 strcat(writeBuffer, ".borderColor:");
3898 strcat(writeBuffer, colorString);
3899 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3900 }
3901 }
3902 }
3903
3904
3905
3906 strcpy(writeBuffer, "\r\n");
3907 WriteFile(file, writeBuffer, strlen(writeBuffer), &retLength, NULL);
3908}