public override void BuildBuffer(IntPtr buffer, int offset, ref int strOffset, ref int msgOffset) { base.BuildBuffer(buffer, offset, ref strOffset, ref msgOffset); msgOffset = ObjectTemplate.WriteString(_text, _max_text_len, buffer, offset + WritableFieldTemplateOffset.Text, msgOffset); Marshal.WriteInt32(buffer, offset + WritableFieldTemplateOffset.MaxTextLen, Math.Max(_text.Length + 1, _max_text_len)); msgOffset = ObjectTemplate.WriteString(_allowable, _max_allowable_len, buffer, offset + WritableFieldTemplateOffset.Allowable, msgOffset); Marshal.WriteInt32(buffer, offset + WritableFieldTemplateOffset.MaxAllowableLen, Math.Max(_allowable.Length + 1, _max_allowable_len)); Marshal.WriteInt32(buffer, offset + WritableFieldTemplateOffset.Before, _before); Marshal.WriteInt32(buffer, offset + WritableFieldTemplateOffset.After, _after); }
public override void BuildBuffer(IntPtr buffer, int offset, ref int strOffset, ref int msgOffset) { base.BuildBuffer(buffer, offset, ref strOffset, ref msgOffset); Marshal.WriteInt32(buffer, offset + ButtonTemplateOffset.ButtonFlags, ButtonFlags); msgOffset = ObjectTemplate.WriteString(_text, _max_text_len, buffer, offset + ButtonTemplateOffset.Text, msgOffset); Marshal.WriteInt32(buffer, offset + ButtonTemplateOffset.MaxTextLen, Math.Max(_text.Length + 1, _max_text_len)); strOffset = ObjectTemplate.WriteString(_validation, _max_validation_len, buffer, offset + ButtonTemplateOffset.Validation, strOffset); Marshal.WriteInt32(buffer, offset + ButtonTemplateOffset.MaxValidation, Math.Max(_validation.Length + 1, _max_validation_len)); }
/*! \brief Write the template data into the buffer. * \param [in] buffer Pointer to the buffer to write the template to. * \param [in] offset The offset from the start of the buffer where the gadget * will be written. * \param [in,out] strOffset The offset from the start of the template where the * next string should be written in the string table. Updated after each string * is written. * \param [in,out] msgOffset The offset from the start of the template where the * next string should be written in the message table. Updated after each string * is written. * \return Nothing. */ public virtual void BuildBuffer(IntPtr buffer, int offset, ref int strOffset, ref int msgOffset) { Marshal.WriteInt32(buffer, offset + GadgetTemplateOffset.Flags, (int)_flags); Marshal.WriteInt16(buffer, offset + GadgetTemplateOffset.Type, (short)Type); Marshal.WriteInt16(buffer, offset + GadgetTemplateOffset.Size, (short)GetTemplateSize()); Marshal.WriteInt32(buffer, offset + GadgetTemplateOffset.MinX, _bounding_box.MinX); Marshal.WriteInt32(buffer, offset + GadgetTemplateOffset.MinY, _bounding_box.MinY); Marshal.WriteInt32(buffer, offset + GadgetTemplateOffset.MaxX, _bounding_box.MaxX); Marshal.WriteInt32(buffer, offset + GadgetTemplateOffset.MaxY, _bounding_box.MaxY); Marshal.WriteInt32(buffer, offset + GadgetTemplateOffset.ComponentID, (int)_component_id); msgOffset = ObjectTemplate.WriteString(_help_message, _max_help, buffer, offset + GadgetTemplateOffset.HelpMessage, msgOffset); Marshal.WriteInt32(buffer, offset + GadgetTemplateOffset.MaxHelp, string.IsNullOrEmpty(_help_message) ? 0 : Math.Max(_help_message.Length + 1, _max_help)); }
public override void BuildBuffer(IntPtr buffer, int offset, ref int strOffset, ref int msgOffset) { base.BuildBuffer(buffer, offset, ref strOffset, ref msgOffset); msgOffset = ObjectTemplate.WriteString(_text, _max_text_len, buffer, offset + ActionButtonTemplateOffset.Text, msgOffset); Marshal.WriteInt32(buffer, offset + ActionButtonTemplateOffset.MaxTextLen, string.IsNullOrEmpty(_text) ? 0 : Math.Max(_text.Length + 1, _max_text_len)); strOffset = ObjectTemplate.WriteString(_click_show, 0, buffer, offset + ActionButtonTemplateOffset.ClickShow, strOffset); Marshal.WriteInt32(buffer, offset + ActionButtonTemplateOffset.Event, (int)_event); }
public override void BuildBuffer(IntPtr buffer, int offset, ref int strOffset, ref int msgOffset) { base.BuildBuffer(buffer, offset, ref strOffset, ref msgOffset); strOffset = ObjectTemplate.WriteString(_menu, 0, buffer, offset + PopupMenuTemplateOffset.Menu, strOffset); }
public override void BuildBuffer(IntPtr buffer, int offset, ref int strOffset, ref int msgOffset) { base.BuildBuffer(buffer, offset, ref strOffset, ref msgOffset); msgOffset = ObjectTemplate.WriteString(_label, 0, buffer, offset + LabelTemplateOffset.Label, msgOffset); }
public override void BuildBuffer(IntPtr buffer, int offset, ref int strOffset, ref int msgOffset) { base.BuildBuffer(buffer, offset, ref strOffset, ref msgOffset); msgOffset = ObjectTemplate.WriteString(_text, _max_text_len, buffer, offset + DisplayFieldTemplateOffset.Text, msgOffset); Marshal.WriteInt32(buffer, offset + DisplayFieldTemplateOffset.MaxTextLen, Math.Max(_text.Length + 1, _max_text_len)); }
/*! \brief Write the keyboard shortcut template data into the buffer. * \param [in] buffer Pointer to the buffer to write the template to. * \param [in] offset The offset from the start of the buffer where the keyboard * shortcut will be written. * \param [in,out] strOffset The offset from the start of the template where the * next string should be written in the string table. Updated after each string * is written. * \return Nothing. */ public void BuildBuffer(IntPtr buffer, int offset, ref int strOffset) { Marshal.WriteInt32(buffer, offset + KeyboardShortcutTemplateOffset.Flags, (int)_flags); Marshal.WriteInt32(buffer, offset + KeyboardShortcutTemplateOffset.WimpKeyCode, _wimp_key_code); Marshal.WriteInt32(buffer, offset + KeyboardShortcutTemplateOffset.KeyEvent, (int)_key_event); strOffset = ObjectTemplate.WriteString(_key_show, 0, buffer, offset + KeyboardShortcutTemplateOffset.KeyShow, strOffset); }
public override void BuildBuffer(IntPtr buffer, int offset, ref int strOffset, ref int msgOffset) { base.BuildBuffer(buffer, offset, ref strOffset, ref msgOffset); msgOffset = ObjectTemplate.WriteString(_label, _max_label_len, buffer, offset + OptionButtonTemplateOffset.Label, msgOffset); Marshal.WriteInt32(buffer, offset + OptionButtonTemplateOffset.MaxLabelLen, string.IsNullOrEmpty(_label) ? 0 : Math.Max(_label.Length + 1, _max_label_len)); Marshal.WriteInt32(buffer, offset + OptionButtonTemplateOffset.Event, (int)_event); }
public override void BuildBuffer(IntPtr buffer, int offset, ref int strOffset, ref int msgOffset) { base.BuildBuffer(buffer, offset, ref strOffset, ref msgOffset); msgOffset = ObjectTemplate.WriteString(_string_set, 0, buffer, offset + StringSetTemplateOffset.StringSet, msgOffset); msgOffset = ObjectTemplate.WriteString(_menu_title, 0, buffer, offset + StringSetTemplateOffset.MenuTitle, msgOffset); msgOffset = ObjectTemplate.WriteString(_initial_selected_string, _max_selected_string_len, buffer, offset + StringSetTemplateOffset.InitialSelectedString, msgOffset); Marshal.WriteInt32(buffer, offset + StringSetTemplateOffset.MaxSelectedStringLen, Math.Max(_initial_selected_string.Length + 1, _max_selected_string_len)); msgOffset = ObjectTemplate.WriteString(_allowable, _max_allowable, buffer, offset + StringSetTemplateOffset.Allowable, msgOffset); Marshal.WriteInt32(buffer, offset + StringSetTemplateOffset.MaxAllowable, Math.Max(_allowable.Length + 1, _max_allowable)); Marshal.WriteInt32(buffer, offset + StringSetTemplateOffset.Before, _before); Marshal.WriteInt32(buffer, offset + StringSetTemplateOffset.After, _after); }
public override void BuildBuffer(IntPtr buffer, int offset, ref int strOffset, ref int msgOffset) { base.BuildBuffer(buffer, offset, ref strOffset, ref msgOffset); if (HasSprite) { strOffset = ObjectTemplate.WriteString(_label, 0, buffer, offset + LabelledBoxTemplateOffset.Label, strOffset); } else { msgOffset = ObjectTemplate.WriteString(_label, 0, buffer, offset + LabelledBoxTemplateOffset.Label, msgOffset); } }