| 1 |
//--------------------------------------------------------------------------- |
| 2 |
// Copal のコンフィグ情報を保持するクラス |
| 3 |
// 定義ファイルも管理する |
| 4 |
//--------------------------------------------------------------------------- |
| 5 |
#include <vcl.h> |
| 6 |
#include <Inifiles.hpp> |
| 7 |
#include <filectrl.hpp> |
| 8 |
#pragma hdrstop |
| 9 |
|
| 10 |
|
| 11 |
#include "KCopalConfig.h" |
| 12 |
#include "Main.h" |
| 13 |
#pragma package(smart_init) |
| 14 |
|
| 15 |
|
| 16 |
const char *HotKeyIDStr = "CopalHotKey"; |
| 17 |
|
| 18 |
//--------------------------------------------------------------------------- |
| 19 |
/** |
| 20 |
* コンストラクタ |
| 21 |
* デフォルトフォルダをうけとる |
| 22 |
*/ |
| 23 |
KCopalConfig::KCopalConfig(AnsiString _DefaultPath) { |
| 24 |
//初期化 |
| 25 |
DefaultPath = _DefaultPath; |
| 26 |
FileName = DefaultPath +"CopalPro.cfg"; |
| 27 |
DefFilesPath = DefaultPath +"defs\\"; |
| 28 |
HelpFile = DefaultPath +"CopalPro.hlp";//ヘルプファイル |
| 29 |
ShortCutKeyFile = DefaultPath +"CopalPro.key";//ショートカットキーファイル |
| 30 |
|
| 31 |
LastDroppedFiles = ""; |
| 32 |
SaveResultFile = ""; |
| 33 |
|
| 34 |
|
| 35 |
//その他初期化 |
| 36 |
bUseHotKey = false; |
| 37 |
AutoRefresh = false; |
| 38 |
ReadOnly = false; |
| 39 |
UseCGI = false; |
| 40 |
HotKey = 0; |
| 41 |
DefaultCode = CM_AUTOSELECT; |
| 42 |
TabWidth = DefaultTabWidth; |
| 43 |
|
| 44 |
DefFileList = new TList; |
| 45 |
} |
| 46 |
//--------------------------------------------------------------------------- |
| 47 |
/** |
| 48 |
* デストラクタ |
| 49 |
*/ |
| 50 |
KCopalConfig::~KCopalConfig(void) { |
| 51 |
UnsetHotKey(); |
| 52 |
delete DefFileList; |
| 53 |
} |
| 54 |
//--------------------------------------------------------------------------- |
| 55 |
/** |
| 56 |
* コンフィグデータの保存 |
| 57 |
* ウィンドウ情報以外を保存する |
| 58 |
*/ |
| 59 |
void |
| 60 |
KCopalConfig::Save(void) { |
| 61 |
SaveAllDefConfig(); |
| 62 |
|
| 63 |
TIniFile *IniFile = new TIniFile(FileName); |
| 64 |
|
| 65 |
//現在の言語を保存 |
| 66 |
IniFile->WriteString("Environment","Language",CurrentLanguage->LangName); |
| 67 |
|
| 68 |
//エディタ情報 |
| 69 |
IniFile->WriteString("Environment","Editor",Editor); |
| 70 |
IniFile->WriteBool("Environment","UseDoubleQuotes",UseDoubleQuotes); |
| 71 |
|
| 72 |
//タグジャンプ |
| 73 |
IniFile->WriteBool("Environment","UseTagJump",UseTagJump); |
| 74 |
IniFile->WriteString("Environment","TagJumpText",TagJumpText); |
| 75 |
|
| 76 |
//DOS窓での実行 |
| 77 |
IniFile->WriteString("Environment","TempBat",TempBat); |
| 78 |
IniFile->WriteBool("Environment","UsePause",UsePause); |
| 79 |
|
| 80 |
//ホットキー |
| 81 |
IniFile->WriteBool("Environment","UseHotKey",bUseHotKey); |
| 82 |
IniFile->WriteInteger("Environment","HotKey",(int)HotKey); |
| 83 |
|
| 84 |
//オートリフレッシュ |
| 85 |
IniFile->WriteBool("Environment","AutoRefresh",AutoRefresh); |
| 86 |
IniFile->WriteBool("Environment","ReadOnlyWhenAutoRefresh",ReadOnlyWhenAutoRefresh); |
| 87 |
|
| 88 |
//CGI設定 |
| 89 |
IniFile->WriteString("Environment","TempHtml",TempHtml); |
| 90 |
IniFile->WriteBool("Environment","CutHead",CutHead); |
| 91 |
|
| 92 |
//文字コードの指定 |
| 93 |
IniFile->WriteInteger("Environment","DefaultCode",GetCodeMode()); |
| 94 |
|
| 95 |
//ファイルヒストリの保存 |
| 96 |
FMain->SaveHistory(IniFile); |
| 97 |
|
| 98 |
//その他 |
| 99 |
IniFile->WriteBool("Others","MemoryFileWhenDropped",MemoryFileWhenDropped); |
| 100 |
IniFile->WriteBool("Others","ChangeCurrentDirOnDrop",ChangeCurrentDirOnDrop); |
| 101 |
IniFile->WriteBool("Others","DontChangeDirFromDesktop",DontChangeDirFromDesktop); |
| 102 |
IniFile->WriteBool("Others","FEditorStayOnTop",FEditor->isStayOnTop()); |
| 103 |
|
| 104 |
delete IniFile; |
| 105 |
} |
| 106 |
//--------------------------------------------------------------------------- |
| 107 |
/** |
| 108 |
* コンフィグデータの保存 |
| 109 |
* ウィンドウ情報も込みで保存する |
| 110 |
* 終了時に呼ばれる |
| 111 |
*/ |
| 112 |
void |
| 113 |
KCopalConfig::Save(CONFIGSAVEPARAM csp) { |
| 114 |
|
| 115 |
TIniFile *IniFile = new TIniFile(FileName); |
| 116 |
//ウィンドウ情報を保存 |
| 117 |
IniFile->WriteBool("Window","Maximized",csp.Maximized); |
| 118 |
IniFile->WriteInteger("Window","Height",csp.Height); |
| 119 |
IniFile->WriteInteger("Window","Width",csp.Width); |
| 120 |
delete IniFile; |
| 121 |
Save(); |
| 122 |
|
| 123 |
} |
| 124 |
//--------------------------------------------------------------------------- |
| 125 |
/** |
| 126 |
* コンフィグデータの読み込み |
| 127 |
*/ |
| 128 |
void |
| 129 |
KCopalConfig::Load(void) { |
| 130 |
TIniFile *IniFile = new TIniFile(FileName); |
| 131 |
|
| 132 |
AnsiString LangName = IniFile->ReadString("Environment","Language","Perl"); |
| 133 |
SearchByName(LangName); |
| 134 |
|
| 135 |
//エディタ情報を読み込む |
| 136 |
Editor = IniFile->ReadString("Environment","Editor","notepad.exe"); |
| 137 |
UseDoubleQuotes = IniFile->ReadBool("Environment","UseDoubleQuotes",false); |
| 138 |
|
| 139 |
//タグジャンプ |
| 140 |
UseTagJump = IniFile->ReadBool("Environment","UseTagJump",false); |
| 141 |
TagJumpText = IniFile->ReadString("Environment","TagJumpText",""); |
| 142 |
|
| 143 |
//DOS窓での実行 |
| 144 |
TempBat = IniFile->ReadString("Environment","TempBat","temp.bat"); |
| 145 |
UsePause = IniFile->ReadBool("Environment","UsePause",false); |
| 146 |
|
| 147 |
//ホットキー |
| 148 |
bUseHotKey = IniFile->ReadBool("Environment","UseHotKey",false); |
| 149 |
HotKey = (TShortCut)IniFile->ReadInteger("Environment","HotKey",0); |
| 150 |
ChangeHotKey(bUseHotKey,HotKey); |
| 151 |
|
| 152 |
//オートリフレッシュ |
| 153 |
AutoRefresh = IniFile->ReadBool("Environment","AutoRefresh",false); |
| 154 |
ReadOnlyWhenAutoRefresh = IniFile->ReadBool("Environment","ReadOnlyWhenAutoRefresh",false); |
| 155 |
|
| 156 |
|
| 157 |
//ウィンドウ情報を読み込む |
| 158 |
Maximized = IniFile->ReadBool("Window","Maximized",false); |
| 159 |
|
| 160 |
FMain->Width = IniFile->ReadInteger("Window","Width",600); |
| 161 |
FMain->Height = IniFile->ReadInteger("Window","Height",400); |
| 162 |
|
| 163 |
//CGI設定 |
| 164 |
TempHtml = IniFile->ReadString("Environment","TempHtml","temp.html"); |
| 165 |
CutHead = IniFile->ReadBool("Environment","CutHead",true); |
| 166 |
|
| 167 |
//文字コードの指定 |
| 168 |
DefaultCode = IniFile->ReadInteger("Environment","DefaultCode",-1); |
| 169 |
|
| 170 |
//ファイルヒストリの読み込み |
| 171 |
FMain->LoadHistory(IniFile); |
| 172 |
|
| 173 |
//その他 |
| 174 |
MemoryFileWhenDropped = IniFile->ReadBool("Others","MemoryFileWhenDropped",false); |
| 175 |
ChangeCurrentDirOnDrop = IniFile->ReadBool("Others","ChangeCurrentDirOnDrop",false); |
| 176 |
DontChangeDirFromDesktop = IniFile->ReadBool("Others","DontChangeDirFromDesktop",false); |
| 177 |
FEditorStayOnTop = IniFile->ReadBool("Others","FEditorStayOnTop",false); |
| 178 |
|
| 179 |
delete IniFile; |
| 180 |
} |
| 181 |
//--------------------------------------------------------------------------- |
| 182 |
// 定義ファイルの管理 |
| 183 |
//--------------------------------------------------------------------------- |
| 184 |
/** |
| 185 |
* 定義ファイルを新たに作る |
| 186 |
*/ |
| 187 |
void |
| 188 |
KCopalConfig::CreateDefConfig(AnsiString LangName,AnsiString LangPath) { |
| 189 |
AnsiString FileName = DefFilesPath+LangName+".def"; |
| 190 |
KDefConfig *dc = new KDefConfig(FileName,LangName,LangPath); |
| 191 |
AddDefConfig(dc); |
| 192 |
ChangeLanguage(dc); |
| 193 |
ShowMessage(LangName + " を追加しました。\n 詳細設定は設定メニューの言語別設定から行ってください"); |
| 194 |
} |
| 195 |
//--------------------------------------------------------------------------- |
| 196 |
/** |
| 197 |
* 定義ファイルを保存する |
| 198 |
*/ |
| 199 |
void |
| 200 |
KCopalConfig::SaveAllDefConfig(void) { |
| 201 |
for(int i=0;i<GetDefConfigCount();i++) { |
| 202 |
GetDefConfigAt(i)->SaveToFile(); |
| 203 |
} |
| 204 |
} |
| 205 |
//--------------------------------------------------------------------------- |
| 206 |
/** |
| 207 |
* 定義ファイルを加える |
| 208 |
*/ |
| 209 |
void |
| 210 |
KCopalConfig::AddDefConfig(KDefConfig *DefConfig) { |
| 211 |
DefFileList->Add(DefConfig); |
| 212 |
} |
| 213 |
//--------------------------------------------------------------------------- |
| 214 |
/** |
| 215 |
* 定義ファイルを削除する |
| 216 |
*/ |
| 217 |
void |
| 218 |
KCopalConfig::DeleteDefConfigAt(int index) { |
| 219 |
KDefConfig *dc = GetDefConfigAt(index); |
| 220 |
delete dc; |
| 221 |
DefFileList->Delete(index); |
| 222 |
} |
| 223 |
//--------------------------------------------------------------------------- |
| 224 |
/** |
| 225 |
* 定義ファイルを全て削除する |
| 226 |
*/ |
| 227 |
void |
| 228 |
KCopalConfig::DeleteAllDefConfig(void) { |
| 229 |
for(int i=0;GetDefConfigCount()!=0;i++) { |
| 230 |
DeleteDefConfigAt(0); |
| 231 |
} |
| 232 |
} |
| 233 |
//--------------------------------------------------------------------------- |
| 234 |
/** |
| 235 |
* DefFilesPathのフォルダから定義ファイルを探す |
| 236 |
* 探したファイルはnewしてリストに加える |
| 237 |
*/ |
| 238 |
void |
| 239 |
KCopalConfig::SearchDefFiles(void) { |
| 240 |
//DEFファイルを検索する |
| 241 |
TStringList *st1= new TStringList; |
| 242 |
|
| 243 |
//もしdefフォルダが無ければ作成 |
| 244 |
if(!FileExists(DefFilesPath)) { |
| 245 |
CreateDir(DefFilesPath); |
| 246 |
} |
| 247 |
|
| 248 |
TSearchRec sr; |
| 249 |
if(FindFirst(DefFilesPath+"*.def", faAnyFile, sr)==0) { |
| 250 |
KDefConfig *dc = new KDefConfig(DefFilesPath + sr.Name); |
| 251 |
AddDefConfig(dc); |
| 252 |
while(FindNext(sr)==0) { |
| 253 |
dc = new KDefConfig(DefFilesPath + sr.Name); |
| 254 |
AddDefConfig(dc); |
| 255 |
} |
| 256 |
FindClose(sr); |
| 257 |
} |
| 258 |
delete st1; |
| 259 |
|
| 260 |
//もし定義ファイルが無ければ、デフォルトのファイルを作成する |
| 261 |
if(GetDefConfigCount()==0) { |
| 262 |
ShowMessage("Def Files are not found. Use default Settings."); |
| 263 |
KDefConfig *dc = new KDefConfig(DefFilesPath + "perl.def"); |
| 264 |
AddDefConfig(dc); |
| 265 |
} |
| 266 |
|
| 267 |
//念のため、CurrentLanguageを指定しておく |
| 268 |
ChangeLanguage(GetDefConfigAt(0)); |
| 269 |
} |
| 270 |
//--------------------------------------------------------------------------- |
| 271 |
/** |
| 272 |
* 現在指定されている言語を変更する |
| 273 |
*/ |
| 274 |
void |
| 275 |
KCopalConfig::ChangeLanguage(KDefConfig *df) { |
| 276 |
CurrentLanguage = df; |
| 277 |
} |
| 278 |
//--------------------------------------------------------------------------- |
| 279 |
bool |
| 280 |
isDirectoryExists(LPCTSTR filename) { |
| 281 |
WIN32_FIND_DATA ffd; |
| 282 |
|
| 283 |
// 指定されたファイル名と一致するファイルを検索 |
| 284 |
HANDLE hFindFile = FindFirstFile(filename, &ffd); |
| 285 |
|
| 286 |
// ファイルハンドルが無効 |
| 287 |
if (hFindFile != INVALID_HANDLE_VALUE) { |
| 288 |
// 検索ハンドルをクローズ |
| 289 |
// (hFindFile が INVALID_HANDLE_VALUE ならハンドルをクローズ |
| 290 |
// する必要はない。) |
| 291 |
FindClose(hFindFile); |
| 292 |
|
| 293 |
// ディレクトリかどうかをチェック |
| 294 |
if (ffd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) { |
| 295 |
return TRUE; |
| 296 |
} |
| 297 |
} |
| 298 |
return false; |
| 299 |
} |
| 300 |
//--------------------------------------------------------------------------- |
| 301 |
/** |
| 302 |
* 実行可能かチェック |
| 303 |
*/ |
| 304 |
bool |
| 305 |
KCopalConfig::CheckPath(void) { |
| 306 |
|
| 307 |
// 実行可能ファイルがあるかチェック |
| 308 |
|
| 309 |
if(!FileExists(GetExePath())) { |
| 310 |
ShowMessage("File "+ GetExePath() +" is not found."); |
| 311 |
return false; |
| 312 |
} |
| 313 |
|
| 314 |
//実行用ディレクトリがあるかチェック |
| 315 |
|
| 316 |
AnsiString Dir = ExtractFileDir(GetTempFile()); |
| 317 |
|
| 318 |
if(!isDirectoryExists(Dir.c_str())) { |
| 319 |
ShowMessage("Temp Directory "+ Dir +" is not found."); |
| 320 |
return false; |
| 321 |
} |
| 322 |
return true; |
| 323 |
} |
| 324 |
//--------------------------------------------------------------------------- |
| 325 |
/** |
| 326 |
* 名前から言語情報へのポインタを得る |
| 327 |
*/ |
| 328 |
void |
| 329 |
KCopalConfig::SearchByName(AnsiString LangName) { |
| 330 |
for(int i=0;i<GetDefConfigCount();i++) { |
| 331 |
KDefConfig *df = GetDefConfigAt(i); |
| 332 |
if(df->LangName.LowerCase()==LangName.LowerCase()) { |
| 333 |
ChangeLanguage(df); |
| 334 |
return; |
| 335 |
} |
| 336 |
} |
| 337 |
} |
| 338 |
//--------------------------------------------------------------------------- |
| 339 |
/** |
| 340 |
* ファイルフィルターの作成 |
| 341 |
*/ |
| 342 |
AnsiString |
| 343 |
KCopalConfig::GetFileFilter(void) { |
| 344 |
TStringList *st1 = new TStringList; |
| 345 |
st1->CommaText = CurrentLanguage->LangExt; |
| 346 |
|
| 347 |
AnsiString as1 = CurrentLanguage->LangName + " Files("; |
| 348 |
for(int i=0;i<st1->Count;i++) { |
| 349 |
if(i!=0) |
| 350 |
as1+=","; |
| 351 |
as1+="*."; |
| 352 |
as1+=st1->Strings[i]; |
| 353 |
} |
| 354 |
as1+=")|"; |
| 355 |
for(int i=0;i<st1->Count;i++) { |
| 356 |
if(i!=0) |
| 357 |
as1+=";"; |
| 358 |
as1+="*."; |
| 359 |
as1+=st1->Strings[i]; |
| 360 |
} |
| 361 |
as1+= "|All Files(*.*)|*.*"; |
| 362 |
delete st1; |
| 363 |
return as1; |
| 364 |
} |
| 365 |
//--------------------------------------------------------------------------- |
| 366 |
/** |
| 367 |
* 拡張子から言語を得る |
| 368 |
*/ |
| 369 |
bool |
| 370 |
KCopalConfig::SearchByExt(AnsiString FileName) { |
| 371 |
AnsiString Ext = ExtractFileExt(FileName).Trim(); |
| 372 |
|
| 373 |
if(CurrentLanguage->Contains(Ext)){ |
| 374 |
return true; |
| 375 |
} |
| 376 |
|
| 377 |
for(int i=0;i<GetDefConfigCount();i++) { |
| 378 |
KDefConfig *df = GetDefConfigAt(i); |
| 379 |
if(df->Contains(Ext)){ |
| 380 |
ChangeLanguage(df); |
| 381 |
return true; |
| 382 |
} |
| 383 |
} |
| 384 |
return false; |
| 385 |
} |
| 386 |
//--------------------------------------------------------------------------- |
| 387 |
/** |
| 388 |
* 同じ言語が登録されてないかチェック |
| 389 |
*/ |
| 390 |
bool |
| 391 |
KCopalConfig::LanguageExists(AnsiString LangName){ |
| 392 |
for(int i=0;i<GetDefConfigCount();i++) { |
| 393 |
KDefConfig *df = GetDefConfigAt(i); |
| 394 |
if(df->LangName.Trim().LowerCase()==LangName.Trim().LowerCase()) { |
| 395 |
return true; |
| 396 |
} |
| 397 |
} |
| 398 |
return false; |
| 399 |
} |
| 400 |
//--------------------------------------------------------------------------- |
| 401 |
/** |
| 402 |
* |
| 403 |
*/ |
| 404 |
void |
| 405 |
KCopalConfig::SetTabWidth(int _TabWidth){ |
| 406 |
TabWidth = _TabWidth; |
| 407 |
FScript->SetTabWidth(this,TabWidth); |
| 408 |
} |
| 409 |
//--------------------------------------------------------------------------- |
| 410 |
/** |
| 411 |
* タブ幅を設定する。フォントが設定された後で呼ぶこと |
| 412 |
*/ |
| 413 |
void |
| 414 |
KCopalConfig::SetTabWidthToRichEdit(TRichEdit *re, int w){ |
| 415 |
PARAFORMAT f; |
| 416 |
int tabtwips = re->Font->Size * w * 120 / 11; |
| 417 |
f.cbSize = sizeof(PARAFORMAT); |
| 418 |
f.dwMask = PFM_TABSTOPS; |
| 419 |
f.cTabCount = MAX_TAB_STOPS; |
| 420 |
for(int i = 0;i < f.cTabCount;i++){ |
| 421 |
f.rgxTabs[i] = (i + 1) * tabtwips; |
| 422 |
} |
| 423 |
re->Perform(EM_SETPARAFORMAT,(WPARAM)0,(LPARAM)&f); |
| 424 |
re->Invalidate(); |
| 425 |
} |
| 426 |
//--------------------------------------------------------------------------- |
| 427 |
// インタフェース |
| 428 |
//--------------------------------------------------------------------------- |
| 429 |
/** |
| 430 |
* テンポラリファイル名を返す |
| 431 |
*/ |
| 432 |
AnsiString |
| 433 |
KCopalConfig::GetTempFile(void) { |
| 434 |
if(CurrentLanguage->TempDir=="") { |
| 435 |
return DefaultPath + CurrentLanguage->TempFile; |
| 436 |
} else { |
| 437 |
return CurrentLanguage->TempDir + "\\"+CurrentLanguage->TempFile; |
| 438 |
} |
| 439 |
} |
| 440 |
//--------------------------------------------------------------------------- |
| 441 |
void |
| 442 |
KCopalConfig::SetHotKey(TShortCut _HotKey) { |
| 443 |
|
| 444 |
ATOM HotKeyID = GlobalFindAtom(HotKeyIDStr); |
| 445 |
|
| 446 |
if(HotKeyID == 0) { |
| 447 |
HotKeyID = GlobalAddAtom(HotKeyIDStr); |
| 448 |
} |
| 449 |
|
| 450 |
UINT mod = 0, key = 0; |
| 451 |
TShiftState ss; |
| 452 |
ShortCutToKey(_HotKey,(unsigned short&)key,ss); |
| 453 |
//修飾キーの設定 |
| 454 |
if (ss.Contains(ssShift)){ |
| 455 |
mod += MOD_SHIFT; |
| 456 |
} |
| 457 |
if (ss.Contains(ssCtrl)) { |
| 458 |
mod += MOD_CONTROL; |
| 459 |
} |
| 460 |
if (ss.Contains(ssAlt)) { |
| 461 |
mod += MOD_ALT; |
| 462 |
} |
| 463 |
RegisterHotKey(FMain->Handle,(int)HotKeyID,mod,key); |
| 464 |
} |
| 465 |
//--------------------------------------------------------------------------- |
| 466 |
/** |
| 467 |
* ホットキーを削除する |
| 468 |
*/ |
| 469 |
void |
| 470 |
KCopalConfig::UnsetHotKey(void){ |
| 471 |
ATOM HotKeyID = GlobalFindAtom(HotKeyIDStr); |
| 472 |
if(HotKeyID == 0) { //ホットキーは登録されていない |
| 473 |
return; |
| 474 |
} |
| 475 |
UnregisterHotKey(FMain->Handle,(int)HotKeyID); |
| 476 |
GlobalDeleteAtom(HotKeyID); |
| 477 |
} |
| 478 |
//--------------------------------------------------------------------------- |
| 479 |
/** |
| 480 |
* ホットキー情報を変更 |
| 481 |
*/ |
| 482 |
void |
| 483 |
KCopalConfig::ChangeHotKey(bool _UseHotKey, TShortCut _HotKey) { |
| 484 |
bUseHotKey = _UseHotKey; |
| 485 |
HotKey = _HotKey; |
| 486 |
if(bUseHotKey) { |
| 487 |
SetHotKey(HotKey); |
| 488 |
} else { |
| 489 |
UnsetHotKey(); |
| 490 |
} |
| 491 |
} |
| 492 |
//--------------------------------------------------------------------------- |
| 493 |
/** |
| 494 |
* 編集禁止を変更 |
| 495 |
*/ |
| 496 |
void |
| 497 |
KCopalConfig::SetReadOnly(bool b) { |
| 498 |
ReadOnly = b; |
| 499 |
FScript->SetReadOnly(b); |
| 500 |
} |
| 501 |
//--------------------------------------------------------------------------- |
| 502 |
/** |
| 503 |
* 文字コードモードを返す |
| 504 |
*/ |
| 505 |
int |
| 506 |
KCopalConfig::GetCodeMode(void){ |
| 507 |
return DefaultCode; |
| 508 |
} |
| 509 |
//--------------------------------------------------------------------------- |
| 510 |
/** |
| 511 |
* 文字コードモードを設定する |
| 512 |
*/ |
| 513 |
void |
| 514 |
KCopalConfig::SetCodeMode(int _CodeMode){ |
| 515 |
DefaultCode = _CodeMode; |
| 516 |
FScript->SetCode(DefaultCode); |
| 517 |
} |
| 518 |
//--------------------------------------------------------------------------- |
| 519 |
/** |
| 520 |
* 文字コードを表示する文字列を返す |
| 521 |
*/ |
| 522 |
char * |
| 523 |
KCopalConfig::GetCodeStr(void) { |
| 524 |
return KCodeConv::GetCodeChar(DefaultCode); |
| 525 |
} |
| 526 |
//--------------------------------------------------------------------------- |
| 527 |
|