/examples/componentstreaming/mainunit.lrs

http://github.com/graemeg/lazarus · Unknown · 38 lines · 38 code · 0 blank · 0 comment · 0 complexity · 722ad700a3e2cbfdca79cd5b04e55bf4 MD5 · raw file

  1. LazarusResources.Add('TCompStreamDemoForm','FORMDATA',[
  2. 'TPF0'#19'TCompStreamDemoForm'#18'CompStreamDemoForm'#7'Caption'#6#28'Streami'
  3. +'ng components example'#12'ClientHeight'#3#229#1#11'ClientWidth'#3#13#2#8'On'
  4. +'Create'#7#10'FormCreate'#13'PixelsPerInch'#2'p'#18'HorzScrollBar.Page'#3#12
  5. +#2#18'VertScrollBar.Page'#3#228#1#4'Left'#3'$'#1#6'Height'#3#229#1#3'Top'#3
  6. +#168#0#5'Width'#3#13#2#0#6'TLabel'#10'Note1Label'#7'Caption'#6'UThis example'
  7. +' demonstrates, how to stream a component to a stream in binary format ...'#5
  8. +'Color'#7#6'clNone'#11'ParentColor'#8#8'WordWrap'#9#4'Left'#3#253#0#6'Height'
  9. +#3#133#0#3'Top'#2#27#5'Width'#3#217#0#0#0#6'TLabel'#10'Note2Label'#7'Caption'
  10. +#6#236'... and how to reconstruct the component from a stream. This techniqu'
  11. +'e can be used to save components to disk or to transfer them via network. O'
  12. +'f course this also works for your own classes as long as they are descendan'
  13. +'ts of TComponent.'#5'Color'#7#6'clNone'#11'ParentColor'#8#8'WordWrap'#9#4'L'
  14. +'eft'#3#9#1#6'Height'#2'g'#3'Top'#3'E'#1#5'Width'#3#228#0#0#0#9'TGroupBox'#14
  15. +'SourceGroupBox'#7'Caption'#6#6'Source'#12'ClientHeight'#2'I'#11'ClientWidth'
  16. +#3#191#0#8'TabOrder'#2#0#4'Left'#2#15#6'Height'#2'Z'#3'Top'#2#25#5'Width'#3
  17. +#195#0#0#9'TGroupBox'#9'AGroupBox'#7'Caption'#6#9'AGroupBox'#12'ClientHeight'
  18. +#2#26#11'ClientWidth'#2'|'#8'TabOrder'#2#0#4'Left'#2#23#6'Height'#2'+'#3'Top'
  19. +#2#15#5'Width'#3#128#0#0#0#0#9'TGroupBox'#19'DestinationGroupBox'#7'Anchors'
  20. +#11#6'akLeft'#8'akBottom'#0#7'Caption'#6#11'Destination'#12'ClientHeight'#2
  21. +'\'#11'ClientWidth'#3#211#0#8'TabOrder'#2#1#4'Left'#2#30#6'Height'#2'm'#3'To'
  22. +'p'#3'h'#1#5'Width'#3#215#0#0#0#7'TButton'#19'WriteToStreamButton'#7'Caption'
  23. +#6#28'1. Write AGroupBox to stream'#7'OnClick'#7#24'WriteToStreamButtonClick'
  24. +#8'TabOrder'#2#2#4'Left'#2#23#6'Height'#2#25#3'Top'#3#130#0#5'Width'#3#197#0
  25. +#0#0#9'TGroupBox'#14'StreamGroupBox'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRi'
  26. +'ght'#8'akBottom'#0#7'Caption'#6'3Stream (special characters are shown as he'
  27. +'xnumbers)'#12'ClientHeight'#2's'#11'ClientWidth'#3#236#1#8'TabOrder'#2#3#4
  28. +'Left'#2#15#6'Height'#3#132#0#3'Top'#3#170#0#5'Width'#3#240#1#0#5'TMemo'#10
  29. +'StreamMemo'#5'Align'#7#8'alClient'#13'Lines.Strings'#1#6'5First click on th'
  30. +'e button above, then on button below'#0#8'ReadOnly'#9#8'TabOrder'#2#0#6'Hei'
  31. +'ght'#2'['#5'Width'#3#236#1#0#0#9'TCheckBox'#19'StreamAsLFMCheckBox'#5'Align'
  32. +#7#8'alBottom'#7'Caption'#6#31'Show sream in LFM format (text)'#8'OnChange'#7
  33. +#25'StreamAsLFMCheckBoxChange'#8'TabOrder'#2#1#6'Height'#2#24#3'Top'#2'['#5
  34. +'Width'#3#236#1#0#0#0#7'TButton'#16'ReadStreamButton'#7'Anchors'#11#6'akLeft'
  35. +#8'akBottom'#0#7'Caption'#6#31'2. Create component from stream'#7'OnClick'#7
  36. +#21'ReadStreamButtonClick'#8'TabOrder'#2#4#4'Left'#2#25#6'Height'#2#24#3'Top'
  37. +#3'<'#1#5'Width'#3#215#0#0#0#0
  38. ]);