- Updated to new VirtualTreeView (UTF8String --> String)

This commit is contained in:
Andreas Schneider 2009-11-24 13:53:43 +01:00
parent f58bef6d63
commit c030b9c586
5 changed files with 1217 additions and 1213 deletions

View File

@ -15,10 +15,9 @@
<LazDoc Paths="../doc"/> <LazDoc Paths="../doc"/>
<VersionInfo> <VersionInfo>
<UseVersionInfo Value="True"/> <UseVersionInfo Value="True"/>
<AutoIncrementBuild Value="True"/>
<CurrentMajorRevNr Value="4"/> <CurrentMajorRevNr Value="4"/>
<CurrentMinorRevNr Value="2"/> <CurrentMinorRevNr Value="2"/>
<CurrentBuildNr Value="127"/> <CurrentBuildNr Value="141"/>
<ProjectVersion Value="0.4.2.85"/> <ProjectVersion Value="0.4.2.85"/>
<CompanyName Value="AKS DataBasis"/> <CompanyName Value="AKS DataBasis"/>
<FileDescription Value="UO CentrED"/> <FileDescription Value="UO CentrED"/>

View File

@ -1,5 +1,5 @@
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 0,4,2,127 FILEVERSION 0,4,2,141
PRODUCTVERSION 0,4,2,85 PRODUCTVERSION 0,4,2,85
{ {
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
@ -9,7 +9,7 @@ PRODUCTVERSION 0,4,2,85
VALUE "Comments", "\000" VALUE "Comments", "\000"
VALUE "CompanyName", "AKS DataBasis\000" VALUE "CompanyName", "AKS DataBasis\000"
VALUE "FileDescription", "UO CentrED\000" VALUE "FileDescription", "UO CentrED\000"
VALUE "FileVersion", "0.4.2.127\000" VALUE "FileVersion", "0.4.2.141\000"
VALUE "InternalName", "\000" VALUE "InternalName", "\000"
VALUE "LegalCopyright", "Andreas Schneider\000" VALUE "LegalCopyright", "Andreas Schneider\000"
VALUE "LegalTrademarks", "\000" VALUE "LegalTrademarks", "\000"

View File

@ -3,7 +3,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Height = 397 Height = 397
Top = 171 Top = 171
Width = 620 Width = 620
ActiveControl = vstActions ActiveControl = pnlLeft
Caption = 'Large Scale Commands' Caption = 'Large Scale Commands'
ClientHeight = 397 ClientHeight = 397
ClientWidth = 620 ClientWidth = 620
@ -15,7 +15,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
OnShow = FormShow OnShow = FormShow
Position = poOwnerFormCenter Position = poOwnerFormCenter
ShowInTaskBar = stAlways ShowInTaskBar = stAlways
LCLVersion = '0.9.27' LCLVersion = '0.9.29'
object nbActions: TNotebook object nbActions: TNotebook
Left = 152 Left = 152
Height = 364 Height = 364
@ -35,8 +35,8 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Top = 0 Top = 0
Width = 462 Width = 462
Align = alClient Align = alClient
ClientHeight = 327 ClientHeight = 329
ClientWidth = 458 ClientWidth = 460
TabOrder = 0 TabOrder = 0
object pbArea: TPaintBox object pbArea: TPaintBox
Left = 0 Left = 0
@ -68,7 +68,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 2 ChildSizing.ControlsPerLine = 2
ClientHeight = 24 ClientHeight = 26
ClientWidth = 182 ClientWidth = 182
Columns = 2 Columns = 2
ItemIndex = 0 ItemIndex = 0
@ -84,7 +84,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Top = 60 Top = 60
Width = 121 Width = 121
Caption = 'Offset' Caption = 'Offset'
ClientHeight = 65 ClientHeight = 67
ClientWidth = 119 ClientWidth = 119
TabOrder = 1 TabOrder = 1
object Label9: TLabel object Label9: TLabel
@ -217,14 +217,14 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Align = alLeft Align = alLeft
BorderSpacing.Around = 8 BorderSpacing.Around = 8
Caption = 'Tiles' Caption = 'Tiles'
ClientHeight = 299 ClientHeight = 301
ClientWidth = 223 ClientWidth = 223
TabOrder = 0 TabOrder = 0
object lblDrawTerrainTilesDesc: TLabel object lblDrawTerrainTilesDesc: TLabel
Left = 4 Left = 4
Height = 58 Height = 58
Top = 0 Top = 0
Width = 215 Width = 213
Align = alTop Align = alTop
BorderSpacing.Left = 4 BorderSpacing.Left = 4
BorderSpacing.Right = 4 BorderSpacing.Right = 4
@ -237,9 +237,9 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Tag = 1 Tag = 1
Cursor = 63 Cursor = 63
Left = 4 Left = 4
Height = 207 Height = 219
Top = 62 Top = 62
Width = 215 Width = 213
Align = alClient Align = alClient
BorderSpacing.Left = 4 BorderSpacing.Left = 4
BorderSpacing.Right = 4 BorderSpacing.Right = 4
@ -263,6 +263,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Text = 'Name' Text = 'Name'
Width = 100 Width = 100
end> end>
Header.DefaultHeight = 17
Header.Options = [hoColumnResize, hoDrag, hoVisible] Header.Options = [hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True Header.ParentFont = True
Header.Style = hsFlatButtons Header.Style = hsFlatButtons
@ -277,12 +278,12 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
object pnlDrawTerrainTilesControls: TPanel object pnlDrawTerrainTilesControls: TPanel
Left = 0 Left = 0
Height = 26 Height = 26
Top = 273 Top = 285
Width = 223 Width = 221
Align = alBottom Align = alBottom
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 26 ClientHeight = 26
ClientWidth = 223 ClientWidth = 221
TabOrder = 1 TabOrder = 1
object btnClearTerrain: TSpeedButton object btnClearTerrain: TSpeedButton
Left = 33 Left = 33
@ -441,6 +442,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Text = 'Name' Text = 'Name'
Width = 100 Width = 100
end> end>
Header.DefaultHeight = 17
Header.Options = [hoColumnResize, hoDrag, hoVisible] Header.Options = [hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True Header.ParentFont = True
Header.Style = hsFlatButtons Header.Style = hsFlatButtons
@ -586,13 +588,13 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Left = 64 Left = 64
Height = 14 Height = 14
Top = 42 Top = 42
Width = 11 Width = 12
Caption = 'to' Caption = 'to'
ParentColor = False ParentColor = False
end end
object seDeleteStaticsZ1: TSpinEdit object seDeleteStaticsZ1: TSpinEdit
Left = 4 Left = 4
Height = 23 Height = 19
Top = 39 Top = 39
Width = 50 Width = 50
MaxValue = 127 MaxValue = 127
@ -602,7 +604,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
end end
object seDeleteStaticsZ2: TSpinEdit object seDeleteStaticsZ2: TSpinEdit
Left = 86 Left = 86
Height = 23 Height = 19
Top = 39 Top = 39
Width = 50 Width = 50
MaxValue = 127 MaxValue = 127
@ -624,14 +626,14 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Align = alLeft Align = alLeft
BorderSpacing.Around = 8 BorderSpacing.Around = 8
Caption = 'Tiles' Caption = 'Tiles'
ClientHeight = 299 ClientHeight = 301
ClientWidth = 223 ClientWidth = 223
TabOrder = 0 TabOrder = 0
object lblInsertStaticsTiles: TLabel object lblInsertStaticsTiles: TLabel
Left = 4 Left = 4
Height = 58 Height = 58
Top = 0 Top = 0
Width = 215 Width = 213
Align = alTop Align = alTop
BorderSpacing.Left = 4 BorderSpacing.Left = 4
BorderSpacing.Right = 4 BorderSpacing.Right = 4
@ -643,9 +645,9 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
object vdtInsertStaticsTiles: TVirtualDrawTree object vdtInsertStaticsTiles: TVirtualDrawTree
Tag = 1 Tag = 1
Left = 4 Left = 4
Height = 207 Height = 219
Top = 62 Top = 62
Width = 215 Width = 213
Align = alClient Align = alClient
BorderSpacing.Left = 4 BorderSpacing.Left = 4
BorderSpacing.Right = 4 BorderSpacing.Right = 4
@ -669,6 +671,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Text = 'Name' Text = 'Name'
Width = 100 Width = 100
end> end>
Header.DefaultHeight = 17
Header.Options = [hoColumnResize, hoDrag, hoVisible] Header.Options = [hoColumnResize, hoDrag, hoVisible]
Header.ParentFont = True Header.ParentFont = True
Header.Style = hsFlatButtons Header.Style = hsFlatButtons
@ -683,12 +686,12 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
object pnlDrawTerrainTilesControls1: TPanel object pnlDrawTerrainTilesControls1: TPanel
Left = 0 Left = 0
Height = 26 Height = 26
Top = 273 Top = 285
Width = 223 Width = 221
Align = alBottom Align = alBottom
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 26 ClientHeight = 26
ClientWidth = 223 ClientWidth = 221
TabOrder = 1 TabOrder = 1
object btnClearIStaticsTiles: TSpeedButton object btnClearIStaticsTiles: TSpeedButton
Left = 33 Left = 33
@ -794,14 +797,14 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Top = 8 Top = 8
Width = 185 Width = 185
Caption = 'Probability' Caption = 'Probability'
ClientHeight = 68 ClientHeight = 70
ClientWidth = 183 ClientWidth = 183
TabOrder = 1 TabOrder = 1
object Label5: TLabel object Label5: TLabel
Left = 4 Left = 4
Height = 28 Height = 28
Top = 0 Top = 0
Width = 175 Width = 173
Align = alTop Align = alTop
BorderSpacing.Left = 4 BorderSpacing.Left = 4
BorderSpacing.Right = 4 BorderSpacing.Right = 4
@ -833,7 +836,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Top = 100 Top = 100
Width = 185 Width = 185
Caption = 'Z Placement' Caption = 'Z Placement'
ClientHeight = 104 ClientHeight = 106
ClientWidth = 183 ClientWidth = 183
TabOrder = 2 TabOrder = 2
object rbPlaceStaticsOnTerrain: TRadioButton object rbPlaceStaticsOnTerrain: TRadioButton
@ -886,7 +889,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
TabOrder = 1 TabOrder = 1
object Label1: TLabel object Label1: TLabel
Left = 4 Left = 4
Height = 13 Height = 14
Top = 136 Top = 136
Width = 144 Width = 144
Align = alTop Align = alTop
@ -909,6 +912,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
Text = 'Actions' Text = 'Actions'
Width = 152 Width = 152
end> end>
Header.DefaultHeight = 17
Header.Options = [hoAutoResize, hoVisible] Header.Options = [hoAutoResize, hoVisible]
Header.ParentFont = True Header.ParentFont = True
Header.Style = hsFlatButtons Header.Style = hsFlatButtons
@ -933,7 +937,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
TabOrder = 1 TabOrder = 1
object lblX: TLabel object lblX: TLabel
Left = 4 Left = 4
Height = 13 Height = 14
Top = 34 Top = 34
Width = 8 Width = 8
Caption = 'X' Caption = 'X'
@ -942,7 +946,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
end end
object lblY: TLabel object lblY: TLabel
Left = 4 Left = 4
Height = 13 Height = 14
Top = 62 Top = 62
Width = 8 Width = 8
Caption = 'Y' Caption = 'Y'
@ -1095,7 +1099,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
end end
object seX1: TSpinEdit object seX1: TSpinEdit
Left = 20 Left = 20
Height = 23 Height = 19
Top = 29 Top = 29
Width = 50 Width = 50
Enabled = False Enabled = False
@ -1104,7 +1108,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
end end
object seX2: TSpinEdit object seX2: TSpinEdit
Left = 84 Left = 84
Height = 23 Height = 19
Top = 29 Top = 29
Width = 50 Width = 50
Enabled = False Enabled = False
@ -1113,7 +1117,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
end end
object seY1: TSpinEdit object seY1: TSpinEdit
Left = 20 Left = 20
Height = 23 Height = 19
Top = 56 Top = 56
Width = 50 Width = 50
Enabled = False Enabled = False
@ -1122,7 +1126,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
end end
object seY2: TSpinEdit object seY2: TSpinEdit
Left = 84 Left = 84
Height = 23 Height = 19
Top = 56 Top = 56
Width = 50 Width = 50
Enabled = False Enabled = False
@ -1132,8 +1136,8 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
end end
object vstArea: TVirtualStringTree object vstArea: TVirtualStringTree
Left = 4 Left = 4
Height = 125 Height = 124
Top = 149 Top = 150
Width = 144 Width = 144
Align = alClient Align = alClient
BorderSpacing.Left = 4 BorderSpacing.Left = 4
@ -1143,6 +1147,7 @@ object frmLargeScaleCommand: TfrmLargeScaleCommand
DefaultText = 'Node' DefaultText = 'Node'
Header.AutoSizeIndex = 0 Header.AutoSizeIndex = 0
Header.Columns = <> Header.Columns = <>
Header.DefaultHeight = 17
Header.MainColumn = -1 Header.MainColumn = -1
Header.Options = [hoColumnResize, hoDrag] Header.Options = [hoColumnResize, hoDrag]
TabOrder = 2 TabOrder = 2

View File

@ -146,18 +146,18 @@ type
procedure vstActionsChange(Sender: TBaseVirtualTree; Node: PVirtualNode); procedure vstActionsChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
procedure vstActionsGetText(Sender: TBaseVirtualTree; procedure vstActionsGetText(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
var CellText: UTF8String); var CellText: String);
procedure vstActionsPaintText(Sender: TBaseVirtualTree; procedure vstActionsPaintText(Sender: TBaseVirtualTree;
const TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex; const TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
TextType: TVSTTextType); TextType: TVSTTextType);
procedure vstAreaChange(Sender: TBaseVirtualTree; Node: PVirtualNode); procedure vstAreaChange(Sender: TBaseVirtualTree; Node: PVirtualNode);
procedure vstAreaGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; procedure vstAreaGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; TextType: TVSTTextType; var CellText: UTF8String); Column: TColumnIndex; TextType: TVSTTextType; var CellText: String);
protected protected
FLastX: Integer; FLastX: Integer;
FLastY: Integer; FLastY: Integer;
FAreaMove: TAreaMove; FAreaMove: TAreaMove;
procedure AddNode(AActionID: Integer; ACaption: UTF8String); procedure AddNode(AActionID: Integer; ACaption: String);
function FindNode(AActionID: Integer): PVirtualNode; function FindNode(AActionID: Integer): PVirtualNode;
procedure SerializeTiles(ATileList: TVirtualDrawTree; procedure SerializeTiles(ATileList: TVirtualDrawTree;
AStream: TEnhancedMemoryStream); AStream: TEnhancedMemoryStream);
@ -178,7 +178,7 @@ type
PNodeInfo = ^TNodeInfo; PNodeInfo = ^TNodeInfo;
TNodeInfo = record TNodeInfo = record
ActionID: Integer; ActionID: Integer;
Caption: UTF8String; Caption: String;
end; end;
PTileInfo = ^TTileInfo; PTileInfo = ^TTileInfo;
TTileInfo = record TTileInfo = record
@ -569,7 +569,7 @@ end;
procedure TfrmLargeScaleCommand.vstActionsGetText( procedure TfrmLargeScaleCommand.vstActionsGetText(
Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
TextType: TVSTTextType; var CellText: UTF8String); TextType: TVSTTextType; var CellText: String);
var var
nodeInfo: PNodeInfo; nodeInfo: PNodeInfo;
begin begin
@ -612,7 +612,7 @@ end;
procedure TfrmLargeScaleCommand.vstAreaGetText(Sender: TBaseVirtualTree; procedure TfrmLargeScaleCommand.vstAreaGetText(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
var CellText: UTF8String); var CellText: String);
var var
nodeInfo: ^TRect; nodeInfo: ^TRect;
begin begin
@ -621,7 +621,7 @@ begin
nodeInfo^.Right, nodeInfo^.Bottom]); nodeInfo^.Right, nodeInfo^.Bottom]);
end; end;
procedure TfrmLargeScaleCommand.AddNode(AActionID: Integer; ACaption: UTF8String); procedure TfrmLargeScaleCommand.AddNode(AActionID: Integer; ACaption: String);
var var
node: PVirtualNode; node: PVirtualNode;
nodeInfo: PNodeInfo; nodeInfo: PNodeInfo;

