Wimp message information.
More...
#include <wimpmessagelistener.h>
|
enum | SendType { User = 17,
Recorded = 18,
Acknowledge = 19
} |
| Enumeration specifying the type of message to send.
|
|
enum | SpecialDestination { Broadcast = 0,
Iconbar = -2
} |
| Enumeration with special targets for sending messages to.
|
|
|
int * | _message_block |
| pointer to the message data
|
|
bool | _owns_block |
| True if the message data will be deleted when this object is deleted.
|
|
Wimp message information.
◆ WimpMessage() [1/4]
tbx::WimpMessage::WimpMessage |
( |
PollBlock & |
poll_block | ) |
|
Use to refer to a message in an existing wimp poll block.
The poll block is NOT deleted when this class is deleted.
- Parameters
-
poll_block | Wimp poll block that contains a message |
◆ WimpMessage() [2/4]
tbx::WimpMessage::WimpMessage |
( |
int |
message_id, |
|
|
int |
size |
|
) |
| |
Create a new message block for the specified action.
- Parameters
-
message_id | Action the code for the message. |
size | size of the message block in (32 bit) words |
◆ WimpMessage() [3/4]
tbx::WimpMessage::WimpMessage |
( |
const WimpMessage & |
other, |
|
|
int |
size_override = 0 |
|
) |
| |
Create a copy of an existing message.
- Parameters
-
other | message to copy |
size_override | - specify the size of the message. 0 means use the other message size. if greater then the other message size, the extra space is uninitialised. |
◆ WimpMessage() [4/4]
tbx::WimpMessage::WimpMessage |
( |
const WimpMessage & |
other, |
|
|
bool |
copy |
|
) |
| |
Create a reference or copy to another message.
- Parameters
-
other | message to reference/copy |
copy | true to create a copy |
◆ ~WimpMessage()
tbx::WimpMessage::~WimpMessage |
( |
void |
| ) |
|
|
virtual |
Destructor for WimpMessage.
Deletes the message block if it owns it.
◆ message_id()
void tbx::WimpMessage::message_id |
( |
int |
id | ) |
|
|
inline |
Set the message id for the message.
- Parameters
-
◆ my_ref()
void tbx::WimpMessage::my_ref |
( |
int |
ref | ) |
|
|
inline |
Set my reference for the message.
- Parameters
-
◆ operator=()
Assignment creates a copy of an existing message.
- Parameters
-
◆ operator[]() [1/2]
int& tbx::WimpMessage::operator[] |
( |
int |
index | ) |
|
|
inline |
Return reference to message word so it can be updated.
- Parameters
-
index | zero based index of the word in the message block. i.e. 0 is at byte offset 0, 1 is at byte offset 4 etc. |
- Returns
- reference to the 32 bit value at the given index
◆ operator[]() [2/2]
int tbx::WimpMessage::operator[] |
( |
int |
index | ) |
const |
|
inline |
Get message word (integer)
- Parameters
-
index | zero based index of the word in the message block. i.e. 0 is at byte offset 0, 1 is at byte offset 4 etc. |
- Returns
- 32 bit value at the given index
◆ send()
int tbx::WimpMessage::send |
( |
SendType |
type, |
|
|
int |
destination, |
|
|
int |
icon_handle = 0 |
|
) |
| |
Send a message to another application.
On exit sender task handle and my ref fields have been updated.
- Parameters
-
type | type of message (User, Recorded, Acknowledge) |
destination | target for the message. task handle, window handle, -2 for icon bar, 0 for broadcast |
icon_handle | icon handle to send to if destination is -2. |
- Returns
- task handle of the destination.
- Exceptions
-
◆ str() [1/2]
char* tbx::WimpMessage::str |
( |
int |
index | ) |
|
|
inline |
Return char * for part of the message.
- Parameters
-
index | zero based index of the word in the message block where the string starts. i.e. 0 is at byte offset 0, 1 is at byte offset 4 etc. |
- Returns
- char * pointing to the start of the string
◆ str() [2/2]
const char* tbx::WimpMessage::str |
( |
int |
index | ) |
const |
|
inline |
Return char * for part of the message.
- Parameters
-
index | zero based index of the word in the message block where the string starts. i.e. 0 is at byte offset 0, 1 is at byte offset 4 etc. |
- Returns
- char * pointing to the start of the string
◆ word() [1/2]
int& tbx::WimpMessage::word |
( |
int |
index | ) |
|
|
inline |
Return reference to message word so it can be updated.
- Parameters
-
index | zero based index of the word in the message block. i.e. 0 is at byte offset 0, 1 is at byte offset 4 etc. |
- Returns
- reference to the 32 bit value at the given index
◆ word() [2/2]
int tbx::WimpMessage::word |
( |
int |
index | ) |
const |
|
inline |
Get message word (integer)
- Parameters
-
index | zero based index of the word in the message block. i.e. 0 is at byte offset 0, 1 is at byte offset 4 etc. |
- Returns
- 32 bit value at the given index
◆ your_ref()
void tbx::WimpMessage::your_ref |
( |
int |
ref | ) |
|
|
inline |
Set your reference for the message.
- Parameters
-
The documentation for this class was generated from the following files: