Sign in Join
Wiki copytemporary

Extending the IDE/ja: what changed

Revision 1 to 2. 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+
116# IDEを拡張する
217
318## 概要
419
5-IDEはいくつかのプラグインをサポートしています。
20+IDEはいくつかのプラグインをサポートしています。
621
7-コンポーネント
8-コンポーネントパレット上にアイコンとして現れます。と問えば、TButtonはボタンを作るのに使われます。
22+コンポーネント
23+ コンポーネントパレット上にアイコンとして現れます。と問えば、TButtonはボタンを作るのに使われます。
924
10-コンポーネントエディタ
11-コンポーネントエディタはコンポーネントを設計時にダブルクリックしたり、設計時にコンポーネント上で右クリックで表示されるポップアップメニューにいくつかの項目を追加するときに使われます。
25+コンポーネントエディタ
26+ コンポーネントエディタはコンポーネントを設計時にダブルクリックしたり、設計時にコンポーネント上で右クリックで表示されるポップアップメニューにいくつかの項目を追加するときに使われます。
1227
13-プロパティエディタ
14-オブジェクトインスペクタの行で使われます。
28+プロパティエディタ
29+ オブジェクトインスペクタの行で使われます。
1530
16-エキスパート
17-その他の全てです。
31+エキスパート
32+ その他の全てです。
1833
19-Lazarusに独自のプラグインを追加するには、2つの方法があります。
34+
35+Lazarusに独自のプラグインを追加するには、2つの方法があります。
2036
21-1. パッケージを書く方法, 自分でプラグインを書いて、そのユニットの'Register'手続きを使います。
37+ 1. パッケージを書く方法, 自分でプラグインを書いて、そのユニットの'Register'手続きを使います。
2238
23-1. Lazarusのコードを拡張して、差分をlazarusのメーリングリストへ送る方法。
39+ 1. Lazarusのコードを拡張して、差分をlazarusのメーリングリストへ送る方法。
2440
2541## コンポーネントを作成する
2642
27-ToDo Hint: Create a new component via the package editor.
43+ToDo Hint: Create a new component via the package editor.
2844
2945## コンポーネントエディタを作成する
3046
31-ToDo Hint: see componenteditors.pas for examples
47+ToDo Hint: see componenteditors.pas for examples
3248
3349## プロパティエディタを作成する
3450
35-ToDo Hint: see propedits.pp for examples
51+ToDo Hint: see propedits.pp for examples
3652
3753## イベントハンドラを登録する
3854
39-IDEにはいくつかのイベントがあり、それに対してプラグインは独自のハンドラを追加することができます。propedits.pp で、"GlobalDesignHook"オブジェクトがあります。これは、設計時のイベントを管理します。各々のイベントはハンドラーのリストを呼び出します。デフォルトのハンドラーはIDEから追加されています。あなたは独自のハンドラを、AddHandlerXXXやRemoveHandlerXXX手続きを使って登録できます。それらは、デフォルトのハンドラの前に呼び出されます。
55+IDEにはいくつかのイベントがあり、それに対してプラグインは独自のハンドラを追加することができます。propedits.pp で、"GlobalDesignHook"オブジェクトがあります。これは、設計時のイベントを管理します。各々のイベントはハンドラーのリストを呼び出します。デフォルトのハンドラーはIDEから追加されています。あなたは独自のハンドラを、AddHandlerXXXやRemoveHandlerXXX手続きを使って登録できます。それらは、デフォルトのハンドラの前に呼び出されます。
4056
41-例:
57+例:
58+```
59+独自のハンドラを追加します。(通常、あなたが作成したオブジェクトのコンストラクタでおこないます。):
60+ GlobalDesignHook.AddHandlerComponentAdded(@YourOnComponentAdded);
61+```
62+```
63+独自のハンドラを取り除きます:
64+ GlobalDesignHook.RemoveHandlerComponentAdded(@YourOnComponentAdded);
65+```
66+```
67+すべてのハンドラを一度に削除することもできます。たとえば、次の行をオブジェクトのデストラクタに追加するのも良いでしょう。:
68+ GlobalDesignHook.RemoveAllHandlersForObject(Self);
69+```
4270
43-` 独自のハンドラを追加します。(通常、あなたが作成したオブジェクトのコンストラクタでおこないます。):`\
44-`   GlobalDesignHook.AddHandlerComponentAdded(@YourOnComponentAdded);`\
45-\
46-` 独自のハンドラを取り除きます:`\
47-`   GlobalDesignHook.RemoveHandlerComponentAdded(@YourOnComponentAdded);`\
48-\
49-` すべてのハンドラを一度に削除することもできます。たとえば、次の行をオブジェクトのデストラクタに追加するのも良いでしょう。:`\
50-`   GlobalDesignHook.RemoveAllHandlersForObject(Self);`
71+GlobalDesignHookのハンドラです:
5172
52-GlobalDesignHookのハンドラです:
73+
5374
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`
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+```
92119
93120## ソースのヘルプを追加する
94121
95-THelpDatabaseを最初に作りましょう:
96-
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);`
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+```
109138
110139## 最初の製作者と変更
111140
112-This page has been converted from the epikwiki [version](http://lazarus-ccr.sourceforge.net/index.php?wiki=ExtendingTheIde).
141+This page has been converted from the epikwiki [version](<http://lazarus-ccr.sourceforge.net/index.php?wiki=ExtendingTheIde>).
113142
114-This document was authored by Mattias Gaertner Initial import and formatted for Lazarus-CCR - VlxAdmin 9/26/2003
143+This document was authored by Mattias Gaertner Initial import and formatted for Lazarus-CCR - [ VlxAdmin](</User:Tom> "User:Tom") 9/26/2003
115144
116145---
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).*
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).*

Back to history