Sign in Join
Wiki copytemporary

Extending the IDE/ja: what changed

Revision 2 to 3. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-**日本語版メニュー**
2----
3-[[Main Page/ja|メインページ]] \- [[Lazarus Documentation/ja|Lazarus Documentation日本語版]] \- [[Japanese Localization Notes|翻訳ノート]] \- [[Bug Tracking/ja|日本語障害情報]]
4-
5-## Contents
6-
7- * 1 IDEを拡張する
8- * 1.1 概要
9- * 1.2 コンポーネントを作成する
10- * 1.3 コンポーネントエディタを作成する
11- * 1.4 プロパティエディタを作成する
12- * 1.5 イベントハンドラを登録する
13- * 1.6 ソースのヘルプを追加する
14- * 1.7 最初の製作者と変更
15-
161# IDEを拡張する
172
183## 概要
194
20-IDEはいくつかのプラグインをサポートしています。
5+IDEはいくつかのプラグインをサポートしています。
216
22-コンポーネント
23- コンポーネントパレット上にアイコンとして現れます。と問えば、TButtonはボタンを作るのに使われます。
7+コンポーネント
8+コンポーネントパレット上にアイコンとして現れます。と問えば、TButtonはボタンを作るのに使われます。
249
25-コンポーネントエディタ
26- コンポーネントエディタはコンポーネントを設計時にダブルクリックしたり、設計時にコンポーネント上で右クリックで表示されるポップアップメニューにいくつかの項目を追加するときに使われます。
10+コンポーネントエディタ
11+コンポーネントエディタはコンポーネントを設計時にダブルクリックしたり、設計時にコンポーネント上で右クリックで表示されるポップアップメニューにいくつかの項目を追加するときに使われます。
2712
28-プロパティエディタ
29- オブジェクトインスペクタの行で使われます。
13+プロパティエディタ
14+オブジェクトインスペクタの行で使われます。
3015
31-エキスパート
32- その他の全てです。
16+エキスパート
17+その他の全てです。
3318
34-
35-Lazarusに独自のプラグインを追加するには、2つの方法があります。
19+Lazarusに独自のプラグインを追加するには、2つの方法があります。
3620
37- 1. パッケージを書く方法, 自分でプラグインを書いて、そのユニットの'Register'手続きを使います。
21+1. パッケージを書く方法, 自分でプラグインを書いて、そのユニットの'Register'手続きを使います。
3822
39- 1. Lazarusのコードを拡張して、差分をlazarusのメーリングリストへ送る方法。
23+1. Lazarusのコードを拡張して、差分をlazarusのメーリングリストへ送る方法。
4024
4125## コンポーネントを作成する
4226
43-ToDo Hint: Create a new component via the package editor.
27+ToDo Hint: Create a new component via the package editor.
4428
4529## コンポーネントエディタを作成する
4630
47-ToDo Hint: see componenteditors.pas for examples
31+ToDo Hint: see componenteditors.pas for examples
4832
4933## プロパティエディタを作成する
5034
51-ToDo Hint: see propedits.pp for examples
35+ToDo Hint: see propedits.pp for examples
5236
5337## イベントハンドラを登録する
5438
55-IDEにはいくつかのイベントがあり、それに対してプラグインは独自のハンドラを追加することができます。propedits.pp で、"GlobalDesignHook"オブジェクトがあります。これは、設計時のイベントを管理します。各々のイベントはハンドラーのリストを呼び出します。デフォルトのハンドラーはIDEから追加されています。あなたは独自のハンドラを、AddHandlerXXXやRemoveHandlerXXX手続きを使って登録できます。それらは、デフォルトのハンドラの前に呼び出されます。
39+IDEにはいくつかのイベントがあり、それに対してプラグインは独自のハンドラを追加することができます。propedits.pp で、"GlobalDesignHook"オブジェクトがあります。これは、設計時のイベントを管理します。各々のイベントはハンドラーのリストを呼び出します。デフォルトのハンドラーはIDEから追加されています。あなたは独自のハンドラを、AddHandlerXXXやRemoveHandlerXXX手続きを使って登録できます。それらは、デフォルトのハンドラの前に呼び出されます。
5640
57-例:
58-```
59-独自のハンドラを追加します。(通常、あなたが作成したオブジェクトのコンストラクタでおこないます。):
60- GlobalDesignHook.AddHandlerComponentAdded(@YourOnComponentAdded);
61-```
62-```
63-独自のハンドラを取り除きます:
64- GlobalDesignHook.RemoveHandlerComponentAdded(@YourOnComponentAdded);
65-```
66-```
67-すべてのハンドラを一度に削除することもできます。たとえば、次の行をオブジェクトのデストラクタに追加するのも良いでしょう。:
68- GlobalDesignHook.RemoveAllHandlersForObject(Self);
69-```
41+例:
7042
71-GlobalDesignHookのハンドラです:
43+` 独自のハンドラを追加します。(通常、あなたが作成したオブジェクトのコンストラクタでおこないます。):`\
44+`   GlobalDesignHook.AddHandlerComponentAdded(@YourOnComponentAdded);`\
7245
73-
46+` 独自のハンドラを取り除きます:`\
47+`   GlobalDesignHook.RemoveHandlerComponentAdded(@YourOnComponentAdded);`\
7448
75-```
76-// lookup root
77- ChangeLookupRoot
78- Called when the "LookupRoot" changed.
79- The "LookupRoot" is the owner object of the currently selected components.
80- Normally this is a TForm.
81-
82- // methods
83- CreateMethod
84- GetMethodName
85- GetMethods
86- MethodExists
87- RenameMethod
88- ShowMethod
89- Called
90- MethodFromAncestor
91- ChainCall
92-
93- // components
94- GetComponent
95- GetComponentName
96- GetComponentNames
97- GetRootClassName
98- ComponentRenamed
99- Called when a component was renamed
100- ComponentAdded
101- Called when a new component was added to the LookupRoot
102- ComponentDeleting
103- Called before a component is freed.
104- DeleteComponent
105- Called by the IDE to delete a component.
106- GetSelectedComponents
107- Get the current selection of components.
108-
109- // persistent objects
110- GetObject
111- GetObjectName
112- GetObjectNames
113-
114- // modifing
115- Modified
116- Revert
117- RefreshPropertyValues
118-```
49+` すべてのハンドラを一度に削除することもできます。たとえば、次の行をオブジェクトのデストラクタに追加するのも良いでしょう。:`\
50+`   GlobalDesignHook.RemoveAllHandlersForObject(Self);`
11951
52+GlobalDesignHookのハンドラです:
53+
54+` // lookup root`\
55+` ChangeLookupRoot`\
56+`   Called when the "LookupRoot" changed.`\
57+`   The "LookupRoot" is the owner object of the currently selected components.`\
58+`   Normally this is a TForm.`\
59+`  // methods`\
60+` CreateMethod`\
61+` GetMethodName`\
62+` GetMethods`\
63+` MethodExists`\
64+` RenameMethod`\
65+` ShowMethod`\
66+`   Called`\
67+` MethodFromAncestor`\
68+` ChainCall`\
69+`  // components`\
70+` GetComponent`\
71+` GetComponentName`\
72+` GetComponentNames`\
73+` GetRootClassName`\
74+` ComponentRenamed`\
75+`   Called when a component was renamed`\
76+` ComponentAdded`\
77+`   Called when a new component was added to the LookupRoot`\
78+` ComponentDeleting`\
79+`   Called before a component is freed.`\
80+` DeleteComponent`\
81+`   Called by the IDE to delete a component.`\
82+` GetSelectedComponents`\
83+`   Get the current selection of components.`\
84+`  // persistent objects`\
85+` GetObject`\
86+` GetObjectName`\
87+` GetObjectNames`\
88+`  // modifing`\
89+` Modified`\
90+` Revert`\
91+` RefreshPropertyValues`
92+
12093## ソースのヘルプを追加する
12194
122-THelpDatabaseを最初に作りましょう:
123-```
124-HelpDB:=TFPDocHTMLHelpDatabase(
125- HelpDatabases.CreateHelpDatabase('ANameOfYourChoiceForTheDatabase',
126- TFPDocHTMLHelpDatabase,true));
127- HelpDB.DefaultBaseURL:='<http://your.help.org/'>;
128-```
129-```
130-FPDocNode:=THelpNode.CreateURL(HelpDB,
131- 'Package1 - A new package',
132- 'file://index.html');
133- HelpDB.TOCNode:=THelpNode.Create(HelpDB,FPDocNode);// once as TOC
134- DirectoryItem:=THelpDBISourceDirectory.Create(FPDocNode,'$(PkgDir)/lcl',
135- '*.pp;*.pas',false);// and once as normal page
136- HelpDB.RegisterItem(DirectoryItem);
137-```
95+THelpDatabaseを最初に作りましょう:
13896
97+` HelpDB:=TFPDocHTMLHelpDatabase(`\
98+`    HelpDatabases.CreateHelpDatabase('ANameOfYourChoiceForTheDatabase',`\
99+`                                            TFPDocHTMLHelpDatabase,true));`\
100+` HelpDB.DefaultBaseURL:='`[`http://your.help.org/`](http://your.help.org/)`';`
101+
102+` FPDocNode:=THelpNode.CreateURL(HelpDB,`\
103+`                  'Package1 - A new package',`\
104+`                  '`[`file://index.html`](file://index.html)`');`\
105+` HelpDB.TOCNode:=THelpNode.Create(HelpDB,FPDocNode);// once as TOC`\
106+` DirectoryItem:=THelpDBISourceDirectory.Create(FPDocNode,'$(PkgDir)/lcl',`\
107+`                                 '*.pp;*.pas',false);// and once as normal page`\
108+` HelpDB.RegisterItem(DirectoryItem);`
109+
139110## 最初の製作者と変更
140111
141-This page has been converted from the epikwiki [version](<http://lazarus-ccr.sourceforge.net/index.php?wiki=ExtendingTheIde>).
112+This page has been converted from the epikwiki [version](http://lazarus-ccr.sourceforge.net/index.php?wiki=ExtendingTheIde).
142113
143-This document was authored by Mattias Gaertner Initial import and formatted for Lazarus-CCR - [ VlxAdmin](</User:Tom> "User:Tom") 9/26/2003
114+This document was authored by Mattias Gaertner Initial import and formatted for Lazarus-CCR - VlxAdmin 9/26/2003
144115
145116---
146-*From the Free Pascal wiki, page "Extending the IDE/ja", as the Internet Archive kept it on 2023-03-27. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
117+*From the Free Pascal wiki, page "Extending the IDE/ja", as it stood on 2008-01-06 after a change by Saeka-jp, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*

Back to history