### 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. 12 1998 Japanize by Mashio Motoyama ### proc FvwmWinList {} { # モジュール / FvwmWinList Desc "FvwmWinList モジュールの設定" ShortDesc "FvwmWinList" Header h -text "FvwmWinList" -frame:relief flat \ -help "このページでは FvwmWinList モジュールの設定を行います。このモジュールはウインドウの管理に使われます。" Line l CheckBox spawn\ -text "起動時から利用する" \ -help "これを選択すると、このモジュールは起動時、つまり"\ "'InitFunction' と 'RestartFunction' からその動作を開始します。" Line colL # Geometry Label geomL\ -text "ウインドウの表示位置: "\ -help "FvwmWinList ウインドウの表示位置を指定できます。" Int geomX -text "X 座標" Int geomY -text "Y 座標" Frame geomF -entries { geomL geomX geomY } PageEnd { if {$geomX != "" || $geomY != ""} { if {$geomX == "" || $geomY == ""} { error "FvwmWinList に X と Y の両方の座標を与えて下さい。" } } } Save { if {$geomX != ""} { print "*FvwmWinListGeometry\t[signed $geomX][signed $geomY]" } } CheckBox skipList\ -text "特定ウインドウの非表示" \ -help "'WindowListSkip' フラグが設定していあるウインドウをリストに表示しない場合に選択します。" Save {if {$skipList == 1} {print "*FvwmWinListUseSkipList"}} CheckBox noAnchor\ -text "ウインドウを固定しない" \ -help "標準では、FvwmWinList は下端の角に固定されますが、固定したくない場合にはこれを選択します。"\ "\n\n原文: By default, FvwmWinList will anchor the gravity"\ "corner so the window will grow in the opposite direction."\ "This undoes that behavior." Save {if {$noAnchor == 1} {print "*FvwmWinListNoAnchor"}} CheckBox useIcons\ -text "アイコン名で表示"\ -help "通常 FvwmWinList はウインドウのタイトルを表示してます。これを選択すると、アイコンのタイトルで表示するようになります。" Save {if {$useIcons == 1} {print "*FvwmWinListUseIconNames"}} CheckBox leftJust\ -text "テキストは左詰め" \ -help "標準では、テキストはセンタリングされています。これを選択するとテキストは左詰めで表示されます。" Save {if {$leftJust == 1} {print "*FvwmWinListLeftJustify"}} Int minWidth\ -text "最小幅を指定: " \ -help "通常 FvwmWinList は、そのサイズを最大のテキストに合わせますが、サイズの制限をしたい場合にはそのサイズを入力します。" Int maxWidth\ -text "最大幅を指定: " \ -help "通常 FvwmWinList は、そのサイズを最大のテキストに合わせますが、サイズの制限をしたい場合にはそのサイズを入力します。" Change { if {$changeElm == "minWidth" && $minWidth == "-"} {set minWidth ""} if {$changeElm == "maxWidth" && $maxWidth == "-"} {set maxWidth ""} if {$changeElm == "maxWidth"} { if {$maxWidth == ""} {Disable truncLeft} else {Enable truncLeft} } } PageEnd { if {$minWidth != "" && $maxWidth != "" && $minWidth > $maxWidth} { error "FvwmWinList の最小幅は、最大幅以下でなくていはなりません。" } } Save { if {$minWidth != ""} {print "*FvwmWinListMinWidth\t$minWidth"} if {$maxWidth != ""} {print "*FvwmWinListMaxWidth\t$maxWidth"} } CheckBox truncLeft\ -text "文字の切捨ては左から行う"\ -help "最大幅を設定してある場合、通常溢れたテキストはその右側が切り捨てられます。もし左側を切り捨てるように設定したい場合には、これを選択します。" Save { if {$maxWidth != "" && $truncLeft == 1} { print "*FvwmWinListTruncateLeft" } } # Colors and Fonts 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 "FvwmWinList の前景色を設定します。" 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 "FvwmWinList の背景色を設定します。" 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 "*FvwmWinListFore\t[hash2rgb [lindex $winFore 0]]" print "*FvwmWinListBack\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 "*FvwmWinListIconFore\t[hash2rgb [lindex $icoFore 0]]" print "*FvwmWinListIconBack\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 "*FvwmWinListFocusFore\t[hash2rgb [lindex $hiFore 0]]" print "*FvwmWinListFocusBack\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 "*FvwmWinListFont\t$fontAscii,$fontKanji,$fontKana" } } Window colFont\ -text "色とフォントの設定" -entries { winColF icoColF hiColF fontF } -help "使用するフォントと色の設定を行います。" # Bindings Label mouseIdx\ -text "定義名: " -label:relief groove Menu mouseBut\ -entries { 1 2 3 } -text "ボタン番号: " 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 {mouseBut responses} -orient top ExtEntry mice -text "マウス・バインディング" -entries { mouseIdx mouseBindF } -index mouseIdx -orient top -count 1 -packFrame:expand yes \ -packFrame:fill x \ -help "マウスへ組み込み関数をバインドします。マウスボタンを選択し、バインドする動作を入力します。" Change { if {$changeElm == "mouseBut"} { set mouseIdx "Button $mouseBut(name)" } } Save { forevery mice { set resp "" forevery responses { append resp ",$builtinCall" if {$mouseArgs != ""} {append resp " $mouseArgs"} } if {$resp != ""} { print "*FvwmWinListAction\tClick$mouseBut(name) [string \ range $resp 1 end]" } else { tk_dialog .mouseDialog Warning "FvwmWinList に何の関数もバインドされていないエントリが存在します。この項目は無視されます。" \ info 0 OK } } } Window bindingW\ -text "マウス・バインディングの設定" -entries { mice } -help "FvwmWinList でのマウスへのバインドを行います。" Save { if {$spawn == 1} { print "AddToFunc InitFunction \"I\" Module FvwmWinList" print "AddToFunc RestartFunction \"I\" Module FvwmWinList" } } }