View File

@ -248,7 +248,7 @@ type
procedure vstChatClick(Sender: TObject); procedure vstChatClick(Sender: TObject);
procedure vstChatFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode); procedure vstChatFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
procedure vstChatGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; procedure vstChatGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; TextType: TVSTTextType; var CellText: UTF8String); Column: TColumnIndex; TextType: TVSTTextType; var CellText: String);
procedure vstChatPaintText(Sender: TBaseVirtualTree; procedure vstChatPaintText(Sender: TBaseVirtualTree;
const TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex; const TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
TextType: TVSTTextType); TextType: TVSTTextType);
@ -256,11 +256,11 @@ type
procedure vstLocationsFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode procedure vstLocationsFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode
); );
procedure vstLocationsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; procedure vstLocationsGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; TextType: TVSTTextType; var CellText: UTF8String); Column: TColumnIndex; TextType: TVSTTextType; var CellText: String);
procedure vstLocationsLoadNode(Sender: TBaseVirtualTree; procedure vstLocationsLoadNode(Sender: TBaseVirtualTree;
Node: PVirtualNode; Stream: TStream); Node: PVirtualNode; Stream: TStream);
procedure vstLocationsNewText(Sender: TBaseVirtualTree; Node: PVirtualNode; procedure vstLocationsNewText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; NewText: WideString); Column: TColumnIndex; const NewText: String);
procedure vstLocationsSaveNode(Sender: TBaseVirtualTree; procedure vstLocationsSaveNode(Sender: TBaseVirtualTree;
Node: PVirtualNode; Stream: TStream); Node: PVirtualNode; Stream: TStream);
protected protected
@ -1454,15 +1454,15 @@ begin
end; end;
procedure TfrmMain.vstChatGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; procedure TfrmMain.vstChatGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
Column: TColumnIndex; TextType: TVSTTextType; var CellText: UTF8String); Column: TColumnIndex; TextType: TVSTTextType; var CellText: String);
var var
chatInfo: PChatInfo; chatInfo: PChatInfo;
begin begin
chatInfo := Sender.GetNodeData(Node); chatInfo := Sender.GetNodeData(Node);
case Column of case Column of
0: CellText := UTF8Encode(TimeToStr(chatInfo^.Time)); 0: CellText := TimeToStr(chatInfo^.Time);
1: CellText := UTF8Encode(chatInfo^.Sender); 1: CellText := chatInfo^.Sender;
2: CellText := UTF8Encode(chatInfo^.Msg); 2: CellText := chatInfo^.Msg;
end; end;
end; end;
@ -1506,14 +1506,14 @@ end;
procedure TfrmMain.vstLocationsGetText(Sender: TBaseVirtualTree; procedure TfrmMain.vstLocationsGetText(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
var CellText: UTF8String); var CellText: String);
var var
locationInfo: PLocationInfo; locationInfo: PLocationInfo;
begin begin
locationInfo := Sender.GetNodeData(Node); locationInfo := Sender.GetNodeData(Node);
case Column of case Column of
0: CellText := UTF8Encode(Format('%d, %d', [locationInfo^.X, locationInfo^.Y])); 0: CellText := Format('%d, %d', [locationInfo^.X, locationInfo^.Y]);
1: CellText := UTF8Encode(locationInfo^.Name); 1: CellText := locationInfo^.Name;
end; end;
end; end;
@ -1535,7 +1535,7 @@ begin
end; end;
procedure TfrmMain.vstLocationsNewText(Sender: TBaseVirtualTree; procedure TfrmMain.vstLocationsNewText(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex; NewText: WideString); Node: PVirtualNode; Column: TColumnIndex; const NewText: String);
var var
locationInfo: PLocationInfo; locationInfo: PLocationInfo;
begin begin