FGX.Messaging.TfgMessageSender: различия между версиями
Перейти к навигации
Перейти к поиску
Admin (обсуждение | вклад) (summary) |
Admin (обсуждение | вклад) (summary) |
||
Строка 14: | Строка 14: | ||
<p>Class to allow sending message notifications to a TObject <i>Receiver</i> .</p> | <p>Class to allow sending message notifications to a TObject <i>Receiver</i> .</p> | ||
+ | |||
+ | == Методы == | ||
+ | |||
+ | {| class="wikitable sortable" | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">HasReceiver(): [[Boolean]]</code> | ||
+ | <p>Returns whether <i>TMessageSender</i> has a Receiver or not.</p> | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">SendMessage(const AMessageID: [[Word]])</code> | ||
+ | <p>Sends a message to an object.</p> | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">SendMessage(const AMessageID: [[Word]]; const AValue: [[T]])</code> | ||
+ | <p>Sends a message with value to an object.</p> | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">SendMessageWithResult(const AMessageID: [[Word]]; var AValue: [[T]])</code> | ||
+ | <p>Sends a message with value to an object and allows to get result from <i>Receiver</i> .</p> | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">DisableNotify()</code> | ||
+ | <p>Disables <i>TMessageSender</i> from sending messages.</p> | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">EnableNotify()</code> | ||
+ | |||
+ | <p>Enables <i>TMessageSender</i> to send messages. Use CanNotify to check whether TMessageSender can send messages.</p><div class="info">The model reads quantity of calls of <i>DisableNotify</i> . So all calls of <i>DisableNotify</i> and <i>EnableNotify</i> shall be pairs.</div> | ||
+ | |- | ||
+ | | <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">CanNotify(): [[Boolean]]</code> | ||
+ | <p>Returns whether <i>TMessageSender</i> can send messages.</p> | ||
+ | |} |
Версия 02:46, 13 июня 2019
Delphi
TfgMessageSender = class (TfgPersistent)
TPersistent -> TfgPersistent -> TfgMessageSender
Прямые наследники: TfgNativeControlHandle
Описание
Class to allow sending message notifications to a TObject Receiver .
Методы
function
|
HasReceiver(): Boolean
Returns whether TMessageSender has a Receiver or not. |
procedure
|
SendMessage(const AMessageID: Word)
Sends a message to an object. |
procedure
|
SendMessage(const AMessageID: Word; const AValue: T)
Sends a message with value to an object. |
procedure
|
SendMessageWithResult(const AMessageID: Word; var AValue: T)
Sends a message with value to an object and allows to get result from Receiver . |
procedure
|
DisableNotify()
Disables TMessageSender from sending messages. |
procedure
|
EnableNotify()
Enables TMessageSender to send messages. Use CanNotify to check whether TMessageSender can send messages. The model reads quantity of calls of DisableNotify . So all calls of DisableNotify and EnableNotify shall be pairs.
|
function
|
CanNotify(): Boolean
Returns whether TMessageSender can send messages. |