FGX.Messaging.TfgMessageSender: различия между версиями

Материал из FGX Native Докуметации
Перейти к навигации Перейти к поиску
(summary)
(summary)
 
(не показано 26 промежуточных версий этого же участника)
Строка 1: Строка 1:
* [[ FGX.Messaging | Вверх к родителю: FGX.Messaging ]]
+
* [[ FGX.Types.TfgPersistent | Вверх к родителю: TfgPersistent ]]
 +
* [[ FGX.Messaging | К модулю: FGX.Messaging ]]
  
 
Delphi
 
Delphi
  
<code lang="Delphi">TfgMessageSender = class (TfgPersistent)</code>
+
<syntaxhighlight lang="Delphi">TfgMessageSender = class (TfgPersistent)</syntaxhighlight>
 +
 
 +
<p class="class-inheritance"><span class="type-border">[[System.Classes.TPersistent|TPersistent]]</span> -> <span class="type-border">[[FGX.Types.TfgPersistent|TfgPersistent]]</span> -> <span class="type-border">[[FGX.Messaging.TfgMessageSender|TfgMessageSender]]</span></p>
 +
 
 +
Прямые наследники:
 +
[[FGX.Controls.Factory.TfgNativeControlHandle|TfgNativeControlHandle]]
  
 
== Описание ==
 
== Описание ==
  
Class to allow sending message notifications to a TObject '' Receiver '' .
+
<p>Class to allow sending message notifications to a TObject <i>Receiver</i> .</p>
 
 
 
== Методы ==
 
== Методы ==
  
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|-
 
|-
| <code lang="Delphi">function</code> || <code lang="Delphi">HasReceiver()</code>
+
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">HasReceiver(): [[Boolean]]</code>
Returns whether '' TMessageSender '' has a Receiver or not.
+
<p>Returns whether <i>TMessageSender</i> has a Receiver or not.</p>
 
|-
 
|-
| <code lang="Delphi">procedure</code> || <code lang="Delphi">SendMessage(const AMessageID: [[Word]])</code>
+
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">SendMessage(const AMessageID: [[Word]])</code>
Sends a message to an object.
+
<p>Sends a message to an object.</p>
 
|-
 
|-
| <code lang="Delphi">procedure</code> || <code lang="Delphi">SendMessage(const AMessageID: [[Word]]; const AValue: [[T]])</code>
+
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">SendMessage(const AMessageID: [[Word]]; const AValue: [[T]])</code>
Sends a message with value to an object.
+
<p>Sends a message with value to an object.</p>
 
|-
 
|-
| <code lang="Delphi">procedure</code> || <code lang="Delphi">SendMessageWithResult(const AMessageID: [[Word]]; var AValue: [[T]])</code>
+
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">SendMessageWithResult(const AMessageID: [[Word]]; var AValue: [[T]])</code>
Sends a message with value to an object and allows to get result from '' Receiver '' .
+
<p>Sends a message with value to an object and allows to get result from <i>Receiver</i> .</p>
 
|-
 
|-
| <code lang="Delphi">procedure</code> || <code lang="Delphi">DisableNotify()</code>
+
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">DisableNotify()</code>
Disables '' TMessageSender '' from sending messages.
+
<p>Disables <i>TMessageSender</i> from sending messages.</p>
 
|-
 
|-
| <code lang="Delphi">procedure</code> || <code lang="Delphi">EnableNotify()</code>
+
| <syntaxhighlight lang="Delphi">procedure</syntaxhighlight> || <code lang="Delphi">EnableNotify()</code>
Enables '' TMessageSender '' to send messages. Use CanNotify to check whether TMessageSender can send messages.
+
 
 +
<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>
 
|-
 
|-
| <code lang="Delphi">function</code> || <code lang="Delphi">CanNotify()</code>
+
| <syntaxhighlight lang="Delphi">function</syntaxhighlight> || <code lang="Delphi">CanNotify(): [[Boolean]]</code>
Returns whether '' TMessageSender '' can send messages.
+
<p>Returns whether <i>TMessageSender</i> can send messages.</p>
 
|}
 
|}
  
Строка 39: Строка 45:
 
{| class="wikitable sortable"
 
{| class="wikitable sortable"
 
|-
 
|-
| <code>property</code> || <code>Receiver: [[TObject]]</code>
+
| <syntaxhighlight lang="Delphi">property</syntaxhighlight> || <code>Receiver: [[TObject]]</code>
Returns the object that receives the message.
+
<p>Returns the object that receives the message.</p>
 
|}
 
|}

Текущая версия на 03:59, 19 ноября 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.

Свойства

property
Receiver: TObject

Returns the object that receives the message.