- 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"/>
<VersionInfo>
<UseVersionInfo Value="True"/>
<AutoIncrementBuild Value="True"/>
<CurrentMajorRevNr Value="4"/>
<CurrentMinorRevNr Value="2"/>
<CurrentBuildNr Value="127"/>
<CurrentBuildNr Value="141"/>
<ProjectVersion Value="0.4.2.85"/>
<CompanyName Value="AKS DataBasis"/>
<FileDescription Value="UO CentrED"/>

View File

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

View File

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

View File

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

View File

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