typ_lib_edtr : Class properties and record fields reordering

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@605 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
inoussa
2008-11-19 10:43:32 +00:00
parent f8f72633af
commit 88fb32b8f1
7 changed files with 532 additions and 295 deletions

View File

@ -105,6 +105,7 @@
<Filename Value="udm.pas"/> <Filename Value="udm.pas"/>
<ComponentName Value="DM"/> <ComponentName Value="DM"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<ResourceBaseClass Value="DataModule"/>
<ResourceFilename Value="udm.lrs"/> <ResourceFilename Value="udm.lrs"/>
<UnitName Value="udm"/> <UnitName Value="udm"/>
</Unit10> </Unit10>
@ -213,7 +214,7 @@
</Parsing> </Parsing>
<Linking> <Linking>
<Debugging> <Debugging>
<GenerateDebugInfo Value="True"/> <UseLineInfoUnit Value="False"/>
<StripSymbols Value="True"/> <StripSymbols Value="True"/>
</Debugging> </Debugging>
<LinkSmart Value="True"/> <LinkSmart Value="True"/>

View File

@ -1,25 +1,26 @@
object fClassEdit: TfClassEdit object fClassEdit: TfClassEdit
Left = 616 Left = 536
Height = 547 Height = 547
Top = 120 Top = 127
Width = 518 Width = 552
ActiveControl = PC ActiveControl = PC
BorderStyle = bsSizeToolWin BorderStyle = bsSizeToolWin
Caption = 'fClassEdit' Caption = 'fClassEdit'
ClientHeight = 547 ClientHeight = 547
ClientWidth = 518 ClientWidth = 552
ParentFont = False
Position = poDesktopCenter Position = poDesktopCenter
LCLVersion = '0.9.25' LCLVersion = '0.9.26.1'
object Panel1: TPanel object Panel1: TPanel
Height = 50 Height = 50
Top = 497 Top = 497
Width = 518 Width = 552
Align = alBottom Align = alBottom
ClientHeight = 50 ClientHeight = 50
ClientWidth = 518 ClientWidth = 552
TabOrder = 0 TabOrder = 0
object Button1: TButton object Button1: TButton
Left = 341 Left = 375
Height = 25 Height = 25
Top = 10 Top = 10
Width = 75 Width = 75
@ -31,7 +32,7 @@ object fClassEdit: TfClassEdit
TabOrder = 1 TabOrder = 1
end end
object Button2: TButton object Button2: TButton
Left = 253 Left = 287
Height = 25 Height = 25
Top = 10 Top = 10
Width = 75 Width = 75
@ -42,7 +43,7 @@ object fClassEdit: TfClassEdit
TabOrder = 0 TabOrder = 0
end end
object Button6: TButton object Button6: TButton
Left = 429 Left = 463
Height = 25 Height = 25
Top = 10 Top = 10
Width = 75 Width = 75
@ -53,7 +54,7 @@ object fClassEdit: TfClassEdit
end end
object PC: TPageControl object PC: TPageControl
Height = 497 Height = 497
Width = 518 Width = 552
ActivePage = TabSheet1 ActivePage = TabSheet1
Align = alClient Align = alClient
TabIndex = 0 TabIndex = 0
@ -63,7 +64,7 @@ object fClassEdit: TfClassEdit
object TabSheet1: TTabSheet object TabSheet1: TTabSheet
Caption = 'Compound Object' Caption = 'Compound Object'
ClientHeight = 471 ClientHeight = 471
ClientWidth = 510 ClientWidth = 544
object Label1: TLabel object Label1: TLabel
Left = 4 Left = 4
Height = 14 Height = 14
@ -84,7 +85,7 @@ object fClassEdit: TfClassEdit
Left = 92 Left = 92
Height = 23 Height = 23
Top = 18 Top = 18
Width = 406 Width = 440
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
TabOrder = 0 TabOrder = 0
end end
@ -92,15 +93,15 @@ object fClassEdit: TfClassEdit
Left = 4 Left = 4
Height = 312 Height = 312
Top = 98 Top = 98
Width = 495 Width = 529
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
Caption = ' Properties ' Caption = ' Properties '
ClientHeight = 294 ClientHeight = 294
ClientWidth = 491 ClientWidth = 525
TabOrder = 2 TabOrder = 2
object edtProp: TListView object edtProp: TListView
Height = 294 Height = 294
Width = 491 Width = 525
Align = alClient Align = alClient
BorderWidth = 2 BorderWidth = 2
Columns = < Columns = <
@ -117,6 +118,7 @@ object fClassEdit: TfClassEdit
Caption = 'Attribute' Caption = 'Attribute'
Width = 60 Width = 60
end> end>
HideSelection = False
PopupMenu = PopupMenu1 PopupMenu = PopupMenu1
RowSelect = True RowSelect = True
TabOrder = 0 TabOrder = 0
@ -158,31 +160,50 @@ object fClassEdit: TfClassEdit
Left = 92 Left = 92
Height = 21 Height = 21
Top = 58 Top = 58
Width = 406 Width = 440
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
ItemHeight = 13 ItemHeight = 13
MaxLength = -1
Style = csDropDownList Style = csDropDownList
TabOrder = 1 TabOrder = 1
end end
object Button7: TButton
Left = 372
Height = 25
Top = 421
Width = 70
Action = actMoveUp
Anchors = [akRight, akBottom]
BorderSpacing.InnerBorder = 4
TabOrder = 6
end
object Button8: TButton
Left = 452
Height = 25
Top = 421
Width = 70
Action = actMoveDown
Anchors = [akRight, akBottom]
BorderSpacing.InnerBorder = 4
TabOrder = 7
end
end end
object tsSourceXSD: TTabSheet object tsSourceXSD: TTabSheet
Caption = 'XSD' Caption = 'XSD'
ClientHeight = 471 ClientHeight = 471
ClientWidth = 510 ClientWidth = 544
object edtSourceXSD: TSynEdit object edtSourceXSD: TSynEdit
Left = 12 Left = 12
Height = 432 Height = 432
Top = 18 Top = 18
Width = 480 Width = 514
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
Font.Height = -20 Font.Height = -20
Font.Name = 'courier' Font.Name = 'courier'
Font.Pitch = fpFixed Font.Pitch = fpFixed
ParentColor = False ParentColor = False
ParentFont = False
TabOrder = 0 TabOrder = 0
BookMarkOptions.Xoffset = 42 BookMarkOptions.Xoffset = 42
BookMarkOptions.OnChange = nil
Gutter.DigitCount = 2 Gutter.DigitCount = 2
Gutter.ShowLineNumbers = True Gutter.ShowLineNumbers = True
Gutter.Width = 10 Gutter.Width = 10
@ -510,18 +531,17 @@ object fClassEdit: TfClassEdit
ShortCut = 24642 ShortCut = 24642
end> end>
ReadOnly = True ReadOnly = True
SelectedColor.OnChange = nil
end end
end end
object tsDependencies: TTabSheet object tsDependencies: TTabSheet
Caption = 'Used by' Caption = 'Used by'
ClientHeight = 471 ClientHeight = 471
ClientWidth = 510 ClientWidth = 544
object tvDependency: TTreeView object tvDependency: TTreeView
Left = 20 Left = 20
Height = 433 Height = 433
Top = 18 Top = 18
Width = 464 Width = 498
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
DefaultItemHeight = 15 DefaultItemHeight = 15
ReadOnly = True ReadOnly = True
@ -533,12 +553,12 @@ object fClassEdit: TfClassEdit
object tsDocumentation: TTabSheet object tsDocumentation: TTabSheet
Caption = 'Documentation' Caption = 'Documentation'
ClientHeight = 471 ClientHeight = 471
ClientWidth = 510 ClientWidth = 544
object edtDocumentation: TMemo object edtDocumentation: TMemo
Left = 12 Left = 12
Height = 434 Height = 434
Top = 18 Top = 18
Width = 480 Width = 514
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
ScrollBars = ssAutoBoth ScrollBars = ssAutoBoth
TabOrder = 0 TabOrder = 0
@ -578,6 +598,18 @@ object fClassEdit: TfClassEdit
OnExecute = actApplyExecute OnExecute = actApplyExecute
OnUpdate = actOKUpdate OnUpdate = actOKUpdate
end end
object actMoveUp: TAction
Caption = 'Move Up'
DisableIfNoHandler = True
OnExecute = actMoveUpExecute
OnUpdate = actMoveUpUpdate
end
object actMoveDown: TAction
Caption = 'Move Down'
DisableIfNoHandler = True
OnExecute = actMoveDownExecute
OnUpdate = actMoveDownUpdate
end
end end
object PopupMenu1: TPopupMenu object PopupMenu1: TPopupMenu
left = 105 left = 105

View File

