Closed mfs12 closed 1 year ago
definition of the messageBox object in the object model:
{ "axisControls", OBJECT_MODEL_FUNC_IF(self->mode == 2 || self->mode == 3, (int32_t)self->controls.GetRaw()), ObjectModelEntryFlags::important },
{ "cancelButton", OBJECT_MODEL_FUNC(self->limits.canCancel), ObjectModelEntryFlags::important },
{ "choices", OBJECT_MODEL_FUNC_IF(self->mode == 4, self->limits.choices), ObjectModelEntryFlags::important },
{ "default", OBJECT_MODEL_FUNC_IF(self->mode >= 4, self->limits.defaultVal), ObjectModelEntryFlags::important },
{ "max", OBJECT_MODEL_FUNC_IF(self->mode >= 5, self->limits.maxVal), ObjectModelEntryFlags::important },
{ "message", OBJECT_MODEL_FUNC(self->message.c_str()), ObjectModelEntryFlags::important },
{ "min", OBJECT_MODEL_FUNC_IF(self->mode >= 5, self->limits.minVal), ObjectModelEntryFlags::important },
{ "mode", OBJECT_MODEL_FUNC((int32_t)self->mode), ObjectModelEntryFlags::important },
{ "seq", OBJECT_MODEL_FUNC((int32_t)self->seq), ObjectModelEntryFlags::important },
{ "timeout", OBJECT_MODEL_FUNC((int32_t)self->timeout), ObjectModelEntryFlags::important },
{ "title", OBJECT_MODEL_FUNC(self->title.c_str()), ObjectModelEntryFlags::important }
@dc42 wrote:
The cancelButton, choices, default, min and max fields are new in 3.5. The mode field can take new values in 3.5. See M291 in the GCodes wiki for the new mode values and the values of the new fields.
@dc42 what is the max number of choices? which string length shall each have?
@dc42 is there a max length of strings to enter? if so what is it?
The only limits currently are:
I suggest you define and we document a maximum length of each string and a maximum number of choices that can be displayed on PanelDue. This number could be lower on the 4.3" display than on the 5" and 7". Longer strings should be truncated, which the text writing functions on PanelDue do anyway.
well just wondering... with all the statically allocated memory perhaps i should check overall memory consumption. In general i would suggest a limit of 32 including terminating 0 as decent limit for choices.
That sounds reasonable. What length text will fit on the 800x480 screen of the 5" and 7" displays?
Description
Description
Refer to
implement new message box modes and parameters.
new message box modes
new message box parameters