Difference between revisions of "LCL Messages/ja"

From Free Pascal wiki
Jump to navigationJump to search
m
 
m
Line 1: Line 1:
{{LCL Messages/ja}}
+
{{LCL Messages}}
  
'''This document is for Lazarus developers'''
+
{{Japanese Menu}}
  
 
Thumb rules:
 
Thumb rules:
  
Messages exists for VCL compatibility.
+
メッセージはVCLとの互換性のために存在します。
Messages look like win32 messages, but only those parameters and flags are
+
メッセージはwin32メッセージのように見えますが、パラメータとフラグをサポートしているにすぎません。
supported, that are commonly used by existing VCL controls (including third
+
それらは、サードパーティ製のものも含めて、既存のVCLコントロールに共通的に使われているからです。
part controls).
+
 
Every supported flag, that is not commonly used, makes implementing the
+
共通的に使われていない、独自に利用するフラグは、インターフェースの実装を難しくします。
interfaces more difficult. So, think twice, before adding a message.
+
つまり、メッセージを追加する前に十分な思慮が必要です。
Many messages uses hard to read constants and small values (smallint) which
+
 
limits the interfaces and windows does not define the exact ordering of
+
多くのメッセージは、読みにくい定数と、ちょっとした値を使い、インターフェースに用いられます。
messages. Therefore the goal is that every message can be substituted by a
+
Windowsはメッセージの順序を正確に決めることはありません。
method. For example: A control can use DoOnChangeBounds instead of WMSize to
+
(訳注:たとえば、Windows95系(95/98/ME)とNT系(NT,2000,XP)ではメッセージの順序や発生するかどうか自体も異なるものがある。互換性はともかく、WindowsはGUIについては複雑で大変混乱して作っているようである。そのOSの混乱をアプリケーションが収拾しないといけない「おまじない」を入れなくてはいけないことが時々ある。)
react.
+
 
 +
ですから、Lazarusが目標とすることは、すべてのメッセージを、メソッドに置き換えることです。
 +
たとえば、コントロールはサイズを変更するにあたって、WMSizeのかわりに、DoOnChangeBoundsを使うことができます。
 +
 
 +
現在、LCLがメッセージをインターフェースに送るのは、たいへんまれなケースのみです。
 +
事実として、VCLの共通な利用のみで使っているくらいです。
  
The LCL should send messages to the interface only in rare cases. In fact, only
 
when it is common usage in VCL controls.
 
  
 
At the moment the interfaces send many messages to the LCL. This amount should
 
At the moment the interfaces send many messages to the LCL. This amount should

Revision as of 03:11, 30 July 2006

English (en) | 日本語 (ja) | slovenčina (sk)

日本語版メニュー
メインページ - Lazarus Documentation日本語版 - 翻訳ノート - 日本語障害情報

Thumb rules:

メッセージはVCLとの互換性のために存在します。 メッセージはwin32メッセージのように見えますが、パラメータとフラグをサポートしているにすぎません。 それらは、サードパーティ製のものも含めて、既存のVCLコントロールに共通的に使われているからです。

共通的に使われていない、独自に利用するフラグは、インターフェースの実装を難しくします。 つまり、メッセージを追加する前に十分な思慮が必要です。

多くのメッセージは、読みにくい定数と、ちょっとした値を使い、インターフェースに用いられます。 Windowsはメッセージの順序を正確に決めることはありません。 (訳注:たとえば、Windows95系(95/98/ME)とNT系(NT,2000,XP)ではメッセージの順序や発生するかどうか自体も異なるものがある。互換性はともかく、WindowsはGUIについては複雑で大変混乱して作っているようである。そのOSの混乱をアプリケーションが収拾しないといけない「おまじない」を入れなくてはいけないことが時々ある。)

ですから、Lazarusが目標とすることは、すべてのメッセージを、メソッドに置き換えることです。 たとえば、コントロールはサイズを変更するにあたって、WMSizeのかわりに、DoOnChangeBoundsを使うことができます。

現在、LCLがメッセージをインターフェースに送るのは、たいへんまれなケースのみです。 事実として、VCLの共通な利用のみで使っているくらいです。


At the moment the interfaces send many messages to the LCL. This amount should be reduced in future. Better create a procedure in the LCL, that will send the message. This way the parameters are well defined and all interfaces creates the messages the same way.


The messages:

Interface -> LCL -> WMSize, WMMove
Send from the interface to tell the LCL control to update its bounds. Because of the auto aligning/sizing features of the LCL and some interfaces, these messages are not sent everytime a HandleObject is resized. So, either trust the LCL bounds OR the interface bounds, but don't mix.