@ -1,126 +1,134 @@
{ Ceci est un fichier ressource g�n�r� automatiquement par Lazarus } { Ceci est un fichier ressource g�n�r� automatiquement par Lazarus }
LazarusResources.Add('TfClassEdit','FORMDATA',[ LazarusResources.Add('TfClassEdit','FORMDATA',[
'TPF0'#11'TfClassEdit'#10'fClassEdit'#4'Left'#3'h'#2#6'Height'#3'#'#2#3'Top'#2 'TPF0'#11'TfClassEdit'#10'fClassEdit'#4'Left'#3#24#2#6'Height'#3'#'#2#3'Top'#2
+'x'#5'Width'#3#6#2#13'ActiveControl'#7#2'PC'#11'BorderStyle'#7#13'bsSizeTool' +''#5'Width'#3'('#2#13'ActiveControl'#7#2'PC'#11'BorderStyle'#7#13'bsSizeToo'
+'Win'#7'Caption'#6#10'fClassEdit'#12'ClientHeight'#3'#'#2#11'ClientWidth'#3#6 +'lWin'#7'Caption'#6#10'fClassEdit'#12'ClientHeight'#3'#'#2#11'ClientWidth'#3
+#2#8'Position'#7#15'poDesktopCenter'#10'LCLVersion'#6#6'0.9.25'#0#6'TPanel'#6 +'('#2#10'ParentFont'#8#8'Position'#7#15'poDesktopCenter'#10'LCLVersion'#6#8
+'Panel1'#6'Height'#2'2'#3'Top'#3#241#1#5'Width'#3#6#2#5'Align'#7#8'alBottom' +'0.9.26.1'#0#6'TPanel'#6'Panel1'#6'Height'#2'2'#3'Top'#3#241#1#5'Width'#3'('
+#12'ClientHeight'#2'2'#11'ClientWidth'#3#6#2#8'TabOrder'#2#0#0#7'TButton'#7 +#2#5'Align'#7#8'alBottom'#12'ClientHeight'#2'2'#11'ClientWidth'#3'('#2#8'Tab'
+'Button1'#4'Left'#3'U'#1#6'Height'#2#25#3'Top'#2#10#5'Width'#2'K'#7'Anchors' +'Order'#2#0#0#7'TButton'#7'Button1'#4'Left'#3'w'#1#6'Height'#2#25#3'Top'#2#10
+#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#4#6'Cancel'#9#7'Ca' +#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBor'
+'ption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#1#0#0#7'TButton'#7'But' +'der'#2#4#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'
+'ton2'#4'Left'#3#253#0#6'Height'#2#25#3'Top'#2#10#5'Width'#2'K'#6'Action'#7#5 +#2#1#0#0#7'TButton'#7'Button2'#4'Left'#3#31#1#6'Height'#2#25#3'Top'#2#10#5'W'
+'actOK'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#4 +'idth'#2'K'#6'Action'#7#5'actOK'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'Bord'
+#7'Default'#9#8'TabOrder'#2#0#0#0#7'TButton'#7'Button6'#4'Left'#3#173#1#6'He' +'erSpacing.InnerBorder'#2#4#7'Default'#9#8'TabOrder'#2#0#0#0#7'TButton'#7'Bu'
+'ight'#2#25#3'Top'#2#10#5'Width'#2'K'#6'Action'#7#8'actApply'#7'Anchors'#11#5 +'tton6'#4'Left'#3#207#1#6'Height'#2#25#3'Top'#2#10#5'Width'#2'K'#6'Action'#7
+'akTop'#7'akRight'#0#8'TabOrder'#2#2#0#0#0#12'TPageControl'#2'PC'#6'Height'#3 +#8'actApply'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'TabOrder'#2#2#0#0#0#12'TP'
+#241#1#5'Width'#3#6#2#10'ActivePage'#7#9'TabSheet1'#5'Align'#7#8'alClient'#8 +'ageControl'#2'PC'#6'Height'#3#241#1#5'Width'#3'('#2#10'ActivePage'#7#9'TabS'
+'TabIndex'#2#0#8'TabOrder'#2#1#8'OnChange'#7#8'PCChange'#13'OnPageChanged'#7 +'heet1'#5'Align'#7#8'alClient'#8'TabIndex'#2#0#8'TabOrder'#2#1#8'OnChange'#7
+#8'PCChange'#0#9'TTabSheet'#9'TabSheet1'#7'Caption'#6#15'Compound Object'#12 +#8'PCChange'#13'OnPageChanged'#7#8'PCChange'#0#9'TTabSheet'#9'TabSheet1'#7'C'
+'ClientHeight'#3#215#1#11'ClientWidth'#3#254#1#0#6'TLabel'#6'Label1'#4'Left' +'aption'#6#15'Compound Object'#12'ClientHeight'#3#215#1#11'ClientWidth'#3' '
+#2#4#6'Height'#2#14#3'Top'#2#18#5'Width'#2#28#7'Caption'#6#4'Name'#11'Parent' +#2#0#6'TLabel'#6'Label1'#4'Left'#2#4#6'Height'#2#14#3'Top'#2#18#5'Width'#2#28
+'Color'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#4#6'Height'#2#14#3'Top'#2';'#5'W' +#7'Caption'#6#4'Name'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2'#4'Left'#2#4#6
+'idth'#2'C'#7'Caption'#6#14'Inheritts from'#11'ParentColor'#8#0#0#5'TEdit'#7 +'Height'#2#14#3'Top'#2';'#5'Width'#2'C'#7'Caption'#6#14'Inheritts from'#11'P'
+'edtName'#4'Left'#2'\'#6'Height'#2#23#3'Top'#2#18#5'Width'#3#150#1#7'Anchors' +'arentColor'#8#0#0#5'TEdit'#7'edtName'#4'Left'#2'\'#6'Height'#2#23#3'Top'#2
+#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#0#0#0#9'TGroupBox'#9'Group' +#18#5'Width'#3#184#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrde'
+'Box1'#4'Left'#2#4#6'Height'#3'8'#1#3'Top'#2'b'#5'Width'#3#239#1#7'Anchors' +'r'#2#0#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2#4#6'Height'#3'8'#1#3'Top'#2
+#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#7'Caption'#6#14' Properties' +'b'#5'Width'#3#17#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0
+' '#12'ClientHeight'#3'&'#1#11'ClientWidth'#3#235#1#8'TabOrder'#2#2#0#9'TLi' +#7'Caption'#6#14' Properties '#12'ClientHeight'#3'&'#1#11'ClientWidth'#3#13
+'stView'#7'edtProp'#6'Height'#3'&'#1#5'Width'#3#235#1#5'Align'#7#8'alClient' +#2#8'TabOrder'#2#2#0#9'TListView'#7'edtProp'#6'Height'#3'&'#1#5'Width'#3#13#2
+#11'BorderWidth'#2#2#7'Columns'#14#1#8'AutoSize'#9#7'Caption'#6#4'Name'#5'Wi' +#5'Align'#7#8'alClient'#11'BorderWidth'#2#2#7'Columns'#14#1#8'AutoSize'#9#7
+'dth'#3#210#0#0#1#7'Caption'#6#4'Type'#5'Width'#3#200#0#0#1#7'Caption'#6#9'A' +'Caption'#6#4'Name'#5'Width'#3#210#0#0#1#7'Caption'#6#4'Type'#5'Width'#3#200
+'ttribute'#5'Width'#2'<'#0#0#9'PopupMenu'#7#10'PopupMenu1'#9'RowSelect'#9#8 +#0#0#1#7'Caption'#6#9'Attribute'#5'Width'#2'<'#0#0#13'HideSelection'#8#9'Pop'
+'TabOrder'#2#0#9'ViewStyle'#7#8'vsReport'#10'OnDblClick'#7#15'edtPropDblClic' +'upMenu'#7#10'PopupMenu1'#9'RowSelect'#9#8'TabOrder'#2#0#9'ViewStyle'#7#8'vs'
+'k'#0#0#0#7'TButton'#7'Button3'#4'Left'#2#4#6'Height'#2#25#3'Top'#3#165#1#5 +'Report'#10'OnDblClick'#7#15'edtPropDblClick'#0#0#0#7'TButton'#7'Button3'#4
+'Width'#2'd'#6'Action'#7#10'actPropAdd'#7'Anchors'#11#6'akLeft'#8'akBottom'#0 +'Left'#2#4#6'Height'#2#25#3'Top'#3#165#1#5'Width'#2'd'#6'Action'#7#10'actPro'
+#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#3#0#0#7'TButton'#7'Button4' +'pAdd'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2
+#4'Left'#2't'#6'Height'#2#25#3'Top'#3#165#1#5'Width'#2'd'#6'Action'#7#11'act' +#4#8'TabOrder'#2#3#0#0#7'TButton'#7'Button4'#4'Left'#2't'#6'Height'#2#25#3'T'
+'PropEdit'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorde' +'op'#3#165#1#5'Width'#2'd'#6'Action'#7#11'actPropEdit'#7'Anchors'#11#6'akLef'
+'r'#2#4#8'TabOrder'#2#4#0#0#7'TButton'#7'Button5'#4'Left'#3#228#0#6'Height'#2 +'t'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#4#0#0#7'TB'
+#25#3'Top'#3#165#1#5'Width'#2'd'#6'Action'#7#13'actPropDelete'#7'Anchors'#11 +'utton'#7'Button5'#4'Left'#3#228#0#6'Height'#2#25#3'Top'#3#165#1#5'Width'#2
+#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#5#0 +'d'#6'Action'#7#13'actPropDelete'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#25'B'
+#0#9'TComboBox'#9'edtParent'#4'Left'#2'\'#6'Height'#2#21#3'Top'#2':'#5'Width' +'orderSpacing.InnerBorder'#2#4#8'TabOrder'#2#5#0#0#9'TComboBox'#9'edtParent'
+#3#150#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#10'ItemHeight'#2#13#9 +#4'Left'#2'\'#6'Height'#2#21#3'Top'#2':'#5'Width'#3#184#1#7'Anchors'#11#5'ak'
+'MaxLength'#2#255#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#1#0#0#0#9'TTab' +'Top'#6'akLeft'#7'akRight'#0#10'ItemHeight'#2#13#5'Style'#7#14'csDropDownLis'
+'Sheet'#11'tsSourceXSD'#7'Caption'#6#3'XSD'#12'ClientHeight'#3#215#1#11'Clie' +'t'#8'TabOrder'#2#1#0#0#7'TButton'#7'Button7'#4'Left'#3't'#1#6'Height'#2#25#3
+'ntWidth'#3#254#1#0#8'TSynEdit'#12'edtSourceXSD'#4'Left'#2#12#6'Height'#3#176 +'Top'#3#165#1#5'Width'#2'F'#6'Action'#7#9'actMoveUp'#7'Anchors'#11#7'akRight'
+#1#3'Top'#2#18#5'Width'#3#224#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8 +#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#6#0#0#7'TButt'
+'akBottom'#0#11'Font.Height'#2#236#9'Font.Name'#6#7'courier'#10'Font.Pitch'#7 +'on'#7'Button8'#4'Left'#3#196#1#6'Height'#2#25#3'Top'#3#165#1#5'Width'#2'F'#6
+#7'fpFixed'#11'ParentColor'#8#8'TabOrder'#2#0#23'BookMarkOptions.Xoffset'#2 +'Action'#7#11'actMoveDown'#7'Anchors'#11#7'akRight'#8'akBottom'#0#25'BorderS'
+'*'#24'BookMarkOptions.OnChange'#13#17'Gutter.DigitCount'#2#2#22'Gutter.Show' +'pacing.InnerBorder'#2#4#8'TabOrder'#2#7#0#0#0#9'TTabSheet'#11'tsSourceXSD'#7
+'LineNumbers'#9#12'Gutter.Width'#2#10#22'Gutter.ShowCodeFolding'#9#11'Highli' +'Caption'#6#3'XSD'#12'ClientHeight'#3#215#1#11'ClientWidth'#3' '#2#0#8'TSynE'
+'ghter'#7#10'SynXMLSyn1'#10'Keystrokes'#14#1#7'Command'#2#3#8'ShortCut'#2'&' +'dit'#12'edtSourceXSD'#4'Left'#2#12#6'Height'#3#176#1#3'Top'#2#18#5'Width'#3
+#0#1#7'Command'#2'g'#8'ShortCut'#3'& '#0#1#7'Command'#3#211#0#8'ShortCut'#3 +#2#2#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#11'Font.Heigh'
+'&@'#0#1#7'Command'#2#4#8'ShortCut'#2'('#0#1#7'Command'#2'h'#8'ShortCut'#3'(' +'t'#2#236#9'Font.Name'#6#7'courier'#10'Font.Pitch'#7#7'fpFixed'#11'ParentCol'
+' '#0#1#7'Command'#3#212#0#8'ShortCut'#3'(@'#0#1#7'Command'#2#1#8'ShortCut'#2 +'or'#8#10'ParentFont'#8#8'TabOrder'#2#0#23'BookMarkOptions.Xoffset'#2'*'#17
+'%'#0#1#7'Command'#2'e'#8'ShortCut'#3'% '#0#1#7'Command'#2#5#8'ShortCut'#3'%' +'Gutter.DigitCount'#2#2#22'Gutter.ShowLineNumbers'#9#12'Gutter.Width'#2#10#22
+'@'#0#1#7'Command'#2'i'#8'ShortCut'#3'%`'#0#1#7'Command'#2#2#8'ShortCut'#2 +'Gutter.ShowCodeFolding'#9#11'Highlighter'#7#10'SynXMLSyn1'#10'Keystrokes'#14
+''''#0#1#7'Command'#2'f'#8'ShortCut'#3''' '#0#1#7'Command'#2#6#8'ShortCut'#3 +#1#7'Command'#2#3#8'ShortCut'#2'&'#0#1#7'Command'#2'g'#8'ShortCut'#3'& '#0#1
+'''@'#0#1#7'Command'#2'j'#8'ShortCut'#3'''`'#0#1#7'Command'#2#10#8'ShortCut' +#7'Command'#3#211#0#8'ShortCut'#3'&@'#0#1#7'Command'#2#4#8'ShortCut'#2'('#0#1
+#2'"'#0#1#7'Command'#2'n'#8'ShortCut'#3'" '#0#1#7'Command'#2#14#8'ShortCut'#3 +#7'Command'#2'h'#8'ShortCut'#3'( '#0#1#7'Command'#3#212#0#8'ShortCut'#3'(@'#0
+'"@'#0#1#7'Command'#2'r'#8'ShortCut'#3'"`'#0#1#7'Command'#2#9#8'ShortCut'#2 +#1#7'Command'#2#1#8'ShortCut'#2'%'#0#1#7'Command'#2'e'#8'ShortCut'#3'% '#0#1
+'!'#0#1#7'Command'#2'm'#8'ShortCut'#3'! '#0#1#7'Command'#2#13#8'ShortCut'#3 +#7'Command'#2#5#8'ShortCut'#3'%@'#0#1#7'Command'#2'i'#8'ShortCut'#3'%`'#0#1#7
+'!@'#0#1#7'Command'#2'q'#8'ShortCut'#3'!`'#0#1#7'Command'#2#7#8'ShortCut'#2 +'Command'#2#2#8'ShortCut'#2''''#0#1#7'Command'#2'f'#8'ShortCut'#3''' '#0#1#7
+'$'#0#1#7'Command'#2'k'#8'ShortCut'#3'$ '#0#1#7'Command'#2#15#8'ShortCut'#3 +'Command'#2#6#8'ShortCut'#3'''@'#0#1#7'Command'#2'j'#8'ShortCut'#3'''`'#0#1#7
+'$@'#0#1#7'Command'#2's'#8'ShortCut'#3'$`'#0#1#7'Command'#2#8#8'ShortCut'#2 +'Command'#2#10#8'ShortCut'#2'"'#0#1#7'Command'#2'n'#8'ShortCut'#3'" '#0#1#7
+'#'#0#1#7'Command'#2'l'#8'ShortCut'#3'# '#0#1#7'Command'#2#16#8'ShortCut'#3 +'Command'#2#14#8'ShortCut'#3'"@'#0#1#7'Command'#2'r'#8'ShortCut'#3'"`'#0#1#7
,'#@'#0#1#7'Command'#2't'#8'ShortCut'#3'#`'#0#1#7'Command'#3#223#0#8'ShortCut' ,'Command'#2#9#8'ShortCut'#2'!'#0#1#7'Command'#2'm'#8'ShortCut'#3'! '#0#1#7'C'
+#2'-'#0#1#7'Command'#3#201#0#8'ShortCut'#3'-@'#0#1#7'Command'#3'\'#2#8'Short' +'ommand'#2#13#8'ShortCut'#3'!@'#0#1#7'Command'#2'q'#8'ShortCut'#3'!`'#0#1#7
+'Cut'#3'- '#0#1#7'Command'#3#246#1#8'ShortCut'#2'.'#0#1#7'Command'#3'['#2#8 +'Command'#2#7#8'ShortCut'#2'$'#0#1#7'Command'#2'k'#8'ShortCut'#3'$ '#0#1#7'C'
+'ShortCut'#3'. '#0#1#7'Command'#3#245#1#8'ShortCut'#2#8#0#1#7'Command'#3#245 +'ommand'#2#15#8'ShortCut'#3'$@'#0#1#7'Command'#2's'#8'ShortCut'#3'$`'#0#1#7
+#1#8'ShortCut'#3#8' '#0#1#7'Command'#3#248#1#8'ShortCut'#3#8'@'#0#1#7'Comman' +'Command'#2#8#8'ShortCut'#2'#'#0#1#7'Command'#2'l'#8'ShortCut'#3'# '#0#1#7'C'
+'d'#3'Y'#2#8'ShortCut'#4#8#128#0#0#0#1#7'Command'#3'Z'#2#8'ShortCut'#4#8#160 +'ommand'#2#16#8'ShortCut'#3'#@'#0#1#7'Command'#2't'#8'ShortCut'#3'#`'#0#1#7
+#0#0#0#1#7'Command'#3#253#1#8'ShortCut'#2#13#0#1#7'Command'#3#199#0#8'ShortC' +'Command'#3#223#0#8'ShortCut'#2'-'#0#1#7'Command'#3#201#0#8'ShortCut'#3'-@'#0
+'ut'#3'A@'#0#1#7'Command'#3#201#0#8'ShortCut'#3'C@'#0#1#7'Command'#3'b'#2#8 +#1#7'Command'#3'\'#2#8'ShortCut'#3'- '#0#1#7'Command'#3#246#1#8'ShortCut'#2
+'ShortCut'#3'I`'#0#1#7'Command'#3#253#1#8'ShortCut'#3'M@'#0#1#7'Command'#3 +'.'#0#1#7'Command'#3'['#2#8'ShortCut'#3'. '#0#1#7'Command'#3#245#1#8'ShortCu'
+#254#1#8'ShortCut'#3'N@'#0#1#7'Command'#3#247#1#8'ShortCut'#3'T@'#0#1#7'Comm' +'t'#2#8#0#1#7'Command'#3#245#1#8'ShortCut'#3#8' '#0#1#7'Command'#3#248#1#8'S'
+'and'#3'c'#2#8'ShortCut'#3'U`'#0#1#7'Command'#3'\'#2#8'ShortCut'#3'V@'#0#1#7 +'hortCut'#3#8'@'#0#1#7'Command'#3'Y'#2#8'ShortCut'#4#8#128#0#0#0#1#7'Command'
+'Command'#3'['#2#8'ShortCut'#3'X@'#0#1#7'Command'#3#251#1#8'ShortCut'#3'Y@'#0 +#3'Z'#2#8'ShortCut'#4#8#160#0#0#0#1#7'Command'#3#253#1#8'ShortCut'#2#13#0#1#7
+#1#7'Command'#3#250#1#8'ShortCut'#3'Y`'#0#1#7'Command'#3'Y'#2#8'ShortCut'#3 +'Command'#3#199#0#8'ShortCut'#3'A@'#0#1#7'Command'#3#201#0#8'ShortCut'#3'C@'
+'Z@'#0#1#7'Command'#3'Z'#2#8'ShortCut'#3'Z`'#0#1#7'Command'#3'-'#1#8'ShortCu' +#0#1#7'Command'#3'b'#2#8'ShortCut'#3'I`'#0#1#7'Command'#3#253#1#8'ShortCut'#3
+'t'#3'0@'#0#1#7'Command'#3'.'#1#8'ShortCut'#3'1@'#0#1#7'Command'#3'/'#1#8'Sh' +'M@'#0#1#7'Command'#3#254#1#8'ShortCut'#3'N@'#0#1#7'Command'#3#247#1#8'Short'
+'ortCut'#3'2@'#0#1#7'Command'#3'0'#1#8'ShortCut'#3'3@'#0#1#7'Command'#3'1'#1 +'Cut'#3'T@'#0#1#7'Command'#3'c'#2#8'ShortCut'#3'U`'#0#1#7'Command'#3'\'#2#8
+#8'ShortCut'#3'4@'#0#1#7'Command'#3'2'#1#8'ShortCut'#3'5@'#0#1#7'Command'#3 +'ShortCut'#3'V@'#0#1#7'Command'#3'['#2#8'ShortCut'#3'X@'#0#1#7'Command'#3#251
+'3'#1#8'ShortCut'#3'6@'#0#1#7'Command'#3'4'#1#8'ShortCut'#3'7@'#0#1#7'Comman' +#1#8'ShortCut'#3'Y@'#0#1#7'Command'#3#250#1#8'ShortCut'#3'Y`'#0#1#7'Command'
+'d'#3'5'#1#8'ShortCut'#3'8@'#0#1#7'Command'#3'6'#1#8'ShortCut'#3'9@'#0#1#7'C' +#3'Y'#2#8'ShortCut'#3'Z@'#0#1#7'Command'#3'Z'#2#8'ShortCut'#3'Z`'#0#1#7'Comm'
+'ommand'#3'_'#1#8'ShortCut'#3'0`'#0#1#7'Command'#3'`'#1#8'ShortCut'#3'1`'#0#1 +'and'#3'-'#1#8'ShortCut'#3'0@'#0#1#7'Command'#3'.'#1#8'ShortCut'#3'1@'#0#1#7
+#7'Command'#3'a'#1#8'ShortCut'#3'2`'#0#1#7'Command'#3'b'#1#8'ShortCut'#3'3`' +'Command'#3'/'#1#8'ShortCut'#3'2@'#0#1#7'Command'#3'0'#1#8'ShortCut'#3'3@'#0
+#0#1#7'Command'#3'c'#1#8'ShortCut'#3'4`'#0#1#7'Command'#3'd'#1#8'ShortCut'#3 +#1#7'Command'#3'1'#1#8'ShortCut'#3'4@'#0#1#7'Command'#3'2'#1#8'ShortCut'#3'5'
+'5`'#0#1#7'Command'#3'e'#1#8'ShortCut'#3'6`'#0#1#7'Command'#3'f'#1#8'ShortCu' +'@'#0#1#7'Command'#3'3'#1#8'ShortCut'#3'6@'#0#1#7'Command'#3'4'#1#8'ShortCut'
+'t'#3'7`'#0#1#7'Command'#3'g'#1#8'ShortCut'#3'8`'#0#1#7'Command'#3'h'#1#8'Sh' +#3'7@'#0#1#7'Command'#3'5'#1#8'ShortCut'#3'8@'#0#1#7'Command'#3'6'#1#8'Short'
+'ortCut'#3'9`'#0#1#7'Command'#3#231#0#8'ShortCut'#3'N`'#0#1#7'Command'#3#232 +'Cut'#3'9@'#0#1#7'Command'#3'_'#1#8'ShortCut'#3'0`'#0#1#7'Command'#3'`'#1#8
+#0#8'ShortCut'#3'C`'#0#1#7'Command'#3#233#0#8'ShortCut'#3'L`'#0#1#7'Command' +'ShortCut'#3'1`'#0#1#7'Command'#3'a'#1#8'ShortCut'#3'2`'#0#1#7'Command'#3'b'
+#3'd'#2#8'ShortCut'#2#9#0#1#7'Command'#3'e'#2#8'ShortCut'#3#9' '#0#1#7'Comma' +#1#8'ShortCut'#3'3`'#0#1#7'Command'#3'c'#1#8'ShortCut'#3'4`'#0#1#7'Command'#3
+'nd'#3#250#0#8'ShortCut'#3'B`'#0#0#8'ReadOnly'#9#22'SelectedColor.OnChange' +'d'#1#8'ShortCut'#3'5`'#0#1#7'Command'#3'e'#1#8'ShortCut'#3'6`'#0#1#7'Comman'
+#13#0#0#0#9'TTabSheet'#14'tsDependencies'#7'Caption'#6#7'Used by'#12'ClientH' +'d'#3'f'#1#8'ShortCut'#3'7`'#0#1#7'Command'#3'g'#1#8'ShortCut'#3'8`'#0#1#7'C'
+'eight'#3#215#1#11'ClientWidth'#3#254#1#0#9'TTreeView'#12'tvDependency'#4'Le' +'ommand'#3'h'#1#8'ShortCut'#3'9`'#0#1#7'Command'#3#231#0#8'ShortCut'#3'N`'#0
+'ft'#2#20#6'Height'#3#177#1#3'Top'#2#18#5'Width'#3#208#1#7'Anchors'#11#5'akT' +#1#7'Command'#3#232#0#8'ShortCut'#3'C`'#0#1#7'Command'#3#233#0#8'ShortCut'#3
+'op'#6'akLeft'#7'akRight'#8'akBottom'#0#17'DefaultItemHeight'#2#15#8'ReadOnl' +'L`'#0#1#7'Command'#3'd'#2#8'ShortCut'#2#9#0#1#7'Command'#3'e'#2#8'ShortCut'
+'y'#9#16'RightClickSelect'#9#8'TabOrder'#2#0#7'Options'#11#17'tvoAutoItemHei' +#3#9' '#0#1#7'Command'#3#250#0#8'ShortCut'#3'B`'#0#0#8'ReadOnly'#9#0#0#0#9'T'
+'ght'#16'tvoHideSelection'#21'tvoKeepCollapsedNodes'#11'tvoReadOnly'#19'tvoR' +'TabSheet'#14'tsDependencies'#7'Caption'#6#7'Used by'#12'ClientHeight'#3#215
+'ightClickSelect'#14'tvoShowButtons'#12'tvoShowLines'#11'tvoShowRoot'#11'tvo' +#1#11'ClientWidth'#3' '#2#0#9'TTreeView'#12'tvDependency'#4'Left'#2#20#6'Hei'
+'ToolTips'#0#0#0#0#9'TTabSheet'#15'tsDocumentation'#7'Caption'#6#13'Document' +'ght'#3#177#1#3'Top'#2#18#5'Width'#3#242#1#7'Anchors'#11#5'akTop'#6'akLeft'#7
+'ation'#12'ClientHeight'#3#215#1#11'ClientWidth'#3#254#1#0#5'TMemo'#16'edtDo' +'akRight'#8'akBottom'#0#17'DefaultItemHeight'#2#15#8'ReadOnly'#9#16'RightCli'
+'cumentation'#4'Left'#2#12#6'Height'#3#178#1#3'Top'#2#18#5'Width'#3#224#1#7 +'ckSelect'#9#8'TabOrder'#2#0#7'Options'#11#17'tvoAutoItemHeight'#16'tvoHideS'
+'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#10'ScrollBars'#7#10 +'election'#21'tvoKeepCollapsedNodes'#11'tvoReadOnly'#19'tvoRightClickSelect'
+'ssAutoBoth'#8'TabOrder'#2#0#8'WordWrap'#8#0#0#0#0#11'TActionList'#11'Action' +#14'tvoShowButtons'#12'tvoShowLines'#11'tvoShowRoot'#11'tvoToolTips'#0#0#0#0
+'List1'#4'left'#3#232#0#3'top'#3#200#0#0#7'TAction'#5'actOK'#7'Caption'#6#2 +#9'TTabSheet'#15'tsDocumentation'#7'Caption'#6#13'Documentation'#12'ClientHe'
+'OK'#18'DisableIfNoHandler'#9#9'OnExecute'#7#12'actOKExecute'#8'OnUpdate'#7 +'ight'#3#215#1#11'ClientWidth'#3' '#2#0#5'TMemo'#16'edtDocumentation'#4'Left'
+#11'actOKUpdate'#0#0#7'TAction'#10'actPropAdd'#7'Caption'#6#12'New Property' +#2#12#6'Height'#3#178#1#3'Top'#2#18#5'Width'#3#2#2#7'Anchors'#11#5'akTop'#6
+#18'DisableIfNoHandler'#9#9'OnExecute'#7#17'actPropAddExecute'#0#0#7'TAction' +'akLeft'#7'akRight'#8'akBottom'#0#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'
+#11'actPropEdit'#7'Caption'#6#13'Edit Property'#18'DisableIfNoHandler'#9#9'O' +#2#0#8'WordWrap'#8#0#0#0#0#11'TActionList'#11'ActionList1'#4'left'#3#232#0#3
+'nExecute'#7#18'actPropEditExecute'#8'OnUpdate'#7#17'actPropEditUpdate'#0#0#7 +'top'#3#200#0#0#7'TAction'#5'actOK'#7'Caption'#6#2'OK'#18'DisableIfNoHandler'
+'TAction'#13'actPropDelete'#7'Caption'#6#15'Delete Property'#18'DisableIfNoH' +#9#9'OnExecute'#7#12'actOKExecute'#8'OnUpdate'#7#11'actOKUpdate'#0#0#7'TActi'
+'andler'#9#9'OnExecute'#7#20'actPropDeleteExecute'#8'OnUpdate'#7#17'actPropE' +'on'#10'actPropAdd'#7'Caption'#6#12'New Property'#18'DisableIfNoHandler'#9#9
+'ditUpdate'#0#0#7'TAction'#8'actApply'#7'Caption'#6#5'Apply'#18'DisableIfNoH' +'OnExecute'#7#17'actPropAddExecute'#0#0#7'TAction'#11'actPropEdit'#7'Caption'
+'andler'#9#9'OnExecute'#7#15'actApplyExecute'#8'OnUpdate'#7#11'actOKUpdate'#0 +#6#13'Edit Property'#18'DisableIfNoHandler'#9#9'OnExecute'#7#18'actPropEditE'
+#0#0#10'TPopupMenu'#10'PopupMenu1'#4'left'#2'i'#3'top'#3#186#0#0#9'TMenuItem' +'xecute'#8'OnUpdate'#7#17'actPropEditUpdate'#0#0#7'TAction'#13'actPropDelete'
+#9'MenuItem1'#6'Action'#7#10'actPropAdd'#7'OnClick'#7#17'actPropAddExecute'#0 +#7'Caption'#6#15'Delete Property'#18'DisableIfNoHandler'#9#9'OnExecute'#7#20
+#0#9'TMenuItem'#9'MenuItem2'#6'Action'#7#11'actPropEdit'#7'OnClick'#7#18'act' +'actPropDeleteExecute'#8'OnUpdate'#7#17'actPropEditUpdate'#0#0#7'TAction'#8
+'PropEditExecute'#0#0#9'TMenuItem'#9'MenuItem3'#6'Action'#7#13'actPropDelete' +'actApply'#7'Caption'#6#5'Apply'#18'DisableIfNoHandler'#9#9'OnExecute'#7#15
+#7'OnClick'#7#20'actPropDeleteExecute'#0#0#0#10'TSynXMLSyn'#10'SynXMLSyn1'#13 +'actApplyExecute'#8'OnUpdate'#7#11'actOKUpdate'#0#0#7'TAction'#9'actMoveUp'#7
+'DefaultFilter'#6'MDocuments XML (*.xml,*.xsd,*.xsl,*.xslt,*.dtd)|*.xml;*.xs' +'Caption'#6#7'Move Up'#18'DisableIfNoHandler'#9#9'OnExecute'#7#16'actMoveUpE'
+'d;*.xsl;*.xslt;*.dtd'#7'Enabled'#8#16'WantBracesParsed'#8#4'left'#3#210#0#3 +'xecute'#8'OnUpdate'#7#15'actMoveUpUpdate'#0#0#7'TAction'#11'actMoveDown'#7
+'top'#3#171#0#0#0#0 +'Caption'#6#9'Move Down'#18'DisableIfNoHandler'#9#9'OnExecute'#7#18'actMoveD'
+'ownExecute'#8'OnUpdate'#7#17'actMoveDownUpdate'#0#0#0#10'TPopupMenu'#10'Pop'
+'upMenu1'#4'left'#2'i'#3'top'#3#186#0#0#9'TMenuItem'#9'MenuItem1'#6'Action'#7
+#10'actPropAdd'#7'OnClick'#7#17'actPropAddExecute'#0#0#9'TMenuItem'#9'MenuIt'
+'em2'#6'Action'#7#11'actPropEdit'#7'OnClick'#7#18'actPropEditExecute'#0#0#9
+'TMenuItem'#9'MenuItem3'#6'Action'#7#13'actPropDelete'#7'OnClick'#7#20'actPr'
+'opDeleteExecute'#0#0#0#10'TSynXMLSyn'#10'SynXMLSyn1'#13'DefaultFilter'#6'MD'
,'ocuments XML (*.xml,*.xsd,*.xsl,*.xslt,*.dtd)|*.xml;*.xsd;*.xsl;*.xslt;*.dt'
+'d'#7'Enabled'#8#16'WantBracesParsed'#8#4'left'#3#210#0#3'top'#3#171#0#0#0#0
]); ]);

