### Copyright (C) 1995, 1996, 1997 Jeppe Buk (buk@imada.ou.dk) ### This program is free software; you can redistribute it and/or modify ### it under the terms of the GNU General Public License as published by ### the Free Software Foundation; either version 2 of the License, or ### (at your option) any later version. ### ### This program is distributed in the hope that it will be useful, ### but WITHOUT ANY WARRANTY; without even the implied warranty of ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ### GNU General Public License for more details. ### ### You should have received a copy of the GNU General Public License ### along with this program; if not, write to the Free Software ### Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ### ### Sun Feb 22 1998, Japanized by Mashio Motoyama ### proc colorsfonts {} { # 概観と操作性 / 色とフォント Desc "メニューとウインドウの色とフォントの設定" ShortDesc "色とフォント" Header colfontH -text "色とフォント" -frame:relief flat Help colfontH \ "このページではメニューやタイトルバーのカラーリングとフォントの設定を行います。" #################################################################### # Menus # Line menusL Header menusH -text "メニューの概観" -frame:relief flat CheckBox menuB -text "メニューの概観を設定します。" Command foreColor \ -text " テキストの色" \ -default [list "#000000" 0] \ -setvalue { $widget configure -bg [lindex $foreColor 0] -text " "} \ -invoke {ColorWidget $colorList [lindex $foreColor 0] [lindex $foreColor 1]} \ -disable {$widget configure -relief flat } \ -enable {$widget configure -relief raised } \ -packFrame:expand no Command backColor \ -text "背景の色" \ -default [list "#AAAAAA" 0] \ -setvalue { $widget configure -bg [lindex $backColor 0] -text " "} \ -invoke {ColorWidget $colorList [lindex $backColor 0] [lindex $backColor 1]} \ -disable {$widget configure -relief flat } \ -enable {$widget configure -relief raised } \ -packFrame:expand no Command shadeColor \ -text "シェイド(影)" \ -default [list "#CCCCCC" 0] \ -setvalue { $widget configure -bg [lindex $shadeColor 0] -text " "} \ -invoke {ColorWidget $colorList [lindex $shadeColor 0] [lindex $shadeColor 1]} \ -disable {$widget configure -relief flat } \ -enable {$widget configure -relief raised } \ -packFrame:expand no Frame colF -entries { foreColor backColor shadeColor } Label menuFontLabel\ -text " フォント" Command menuFontAscii\ -default "a14" \ -setvalue {buttonSetText $widget Ascii $menuFontAscii ascii} \ -invoke {FontWidget $menuFontAscii 0 ascii} \ -disable {$widget configure -text "Not set"} \ -enable {buttonSetText $widget Ascii $menuFontAscii ascii} Command menuFontKanji\ -default "k14" \ -setvalue {buttonSetText $widget 漢字 $menuFontKanji kanji} \ -invoke {FontWidget $menuFontKanji 0 kanji} \ -disable {$widget configure -text "未設定"}\ -enable {buttonSetText $widget 漢字 $menuFontKanji kanji} Command menuFontKana\ -default "r14"\ -setvalue {buttonSetText $widget "1Byte Kana" $menuFontKana kana}\ -invoke {FontWidget $menuFontKana 0 kana} \ -disable {$widget configure -text "Not set"}\ -enable {buttonSetText $widget "1Byte Kana" $menuFontKana kana} Frame menuFont\ -entries {menuFontLabel menuFontAscii menuFontKanji menuFontKana}\ -orient left Label menuStyleL -text " メニュースタイル" -packFrame:expand no Radio menuStyle -entries { FVWM MWM } Frame menuStyleF -entries { menuStyleL menuStyle } Help menusH \ "メニューの見た目を設定します。色とフォント、そして Motif"\ "Window Manager のエミュレートを設定可能です。" Help menuB \ "メニューの概観を設定するならば、このチェックボックスを選択します。" Help foreColor \ "メニューに表示されるテキストの色を設定します。" Help backColor \ "メニューの背景色を設定します。" Help shadeColor \ "選択されていないメニューの色を設定します。" Help menuFont \ "このメニューで使用されるフォントを選択します。" set styleHelp [concat \ "メニューのスタイルを選択します。FVWM はデフォルトのメニューで、MWM"\ "は Motif 似のメニューになります。この選択はタイトルとドロップダウンメニューに影響を与えます。"] Help menuStyleL $styleHelp Help menuStyle $styleHelp Change { if {$changeElm == "menuB"} { if {$menuB == 1} { Enable foreColor backColor shadeColor menuFontAscii menuFontKanji menuFontKana menuStyle } else { Disable foreColor backColor shadeColor menuFontAscii menuFontKanji menuFontKana menuStyle } } } Save { if {$menuB == 1} { set result "MenuStyle\t" append result "[hash2rgb [lindex $foreColor 0]] " append result "[hash2rgb [lindex $backColor 0]] " append result "[hash2rgb [lindex $shadeColor 0]] $menuFontAscii,$menuFontKanji,$menuFontKana " if {$menuStyle(name) == "FVWM"} { append result fvwm } else { append result mwm } print $result } } # #################################################################### #################################################################### # Windows # Line windowsL Header windowsH -text "ウインドウの概観" -frame:relief flat CheckBox wColB -text "強調色" -packFrame:expand no Command wForeColor \ -text "テキスト" \ -default [list "#FFFFFF" 0] \ -setvalue { $widget configure -bg [lindex $wForeColor 0] -text " "} \ -invoke {ColorWidget $colorList [lindex $wForeColor 0] \ [lindex $wForeColor 1]} \ -disable {$widget configure -relief flat } \ -enable {$widget configure -relief raised } \ -packFrame:expand no Command wBackColor \ -text "背景" \ -default [list "#0000AA" 0] \ -setvalue { $widget configure -bg [lindex $wBackColor 0] -text " "} \ -invoke {ColorWidget $colorList [lindex $wBackColor 0] \ [lindex $wBackColor 1]} \ -disable {$widget configure -relief flat } \ -enable {$widget configure -relief raised } \ -packFrame:expand no Frame wColF -entries { wColB wForeColor wBackColor } -packFrame:expand no Help windowsH \ "アクティブウインドウの色とフォントを設定します。" Help wColB \ "アクティブウインドウの色を変更するならば、このボタンをチェックします。" Help wForeColor \ "このボタンを押せば、アクティブウインドウの前景色を設定できます。" Help wBackColor \ "このボタンを押せば、アクティブウインドウの背景色を設定できます。" CheckBox wFonB -text "タイトルのフォントを変更" Command winFontAscii \ -default "a14" \ -setvalue {buttonSetText $widget Ascii $winFontAscii ascii}\ -invoke {FontWidget $winFontAscii 0 ascii} \ -disable {$widget configure -text "Not set"} \ -enable {buttonSetText $widget Ascii $winFontAscii ascii} Command winFontKanji \ -default "k14" \ -setvalue {buttonSetText $widget 漢字 $winFontKanji kanji}\ -invoke {FontWidget $winFontKanji 0 kanji} \ -disable {$widget configure -text "未設定"}\ -enable {buttonSetText $widget 漢字 $winFontKanji kanji} Command winFontKana \ -default "r14" \ -setvalue {buttonSetText $widget "1Byte Kana" $winFontKana kana}\ -invoke {FontWidget $winFontKana 0 kana} \ -disable {$widget configure -text "Not set"} \ -enable {buttonSetText $widget "1Byte Kana" $winFontKana kana} Frame wFonF -entries { wFonB winFontAscii winFontKanji winFontKana } Help wFonB \ "アクティブウインドウのフォントを変更する場合には、このチェックボックスをチェクします。" Help winFontAscii\ "アクティブタイトルバーのフォントを変更する場合には、このチェックボックスをチェクします。" Help winFontKanji\ "アクティブタイトルバーのフォントを変更する場合には、このチェックボックスをチェクします。" Help winFontKana\ "アクティブタイトルバーのフォントを変更する場合には、このチェックボックスをチェクします。" CheckBox tStyleB -text "タイトルのスタイル変更" Label tStyleAlignL -text " 表示位置" -packFrame:expand no Radio tStyleAlign -entries { left centered right } -default centered Frame tStyleAlignF -entries { tStyleAlignL tStyleAlign } Label tStyleReliefL -text " 概観" -packFrame:expand no Radio tStyleRelief -entries { raised flat sunken } -default raised Frame tStyleReliefF -entries { tStyleReliefL tStyleRelief } Help tStyleB \ "タイトルバーで使われるフォントを変更する場合にチェックします。" set tStyleAlignHelp "タイトルバー上のテキストの位置を変更できます。" Help tStyleAlignL $tStyleAlignHelp Help tStyleAlign $tStyleAlignHelp set tStyleReliefHelp "タイトルバーの境界線の見た目を設定できます。" Help tStyleReliefL $tStyleReliefHelp Help tStyleRelief $tStyleReliefHelp CheckBox iFonB -text "アイコンのフォントを変更" Command icoFontAscii\ -default "a14" \ -setvalue {buttonSetText $widget Ascii $icoFontAscii ascii}\ -invoke {FontWidget $icoFontAscii 0 ascii} \ -disable {$widget configure -text "Not set"} \ -enable {buttonSetText $widget Ascii $icoFontAscii ascii} Command icoFontKanji\ -default "k14" \ -setvalue {buttonSetText $widget 漢字 $icoFontKanji kanji}\ -invoke {FontWidget $icoFontKanji 0 kanji} \ -disable {$widget configure -text "未設定"} \ -enable {buttonSetText $widget 漢字 $icoFontKanji Kanji} Command icoFontKana\ -default "r14" \ -setvalue {buttonSetText $widget "1 Byte Kana" $icoFontKana kana}\ -invoke {FontWidget $icoFontKana 0 kana} \ -disable {$widget configure -text "Not set"} \ -enable {buttonSetText $widget "1Byte Kana" $icoFontKana kana} Frame iFonF -entries { iFonB icoFontAscii icoFontKanji icoFontKana } Help iFonB \ "アイコンで使われるフォントを変更する場合にこれをチェックします。" Help icoFontAscii \ このボタンを押すとアイコンでのフォントを選択できます。" Help icoFontKanji \ このボタンを押すとアイコンでのフォントを選択できます。" Help icoFontKana \ このボタンを押すとアイコンでのフォントを選択できます。" Change { if {$changeElm == "wColB"} { if {$wColB == 1} { Enable wForeColor wBackColor } else { Disable wForeColor wBackColor } } if {$changeElm == "wFonB"} { if {$wFonB == 1} { Enable winFontAscii winFontKanji winFontKana } else { Disable winFontAscii winFontKanji winFontKana } } if {$changeElm == "tStyleB"} { if {$tStyleB == 1} { Enable tStyleAlign tStyleRelief } else { Disable tStyleAlign tStyleRelief } } if {$changeElm == "iFonB"} { if {$iFonB == 1} { Enable icoFontAscii icoFontKanji icoFontKana } else { Disable icoFontAscii icoFontKanji icoFontKana } } } Save { if {$wColB == 1} { print "HilightColor\t[hash2rgb [lindex $wForeColor 0]] [hash2rgb [lindex $wBackColor 0]]" } if {$wFonB == 1} { print "WindowFont\t$winFontAscii,$winFontKanji,$winFontKana" } if {$tStyleB == 1} { set justification {LeftJustified Centered RightJustified} set appearance {Raised Flat Sunk} set result "TitleStyle\t" append result "[lindex $justification $tStyleAlign(index)] " print $result set result "TitleStyle\t-- " append result "[lindex $appearance $tStyleRelief(index)]" } if {$iFonB == 1} { print "IconFont\t$icoFontAscii,$icoFontKanji,$icoFontKana" } } }