### 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. ### ### Mar. 10 1998 Japanized by Mashio Motoyama ### proc FvwmIconBox {} { # モジュール / FvwmIconBox Desc "FvwmIconBox モジュールの設定" ShortDesc "FvwmIconBox" Header h -text "FvwmIconBox" -frame:relief flat \ -help "このページでは FvwmIconBox モジュールの設定を行います。このモジュールはアイコン化されたウインドウを root ウインドウに配置する替わりに使われ、全てのウインドウに NoIcon が設定されている場合には、この FvwmIconBox へ置かれます。" Line l CheckBox spawn\ -text "起動時から利用する" \ -help "これを選択すると、このモジュールは起動時、つまり"\ "'InitFunction' と 'RestartFunction' からその動作を開始します。" CheckBox style\ -text "全アイコン化ウインドウを対象にする" \ -help "これを選択すると、FvwmIconBox は 'NoIcon' フラグが設定されているウインドウを取り込みます。" Line colL CheckBox winColB\ -text "ウインドウの色: "\ -help "ウインドウの色を指定する場合に選択します。" Command winFore \ -text "前景色" \ -default [list "white" 0] \ -setvalue { $widget configure -bg [lindex $winFore 0] -text " "} \ -invoke {ColorWidget $colorList [lindex $winFore 0] \ [lindex $winFore 1]} \ -disable {$widget configure -relief flat } \ -enable {$widget configure -relief raised } \ -help "FvwmIconBox ウインドウの前景色を設定します。この設定はモノクローム・ビットマップにのみ影響を与えます。" Command winBack \ -text "背景色" \ -default [list "black" 0] \ -setvalue { $widget configure -bg [lindex $winBack 0] -text " "} \ -invoke {ColorWidget $colorList [lindex $winBack 0] \ [lindex $winBack 1]} \ -disable {$widget configure -relief flat } \ -enable {$widget configure -relief raised } \ -help "FvwmIconBox ウインドウの背景色を設定します。" Frame winColF -entries { winColB winFore winBack } Change { if {$changeElm == "winColB"} { if {$winColB == 1} {Enable winFore winBack } else {Disable winFore winBack} } } Save { if {$winColB == 1} { print "*FvwmIconBoxFore\t[hash2rgb [lindex $winFore 0]]" print "*FvwmIconBoxBack\t[hash2rgb [lindex $winBack 0]]" } } CheckBox icoColB\ -text "アイコンの色 :"\ -help "アイコンの色を設定する場合に選択します。" Command icoFore \ -text "前景色" \ -default [list "white" 0] \ -setvalue { $widget configure -bg [lindex $icoFore 0] -text " "} \ -invoke {ColorWidget $colorList [lindex $icoFore 0] \ [lindex $icoFore 1]} \ -disable {$widget configure -relief flat } \ -enable {$widget configure -relief raised } \ -help "アイコンの前景色を設定します。" Command icoBack \ -text "背景色" \ -default [list "black" 0] \ -setvalue { $widget configure -bg [lindex $icoBack 0] -text " "} \ -invoke {ColorWidget $colorList [lindex $icoBack 0] \ [lindex $icoBack 1]} \ -disable {$widget configure -relief flat } \ -enable {$widget configure -relief raised } \ -help "アイコンの背景色を設定します。" Frame icoColF -entries { icoColB icoFore icoBack } Change { if {$changeElm == "icoColB"} { if {$icoColB == 1} {Enable icoFore icoBack } else {Disable icoFore icoBack} } } Save { if {$icoColB == 1} { print "*FvwmIconBoxIconFore\t[hash2rgb [lindex $icoFore 0]]" print "*FvwmIconBoxIconBack\t[hash2rgb [lindex $icoBack 0]]" } } CheckBox hiColB\ -text "ハイライト: "\ -help "アイコンのハイライトを設定する場合に選択します。" Command hiFore \ -text "前景色" \ -default [list "white" 0] \ -setvalue { $widget configure -bg [lindex $hiFore 0] -text " "} \ -invoke {ColorWidget $colorList [lindex $hiFore 0] \ [lindex $hiFore 1]} \ -disable {$widget configure -relief flat } \ -enable {$widget configure -relief raised } \ -help "ハイライト・カラーの前景色を設定します。" Command hiBack \ -text "背景色" \ -default [list "black" 0] \ -setvalue { $widget configure -bg [lindex $hiBack 0] -text " "} \ -invoke {ColorWidget $colorList [lindex $hiBack 0] \ [lindex $hiBack 1]} \ -disable {$widget configure -relief flat } \ -enable {$widget configure -relief raised } \ -help "ハイライト・カラーの背景色を設定します。" Frame hiColF -entries { hiColB hiFore hiBack } Change { if {$changeElm == "hiColB"} { if {$hiColB == 1} {Enable hiFore hiBack } else {Disable hiFore hiBack} } } Save { if {$icoColB == 1} { print "*FvwmIconBoxIconHiFore\t[hash2rgb [lindex $hiFore 0]]" print "*FvwmIconBoxIconHiBack\t[hash2rgb [lindex $hiBack 0]]" } } CheckBox fontB\ -text "フォント: "\ -help "フォントを変更する場合に選択します。" Command fontAscii\ -default "a14"\ -setvalue {buttonSetText $widget ASCII $fontAscii ascii}\ -invoke {FontWidget $fontAscii 0 ascii}\ -disable {$widget configure -text "Not set"}\ -enable {buttonSetText $widget ASCII $fontAscii ascii} \ -help "アイコンタイトルで使われる ASCII フォントを選択します。" Command fontKanji\ -default "k14"\ -setvalue {buttonSetText $widget 漢字 $fontKanji kanji}\ -invoke {FontWidget $fontKanji 0 kanji}\ -disable {$widget configure -text "未設定"}\ -enable {buttonSetText $widget 漢字 $fontKanji kanji} \ -help "アイコンタイトルで使われる漢字フォントを選択します。" Command fontKana\ -default "r14"\ -setvalue {buttonSetText $widget "1Byte Kana" $fontKana kana}\ -invoke {FontWidget $fontKana 0 kana}\ -disable {$widget configure -text "Not set"}\ -enable {buttonSetText $widget "1Byte Kana" $fontKana kana} \ -help "アイコンタイトルで使われる半角カナフォントを選択します。" Frame fontF -entries { fontB fontAscii fontKanji fontKana } Change { if {$changeElm == "fontB"} { if {$fontB == 1} { Enable fontAscii fontKanji fontKana } else { Disable fontAscii fontKanji fontKana } } } Save { if {$fontB == 1} { print "*FvwmIconBoxFont\t$fontAscii,$fontKanji,$fontKana" } } Window colFont\ -text "色とフォントの設定"\ -entries { winColF icoColF hiColF fontF }\ -help "使用するフォントと色の設定を行います。" # Icon presentation CheckBox sortB -text "アイコンのソート方法:" \ -help "アイコンをアルファベット順に整列させたい場合に選択します。" Radio sortOrder\ -entryhelp { "ウインドウ名" "ウインドウのタイトルでソートします。" "アイコン名" "アイコンの名前でソートします。" "リソースクラス" "リソースクラスでソートします。" "リソース名" "リソース名でソートします。" } Change { if {$changeElm == "sortB"} { if {$sortB == 1} {Enable sortOrder} else {Disable sortOrder} } } Save { if {$sortB == 1} { set result "*FvwmIconBoxSortIcons\t" switch $sortOrder(name) \ "ウインドウ名" {append result WindowName} \ "アイコン名" {append result IconName} \ "リソースクラス" {append result ResClass} \ "リソース名" {append result ResName} print $result } } Int padding\ -text "アイコンの間隔を"\ -textafter "ピクセルに設定"\ -help "アイコン同士の間隔をピクセル単位で設定します。" Change {if {$changeElm == "padding" && $padding == "-"} {set padding ""}} Save {if {$padding != ""} {print "*FvwmIconBoxPadding\t$padding"}} Line placeLn CheckBox placeB\ -text "アイコンの表示方法を指定"\ -help "アイコンの並べ方を設定できます" Label primLb -text "一次側" CheckBox primL -text "左から右へ" CheckBox primR -text "右から左へ" CheckBox primT -text "上から下へ" CheckBox primB -text "下から上へ" Frame primF -orient top -entries { primLb primL primR primT primB } Label secoLb -text "二次側" CheckBox secoL -text "左から右へ" CheckBox secoR -text "右から左へ" CheckBox secoT -text "上から下へ" CheckBox secoB -text "下から上へ" Frame secoF -orient top -entries { secoLb secoL secoR secoT secoB } Frame placeF -entries { primF secoF } Change { if {$changeElm == "placeB"} { if {$placeB == 1} {Enable primF secoF} else {Disable primF secoF} } if {[lsearch {primL primR primT primB} $changeElm] != -1} { foreach var {primL primR primT primB} { if {$var != $changeElm} {set $var 0} else {set $var 1} } if {[lsearch {primL primR} $changeElm] != -1 && ($secoL == 1 || $secoR == 1)} { set secoT 1 set secoL 0 set secoR 0 } if {[lsearch {primT primB} $changeElm] != -1 && ($secoT == 1 || $secoB == 1)} { set secoL 1 set secoT 0 set secoB 0 } } if {[lsearch {secoL secoR secoT secoB} $changeElm] != -1} { foreach var {secoL secoR secoT secoB} { if {$var != $changeElm} {set $var 0} else {set $var 1} } if {[lsearch {secoL secoR} $changeElm] != -1 && ($primL == 1 || $primR == 1)} { set primT 1 set primL 0 set primR 0 } if {[lsearch {secoT secoB} $changeElm] != -1 && ($primT == 1 || $primB == 1)} { set primL 1 set primT 0 set primB 0 } } } Save { if {$placeB == 1} { set result "*FvwmIconBoxPlacement\t" if {$primL == 1} {append result Left } elseif {$primR == 1} {append result Right } elseif {$primT == 1} {append result Top } elseif {$primB == 1} {append result Bottom} if {$secoL == 1} {append result " Left" } elseif {$secoR == 1} {append result " Right" } elseif {$secoT == 1} {append result " Top" } elseif {$secoB == 1} {append result " Bottom"} print $result } } Line moreL Int lines\ -text "一次側アイコン数: " \ -help "一次側に配置するアイコンの数を設定します。" Change {if {$changeElm == "lines" && $lines == "-"} {set lines ""}} Save {if {$lines != ""} {print "*FvwmIconBoxLines\t$lines"}} CheckBox maxISB\ -text "最大アイコンサイズ: " \ -help "アイコンの最大のサイズを指定する場合に選択します。" Int maxISW\ -text "幅"\ -help "アイコンの最大幅を入力します。" Int maxISH\ -text "高さ"\ -help "アイコンの最大高を入力します。" Frame maxISF -entries { maxISB maxISW maxISH } Change { if {$changeElm == "maxISW" && $maxISW == "-"} {set maxISW ""} if {$changeElm == "maxISH" && $maxISH == "-"} {set maxISH ""} if {$changeElm == "maxISB"} { if {$maxISB == 1} {Enable maxISW maxISH} else {Disable maxISW maxISH} } } Save { if {$maxISB == 1} {print "*FvwmIconBoxMaxIconSize\t${maxISW}x$maxISH"} } CheckBox hilight \ -text "アクティブウインドウのアイコンにハイライトを与える"\ -help "アクティブウインドウのアイコンにハイライトを与える場合に選択します。" Save {if {$hilight == 1} {print "*FvwmIconBoxHilightFocusWin"}} Line styleL Entry winName\ -text "ウインドウ名" \ -help "ウインドウ名、クラス名、リソース名のいずれかを入力します。(ワイルドカードが使えます。)" Entry iconName\ -text "アイコン名" \ -help "FvwmIconBox で表示する、このウインドウのビットマップを入力します。" ExtEntry styles\ -text "FVWM2 スタイルの無効化"\ -entries { winName iconName }\ -help "各ウインドウ用のアイコンが指定できます。FVWM2 スタイルと比較して、より柔軟に設定が行えますが、この設定は他で使われているアイコンやアイコン名にも影響を与えます。" Save {forevery styles {print "*FvwmIconBox\t$winName\t$iconName"}} Window presentW\ -text "アイコン表示方法の設定"\ -entries { sortB sortOrder padding placeLn placeB placeF moreL lines maxISF hilight styleL styles }\ -help "アイコンをどの様に表示するかを設定します。" \ -pageEnd { if {$maxISB == 1 && ($maxISW == "" || $maxISH == "")} { error "FvwmIconBox のアイコンサイズに、無効な幅または高さが設定されています。" } forevery styles { if {$winName == "" || $iconName == ""} { error "ウインドウ名とアイコン名の両方を設定する必要があります。これらを設定するか、またはそのタプルを消去して下さい。" } } } CheckBox pixB\ -text "背景画: "\ -help "FvwmIconBox ウインドウの背景に使うピックスマップを指定できます。" Entry pix\ -help "使用するピックスマップ・ファイルを入力します。" Frame pixF -entries { pixB pix } Change { if {$changeElm == "pixB"} { if {$pixB == 1} {Enable pix} else {Disable pix} } } Save {if {$pixB == 1} {print "*FvwmIconBoxPixmap\t$pix"}} Label geomL\ -text "サイズと表示位置: "\ -help "FvwmIconBox ウインドウの幅と高さ、そして表示する位置を設定します。" Int geomW -text "幅" Int geomH -text "高さ" Int geomX -text "X 座標" Int geomY -text "Y 座標" Frame geomF -entries { geomL geomW geomH geomX geomY } Change { if {$changeElm == "geomW" && $geomW == "-"} {set geomW ""} if {$changeElm == "geomH" && $geomH == "-"} {set geomH ""} } Save { if {$geomW != ""} { print "*FvwmIconBoxGeometry\t${geomW}x$geomH[signed \ $geomX][signed $geomY]" } } Int scWidth\ -text "スクロールバーの幅を" \ -textafter "ピクセルに設定" \ -help "スクロールバーの幅をピクセル単位で入力します。" Change {if {$changeElm == "scWidth" && $scWidth == "-"} {set scWidth ""}} Save {if {$scWidth != ""} {print "*FvwmIconBoxSBWidth\t$scWidth"}} Int scPad\ -text "ウインドウとスクロールバーの間隔を" \ -textafter "ピクセルに設定" \ -help "ウインドウとスクロールバーとの間隔をピクセル単位で設定します。" Change {if {$changeElm == "scPad" && $scPad == "-"} {set scPad ""}} Save {if {$scPad != ""} {print "*FvwmIconBoxFrameWidth\t$scPad $scPad"}} Label hideSC\ -text "スクロールバーを隠す" \ -help "水平方向か垂直方向のどちらかのスクロールバーを非表示にすることができます。" CheckBox hideSCH\ -text "水平方向"\ -help "これを選択すると、水平方向のスクロールバーが消えます。" CheckBox hideSCV\ -text "垂直方向"\ -help "これを選択すると、垂直方向のスクロールバーが消えます。" Frame hideSCF -entries { hideSC hideSCH hideSCV } Change { if {$changeElm == "hideSCH" && $hideSCH == 1} {set hideSCV 0} if {$changeElm == "hideSCV" && $hideSCV == 1} {set hideSCH 0} } Save { if {$hideSCH == 1} {print "*FvwmIconBoxHideSC\tHorizontal"} if {$hideSCV == 1} {print "*FvwmIconBoxHideSC\tVertical"} } CheckBox currOnly\ -text "カレント・デスクトップのアイコンのみ表示" \ -help "FvwmIconBox に現在使用している仮想デスクトップ上のアイコンのみ表示させたい場合に選択します。" Save {if {$currOnly == 1} {print "*FvwmIconBoxResolution\tDesk"}} CheckBox sWMIS\ -text "root ウインドウの特性に XA_WM_ICON_SIZE をセットする" \ -help "十中八九、これは設定すべきでしょう。でもそれが何を為すか私は知りません。"\ "\n\n(訳者より: 無責任ですよねぇ。一応調べてはおきますが...)" Save {if {$sWMIS == 1} {print "*FvwmIconBoxSetWMIconSize"}} Line globL1 Line globL2 Window globalW -text "ウインドウの設定" -entries { pixF geomF globL1 scWidth scPad hideSCF globL2 currOnly sWMIS } -help "メイン・ウインドウの外観を設定します。" \ -pageEnd { if {$geomW != "" || $geomH != "" || $geomX != "" || $geomY != ""} { if {$geomW == "" || $geomH == "" || $geomX == "" || $geomY == ""} { error "You must specify all or no geometry configuration for\ FvwmIconBox." } } } Label keyIdx\ -text "定義名: "\ -label:relief groove Label keysymL\ -text "キーシム"\ -help "リストからキーシムを選択して下さい。リストに無い場合は手打ちになります。" ComboBox keysym\ -entries { Left Right Up Down F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 L1 L2 L3 L4 L5 L6 L7 L8 L9 L10 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z }\ -help "リストからキーシムを選択して下さい。リストに無い場合は手打ちになります。" Frame keysymF -orient top -entries { keysymL keysym } Label KfuncLabel\ -text "組み込み関数" \ -help "バインド可能な組み込み関数の一覧です。" global Builtins ComboBox KbuiltinCall -noedit 1 -default Next -entryhelp \ [concat { Next "ハイライトの位置を次のアイコンへ移動させます。" Prev "ハイライトの位置を次のアイコンへ移動させます。" Left "水平スクロールバーを左へ動かします。" Right "水平スクロールバーを右へ動かします。" Up "垂直スクロールバーを上へ動かします。" Down "垂直スクロールバーを下へ動かします。" } $Builtins] \ -help "このメニューから呼び出す組み込み関数を選択します。" Label KargLabel\ -text "引数" \ -help "引数を入力します。尚、その書式については関知しません。" Entry keyArgs \ -help "引数を入力します。尚、その書式については関知しません。" Frame keyFuncF -entries {KfuncLabel KbuiltinCall} -orient top Frame keyArgsF -entries {KargLabel keyArgs} -orient top ExtEntry Kresponses -entries { keyFuncF keyArgsF } Frame keyBindF -entries {keysymF Kresponses} ExtEntry keys -text "キー・バインディング" -entries { keyIdx keyBindF } -index keyIdx -orient top -count 1 -packFrame:expand yes \ -packFrame:fill x \ -help "キー・バインディングの設定を行います。バンドするキーシムを選択し、実行するコマンドを指定します。" Change { if {$changeElm == "keysym"} { set keyIdx "Key $keysym" } } Save { forevery keys { set resp "" forevery Kresponses { append resp ",$KbuiltinCall" if {$keyArgs != ""} {append resp " $keyArgs"} } if {$resp != ""} { print "*FvwmIconBoxKey\t$keysym [string range $resp 1 end]" } else { tk_dialog .keyDialog Warning "何の関数も呼び出さないキー・バインディングが定義されています。この項目は無視されます。" info 0 OK } } } Label mouseIdx -text "定義名: " -label:relief groove Menu mouseBut -entries { 1 2 3 } Menu mouseAct -entries { Click DoubleClick } Frame mouseActionF -entries { mouseBut mouseAct } Label funcLabel\ -text "組み込み関数" \ -help "バインド可能な組み込み関数のリストです。" global Builtins ComboBox builtinCall -noedit 1 -default Beep -entryhelp $Builtins \ -help "このメニューから呼び出す組み込み関数を選択します。" Label argLabel -text "引数" \ -help "引数を入力します。尚、その書式については関知しません。" Entry mouseArgs \ -help "引数を入力します。尚、その書式については関知しません。" Frame mouseFuncF -entries {funcLabel builtinCall} -orient top Frame mouseArgsF -entries {argLabel mouseArgs} -orient top ExtEntry responses -entries { mouseFuncF mouseArgsF } Frame mouseBindF -entries {mouseActionF responses} ExtEntry mice -text "マウス・バインディング" -entries { mouseIdx mouseBindF } -index mouseIdx -orient top -count 1 -packFrame:expand yes \ -packFrame:fill x \ -help "マウス・バインディングの設定を行います。マウスボタンとその動作を選択し、バインドする関数を指定します。" Change { if {$changeElm == "mouseBut" || $changeElm == "mouseAct"} { set mouseIdx "Button $mouseBut(name), $mouseAct(name)" } } Save { forevery mice { set resp "" forevery responses { append resp ",$builtinCall" if {$mouseArgs != ""} {append resp " $mouseArgs"} } if {$resp != ""} { print "*FvwmIconBoxMouse\t$mouseBut(name) $mouseAct(name) [string \ range $resp 1 end]" } else { tk_dialog .mouseDialog Warning "何の関数も呼び出さないマウス・バインディングが定義されています。この項目は無視されます。" info 0 OK } } } Line bindL Window bindingW\ -text "キーとマウスへのバインド"\ -entries { keys bindL mice }\ -help "FvwmIconBox で使うバインドの設定を行います。" Save { if {$style == 1} {print "Style \"*\"\tNoIcon"} if {$spawn == 1} { print "AddToFunc InitFunction \"I\" Module FvwmIconBox" print "AddToFunc RestartFunction \"I\" Module FvwmIconBox" } } }