View File

@ -28,6 +28,8 @@ type
TfClassEdit = class(TForm) TfClassEdit = class(TForm)
actApply : TAction; actApply : TAction;
actMoveDown: TAction;
actMoveUp: TAction;
actPropDelete: TAction; actPropDelete: TAction;
actPropEdit: TAction; actPropEdit: TAction;
actPropAdd: TAction; actPropAdd: TAction;
@ -40,6 +42,8 @@ type
Button4: TButton; Button4: TButton;
Button5: TButton; Button5: TButton;
Button6 : TButton; Button6 : TButton;
Button7: TButton;
Button8: TButton;
edtParent: TComboBox; edtParent: TComboBox;
edtName: TEdit; edtName: TEdit;
GroupBox1: TGroupBox; GroupBox1: TGroupBox;
@ -61,6 +65,10 @@ type
tvDependency : TTreeView; tvDependency : TTreeView;
tsSourceXSD : TTabSheet; tsSourceXSD : TTabSheet;
procedure actApplyExecute(Sender : TObject); procedure actApplyExecute(Sender : TObject);
procedure actMoveDownExecute(Sender: TObject);
procedure actMoveDownUpdate(Sender: TObject);
procedure actMoveUpExecute(Sender: TObject);
procedure actMoveUpUpdate(Sender: TObject);
procedure actOKExecute(Sender: TObject); procedure actOKExecute(Sender: TObject);
procedure actOKUpdate(Sender: TObject); procedure actOKUpdate(Sender: TObject);
procedure actPropAddExecute(Sender: TObject); procedure actPropAddExecute(Sender: TObject);
@ -79,8 +87,9 @@ type
private private
property UpdateType : TEditType read FUpdateType; property UpdateType : TEditType read FUpdateType;
private private
procedure MovePropertyItem(AItem : TPasProperty; const ANewIndex : Integer);
procedure PrepareParentCombo(); procedure PrepareParentCombo();
procedure LoadProperty(APropDef : TPasProperty); function LoadProperty(APropDef : TPasProperty; const AIndex : Integer) : TListItem;
procedure LoadFromObject(); procedure LoadFromObject();
procedure SaveToObject(); procedure SaveToObject();
@ -112,7 +121,7 @@ var
begin begin
prp := CreateProperty(FObject,FSymbolTable) as TPasProperty; prp := CreateProperty(FObject,FSymbolTable) as TPasProperty;
if Assigned(prp) then begin if Assigned(prp) then begin
LoadProperty(prp); LoadProperty(prp,-1);
end; end;
end; end;
@ -133,6 +142,26 @@ begin
ShowSourceXSD(); ShowSourceXSD();
end; end;
procedure TfClassEdit.actMoveDownExecute(Sender: TObject);
begin
MovePropertyItem(TPasProperty(edtProp.ItemFocused.Data),(edtProp.ItemFocused.Index + 1));
end;
procedure TfClassEdit.actMoveDownUpdate(Sender: TObject);
begin
TAction(Sender).Enabled := Assigned(edtProp.ItemFocused) and ( edtProp.ItemFocused.Index < Pred(edtProp.Items.Count) );
end;
procedure TfClassEdit.actMoveUpExecute(Sender: TObject);
begin
MovePropertyItem(TPasProperty(edtProp.ItemFocused.Data),(edtProp.ItemFocused.Index - 1));
end;
procedure TfClassEdit.actMoveUpUpdate(Sender: TObject);
begin
TAction(Sender).Enabled := Assigned(edtProp.ItemFocused) and ( edtProp.ItemFocused.Index > 0 );
end;
procedure TfClassEdit.actPropDeleteExecute(Sender: TObject); procedure TfClassEdit.actPropDeleteExecute(Sender: TObject);
var var
prop : TPasProperty; prop : TPasProperty;
@ -147,13 +176,15 @@ procedure TfClassEdit.actPropEditExecute(Sender: TObject);
var var
prp : TPasProperty; prp : TPasProperty;
itm : TListItem; itm : TListItem;
oldPos : Integer;
begin begin
itm := edtProp.ItemFocused; itm := edtProp.ItemFocused;
if Assigned(itm) then begin if Assigned(itm) then begin
prp := TPasProperty(itm.Data); prp := TPasProperty(itm.Data);
if UpdateProperty(prp,FSymbolTable) then begin if UpdateProperty(prp,FSymbolTable) then begin
oldPos := itm.Index;
itm.Free(); itm.Free();
LoadProperty(prp); LoadProperty(prp,oldPos);
end; end;
end; end;
end; end;
@ -185,6 +216,46 @@ begin
end; end;
end; end;
procedure TfClassEdit.MovePropertyItem(AItem: TPasProperty; const ANewIndex: Integer);
function FindNewMemberPosition() : Integer;
var
k, kcounter : Integer;
mlist : TList;
pp : TPasProperty;
begin
Result := 0;
kcounter := 0;
mlist := FObject.Members;
for k := 0 to Pred(mlist.Count) do begin
if TPasElement(mlist[k]).InheritsFrom(TPasProperty) then begin
Inc(kcounter);
if ( kcounter = ANewIndex ) then begin
Result := k;
Break;
end;
end;
end;
end;
var
locItem : TListItem;
i : Integer;
begin
if ( AItem <> nil ) and
( ( ANewIndex >= 0 ) and ( ANewIndex < edtProp.Items.Count ) )
then begin
locItem := FindItem(FSymbolTable.GetExternalName(AItem),edtProp.Items);
if ( locItem <> nil ) then
locItem.Free();
FObject.Members.Exchange(FObject.Members.IndexOf(AItem),FindNewMemberPosition());
locItem := LoadProperty(AItem,ANewIndex);
edtProp.ItemFocused := locItem;
edtProp.Selected := locItem;
FApplied := True;
end;
end;
procedure InternalFillList( procedure InternalFillList(
ALs : TStrings; ALs : TStrings;
AContainer : TwstPasTreeContainer AContainer : TwstPasTreeContainer
@ -266,7 +337,7 @@ begin
end; end;
end; end;
procedure TfClassEdit.LoadProperty(APropDef: TPasProperty); function TfClassEdit.LoadProperty(APropDef: TPasProperty; const AIndex : Integer) : TListItem;
var var
itm : TListItem; itm : TListItem;
s, extName : string; s, extName : string;
@ -274,7 +345,10 @@ begin
extName := FSymbolTable.GetExternalName(APropDef); extName := FSymbolTable.GetExternalName(APropDef);
itm := FindItem(extName,edtProp.Items); itm := FindItem(extName,edtProp.Items);
if ( itm = nil ) then begin if ( itm = nil ) then begin
itm := edtProp.Items.Add(); if ( AIndex >= 0 ) and ( AIndex < edtProp.Items.Count ) then
itm := edtProp.Items.Insert(AIndex)
else
itm := edtProp.Items.Add();
end; end;
itm.Caption := extName; itm.Caption := extName;
itm.SubItems.Add(FSymbolTable.GetExternalName(APropDef.VarType)); itm.SubItems.Add(FSymbolTable.GetExternalName(APropDef.VarType));
@ -285,6 +359,7 @@ begin
end; end;
itm.SubItems.Add(s); itm.SubItems.Add(s);
itm.Data := APropDef; itm.Data := APropDef;
Result := itm;
end; end;
procedure TfClassEdit.LoadFromObject(); procedure TfClassEdit.LoadFromObject();
@ -303,7 +378,7 @@ begin
for i := 0 to Pred(FObject.Members.Count) do begin for i := 0 to Pred(FObject.Members.Count) do begin
if TPasElement(FObject.Members[i]).InheritsFrom(TPasProperty) then begin if TPasElement(FObject.Members[i]).InheritsFrom(TPasProperty) then begin
prp := TPasProperty(FObject.Members[i]); prp := TPasProperty(FObject.Members[i]);
LoadProperty(prp); LoadProperty(prp,-1);
end; end;
end; end;
if Assigned(FObject.AncestorType) then begin if Assigned(FObject.AncestorType) then begin

View File

@ -2,16 +2,17 @@ object fRecordEdit: TfRecordEdit
Left = 609 Left = 609
Height = 542 Height = 542
Top = 181 Top = 181
Width = 517 Width = 559
ActiveControl = PC ActiveControl = PC
Caption = 'fRecordEdit' Caption = 'fRecordEdit'
ClientHeight = 542 ClientHeight = 542
ClientWidth = 517 ClientWidth = 559
ParentFont = False
Position = poDesktopCenter Position = poDesktopCenter
LCLVersion = '0.9.25' LCLVersion = '0.9.26.1'
object PC: TPageControl object PC: TPageControl
Height = 492 Height = 492
Width = 517 Width = 559
ActivePage = TabSheet1 ActivePage = TabSheet1
Align = alClient Align = alClient
TabIndex = 0 TabIndex = 0
@ -21,7 +22,7 @@ object fRecordEdit: TfRecordEdit
object TabSheet1: TTabSheet object TabSheet1: TTabSheet
Caption = 'Record Type' Caption = 'Record Type'
ClientHeight = 466 ClientHeight = 466
ClientWidth = 509 ClientWidth = 551
object Label1: TLabel object Label1: TLabel
Left = 20 Left = 20
Height = 14 Height = 14
@ -34,7 +35,7 @@ object fRecordEdit: TfRecordEdit
Left = 76 Left = 76
Height = 23 Height = 23
Top = 34 Top = 34
Width = 409 Width = 451
Anchors = [akTop, akLeft, akRight] Anchors = [akTop, akLeft, akRight]
TabOrder = 0 TabOrder = 0
end end
@ -42,15 +43,15 @@ object fRecordEdit: TfRecordEdit
Left = 20 Left = 20
Height = 320 Height = 320
Top = 82 Top = 82
Width = 465 Width = 507
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
Caption = ' Fields ' Caption = ' Fields '
ClientHeight = 302 ClientHeight = 302
ClientWidth = 461 ClientWidth = 503
TabOrder = 1 TabOrder = 1
object edtFields: TListView object edtFields: TListView
Height = 302 Height = 302
Width = 461 Width = 503
Align = alClient Align = alClient
Columns = < Columns = <
item item
@ -65,7 +66,9 @@ object fRecordEdit: TfRecordEdit
Caption = 'Attribute' Caption = 'Attribute'
Width = 60 Width = 60
end> end>
HideSelection = False
PopupMenu = PopupMenu1 PopupMenu = PopupMenu1
RowSelect = True
TabOrder = 0 TabOrder = 0
ViewStyle = vsReport ViewStyle = vsReport
end end
@ -100,21 +103,42 @@ object fRecordEdit: TfRecordEdit
BorderSpacing.InnerBorder = 4 BorderSpacing.InnerBorder = 4
TabOrder = 4 TabOrder = 4
end end
object Button7: TButton
Left = 383
Height = 25
Top = 418
Width = 70
Action = actMoveUp
Anchors = [akRight, akBottom]
BorderSpacing.InnerBorder = 4
TabOrder = 5
end
object Button8: TButton
Left = 458
Height = 25
Top = 418
Width = 70
Action = actMoveDown
Anchors = [akRight, akBottom]
BorderSpacing.InnerBorder = 4
TabOrder = 6
end
end end
object tsSourceXSD: TTabSheet object tsSourceXSD: TTabSheet
Caption = 'XSD' Caption = 'XSD'
ClientHeight = 466 ClientHeight = 466
ClientWidth = 509 ClientWidth = 551
object edtSourceXSD: TSynEdit object edtSourceXSD: TSynEdit
Left = 12 Left = 12
Height = 432 Height = 432
Top = 18 Top = 18
Width = 480 Width = 522
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
Font.Height = -20 Font.Height = -20
Font.Name = 'courier' Font.Name = 'courier'
Font.Pitch = fpFixed Font.Pitch = fpFixed
ParentColor = False ParentColor = False
ParentFont = False
TabOrder = 0 TabOrder = 0
BookMarkOptions.Xoffset = 42 BookMarkOptions.Xoffset = 42
Gutter.DigitCount = 2 Gutter.DigitCount = 2
@ -449,12 +473,12 @@ object fRecordEdit: TfRecordEdit
object tsDependencies: TTabSheet object tsDependencies: TTabSheet
Caption = 'Used by' Caption = 'Used by'
ClientHeight = 466 ClientHeight = 466
ClientWidth = 509 ClientWidth = 551
object tvDependency: TTreeView object tvDependency: TTreeView
Left = 20 Left = 20
Height = 433 Height = 433
Top = 18 Top = 18
Width = 464 Width = 506
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
DefaultItemHeight = 15 DefaultItemHeight = 15
ReadOnly = True ReadOnly = True
@ -466,12 +490,12 @@ object fRecordEdit: TfRecordEdit
object tsDocumentation: TTabSheet object tsDocumentation: TTabSheet
Caption = 'Documentation' Caption = 'Documentation'
ClientHeight = 466 ClientHeight = 466
ClientWidth = 509 ClientWidth = 551
object edtDocumentation: TMemo object edtDocumentation: TMemo
Left = 12 Left = 12
Height = 434 Height = 434
Top = 18 Top = 18
Width = 480 Width = 522
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
ScrollBars = ssAutoBoth ScrollBars = ssAutoBoth
TabOrder = 0 TabOrder = 0
@ -482,13 +506,13 @@ object fRecordEdit: TfRecordEdit
object Panel1: TPanel object Panel1: TPanel
Height = 50 Height = 50
Top = 492 Top = 492
Width = 517 Width = 559
Align = alBottom Align = alBottom
ClientHeight = 50 ClientHeight = 50
ClientWidth = 517 ClientWidth = 559
TabOrder = 1 TabOrder = 1
object Button1: TButton object Button1: TButton
Left = 253 Left = 295
Height = 25 Height = 25
Top = 10 Top = 10
Width = 75 Width = 75
@ -498,7 +522,7 @@ object fRecordEdit: TfRecordEdit
TabOrder = 0 TabOrder = 0
end end
object Button2: TButton object Button2: TButton
Left = 341 Left = 383
Height = 25 Height = 25
Top = 10 Top = 10
Width = 75 Width = 75
@ -510,7 +534,7 @@ object fRecordEdit: TfRecordEdit
TabOrder = 1 TabOrder = 1
end end
object Button6: TButton object Button6: TButton
Left = 429 Left = 471
Height = 25 Height = 25
Top = 10 Top = 10
Width = 75 Width = 75
@ -551,6 +575,18 @@ object fRecordEdit: TfRecordEdit
OnExecute = actApplyExecute OnExecute = actApplyExecute
OnUpdate = actOKUpdate OnUpdate = actOKUpdate
end end
object actMoveDown: TAction
Caption = 'Move Down'
DisableIfNoHandler = True
OnExecute = actMoveDownExecute
OnUpdate = actMoveDownUpdate
end
object actMoveUp: TAction
Caption = 'Move Up'
DisableIfNoHandler = True
OnExecute = actMoveUpExecute
OnUpdate = actMoveUpUpdate
end
end end
object PopupMenu1: TPopupMenu object PopupMenu1: TPopupMenu
left = 112 left = 112

View File

@ -2,118 +2,128 @@
LazarusResources.Add('TfRecordEdit','FORMDATA',[ LazarusResources.Add('TfRecordEdit','FORMDATA',[
'TPF0'#12'TfRecordEdit'#11'fRecordEdit'#4'Left'#3'a'#2#6'Height'#3#30#2#3'Top' 'TPF0'#12'TfRecordEdit'#11'fRecordEdit'#4'Left'#3'a'#2#6'Height'#3#30#2#3'Top'
+#3#181#0#5'Width'#3#5#2#13'ActiveControl'#7#2'PC'#7'Caption'#6#11'fRecordEdi' +#3#181#0#5'Width'#3'/'#2#13'ActiveControl'#7#2'PC'#7'Caption'#6#11'fRecordEd'
+'t'#12'ClientHeight'#3#30#2#11'ClientWidth'#3#5#2#8'Position'#7#15'poDesktop' +'it'#12'ClientHeight'#3#30#2#11'ClientWidth'#3'/'#2#10'ParentFont'#8#8'Posit'
+'Center'#10'LCLVersion'#6#6'0.9.25'#0#12'TPageControl'#2'PC'#6'Height'#3#236 +'ion'#7#15'poDesktopCenter'#10'LCLVersion'#6#8'0.9.26.1'#0#12'TPageControl'#2
+#1#5'Width'#3#5#2#10'ActivePage'#7#9'TabSheet1'#5'Align'#7#8'alClient'#8'Tab' +'PC'#6'Height'#3#236#1#5'Width'#3'/'#2#10'ActivePage'#7#9'TabSheet1'#5'Align'
+'Index'#2#0#8'TabOrder'#2#0#8'OnChange'#7#8'PCChange'#13'OnPageChanged'#7#8 +#7#8'alClient'#8'TabIndex'#2#0#8'TabOrder'#2#0#8'OnChange'#7#8'PCChange'#13
+'PCChange'#0#9'TTabSheet'#9'TabSheet1'#7'Caption'#6#11'Record Type'#12'Clien' +'OnPageChanged'#7#8'PCChange'#0#9'TTabSheet'#9'TabSheet1'#7'Caption'#6#11'Re'
+'tHeight'#3#210#1#11'ClientWidth'#3#253#1#0#6'TLabel'#6'Label1'#4'Left'#2#20 +'cord Type'#12'ClientHeight'#3#210#1#11'ClientWidth'#3''''#2#0#6'TLabel'#6'L'
+#6'Height'#2#14#3'Top'#2'"'#5'Width'#2#28#7'Caption'#6#4'Name'#11'ParentColo' +'abel1'#4'Left'#2#20#6'Height'#2#14#3'Top'#2'"'#5'Width'#2#28#7'Caption'#6#4
+'r'#8#0#0#5'TEdit'#7'edtName'#4'Left'#2'L'#6'Height'#2#23#3'Top'#2'"'#5'Widt' +'Name'#11'ParentColor'#8#0#0#5'TEdit'#7'edtName'#4'Left'#2'L'#6'Height'#2#23
+'h'#3#153#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#0#0#0 +#3'Top'#2'"'#5'Width'#3#195#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8
+#9'TGroupBox'#9'GroupBox1'#4'Left'#2#20#6'Height'#3'@'#1#3'Top'#2'R'#5'Width' +'TabOrder'#2#0#0#0#9'TGroupBox'#9'GroupBox1'#4'Left'#2#20#6'Height'#3'@'#1#3
+#3#209#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#7'Caption' +'Top'#2'R'#5'Width'#3#251#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'ak'
+#6#10' Fields '#12'ClientHeight'#3'.'#1#11'ClientWidth'#3#205#1#8'TabOrder' +'Bottom'#0#7'Caption'#6#10' Fields '#12'ClientHeight'#3'.'#1#11'ClientWidt'
+#2#1#0#9'TListView'#9'edtFields'#6'Height'#3'.'#1#5'Width'#3#205#1#5'Align'#7 +'h'#3#247#1#8'TabOrder'#2#1#0#9'TListView'#9'edtFields'#6'Height'#3'.'#1#5'W'
+#8'alClient'#7'Columns'#14#1#7'Caption'#6#4'Name'#5'Width'#3#200#0#0#1#7'Cap' +'idth'#3#247#1#5'Align'#7#8'alClient'#7'Columns'#14#1#7'Caption'#6#4'Name'#5
+'tion'#6#4'Type'#5'Width'#3#190#0#0#1#7'Caption'#6#9'Attribute'#5'Width'#2'<' +'Width'#3#200#0#0#1#7'Caption'#6#4'Type'#5'Width'#3#190#0#0#1#7'Caption'#6#9
+#0#0#9'PopupMenu'#7#10'PopupMenu1'#8'TabOrder'#2#0#9'ViewStyle'#7#8'vsReport' +'Attribute'#5'Width'#2'<'#0#0#13'HideSelection'#8#9'PopupMenu'#7#10'PopupMen'
+#0#0#0#7'TButton'#7'Button3'#4'Left'#2#20#6'Height'#2#25#3'Top'#3#162#1#5'Wi' +'u1'#9'RowSelect'#9#8'TabOrder'#2#0#9'ViewStyle'#7#8'vsReport'#0#0#0#7'TButt'
+'dth'#2'd'#6'Action'#7#10'actPropAdd'#7'Anchors'#11#6'akLeft'#8'akBottom'#0 +'on'#7'Button3'#4'Left'#2#20#6'Height'#2#25#3'Top'#3#162#1#5'Width'#2'd'#6'A'
+#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#2#0#0#7'TButton'#7'Button4' +'ction'#7#10'actPropAdd'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#25'BorderSpac'
+#4'Left'#3#132#0#6'Height'#2#25#3'Top'#3#162#1#5'Width'#2'd'#6'Action'#7#11 +'ing.InnerBorder'#2#4#8'TabOrder'#2#2#0#0#7'TButton'#7'Button4'#4'Left'#3#132
+'actPropEdit'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBo' +#0#6'Height'#2#25#3'Top'#3#162#1#5'Width'#2'd'#6'Action'#7#11'actPropEdit'#7
+'rder'#2#4#8'TabOrder'#2#3#0#0#7'TButton'#7'Button5'#4'Left'#3#244#0#6'Heigh' +'Anchors'#11#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#8'Tab'
+'t'#2#25#3'Top'#3#162#1#5'Width'#2'd'#6'Action'#7#13'actPropDelete'#7'Anchor' +'Order'#2#3#0#0#7'TButton'#7'Button5'#4'Left'#3#244#0#6'Height'#2#25#3'Top'#3
+'s'#11#6'akLeft'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder' +#162#1#5'Width'#2'd'#6'Action'#7#13'actPropDelete'#7'Anchors'#11#6'akLeft'#8
+#2#4#0#0#0#9'TTabSheet'#11'tsSourceXSD'#7'Caption'#6#3'XSD'#12'ClientHeight' +'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#4#0#0#7'TButton'
+#3#210#1#11'ClientWidth'#3#253#1#0#8'TSynEdit'#12'edtSourceXSD'#4'Left'#2#12 +#7'Button7'#4'Left'#3''#1#6'Height'#2#25#3'Top'#3#162#1#5'Width'#2'F'#6'Act'
+#6'Height'#3#176#1#3'Top'#2#18#5'Width'#3#224#1#7'Anchors'#11#5'akTop'#6'akL' +'ion'#7#9'actMoveUp'#7'Anchors'#11#7'akRight'#8'akBottom'#0#25'BorderSpacing'
+'eft'#7'akRight'#8'akBottom'#0#11'Font.Height'#2#236#9'Font.Name'#6#7'courie' +'.InnerBorder'#2#4#8'TabOrder'#2#5#0#0#7'TButton'#7'Button8'#4'Left'#3#202#1
+'r'#10'Font.Pitch'#7#7'fpFixed'#11'ParentColor'#8#8'TabOrder'#2#0#23'BookMar' +#6'Height'#2#25#3'Top'#3#162#1#5'Width'#2'F'#6'Action'#7#11'actMoveDown'#7'A'
+'kOptions.Xoffset'#2'*'#17'Gutter.DigitCount'#2#2#22'Gutter.ShowLineNumbers' +'nchors'#11#7'akRight'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#8'Tab'
+#9#12'Gutter.Width'#2#10#22'Gutter.ShowCodeFolding'#9#11'Highlighter'#7#10'S' +'Order'#2#6#0#0#0#9'TTabSheet'#11'tsSourceXSD'#7'Caption'#6#3'XSD'#12'Client'
+'ynXMLSyn1'#10'Keystrokes'#14#1#7'Command'#2#3#8'ShortCut'#2'&'#0#1#7'Comman' +'Height'#3#210#1#11'ClientWidth'#3''''#2#0#8'TSynEdit'#12'edtSourceXSD'#4'Le'
+'d'#2'g'#8'ShortCut'#3'& '#0#1#7'Command'#3#211#0#8'ShortCut'#3'&@'#0#1#7'Co' +'ft'#2#12#6'Height'#3#176#1#3'Top'#2#18#5'Width'#3#10#2#7'Anchors'#11#5'akTo'
+'mmand'#2#4#8'ShortCut'#2'('#0#1#7'Command'#2'h'#8'ShortCut'#3'( '#0#1#7'Com' +'p'#6'akLeft'#7'akRight'#8'akBottom'#0#11'Font.Height'#2#236#9'Font.Name'#6#7
+'mand'#3#212#0#8'ShortCut'#3'(@'#0#1#7'Command'#2#1#8'ShortCut'#2'%'#0#1#7'C' +'courier'#10'Font.Pitch'#7#7'fpFixed'#11'ParentColor'#8#10'ParentFont'#8#8'T'
+'ommand'#2'e'#8'ShortCut'#3'% '#0#1#7'Command'#2#5#8'ShortCut'#3'%@'#0#1#7'C' +'abOrder'#2#0#23'BookMarkOptions.Xoffset'#2'*'#17'Gutter.DigitCount'#2#2#22
+'ommand'#2'i'#8'ShortCut'#3'%`'#0#1#7'Command'#2#2#8'ShortCut'#2''''#0#1#7'C' +'Gutter.ShowLineNumbers'#9#12'Gutter.Width'#2#10#22'Gutter.ShowCodeFolding'#9
+'ommand'#2'f'#8'ShortCut'#3''' '#0#1#7'Command'#2#6#8'ShortCut'#3'''@'#0#1#7 +#11'Highlighter'#7#10'SynXMLSyn1'#10'Keystrokes'#14#1#7'Command'#2#3#8'Short'
+'Command'#2'j'#8'ShortCut'#3'''`'#0#1#7'Command'#2#10#8'ShortCut'#2'"'#0#1#7 +'Cut'#2'&'#0#1#7'Command'#2'g'#8'ShortCut'#3'& '#0#1#7'Command'#3#211#0#8'Sh'
+'Command'#2'n'#8'ShortCut'#3'" '#0#1#7'Command'#2#14#8'ShortCut'#3'"@'#0#1#7 +'ortCut'#3'&@'#0#1#7'Command'#2#4#8'ShortCut'#2'('#0#1#7'Command'#2'h'#8'Sho'
+'Command'#2'r'#8'ShortCut'#3'"`'#0#1#7'Command'#2#9#8'ShortCut'#2'!'#0#1#7'C' +'rtCut'#3'( '#0#1#7'Command'#3#212#0#8'ShortCut'#3'(@'#0#1#7'Command'#2#1#8
+'ommand'#2'm'#8'ShortCut'#3'! '#0#1#7'Command'#2#13#8'ShortCut'#3'!@'#0#1#7 +'ShortCut'#2'%'#0#1#7'Command'#2'e'#8'ShortCut'#3'% '#0#1#7'Command'#2#5#8'S'
+'Command'#2'q'#8'ShortCut'#3'!`'#0#1#7'Command'#2#7#8'ShortCut'#2'$'#0#1#7'C' +'hortCut'#3'%@'#0#1#7'Command'#2'i'#8'ShortCut'#3'%`'#0#1#7'Command'#2#2#8'S'
+'ommand'#2'k'#8'ShortCut'#3'$ '#0#1#7'Command'#2#15#8'ShortCut'#3'$@'#0#1#7 +'hortCut'#2''''#0#1#7'Command'#2'f'#8'ShortCut'#3''' '#0#1#7'Command'#2#6#8
+'Command'#2's'#8'ShortCut'#3'$`'#0#1#7'Command'#2#8#8'ShortCut'#2'#'#0#1#7'C' +'ShortCut'#3'''@'#0#1#7'Command'#2'j'#8'ShortCut'#3'''`'#0#1#7'Command'#2#10
+'ommand'#2'l'#8'ShortCut'#3'# '#0#1#7'Command'#2#16#8'ShortCut'#3'#@'#0#1#7 +#8'ShortCut'#2'"'#0#1#7'Command'#2'n'#8'ShortCut'#3'" '#0#1#7'Command'#2#14#8
+'Command'#2't'#8'ShortCut'#3'#`'#0#1#7'Command'#3#223#0#8'ShortCut'#2'-'#0#1 +'ShortCut'#3'"@'#0#1#7'Command'#2'r'#8'ShortCut'#3'"`'#0#1#7'Command'#2#9#8
+#7'Command'#3#201#0#8'ShortCut'#3'-@'#0#1#7'Command'#3'\'#2#8'ShortCut'#3'- ' +'ShortCut'#2'!'#0#1#7'Command'#2'm'#8'ShortCut'#3'! '#0#1#7'Command'#2#13#8
+#0#1#7'Command'#3#246#1#8'ShortCut'#2'.'#0#1#7'Command'#3'['#2#8'ShortCut'#3 +'ShortCut'#3'!@'#0#1#7'Command'#2'q'#8'ShortCut'#3'!`'#0#1#7'Command'#2#7#8
+'. '#0#1#7'Command'#3#245#1#8'ShortCut'#2#8#0#1#7'Command'#3#245#1#8'ShortCu' +'ShortCut'#2'$'#0#1#7'Command'#2'k'#8'ShortCut'#3'$ '#0#1#7'Command'#2#15#8
+'t'#3#8' '#0#1#7'Command'#3#248#1#8'ShortCut'#3#8'@'#0#1#7'Command'#3'Y'#2#8 +'ShortCut'#3'$@'#0#1#7'Command'#2's'#8'ShortCut'#3'$`'#0#1#7'Command'#2#8#8
+'ShortCut'#4#8#128#0#0#0#1#7'Command'#3'Z'#2#8'ShortCut'#4#8#160#0#0#0#1#7'C' +'ShortCut'#2'#'#0#1#7'Command'#2'l'#8'ShortCut'#3'# '#0#1#7'Command'#2#16#8
+'ommand'#3#253#1#8'ShortCut'#2#13#0#1#7'Command'#3#199#0#8'ShortCut'#3'A@'#0 +'ShortCut'#3'#@'#0#1#7'Command'#2't'#8'ShortCut'#3'#`'#0#1#7'Command'#3#223#0
+#1#7'Command'#3#201#0#8'ShortCut'#3'C@'#0#1#7'Command'#3'b'#2#8'ShortCut'#3 +#8'ShortCut'#2'-'#0#1#7'Command'#3#201#0#8'ShortCut'#3'-@'#0#1#7'Command'#3
+'I`'#0#1#7'Command'#3#253#1#8'ShortCut'#3'M@'#0#1#7'Command'#3#254#1#8'Short' +'\'#2#8'ShortCut'#3'- '#0#1#7'Command'#3#246#1#8'ShortCut'#2'.'#0#1#7'Comman'
+'Cut'#3'N@'#0#1#7'Command'#3#247#1#8'ShortCut'#3'T@'#0#1#7'Command'#3'c'#2#8 +'d'#3'['#2#8'ShortCut'#3'. '#0#1#7'Command'#3#245#1#8'ShortCut'#2#8#0#1#7'Co'
+'ShortCut'#3'U`'#0#1#7'Command'#3'\'#2#8'ShortCut'#3'V@'#0#1#7'Command'#3'[' +'mmand'#3#245#1#8'ShortCut'#3#8' '#0#1#7'Command'#3#248#1#8'ShortCut'#3#8'@'
+#2#8'ShortCut'#3'X@'#0#1#7'Command'#3#251#1#8'ShortCut'#3'Y@'#0#1#7'Command' +#0#1#7'Command'#3'Y'#2#8'ShortCut'#4#8#128#0#0#0#1#7'Command'#3'Z'#2#8'Short'
+#3#250#1#8'ShortCut'#3'Y`'#0#1#7'Command'#3'Y'#2#8'ShortCut'#3'Z@'#0#1#7'Com' +'Cut'#4#8#160#0#0#0#1#7'Command'#3#253#1#8'ShortCut'#2#13#0#1#7'Command'#3
+'mand'#3'Z'#2#8'ShortCut'#3'Z`'#0#1#7'Command'#3'-'#1#8'ShortCut'#3'0@'#0#1#7 +#199#0#8'ShortCut'#3'A@'#0#1#7'Command'#3#201#0#8'ShortCut'#3'C@'#0#1#7'Comm'
+'Command'#3'.'#1#8'ShortCut'#3'1@'#0#1#7'Command'#3'/'#1#8'ShortCut'#3'2@'#0 +'and'#3'b'#2#8'ShortCut'#3'I`'#0#1#7'Command'#3#253#1#8'ShortCut'#3'M@'#0#1#7
+#1#7'Command'#3'0'#1#8'ShortCut'#3'3@'#0#1#7'Command'#3'1'#1#8'ShortCut'#3'4' +'Command'#3#254#1#8'ShortCut'#3'N@'#0#1#7'Command'#3#247#1#8'ShortCut'#3'T@'
,'@'#0#1#7'Command'#3'2'#1#8'ShortCut'#3'5@'#0#1#7'Command'#3'3'#1#8'ShortCut' ,#0#1#7'Command'#3'c'#2#8'ShortCut'#3'U`'#0#1#7'Command'#3'\'#2#8'ShortCut'#3
+#3'6@'#0#1#7'Command'#3'4'#1#8'ShortCut'#3'7@'#0#1#7'Command'#3'5'#1#8'Short' +'V@'#0#1#7'Command'#3'['#2#8'ShortCut'#3'X@'#0#1#7'Command'#3#251#1#8'ShortC'
+'Cut'#3'8@'#0#1#7'Command'#3'6'#1#8'ShortCut'#3'9@'#0#1#7'Command'#3'_'#1#8 +'ut'#3'Y@'#0#1#7'Command'#3#250#1#8'ShortCut'#3'Y`'#0#1#7'Command'#3'Y'#2#8
+'ShortCut'#3'0`'#0#1#7'Command'#3'`'#1#8'ShortCut'#3'1`'#0#1#7'Command'#3'a' +'ShortCut'#3'Z@'#0#1#7'Command'#3'Z'#2#8'ShortCut'#3'Z`'#0#1#7'Command'#3'-'
+#1#8'ShortCut'#3'2`'#0#1#7'Command'#3'b'#1#8'ShortCut'#3'3`'#0#1#7'Command'#3 +#1#8'ShortCut'#3'0@'#0#1#7'Command'#3'.'#1#8'ShortCut'#3'1@'#0#1#7'Command'#3
+'c'#1#8'ShortCut'#3'4`'#0#1#7'Command'#3'd'#1#8'ShortCut'#3'5`'#0#1#7'Comman' +'/'#1#8'ShortCut'#3'2@'#0#1#7'Command'#3'0'#1#8'ShortCut'#3'3@'#0#1#7'Comman'
+'d'#3'e'#1#8'ShortCut'#3'6`'#0#1#7'Command'#3'f'#1#8'ShortCut'#3'7`'#0#1#7'C' +'d'#3'1'#1#8'ShortCut'#3'4@'#0#1#7'Command'#3'2'#1#8'ShortCut'#3'5@'#0#1#7'C'
+'ommand'#3'g'#1#8'ShortCut'#3'8`'#0#1#7'Command'#3'h'#1#8'ShortCut'#3'9`'#0#1 +'ommand'#3'3'#1#8'ShortCut'#3'6@'#0#1#7'Command'#3'4'#1#8'ShortCut'#3'7@'#0#1
+#7'Command'#3#231#0#8'ShortCut'#3'N`'#0#1#7'Command'#3#232#0#8'ShortCut'#3'C' +#7'Command'#3'5'#1#8'ShortCut'#3'8@'#0#1#7'Command'#3'6'#1#8'ShortCut'#3'9@'
+'`'#0#1#7'Command'#3#233#0#8'ShortCut'#3'L`'#0#1#7'Command'#3'd'#2#8'ShortCu' +#0#1#7'Command'#3'_'#1#8'ShortCut'#3'0`'#0#1#7'Command'#3'`'#1#8'ShortCut'#3
+'t'#2#9#0#1#7'Command'#3'e'#2#8'ShortCut'#3#9' '#0#1#7'Command'#3#250#0#8'Sh' +'1`'#0#1#7'Command'#3'a'#1#8'ShortCut'#3'2`'#0#1#7'Command'#3'b'#1#8'ShortCu'
+'ortCut'#3'B`'#0#0#8'ReadOnly'#9#0#0#0#9'TTabSheet'#14'tsDependencies'#7'Cap' +'t'#3'3`'#0#1#7'Command'#3'c'#1#8'ShortCut'#3'4`'#0#1#7'Command'#3'd'#1#8'Sh'
+'tion'#6#7'Used by'#12'ClientHeight'#3#210#1#11'ClientWidth'#3#253#1#0#9'TTr' +'ortCut'#3'5`'#0#1#7'Command'#3'e'#1#8'ShortCut'#3'6`'#0#1#7'Command'#3'f'#1
+'eeView'#12'tvDependency'#4'Left'#2#20#6'Height'#3#177#1#3'Top'#2#18#5'Width' +#8'ShortCut'#3'7`'#0#1#7'Command'#3'g'#1#8'ShortCut'#3'8`'#0#1#7'Command'#3
+#3#208#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#17'Defaul' +'h'#1#8'ShortCut'#3'9`'#0#1#7'Command'#3#231#0#8'ShortCut'#3'N`'#0#1#7'Comma'
+'tItemHeight'#2#15#8'ReadOnly'#9#16'RightClickSelect'#9#8'TabOrder'#2#0#7'Op' +'nd'#3#232#0#8'ShortCut'#3'C`'#0#1#7'Command'#3#233#0#8'ShortCut'#3'L`'#0#1#7
+'tions'#11#17'tvoAutoItemHeight'#16'tvoHideSelection'#21'tvoKeepCollapsedNod' +'Command'#3'd'#2#8'ShortCut'#2#9#0#1#7'Command'#3'e'#2#8'ShortCut'#3#9' '#0#1
+'es'#11'tvoReadOnly'#19'tvoRightClickSelect'#14'tvoShowButtons'#12'tvoShowLi' +#7'Command'#3#250#0#8'ShortCut'#3'B`'#0#0#8'ReadOnly'#9#0#0#0#9'TTabSheet'#14
+'nes'#11'tvoShowRoot'#11'tvoToolTips'#0#0#0#0#9'TTabSheet'#15'tsDocumentatio' +'tsDependencies'#7'Caption'#6#7'Used by'#12'ClientHeight'#3#210#1#11'ClientW'
+'n'#7'Caption'#6#13'Documentation'#12'ClientHeight'#3#210#1#11'ClientWidth'#3 +'idth'#3''''#2#0#9'TTreeView'#12'tvDependency'#4'Left'#2#20#6'Height'#3#177#1
+#253#1#0#5'TMemo'#16'edtDocumentation'#4'Left'#2#12#6'Height'#3#178#1#3'Top' +#3'Top'#2#18#5'Width'#3#250#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8
+#2#18#5'Width'#3#224#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBotto' +'akBottom'#0#17'DefaultItemHeight'#2#15#8'ReadOnly'#9#16'RightClickSelect'#9
+'m'#0#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#8'WordWrap'#8#0#0#0#0#6 +#8'TabOrder'#2#0#7'Options'#11#17'tvoAutoItemHeight'#16'tvoHideSelection'#21
+'TPanel'#6'Panel1'#6'Height'#2'2'#3'Top'#3#236#1#5'Width'#3#5#2#5'Align'#7#8 +'tvoKeepCollapsedNodes'#11'tvoReadOnly'#19'tvoRightClickSelect'#14'tvoShowBu'
+'alBottom'#12'ClientHeight'#2'2'#11'ClientWidth'#3#5#2#8'TabOrder'#2#1#0#7'T' +'ttons'#12'tvoShowLines'#11'tvoShowRoot'#11'tvoToolTips'#0#0#0#0#9'TTabSheet'
+'Button'#7'Button1'#4'Left'#3#253#0#6'Height'#2#25#3'Top'#2#10#5'Width'#2'K' +#15'tsDocumentation'#7'Caption'#6#13'Documentation'#12'ClientHeight'#3#210#1
+#6'Action'#7#5'actOK'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.I' +#11'ClientWidth'#3''''#2#0#5'TMemo'#16'edtDocumentation'#4'Left'#2#12#6'Heig'
+'nnerBorder'#2#4#8'TabOrder'#2#0#0#0#7'TButton'#7'Button2'#4'Left'#3'U'#1#6 +'ht'#3#178#1#3'Top'#2#18#5'Width'#3#10#2#7'Anchors'#11#5'akTop'#6'akLeft'#7
+'Height'#2#25#3'Top'#2#10#5'Width'#2'K'#7'Anchors'#11#5'akTop'#7'akRight'#0 +'akRight'#8'akBottom'#0#10'ScrollBars'#7#10'ssAutoBoth'#8'TabOrder'#2#0#8'Wo'
+#25'BorderSpacing.InnerBorder'#2#4#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'Mod' +'rdWrap'#8#0#0#0#0#6'TPanel'#6'Panel1'#6'Height'#2'2'#3'Top'#3#236#1#5'Width'
+'alResult'#2#2#8'TabOrder'#2#1#0#0#7'TButton'#7'Button6'#4'Left'#3#173#1#6'H' +#3'/'#2#5'Align'#7#8'alBottom'#12'ClientHeight'#2'2'#11'ClientWidth'#3'/'#2#8
+'eight'#2#25#3'Top'#2#10#5'Width'#2'K'#6'Action'#7#8'actApply'#7'Anchors'#11 +'TabOrder'#2#1#0#7'TButton'#7'Button1'#4'Left'#3''''#1#6'Height'#2#25#3'Top'
+#5'akTop'#7'akRight'#0#8'TabOrder'#2#2#0#0#0#11'TActionList'#11'ActionList1' +#2#10#5'Width'#2'K'#6'Action'#7#5'actOK'#7'Anchors'#11#5'akTop'#7'akRight'#0
+#4'left'#3#128#0#3'top'#3#208#0#0#7'TAction'#5'actOK'#7'Caption'#6#2'OK'#18 +#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#0#0#0#7'TButton'#7'Button2'
+'DisableIfNoHandler'#9#9'OnExecute'#7#12'actOKExecute'#8'OnUpdate'#7#11'actO' +#4'Left'#3''#1#6'Height'#2#25#3'Top'#2#10#5'Width'#2'K'#7'Anchors'#11#5'akT'
+'KUpdate'#0#0#7'TAction'#10'actPropAdd'#7'Caption'#6#12'New Property'#18'Dis' +'op'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#4#6'Cancel'#9#7'Caption'#6
+'ableIfNoHandler'#9#9'OnExecute'#7#17'actPropAddExecute'#0#0#7'TAction'#11'a' +#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#1#0#0#7'TButton'#7'Button6'#4'L'
+'ctPropEdit'#7'Caption'#6#13'Edit Property'#18'DisableIfNoHandler'#9#9'OnExe' +'eft'#3#215#1#6'Height'#2#25#3'Top'#2#10#5'Width'#2'K'#6'Action'#7#8'actAppl'
+'cute'#7#18'actPropEditExecute'#8'OnUpdate'#7#17'actPropEditUpdate'#0#0#7'TA' +'y'#7'Anchors'#11#5'akTop'#7'akRight'#0#8'TabOrder'#2#2#0#0#0#11'TActionList'
+'ction'#13'actPropDelete'#7'Caption'#6#15'Delete Property'#18'DisableIfNoHan' +#11'ActionList1'#4'left'#3#128#0#3'top'#3#208#0#0#7'TAction'#5'actOK'#7'Capt'
+'dler'#9#9'OnExecute'#7#20'actPropDeleteExecute'#8'OnUpdate'#7#17'actPropEdi' +'ion'#6#2'OK'#18'DisableIfNoHandler'#9#9'OnExecute'#7#12'actOKExecute'#8'OnU'
+'tUpdate'#0#0#7'TAction'#8'actApply'#7'Caption'#6#5'Apply'#18'DisableIfNoHan' +'pdate'#7#11'actOKUpdate'#0#0#7'TAction'#10'actPropAdd'#7'Caption'#6#12'New '
+'dler'#9#9'OnExecute'#7#15'actApplyExecute'#8'OnUpdate'#7#11'actOKUpdate'#0#0 +'Property'#18'DisableIfNoHandler'#9#9'OnExecute'#7#17'actPropAddExecute'#0#0
+#0#10'TPopupMenu'#10'PopupMenu1'#4'left'#2'p'#3'top'#3#0#1#0#9'TMenuItem'#9 +#7'TAction'#11'actPropEdit'#7'Caption'#6#13'Edit Property'#18'DisableIfNoHan'
+'MenuItem1'#6'Action'#7#10'actPropAdd'#7'OnClick'#7#17'actPropAddExecute'#0#0 +'dler'#9#9'OnExecute'#7#18'actPropEditExecute'#8'OnUpdate'#7#17'actPropEditU'
+#9'TMenuItem'#9'MenuItem2'#6'Action'#7#11'actPropEdit'#7'OnClick'#7#18'actPr' +'pdate'#0#0#7'TAction'#13'actPropDelete'#7'Caption'#6#15'Delete Property'#18
+'opEditExecute'#0#0#9'TMenuItem'#9'MenuItem3'#6'Action'#7#13'actPropDelete'#7 +'DisableIfNoHandler'#9#9'OnExecute'#7#20'actPropDeleteExecute'#8'OnUpdate'#7
+'OnClick'#7#20'actPropDeleteExecute'#0#0#0#10'TSynXMLSyn'#10'SynXMLSyn1'#13 +#17'actPropEditUpdate'#0#0#7'TAction'#8'actApply'#7'Caption'#6#5'Apply'#18'D'
+'DefaultFilter'#6'MDocuments XML (*.xml,*.xsd,*.xsl,*.xslt,*.dtd)|*.xml;*.xs' +'isableIfNoHandler'#9#9'OnExecute'#7#15'actApplyExecute'#8'OnUpdate'#7#11'ac'
+'d;*.xsl;*.xslt;*.dtd'#7'Enabled'#8#16'WantBracesParsed'#8#4'left'#3#238#0#3 +'tOKUpdate'#0#0#7'TAction'#11'actMoveDown'#7'Caption'#6#9'Move Down'#18'Disa'
+'top'#3#199#0#0#0#0 +'bleIfNoHandler'#9#9'OnExecute'#7#18'actMoveDownExecute'#8'OnUpdate'#7#17'ac'
+'tMoveDownUpdate'#0#0#7'TAction'#9'actMoveUp'#7'Caption'#6#7'Move Up'#18'Dis'
+'ableIfNoHandler'#9#9'OnExecute'#7#16'actMoveUpExecute'#8'OnUpdate'#7#15'act'
+'MoveUpUpdate'#0#0#0#10'TPopupMenu'#10'PopupMenu1'#4'left'#2'p'#3'top'#3#0#1
+#0#9'TMenuItem'#9'MenuItem1'#6'Action'#7#10'actPropAdd'#7'OnClick'#7#17'actP'
+'ropAddExecute'#0#0#9'TMenuItem'#9'MenuItem2'#6'Action'#7#11'actPropEdit'#7
+'OnClick'#7#18'actPropEditExecute'#0#0#9'TMenuItem'#9'MenuItem3'#6'Action'#7
+#13'actPropDelete'#7'OnClick'#7#20'actPropDeleteExecute'#0#0#0#10'TSynXMLSyn'
+#10'SynXMLSyn1'#13'DefaultFilter'#6'MDocuments XML (*.xml,*.xsd,*.xsl,*.xslt'
+',*.dtd)|*.xml;*.xsd;*.xsl;*.xslt;*.dtd'#7'Enabled'#8#16'WantBracesParsed'#8
+#4'left'#3#238#0#3'top'#3#199#0#0#0#0
]); ]);

View File

@ -28,6 +28,8 @@ type
TfRecordEdit = class(TForm) TfRecordEdit = class(TForm)
actApply : TAction; actApply : TAction;
actMoveUp: TAction;
actMoveDown: TAction;
actPropAdd : TAction; actPropAdd : TAction;
actPropEdit : TAction; actPropEdit : TAction;
actPropDelete : TAction; actPropDelete : TAction;
@ -39,6 +41,8 @@ type
Button4 : TButton; Button4 : TButton;
Button5 : TButton; Button5 : TButton;
Button6 : TButton; Button6 : TButton;
Button7: TButton;
Button8: TButton;
edtDocumentation : TMemo; edtDocumentation : TMemo;
edtName : TEdit; edtName : TEdit;
edtSourceXSD : TSynEdit; edtSourceXSD : TSynEdit;
@ -58,6 +62,10 @@ type
tsSourceXSD : TTabSheet; tsSourceXSD : TTabSheet;
tvDependency : TTreeView; tvDependency : TTreeView;
procedure actApplyExecute(Sender : TObject); procedure actApplyExecute(Sender : TObject);
procedure actMoveDownExecute(Sender: TObject);
procedure actMoveDownUpdate(Sender: TObject);
procedure actMoveUpExecute(Sender: TObject);
procedure actMoveUpUpdate(Sender: TObject);
procedure actOKExecute(Sender : TObject); procedure actOKExecute(Sender : TObject);
procedure actOKUpdate(Sender : TObject); procedure actOKUpdate(Sender : TObject);
procedure actPropAddExecute(Sender : TObject); procedure actPropAddExecute(Sender : TObject);
@ -74,7 +82,8 @@ type
private private
property UpdateType : TEditType read FUpdateType; property UpdateType : TEditType read FUpdateType;
private private
procedure LoadField(AFieldDef : TPasVariable); procedure MovePropertyItem(AItem : TPasVariable; const ANewIndex : Integer);
function LoadField(AFieldDef : TPasVariable; const AIndex : Integer) : TListItem;
procedure LoadFromObject(); procedure LoadFromObject();
procedure SaveToObject(); procedure SaveToObject();
@ -109,7 +118,7 @@ var
begin begin
prp := CreateProperty(FObject,FSymbolTable); prp := CreateProperty(FObject,FSymbolTable);
if Assigned(prp) then begin if Assigned(prp) then begin
LoadField(prp); LoadField(prp,-1);
end; end;
end; end;
@ -127,13 +136,15 @@ procedure TfRecordEdit.actPropEditExecute(Sender : TObject);
var var
prp : TPasVariable; prp : TPasVariable;
itm : TListItem; itm : TListItem;
oldPos : Integer;
begin begin
itm := edtFields.ItemFocused; itm := edtFields.ItemFocused;
if Assigned(itm) then begin if Assigned(itm) then begin
prp := TPasVariable(itm.Data); prp := TPasVariable(itm.Data);
if UpdateProperty(prp,FSymbolTable) then begin if UpdateProperty(prp,FSymbolTable) then begin
oldPos := itm.Index;
itm.Free(); itm.Free();
LoadField(prp); LoadField(prp,oldPos);
end; end;
end; end;
end; end;
@ -156,6 +167,46 @@ begin
end; end;
end; end;
procedure TfRecordEdit.MovePropertyItem(AItem: TPasVariable; const ANewIndex: Integer);
function FindNewMemberPosition() : Integer;
var
k, kcounter : Integer;
mlist : TList;
pp : TPasVariable;
begin
Result := 0;
kcounter := 0;
mlist := FObject.Members;
for k := 0 to Pred(mlist.Count) do begin
if TPasElement(mlist[k]).InheritsFrom(TPasVariable) then begin
Inc(kcounter);
if ( kcounter = ANewIndex ) then begin
Result := k;
Break;
end;
end;
end;
end;
var
locItem : TListItem;
i : Integer;
begin
if ( AItem <> nil ) and
( ( ANewIndex >= 0 ) and ( ANewIndex < edtFields.Items.Count ) )
then begin
locItem := FindItem(FSymbolTable.GetExternalName(AItem),edtFields.Items);
if ( locItem <> nil ) then
locItem.Free();
FObject.Members.Exchange(FObject.Members.IndexOf(AItem),FindNewMemberPosition());
locItem := LoadField(AItem,ANewIndex);
edtFields.ItemFocused := locItem;
edtFields.Selected := locItem;
FApplied := True;
end;
end;
procedure TfRecordEdit.actOKExecute(Sender : TObject); procedure TfRecordEdit.actOKExecute(Sender : TObject);
begin begin
ModalResult := mrOk; ModalResult := mrOk;
@ -168,7 +219,27 @@ begin
ShowSourceXSD(); ShowSourceXSD();
end; end;
procedure TfRecordEdit.LoadField(AFieldDef : TPasVariable); procedure TfRecordEdit.actMoveDownExecute(Sender: TObject);
begin
MovePropertyItem(TPasVariable(edtFields.ItemFocused.Data),(edtFields.ItemFocused.Index + 1));
end;
procedure TfRecordEdit.actMoveDownUpdate(Sender: TObject);
begin
TAction(Sender).Enabled := Assigned(edtFields.ItemFocused) and ( edtFields.ItemFocused.Index < Pred(edtFields.Items.Count) );
end;
procedure TfRecordEdit.actMoveUpExecute(Sender: TObject);
begin
MovePropertyItem(TPasVariable(edtFields.ItemFocused.Data),(edtFields.ItemFocused.Index - 1));
end;
procedure TfRecordEdit.actMoveUpUpdate(Sender: TObject);
begin
TAction(Sender).Enabled := Assigned(edtFields.ItemFocused) and ( edtFields.ItemFocused.Index > 0 );
end;
function TfRecordEdit.LoadField(AFieldDef : TPasVariable; const AIndex : Integer) : TListItem;
var var
itm : TListItem; itm : TListItem;
s, extName : string; s, extName : string;
@ -176,7 +247,10 @@ begin
extName := FSymbolTable.GetExternalName(AFieldDef); extName := FSymbolTable.GetExternalName(AFieldDef);
itm := FindItem(extName,edtFields.Items); itm := FindItem(extName,edtFields.Items);
if ( itm = nil ) then begin if ( itm = nil ) then begin
itm := edtFields.Items.Add(); if ( AIndex >= 0 ) and ( AIndex < edtFields.Items.Count ) then
itm := edtFields.Items.Insert(AIndex)
else
itm := edtFields.Items.Add();
end; end;
itm.Caption := extName; itm.Caption := extName;
itm.SubItems.Add(FSymbolTable.GetExternalName(AFieldDef.VarType)); itm.SubItems.Add(FSymbolTable.GetExternalName(AFieldDef.VarType));
@ -187,6 +261,7 @@ begin
end; end;
itm.SubItems.Add(s); itm.SubItems.Add(s);
itm.Data := AFieldDef; itm.Data := AFieldDef;
Result := itm;
end; end;
procedure TfRecordEdit.LoadFromObject(); procedure TfRecordEdit.LoadFromObject();
@ -204,7 +279,7 @@ begin
for i := 0 to Pred(FObject.Members.Count) do begin for i := 0 to Pred(FObject.Members.Count) do begin
if TPasElement(FObject.Members[i]).InheritsFrom(TPasVariable) then begin if TPasElement(FObject.Members[i]).InheritsFrom(TPasVariable) then begin
prp := TPasVariable(FObject.Members[i]); prp := TPasVariable(FObject.Members[i]);
LoadField(prp); LoadField(prp,-1);
end; end;
end; end;
end else begin end else begin