Data Fields

IS_BTN Struct Reference

BuTtoN. More...

#include <ispackets.h>

Data Fields

byte Size
 12 + TEXT_SIZE (a multiple of 4)
byte Type
 ISP_BTN
byte ReqI
 non-zero (returned in IS_BTC and IS_BTT packets)
byte UCID
 connection to display the button (0 = local / 255 = all)
byte ClickID
 button ID (0 to 239)
byte Inst
 some extra flags
byte BStyle
 button style flags
byte TypeIn
 max chars to type in
byte L
 left : 0 - 200
byte T
 top : 0 - 200
byte W
 width : 0 - 200
byte H
 height : 0 - 200
char Text [TEXT_SIZE]
 0 to 240 characters of text

Detailed Description

BuTtoN.

button header - followed by 0 to 240 characters

ClickID byte : this value is returned in IS_BTC and IS_BTT packets.

TypeIn byte : if set, the user can click this button to type in text.

Text : 65-66-67-0 would display button text "ABC" and no caption

Text : 0-65-66-67-0-68-69-70-71-0-0-0 would display button text "DEFG" and caption "ABC"

Inst byte : mainly used internally by InSim but also provides some extra user flags

NOTE :
If width or height are zero, this would normally be an invalid button. But in that case if there is an existing button with the same ClickID, all the packet contents are ignored except the Text field. This can be useful for updating the text in a button without knowing its position. For example, you might reply to an IS_BTT using an IS_BTN with zero W and H to update the text.

Definition at line 2441 of file ispackets.h.


Field Documentation

12 + TEXT_SIZE (a multiple of 4)

Definition at line 2443 of file ispackets.h.

ISP_BTN

Definition at line 2444 of file ispackets.h.

non-zero (returned in IS_BTC and IS_BTT packets)

Definition at line 2445 of file ispackets.h.

connection to display the button (0 = local / 255 = all)

Definition at line 2446 of file ispackets.h.

button ID (0 to 239)

Definition at line 2448 of file ispackets.h.

some extra flags

Definition at line 2449 of file ispackets.h.

button style flags

Definition at line 2450 of file ispackets.h.

max chars to type in

Lowest 7 bits are the maximum number of characters to type in (0 to 95)
Highest bit (128) can be set to initialise dialog with the button's text

Definition at line 2455 of file ispackets.h.

byte IS_BTN::L

left : 0 - 200

Definition at line 2456 of file ispackets.h.

byte IS_BTN::T

top : 0 - 200

Definition at line 2457 of file ispackets.h.

byte IS_BTN::W

width : 0 - 200

Definition at line 2458 of file ispackets.h.

byte IS_BTN::H

height : 0 - 200

Definition at line 2459 of file ispackets.h.

char IS_BTN::Text[TEXT_SIZE]

0 to 240 characters of text

Definition at line 2461 of file ispackets.h.


The documentation for this struct was generated from the following file:
 All Data Structures Files Variables Enumerator Defines