aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Embedded_SW/Embedded/Communication/PMR/Printing/UploadProcessParametersResponse.pb-c.c
blob: e782813cbb2ec6dc59aed6211f618e9f791f8733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* Generated by the protocol buffer compiler.  DO NOT EDIT! */
/* Generated from: UploadProcessParametersResponse.proto */

/* Do not generate deprecated warnings for self */
#ifndef PROTOBUF_C__NO_DEPRECATED
#define PROTOBUF_C__NO_DEPRECATED
#endif

#include "UploadProcessParametersResponse.pb-c.h"
void   upload_process_parameters_response__init
                     (UploadProcessParametersResponse         *message)
{
  static const UploadProcessParametersResponse init_value = UPLOAD_PROCESS_PARAMETERS_RESPONSE__INIT;
  *message = init_value;
}
size_t upload_process_parameters_response__get_packed_size
                     (const UploadProcessParametersResponse *message)
{
  assert(message->base.descriptor == &upload_process_parameters_response__descriptor);
  return protobuf_c_message_get_packed_size ((const ProtobufCMessage*)(message));
}
size_t upload_process_parameters_response__pack
                     (const UploadProcessParametersResponse *message,
                      uint8_t       *out)
{
  assert(message->base.descriptor == &upload_process_parameters_response__descriptor);
  return protobuf_c_message_pack ((const ProtobufCMessage*)message, out);
}
size_t upload_process_parameters_response__pack_to_buffer
                     (const UploadProcessParametersResponse *message,
                      ProtobufCBuffer *buffer)
{
  assert(message->base.descriptor == &upload_process_parameters_response__descriptor);
  return protobuf_c_message_pack_to_buffer ((const ProtobufCMessage*)message, buffer);
}
UploadProcessParametersResponse *
       upload_process_parameters_response__unpack
                     (ProtobufCAllocator  *allocator,
                      size_t               len,
                      const uint8_t       *data)
{
  return (UploadProcessParametersResponse *)
     protobuf_c_message_unpack (&upload_process_parameters_response__descriptor,
                                allocator, len, data);
}
void   upload_process_parameters_response__free_unpacked
                     (UploadProcessParametersResponse *message,
                      ProtobufCAllocator *allocator)
{
  if(!message)
    return;
  assert(message->base.descriptor == &upload_process_parameters_response__descriptor);
  protobuf_c_message_free_unpacked ((ProtobufCMessage*)message, allocator);
}
#define upload_process_parameters_response__field_descriptors NULL
#define upload_process_parameters_response__field_indices_by_name NULL
#define upload_process_parameters_response__number_ranges NULL
const ProtobufCMessageDescriptor upload_process_parameters_response__descriptor =
{
  PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,
  "",
  "",
  "",
  "",
  sizeof(UploadProcessParametersResponse),
  0,
  upload_process_parameters_response__field_descriptors,
  upload_process_parameters_response__field_indices_by_name,
  0,  upload_process_parameters_response__number_ranges,
  (ProtobufCMessageInit) upload_process_parameters_response__init,
  NULL,NULL,NULL    /* reserved[123] */
};
ass="w"> this.BreakAfter = LineBreakCondition.BreakPossible; } /// <summary> /// Creates a new FormattedTextElement that displays the specified text /// and occupies the specified length in the document. /// </summary> public FormattedTextElement(FormattedText text, int documentLength) : base(1, documentLength) { if (text == null) throw new ArgumentNullException("text"); this.formattedText = text; this.BreakBefore = LineBreakCondition.BreakPossible; this.BreakAfter = LineBreakCondition.BreakPossible; } /// <summary> /// Gets/sets the line break condition before the element. /// The default is 'BreakPossible'. /// </summary> public LineBreakCondition BreakBefore { get; set; } /// <summary> /// Gets/sets the line break condition after the element. /// The default is 'BreakPossible'. /// </summary> public LineBreakCondition BreakAfter { get; set; } /// <inheritdoc/> public override TextRun CreateTextRun(int startVisualColumn, ITextRunConstructionContext context) { if (textLine == null) { var formatter = TextFormatterFactory.Create(context.TextView); textLine = PrepareText(formatter, this.text, this.TextRunProperties); this.text = null; } return new FormattedTextRun(this, this.TextRunProperties); } /// <summary> /// Constructs a TextLine from a simple text. /// </summary> public static TextLine PrepareText(TextFormatter formatter, string text, TextRunProperties properties) { if (formatter == null) throw new ArgumentNullException("formatter"); if (text == null) throw new ArgumentNullException("text"); if (properties == null) throw new ArgumentNullException("properties"); return formatter.FormatLine( new SimpleTextSource(text, properties), 0, 32000, new VisualLineTextParagraphProperties { defaultTextRunProperties = properties, textWrapping = TextWrapping.NoWrap, tabSize = 40 }, null); } } /// <summary> /// This is the TextRun implementation used by the <see cref="FormattedTextElement"/> class. /// </summary> public class FormattedTextRun : TextEmbeddedObject { readonly FormattedTextElement element; TextRunProperties properties; /// <summary> /// Creates a new FormattedTextRun. /// </summary> public FormattedTextRun(FormattedTextElement element, TextRunProperties properties) { if (element == null) throw new ArgumentNullException("element"); if (properties == null) throw new ArgumentNullException("properties"); this.properties = properties; this.element = element; } /// <summary> /// Gets the element for which the FormattedTextRun was created. /// </summary> public FormattedTextElement Element { get { return element; } } /// <inheritdoc/> public override LineBreakCondition BreakBefore { get { return element.BreakBefore; } } /// <inheritdoc/> public override LineBreakCondition BreakAfter { get { return element.BreakAfter; } } /// <inheritdoc/> public override bool HasFixedSize { get { return true; } } /// <inheritdoc/> public override CharacterBufferReference CharacterBufferReference { get { return new CharacterBufferReference(); } } /// <inheritdoc/> public override int Length { get { return element.VisualLength; } } /// <inheritdoc/> public override TextRunProperties Properties { get { return properties; } } /// <inheritdoc/> public override TextEmbeddedObjectMetrics Format(double remainingParagraphWidth) { var formattedText = element.formattedText; if (formattedText != null) { return new TextEmbeddedObjectMetrics(formattedText.WidthIncludingTrailingWhitespace, formattedText.Height, formattedText.Baseline); } else { var text = element.textLine; return new TextEmbeddedObjectMetrics(text.WidthIncludingTrailingWhitespace, text.Height, text.Baseline); } } /// <inheritdoc/> public override Rect ComputeBoundingBox(bool rightToLeft, bool sideways) { var formattedText = element.formattedText; if (formattedText != null) { return new Rect(0, 0, formattedText.WidthIncludingTrailingWhitespace, formattedText.Height); } else { var text = element.textLine; return new Rect(0, 0, text.WidthIncludingTrailingWhitespace, text.Height); } } /// <inheritdoc/> public override void Draw(DrawingContext drawingContext, Point origin, bool rightToLeft, bool sideways) { if (element.formattedText != null) { origin.Y -= element.formattedText.Baseline; drawingContext.DrawText(element.formattedText, origin); } else { origin.Y -= element.textLine.Baseline; element.textLine.Draw(drawingContext, origin, InvertAxes.None); } } } }