You've already forked lazarus-ccr
* Change from lazarus resources to native resources / fix checkimage painting / use pascal packarray in carbon / update demos
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4671 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -44,7 +44,7 @@
|
||||
{$ifdef Windows}
|
||||
{$define EnableThreadSupport}
|
||||
{$endif}
|
||||
{$if (FPC_FULLVERSION >= 30100) or defined(CPU64)}
|
||||
{$if (FPC_FULLVERSION >= 30100) or defined(CPU64) or defined(LCLCarbon)}
|
||||
{$define PACKARRAYPASCAL}
|
||||
{$endif}
|
||||
|
||||
|
@ -75,7 +75,7 @@ uses
|
||||
{$ifdef DEBUG_VTV}
|
||||
VTLogger,
|
||||
{$endif}
|
||||
LCLType, LResources, LMessages, Types,
|
||||
LCLType, LMessages, Types,
|
||||
SysUtils, Classes, Graphics, Controls, Forms, ImgList, StdCtrls, Menus, Printers,
|
||||
SyncObjs, // Thread support
|
||||
Clipbrd // Clipboard support
|
||||
@ -1201,10 +1201,10 @@ type
|
||||
TVTHeaderOptions = set of TVTHeaderOption;
|
||||
|
||||
THeaderState = (
|
||||
hsAutoSizing, // auto size chain is in progess, do not trigger again on WM_SIZE
|
||||
hsDragging, // header dragging is in progress (only if enabled)
|
||||
hsDragPending, // left button is down, user might want to start dragging a column
|
||||
hsLoading, // The header currently loads from stream, so updates are not necessary.
|
||||
hsAutoSizing, // auto size chain is in progess, do not trigger again on WM_SIZE
|
||||
hsDragging, // header dragging is in progress (only if enabled)
|
||||
hsDragPending, // left button is down, user might want to start dragging a column
|
||||
hsLoading, // The header currently loads from stream, so updates are not necessary.
|
||||
hsColumnWidthTracking, // column resizing is in progress
|
||||
hsColumnWidthTrackPending, // left button is down, user might want to start resize a column
|
||||
hsHeightTracking, // height resizing is in progress
|
||||
@ -1231,7 +1231,7 @@ type
|
||||
crNodeAdded, // a node has been added
|
||||
crNodeCopied, // a node has been duplicated
|
||||
crNodeMoved // a node has been moved to a new place
|
||||
); // describes what made a structure change event happen
|
||||
); // desribes what made a structure change event happen
|
||||
|
||||
TVTHeader = class(TPersistent)
|
||||
private
|
||||
@ -2195,8 +2195,8 @@ type
|
||||
FOnGetImage: TVTGetImageEvent; // Used to retrieve the image index of a given node.
|
||||
FOnGetImageEx: TVTGetImageExEvent; // Used to retrieve the image index of a given node along with a custom
|
||||
// image list.
|
||||
FOnGetImageText: TVTGetImageTextEvent; // Used to retrieve the image alternative text of a given node.
|
||||
// Used by the accessibility interface to provide useful text for status images.
|
||||
FOnGetImageText: TVTGetImageTextEvent; // Used to retrieve the image alternative text of a given node.
|
||||
// Used by the accessibility interface to provide useful text for status images.
|
||||
FOnHotChange: TVTHotNodeChangeEvent; // called when the current "hot" node (that is, the node under the mouse)
|
||||
// changes and hot tracking is enabled
|
||||
FOnExpanding, // called just before a node is expanded
|
||||
@ -4020,6 +4020,8 @@ procedure ShowError(const Msg: String; HelpContext: Integer); // [IPK] Surface
|
||||
|
||||
implementation
|
||||
|
||||
{$R VirtualTrees.res}
|
||||
|
||||
uses
|
||||
StrUtils, Math,
|
||||
{$ifdef EnableOLE}
|
||||
@ -5127,7 +5129,7 @@ begin
|
||||
Result := TImageList.Create(nil);
|
||||
Result.Height := 16;
|
||||
Result.Width := 16;
|
||||
Result.AddLazarusResource(CheckImagesStrings[CheckKind], clFuchsia);
|
||||
Result.AddResourceName(0, CheckImagesStrings[CheckKind], clFuchsia);
|
||||
end;
|
||||
|
||||
function GetCheckImageList(var ImageList: TImageList; CheckKind: TCheckImageKind): TImageList;
|
||||
@ -5279,6 +5281,9 @@ procedure InitializeGlobalStructures;
|
||||
|
||||
// initialization of stuff global to the unit
|
||||
|
||||
var
|
||||
TheInstance: THandle;
|
||||
|
||||
begin
|
||||
Initialized := True;
|
||||
|
||||
@ -5290,6 +5295,8 @@ begin
|
||||
IsWinVistaOrAbove := False;
|
||||
{$endif}
|
||||
|
||||
TheInstance := HINSTANCE;
|
||||
|
||||
{$ifdef EnableOLE}
|
||||
// Initialize OLE subsystem for drag'n drop and clipboard operations.
|
||||
//todo: replace by Suceeded (see in windows unit)
|
||||
@ -5300,14 +5307,14 @@ begin
|
||||
|
||||
UtilityImages := TBitmap.Create;
|
||||
UtilityImages.Transparent := True;
|
||||
UtilityImages.LoadFromLazarusResource('VT_UTILITIES');
|
||||
UtilityImages.LoadFromResourceName(0, 'VT_UTILITIES');
|
||||
|
||||
SystemCheckImages := CreateCheckImageList(ckSystemDefault);
|
||||
|
||||
// Delphi (at least version 6 and lower) does not provide a standard split cursor.
|
||||
// Hence we have to load our own.
|
||||
Screen.Cursors[crHeaderSplit] := LoadCursorFromLazarusResource('VT_HEADERSPLIT');
|
||||
Screen.Cursors[crVertSplit] := LoadCursorFromLazarusResource('VT_VERTSPLIT');
|
||||
Screen.Cursors[crHeaderSplit] := LoadCursor(TheInstance, 'VT_HEADERSPLIT');
|
||||
Screen.Cursors[crVertSplit] := LoadCursor(TheInstance, 'VT_VERTSPLIT');
|
||||
// Clipboard format registration.
|
||||
// Native clipboard format. Needs a new identifier and has an average priority to allow other formats to take over.
|
||||
// This format is supposed to use the IStream storage format but unfortunately this does not work when
|
||||
@ -13679,20 +13686,24 @@ end;
|
||||
|
||||
procedure TBaseVirtualTree.LoadPanningCursors;
|
||||
|
||||
var
|
||||
TheInstance: THandle;
|
||||
|
||||
begin
|
||||
TheInstance := HINSTANCE;
|
||||
with Screen do
|
||||
begin
|
||||
Cursors[crVT_MOVEALL]:=LoadCursorFromLazarusResource('VT_MOVEALL');
|
||||
Cursors[crVT_MOVEEW]:=LoadCursorFromLazarusResource('VT_MOVEEW');
|
||||
Cursors[crVT_MOVENS]:=LoadCursorFromLazarusResource('VT_MOVENS');
|
||||
Cursors[crVT_MOVENW]:=LoadCursorFromLazarusResource('VT_MOVENW');
|
||||
Cursors[crVT_MOVESW]:=LoadCursorFromLazarusResource('VT_MOVESW');
|
||||
Cursors[crVT_MOVESE]:=LoadCursorFromLazarusResource('VT_MOVESE');
|
||||
Cursors[crVT_MOVENE]:=LoadCursorFromLazarusResource('VT_MOVENE');
|
||||
Cursors[crVT_MOVEW]:=LoadCursorFromLazarusResource('VT_MOVEW');
|
||||
Cursors[crVT_MOVEE]:=LoadCursorFromLazarusResource('VT_MOVEE');
|
||||
Cursors[crVT_MOVEN]:=LoadCursorFromLazarusResource('VT_MOVEN');
|
||||
Cursors[crVT_MOVES]:=LoadCursorFromLazarusResource('VT_MOVES');
|
||||
Cursors[crVT_MOVEALL]:=LoadCursor(TheInstance, 'VT_MOVEALL');
|
||||
Cursors[crVT_MOVEEW]:=LoadCursor(TheInstance, 'VT_MOVEEW');
|
||||
Cursors[crVT_MOVENS]:=LoadCursor(TheInstance, 'VT_MOVENS');
|
||||
Cursors[crVT_MOVENW]:=LoadCursor(TheInstance, 'VT_MOVENW');
|
||||
Cursors[crVT_MOVESW]:=LoadCursor(TheInstance, 'VT_MOVESW');
|
||||
Cursors[crVT_MOVESE]:=LoadCursor(TheInstance, 'VT_MOVESE');
|
||||
Cursors[crVT_MOVENE]:=LoadCursor(TheInstance, 'VT_MOVENE');
|
||||
Cursors[crVT_MOVEW]:=LoadCursor(TheInstance, 'VT_MOVEW');
|
||||
Cursors[crVT_MOVEE]:=LoadCursor(TheInstance, 'VT_MOVEE');
|
||||
Cursors[crVT_MOVEN]:=LoadCursor(TheInstance, 'VT_MOVEN');
|
||||
Cursors[crVT_MOVES]:=LoadCursor(TheInstance, 'VT_MOVES');
|
||||
end;
|
||||
end;
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
@ -13931,7 +13942,7 @@ begin
|
||||
LineTo(Width - 2, Width div 2);
|
||||
end
|
||||
else
|
||||
FMinusBM.LoadFromLazarusResource('VT_XPBUTTONMINUS');
|
||||
FMinusBM.LoadFromResourceName(0, 'VT_XPBUTTONMINUS');
|
||||
FHotMinusBM.Canvas.Draw(0, 0, FMinusBM);
|
||||
end;
|
||||
end;
|
||||
@ -13973,7 +13984,7 @@ begin
|
||||
LineTo(Width div 2, Width - 2);
|
||||
end
|
||||
else
|
||||
FPlusBM.LoadFromLazarusResource('VT_XPBUTTONPLUS');
|
||||
FPlusBM.LoadFromResourceName(0, 'VT_XPBUTTONPLUS');
|
||||
FHotPlusBM.Canvas.Draw(0, 0, FPlusBM);
|
||||
end;
|
||||
end;
|
||||
@ -23723,13 +23734,8 @@ begin
|
||||
else
|
||||
with FCheckImages do
|
||||
begin
|
||||
if Selected and not Ghosted then
|
||||
begin
|
||||
if Focused or (toPopupMode in FOptions.FPaintOptions) then
|
||||
DrawEffect := gdeHighlighted
|
||||
else
|
||||
DrawEffect := gdeNormal;
|
||||
end
|
||||
if not Ghosted then
|
||||
DrawEffect := gdeNormal
|
||||
else
|
||||
DrawEffect := gdeShadowed;
|
||||
|
||||
@ -24657,7 +24663,7 @@ begin
|
||||
else
|
||||
ImageName := 'VT_MOVENS_BMP';
|
||||
|
||||
FPanningWindow.Image.LoadFromLazarusResource(ImageName);
|
||||
FPanningWindow.Image.LoadFromResourceName(0, ImageName);
|
||||
|
||||
FPanningWindow.Show(CreateClipRegion);
|
||||
|
||||
@ -36013,7 +36019,6 @@ end;
|
||||
{$ifend}
|
||||
|
||||
initialization
|
||||
{$I virtualtrees.lrs}
|
||||
// Necessary for dynamic package loading.
|
||||
Initialized := False;
|
||||
NeedToUnitialize := False;
|
||||
|
BIN
components/virtualtreeview-new/trunk/VirtualTrees.res
Normal file
BIN
components/virtualtreeview-new/trunk/VirtualTrees.res
Normal file
Binary file not shown.
@ -9,6 +9,19 @@
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
<Icon Value="0"/>
|
||||
<Resources Count="5">
|
||||
<Resource_0 FileName="Res\Lorem ipsum.uni" Type="RCDATA" ResourceName="LOREM IPSUM"/>
|
||||
<Resource_1 FileName="Res\Transcriptions.bmp" Type="BITMAP" ResourceName="TRANSCRIPTIONS"/>
|
||||
<Resource_2 FileName="Res\Arabic.uni" Type="RCDATA" ResourceName="ARABIC"/>
|
||||
<Resource_3 FileName="Res\Greek.uni" Type="RCDATA" ResourceName="GREEK"/>
|
||||
<Resource_4 FileName="Res\Hebrew.uni" Type="RCDATA" ResourceName="HEBREW"/>
|
||||
</Resources>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
@ -49,7 +62,6 @@
|
||||
<ComponentName Value="WindowsXPForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="WindowsXPStyleDemo"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="AlignDemo.pas"/>
|
||||
@ -124,7 +136,6 @@
|
||||
<ComponentName Value="StateForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="States"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="VisibilityDemo.pas"/>
|
||||
@ -142,10 +153,23 @@
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="advanced"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<Linking>
|
||||
<Options>
|
||||
<Win32>
|
||||
<GraphicApplication Value="True"/>
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
</CompilerOptions>
|
||||
</CONFIG>
|
||||
|
@ -21,6 +21,7 @@ uses
|
||||
//HeaderCustomDrawDemo in 'HeaderCustomDrawDemo.pas' {HeaderOwnerDrawForm},
|
||||
States in 'States.pas' {StateForm}, Printer4Lazarus;
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
|
@ -12,7 +12,7 @@ object AlignForm: TAlignForm
|
||||
Font.Name = 'Arial'
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
LCLVersion = '1.0.8.0'
|
||||
LCLVersion = '0.9.29'
|
||||
object Label8: TLabel
|
||||
Left = 8
|
||||
Height = 111
|
||||
@ -26,9 +26,9 @@ object AlignForm: TAlignForm
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
Height = 17
|
||||
Height = 113
|
||||
Top = 110
|
||||
Width = 1213
|
||||
Width = 203
|
||||
Caption = 'Note that hints are aligned properly and draw selection takes the alignment into account too. Sort arrows are shown but the tree is not sorted. All I want to demonstrate is how well the layout in the header works.'
|
||||
ParentColor = False
|
||||
ShowAccelChar = False
|
||||
@ -99,7 +99,6 @@ object AlignForm: TAlignForm
|
||||
Header.Columns = <
|
||||
item
|
||||
Alignment = taCenter
|
||||
Color = clWindow
|
||||
Hint = 'Text is initially centered and has a left-to-right directionality.'
|
||||
ImageIndex = 20
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coResizable, coShowDropMark, coVisible, coAutoSpring]
|
||||
@ -109,7 +108,6 @@ object AlignForm: TAlignForm
|
||||
Width = 199
|
||||
end
|
||||
item
|
||||
Color = clWindow
|
||||
Hint = 'Text is initially left aligned and has a left-to-right directionality.'
|
||||
ImageIndex = 35
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coResizable, coShowDropMark, coVisible, coAutoSpring, coWrapCaption]
|
||||
@ -120,7 +118,6 @@ object AlignForm: TAlignForm
|
||||
end
|
||||
item
|
||||
BiDiMode = bdRightToLeft
|
||||
Color = clWindow
|
||||
Hint = 'Text is initially left aligned and has a right-to-left directionality.'
|
||||
ImageIndex = 32
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coResizable, coShowDropMark, coVisible, coAutoSpring]
|
||||
@ -151,7 +148,6 @@ object AlignForm: TAlignForm
|
||||
TreeOptions.MiscOptions = [toEditable, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning]
|
||||
TreeOptions.PaintOptions = [toHideFocusRect, toShowButtons, toShowDropmark, toShowRoot, toShowTreeLines, toThemeAware]
|
||||
TreeOptions.SelectionOptions = [toExtendedFocus, toMultiSelect]
|
||||
OnCompareNodes = AlignTreeCompareNodes
|
||||
OnFocusChanged = AlignTreeFocusChanged
|
||||
OnGetText = AlignTreeGetText
|
||||
OnPaintText = AlignTreePaintText
|
||||
|
@ -14,9 +14,6 @@ uses
|
||||
StdCtrls, ComCtrls, VirtualTrees, ExtCtrls, Menus, LResources;
|
||||
|
||||
type
|
||||
|
||||
{ TAlignForm }
|
||||
|
||||
TAlignForm = class(TForm)
|
||||
AlignTree: TVirtualStringTree;
|
||||
Label8: TLabel;
|
||||
@ -41,13 +38,10 @@ type
|
||||
EnabledOptionBox: TCheckBox;
|
||||
Label5: TLabel;
|
||||
LayoutCombo: TComboBox;
|
||||
procedure AlignTreeCompareNodes(Sender: TBaseVirtualTree; Node1,
|
||||
Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
|
||||
procedure AlignTreeGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; Kind: TVTImageKind; Column: TColumnIndex;
|
||||
var Ghosted: Boolean; var Index: Integer);
|
||||
procedure AlignTreeGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
|
||||
var CellText: String);
|
||||
procedure AlignTreeHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
procedure AlignTreePaintText(Sender: TBaseVirtualTree; const Canvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
|
||||
TextType: TVSTTextType);
|
||||
procedure AlignTreeGetNodeDataSize(Sender: TBaseVirtualTree; var NodeDataSize: Integer);
|
||||
@ -59,7 +53,7 @@ type
|
||||
procedure IconPopupPopup(Sender: TObject);
|
||||
procedure AlignComboChange(Sender: TObject);
|
||||
procedure BidiGroupClick(Sender: TObject);
|
||||
procedure AlignTreeHeaderClickx(Sender: TVTHeader; Column: TColumnIndex; Button: TMouseButton; Shift: TShiftState; X,
|
||||
procedure AlignTreeHeaderClick(Sender: TVTHeader; Column: TColumnIndex; Button: TMouseButton; Shift: TShiftState; X,
|
||||
Y: Integer);
|
||||
procedure OptionBoxClick(Sender: TObject);
|
||||
procedure LayoutComboChange(Sender: TObject);
|
||||
@ -80,6 +74,8 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
Main, States;
|
||||
|
||||
@ -185,31 +181,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TAlignForm.AlignTreeHeaderClick(Sender: TVTHeader;
|
||||
HitInfo: TVTHeaderHitInfo);
|
||||
begin
|
||||
with HitInfo do
|
||||
if Button = mbLeft then
|
||||
begin
|
||||
with Sender do
|
||||
begin
|
||||
if SortColumn <> Column then
|
||||
begin
|
||||
SortColumn := Column;
|
||||
SortDirection := sdAscending;
|
||||
end
|
||||
else
|
||||
case SortDirection of
|
||||
sdAscending:
|
||||
SortDirection := sdDescending;
|
||||
sdDescending:
|
||||
SortColumn := NoColumn;
|
||||
end;
|
||||
AlignTree.SortTree(SortColumn, SortDirection, False);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
procedure TAlignForm.AlignTreeGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; Kind: TVTImageKind;
|
||||
@ -226,23 +197,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TAlignForm.AlignTreeCompareNodes(Sender: TBaseVirtualTree; Node1,
|
||||
Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
|
||||
var
|
||||
Data1, Data2: PAlignData;
|
||||
|
||||
begin
|
||||
Data1 := Sender.GetNodeData(Node1);
|
||||
Data2 := Sender.GetNodeData(Node2);
|
||||
case Column of
|
||||
0: // left alignd column
|
||||
Result := CompareText(Data1.MainColumnText, Data2.MainColumnText);
|
||||
1: // centered column
|
||||
Result := CompareText(Data1.GreekText, Data2.GreekText);
|
||||
2: // right aligned column
|
||||
Result := CompareText(Data1.RTLText, Data2.RTLText);
|
||||
end;
|
||||
end;
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
procedure TAlignForm.AlignTreeInitNode(Sender: TBaseVirtualTree; ParentNode, Node: PVirtualNode;
|
||||
@ -524,14 +478,31 @@ end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
procedure TAlignForm.AlignTreeHeaderClickx(Sender: TVTHeader; Column: TColumnIndex; Button: TMouseButton; Shift: TShiftState;
|
||||
procedure TAlignForm.AlignTreeHeaderClick(Sender: TVTHeader; Column: TColumnIndex; Button: TMouseButton; Shift: TShiftState;
|
||||
X, Y: Integer);
|
||||
|
||||
// This method sets sort column and direction on a header click.
|
||||
// Note: this is only to show the header layout. There gets nothing really sorted.
|
||||
|
||||
begin
|
||||
|
||||
if Button = mbLeft then
|
||||
begin
|
||||
with Sender do
|
||||
begin
|
||||
if SortColumn <> Column then
|
||||
begin
|
||||
SortColumn := Column;
|
||||
SortDirection := sdAscending;
|
||||
end
|
||||
else
|
||||
case SortDirection of
|
||||
sdAscending:
|
||||
SortDirection := sdDescending;
|
||||
sdDescending:
|
||||
SortColumn := NoColumn;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
@ -636,7 +607,5 @@ end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
initialization
|
||||
{$I AlignDemo.lrs}
|
||||
|
||||
end.
|
||||
|
@ -10,7 +10,7 @@ object DrawTreeForm: TDrawTreeForm
|
||||
Font.Height = -13
|
||||
Font.Name = 'Trebuchet MS'
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.0.8.0'
|
||||
LCLVersion = '1.7'
|
||||
object Label7: TLabel
|
||||
Left = 0
|
||||
Height = 61
|
||||
@ -24,9 +24,9 @@ object DrawTreeForm: TDrawTreeForm
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 4
|
||||
Height = 19
|
||||
Top = 423
|
||||
Width = 248
|
||||
Height = 18
|
||||
Top = 424
|
||||
Width = 247
|
||||
Anchors = [akLeft, akBottom]
|
||||
Caption = 'Adjust vertical image alignment of nodes:'
|
||||
ParentColor = False
|
||||
@ -36,10 +36,10 @@ object DrawTreeForm: TDrawTreeForm
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideBottom.Control = TrackBar1
|
||||
AnchorSideBottom.Side = asrCenter
|
||||
Left = 424
|
||||
Height = 19
|
||||
Top = 422
|
||||
Width = 23
|
||||
Left = 423
|
||||
Height = 18
|
||||
Top = 424
|
||||
Width = 22
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Left = 8
|
||||
Caption = '50%'
|
||||
@ -115,9 +115,9 @@ object DrawTreeForm: TDrawTreeForm
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideBottom.Control = Label1
|
||||
AnchorSideBottom.Side = asrCenter
|
||||
Left = 259
|
||||
Left = 258
|
||||
Height = 38
|
||||
Top = 413
|
||||
Top = 414
|
||||
Width = 157
|
||||
Max = 100
|
||||
OnChange = TrackBar1Change
|
||||
|
@ -21,12 +21,9 @@ uses
|
||||
Windows,
|
||||
{$endif}
|
||||
LCLIntf, delphicompat, LCLType, SysUtils, Classes, ComCtrls, Graphics, Controls, Forms, Dialogs,
|
||||
VirtualTrees, StdCtrls, shlobjext, LResources, FileUtil;
|
||||
VirtualTrees, StdCtrls, shlobjext, LResources;
|
||||
|
||||
type
|
||||
|
||||
{ TDrawTreeForm }
|
||||
|
||||
TDrawTreeForm = class(TForm)
|
||||
VDT1: TVirtualDrawTree;
|
||||
Label7: TLabel;
|
||||
@ -45,7 +42,8 @@ type
|
||||
var Ghosted: Boolean; var Index: Integer);
|
||||
procedure VDT1GetNodeWidth(Sender: TBaseVirtualTree; Canvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
|
||||
var NodeWidth: Integer);
|
||||
procedure VDT1HeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
procedure VDT1HeaderClick(Sender: TVTHeader; Column: TColumnIndex; Button: TMouseButton; Shift: TShiftState; X,
|
||||
Y: Integer);
|
||||
procedure VDT1InitChildren(Sender: TBaseVirtualTree; Node: PVirtualNode; var ChildCount: Cardinal);
|
||||
procedure VDT1InitNode(Sender: TBaseVirtualTree; ParentNode, Node: PVirtualNode;
|
||||
var InitialStates: TVirtualNodeInitStates);
|
||||
@ -69,8 +67,10 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
States;
|
||||
LazFileUtils, States;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -516,34 +516,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TDrawTreeForm.VDT1HeaderClick(Sender: TVTHeader;
|
||||
HitInfo: TVTHeaderHitInfo);
|
||||
begin
|
||||
with HitInfo do
|
||||
if Button = mbLeft then
|
||||
begin
|
||||
with Sender do
|
||||
begin
|
||||
if Column <> MainColumn then
|
||||
SortColumn := NoColumn
|
||||
else
|
||||
begin
|
||||
if SortColumn = NoColumn then
|
||||
begin
|
||||
SortColumn := Column;
|
||||
SortDirection := sdAscending;
|
||||
end
|
||||
else
|
||||
if SortDirection = sdAscending then
|
||||
SortDirection := sdDescending
|
||||
else
|
||||
SortDirection := sdAscending;
|
||||
Treeview.SortTree(SortColumn, SortDirection, False);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
procedure TDrawTreeForm.VDT1InitChildren(Sender: TBaseVirtualTree; Node: PVirtualNode; var ChildCount: Cardinal);
|
||||
@ -704,6 +676,37 @@ end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
procedure TDrawTreeForm.VDT1HeaderClick(Sender: TVTHeader; Column: TColumnIndex; Button: TMouseButton; Shift: TShiftState;
|
||||
X, Y: Integer);
|
||||
|
||||
// Click handler to switch the column on which will be sorted. Since we cannot sort image data sorting is actually
|
||||
// limited to the main column.
|
||||
|
||||
begin
|
||||
if Button = mbLeft then
|
||||
begin
|
||||
with Sender do
|
||||
begin
|
||||
if Column <> MainColumn then
|
||||
SortColumn := NoColumn
|
||||
else
|
||||
begin
|
||||
if SortColumn = NoColumn then
|
||||
begin
|
||||
SortColumn := Column;
|
||||
SortDirection := sdAscending;
|
||||
end
|
||||
else
|
||||
if SortDirection = sdAscending then
|
||||
SortDirection := sdDescending
|
||||
else
|
||||
SortDirection := sdAscending;
|
||||
Treeview.SortTree(SortColumn, SortDirection, False);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
procedure TDrawTreeForm.TrackBar1Change(Sender: TObject);
|
||||
@ -743,9 +746,6 @@ begin
|
||||
end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
initialization
|
||||
|
||||
{$I DrawTreeDemo.lrs}
|
||||
|
||||
|
||||
end.
|
||||
|
@ -12,14 +12,14 @@ object GeneralForm: TGeneralForm
|
||||
KeyPreview = True
|
||||
OnCreate = FormCreate
|
||||
ShowHint = True
|
||||
LCLVersion = '0.9.29'
|
||||
LCLVersion = '1.7'
|
||||
object Label18: TLabel
|
||||
AnchorSideTop.Control = RadioGroup2
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 502
|
||||
Height = 14
|
||||
Top = 361
|
||||
Width = 105
|
||||
Left = 503
|
||||
Height = 13
|
||||
Top = 334
|
||||
Width = 104
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 20
|
||||
Caption = 'Switch check images:'
|
||||
@ -28,20 +28,20 @@ object GeneralForm: TGeneralForm
|
||||
object Label19: TLabel
|
||||
AnchorSideTop.Control = CheckMarkCombo
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 504
|
||||
Height = 14
|
||||
Top = 418
|
||||
Width = 98
|
||||
Left = 505
|
||||
Height = 13
|
||||
Top = 390
|
||||
Width = 97
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 20
|
||||
Caption = 'Switch main column:'
|
||||
ParentColor = False
|
||||
end
|
||||
object Label8: TLabel
|
||||
Left = 488
|
||||
Height = 40
|
||||
Left = 51
|
||||
Height = 13
|
||||
Top = 40
|
||||
Width = 232
|
||||
Width = 669
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'This sample is an introduction to the general look and feel of Virtual Treeview. Note: you can change almost every visual aspect of the control.'
|
||||
ParentColor = False
|
||||
@ -138,7 +138,7 @@ object GeneralForm: TGeneralForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 488
|
||||
Height = 21
|
||||
Top = 377
|
||||
Top = 349
|
||||
Width = 216
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 2
|
||||
@ -164,18 +164,18 @@ object GeneralForm: TGeneralForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 488
|
||||
Height = 16
|
||||
Top = 434
|
||||
Top = 405
|
||||
Width = 37
|
||||
Anchors = [akTop, akRight]
|
||||
BorderSpacing.Top = 2
|
||||
Min = 0
|
||||
Max = 2
|
||||
Increment = 2
|
||||
Max = 2
|
||||
Min = 0
|
||||
OnChanging = MainColumnUpDownChanging
|
||||
Orientation = udHorizontal
|
||||
Position = 2
|
||||
TabOrder = 2
|
||||
Wrap = True
|
||||
OnChanging = MainColumnUpDownChanging
|
||||
end
|
||||
object BitBtn1: TBitBtn
|
||||
Left = 488
|
||||
@ -200,7 +200,6 @@ object GeneralForm: TGeneralForm
|
||||
33333300C000CC0333333333333330CCCCCCCC03333333333333300000000033
|
||||
3333333333333333333333333333333333333333333333333333
|
||||
}
|
||||
NumGlyphs = 0
|
||||
OnClick = BitBtn1Click
|
||||
TabOrder = 3
|
||||
end
|
||||
@ -209,7 +208,7 @@ object GeneralForm: TGeneralForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 488
|
||||
Height = 77
|
||||
Top = 177
|
||||
Top = 150
|
||||
Width = 216
|
||||
Anchors = [akTop, akRight]
|
||||
AutoFill = True
|
||||
@ -238,7 +237,7 @@ object GeneralForm: TGeneralForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 488
|
||||
Height = 77
|
||||
Top = 264
|
||||
Top = 237
|
||||
Width = 216
|
||||
Anchors = [akTop, akRight]
|
||||
AutoFill = True
|
||||
@ -268,7 +267,7 @@ object GeneralForm: TGeneralForm
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 488
|
||||
Height = 77
|
||||
Top = 90
|
||||
Top = 63
|
||||
Width = 216
|
||||
Anchors = [akTop, akRight]
|
||||
AutoFill = True
|
||||
@ -299,7 +298,6 @@ object GeneralForm: TGeneralForm
|
||||
Width = 99
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Save as text...'
|
||||
NumGlyphs = 0
|
||||
OnClick = SaveButtonClick
|
||||
TabOrder = 7
|
||||
end
|
||||
|
@ -85,6 +85,8 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
States;
|
||||
|
||||
@ -489,7 +491,6 @@ begin
|
||||
if Execute then
|
||||
begin
|
||||
TargetName := FileName;
|
||||
writeln('Filter Index: ', FilterIndex);
|
||||
case FilterIndex of
|
||||
1: // HTML
|
||||
begin
|
||||
@ -565,7 +566,5 @@ end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
initialization
|
||||
{$i GeneralAbilitiesDemo.lrs}
|
||||
|
||||
end.
|
||||
|
@ -54,6 +54,8 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
Editors, States;
|
||||
|
||||
@ -229,7 +231,5 @@ end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
initialization
|
||||
{$i GridDemo.lrs}
|
||||
|
||||
end.
|
||||
|
@ -11,11 +11,11 @@ object HeaderOwnerDrawForm: THeaderOwnerDrawForm
|
||||
Font.Name = 'MS Sans Serif'
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
LCLVersion = '0.9.29'
|
||||
LCLVersion = '1.7'
|
||||
object Label8: TLabel
|
||||
Left = 12
|
||||
Height = 102
|
||||
Top = 320
|
||||
Height = 64
|
||||
Top = 358
|
||||
Width = 745
|
||||
Anchors = [akLeft, akRight, akBottom]
|
||||
Caption = 'This page demonstrates the advance custom draw mode for a tree''s header. The left column is drawn as usual while with the other columns more and more details are customized by the applicaiton. Note: Virtual Treeview allows to customize the header fully or only parts of it and draws all standard elements as normal if they are not handled by the application. This allows very flexible designs but avoids full custom draw if only a small details must be drawn differently.'
|
||||
@ -54,6 +54,7 @@ object HeaderOwnerDrawForm: THeaderOwnerDrawForm
|
||||
Header.Background = clBtnShadow
|
||||
Header.Columns = <
|
||||
item
|
||||
Color = clWindow
|
||||
Hint = 'This column is drawn entirely by the tree.'
|
||||
ImageIndex = 1
|
||||
Options = [coDraggable, coEnabled, coResizable, coShowDropMark, coVisible]
|
||||
@ -64,6 +65,7 @@ object HeaderOwnerDrawForm: THeaderOwnerDrawForm
|
||||
end
|
||||
item
|
||||
Alignment = taCenter
|
||||
Color = clWindow
|
||||
Hint = 'Only the background is customized.'
|
||||
ImageIndex = 2
|
||||
Layout = blGlyphTop
|
||||
|
@ -11,7 +11,7 @@ interface
|
||||
|
||||
uses
|
||||
LCLIntf, VTGraphics, Types, SysUtils, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, VirtualTrees, StdCtrls, ExtCtrls, LResources, LCLType, LCLProc;
|
||||
Dialogs, VirtualTrees, StdCtrls, ExtCtrls, LCLType, LCLProc;
|
||||
|
||||
type
|
||||
THeaderOwnerDrawForm = class(TForm)
|
||||
@ -52,6 +52,8 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
States, LclExt;
|
||||
|
||||
@ -241,7 +243,7 @@ begin
|
||||
//FBackBitmap2.PixelFormat := OptimalPixelFormat;
|
||||
CreateCheckerBackground;
|
||||
FHeaderBitmap := TBitmap.Create;
|
||||
FHeaderBitmap.LoadFromLazarusResource('Transcriptions');
|
||||
FHeaderBitmap.LoadFromResourceName(HINSTANCE, 'Transcriptions');
|
||||
end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
@ -305,8 +307,5 @@ end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
initialization
|
||||
{$i HeaderCustomDrawDemo.lrs}
|
||||
{$i bitmap.lrs}
|
||||
|
||||
end.
|
||||
|
@ -14,7 +14,7 @@ object MainForm: TMainForm
|
||||
OnCreate = FormCreate
|
||||
OnShow = FormShow
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '0.9.29'
|
||||
LCLVersion = '1.7'
|
||||
object PageScroller1: TPanel
|
||||
Left = 0
|
||||
Height = 77
|
||||
@ -47,7 +47,6 @@ object MainForm: TMainForm
|
||||
Top = 2
|
||||
Width = 70
|
||||
BorderSpacing.Top = 2
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
360D0000424D360D000000000000360400002800000030000000300000000100
|
||||
0800000000000009000000000000000000000001000000010000000000000000
|
||||
@ -157,7 +156,6 @@ object MainForm: TMainForm
|
||||
E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = DemoButtonClick
|
||||
end
|
||||
object AbilitiesDemoButton: TSpeedButton
|
||||
@ -168,7 +166,6 @@ object MainForm: TMainForm
|
||||
Top = 2
|
||||
Width = 70
|
||||
BorderSpacing.Top = 2
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
360D0000424D360D000000000000360400002800000030000000300000000100
|
||||
0800000000000009000000000000000000000001000000010000FFFFFF005858
|
||||
@ -278,7 +275,6 @@ object MainForm: TMainForm
|
||||
0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E0E
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = DemoButtonClick
|
||||
end
|
||||
object PropertiesDemoButton: TSpeedButton
|
||||
@ -289,7 +285,6 @@ object MainForm: TMainForm
|
||||
Top = 2
|
||||
Width = 70
|
||||
BorderSpacing.Top = 2
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
36140000424D3614000000000000360400002800000040000000400000000100
|
||||
0800000000000010000000000000000000000001000000010000000000000000
|
||||
@ -455,7 +450,6 @@ object MainForm: TMainForm
|
||||
E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = DemoButtonClick
|
||||
end
|
||||
object VisibilityDemoButton: TSpeedButton
|
||||
@ -466,7 +460,6 @@ object MainForm: TMainForm
|
||||
Top = 2
|
||||
Width = 70
|
||||
BorderSpacing.Top = 2
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
360D0000424D360D000000000000360400002800000030000000300000000100
|
||||
080000000000000900000000000000000000000100000001000000000000040C
|
||||
@ -576,7 +569,6 @@ object MainForm: TMainForm
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFCCCCCC
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = DemoButtonClick
|
||||
end
|
||||
object GridDemoButton: TSpeedButton
|
||||
@ -587,7 +579,6 @@ object MainForm: TMainForm
|
||||
Top = 2
|
||||
Width = 70
|
||||
BorderSpacing.Top = 2
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
360D0000424D360D000000000000360400002800000030000000300000000100
|
||||
0800000000000009000000000000000000000001000000010000000000000800
|
||||
@ -697,7 +688,6 @@ object MainForm: TMainForm
|
||||
0000000000000000000000000000000000000000000000000000
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = DemoButtonClick
|
||||
end
|
||||
object PaintTreeDemoButton: TSpeedButton
|
||||
@ -708,7 +698,6 @@ object MainForm: TMainForm
|
||||
Top = 2
|
||||
Width = 70
|
||||
BorderSpacing.Top = 2
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
360D0000424D360D000000000000360400002800000030000000300000000100
|
||||
0800000000000009000000000000000000000001000000010000FFFFFF00FFFF
|
||||
@ -818,7 +807,6 @@ object MainForm: TMainForm
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFFF62626262626262626262626
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = DemoButtonClick
|
||||
end
|
||||
object AlignDemoButton: TSpeedButton
|
||||
@ -829,7 +817,6 @@ object MainForm: TMainForm
|
||||
Top = 2
|
||||
Width = 70
|
||||
BorderSpacing.Top = 2
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
36140000424D3614000000000000360400002800000040000000400000000100
|
||||
0800000000000010000000000000000000000001000000010000000000000000
|
||||
@ -995,14 +982,13 @@ object MainForm: TMainForm
|
||||
E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5E5
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = DemoButtonClick
|
||||
end
|
||||
object Label1: TLabel
|
||||
Left = 0
|
||||
Height = 14
|
||||
Height = 13
|
||||
Top = 14
|
||||
Width = 76
|
||||
Width = 72
|
||||
Caption = 'Demo picker'
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
@ -1012,9 +998,9 @@ object MainForm: TMainForm
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 0
|
||||
Height = 18
|
||||
Height = 16
|
||||
Top = 30
|
||||
Width = 217
|
||||
Width = 196
|
||||
Caption = 'Which demo do you want to see?'
|
||||
ParentColor = False
|
||||
end
|
||||
@ -1026,7 +1012,6 @@ object MainForm: TMainForm
|
||||
Top = 2
|
||||
Width = 70
|
||||
BorderSpacing.Top = 2
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
361B0000424D361B000000000000360000002800000030000000300000000100
|
||||
180000000000001B0000120B0000120B00000000000000000000FF00FFFF00FF
|
||||
@ -1248,7 +1233,6 @@ object MainForm: TMainForm
|
||||
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = DemoButtonClick
|
||||
end
|
||||
object XPDemoButton: TSpeedButton
|
||||
@ -1259,7 +1243,6 @@ object MainForm: TMainForm
|
||||
Top = 2
|
||||
Width = 70
|
||||
BorderSpacing.Top = 2
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
96270000424D962700000000000036000000280000003C000000380000000100
|
||||
18000000000060270000120B0000120B00000000000000000000FF00FFFF00FF
|
||||
@ -1580,7 +1563,6 @@ object MainForm: TMainForm
|
||||
00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FFFF00FF
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = DemoButtonClick
|
||||
end
|
||||
object SpeedButton2: TSpeedButton
|
||||
@ -1591,7 +1573,6 @@ object MainForm: TMainForm
|
||||
Top = 2
|
||||
Width = 70
|
||||
BorderSpacing.Top = 2
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
361F0000424D361F000000000000360000002800000029000000400000000100
|
||||
180000000000001F0000120B0000120B00000000000000000000FFFFFF4634D5
|
||||
@ -1845,7 +1826,6 @@ object MainForm: TMainForm
|
||||
FFFFFFFFFFFFFFFFFFFFFFFFFFFAF8F7E2D4D0E7E0DEFFFFFF00
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = DemoButtonClick
|
||||
end
|
||||
object QuitButton: TSpeedButton
|
||||
@ -1856,7 +1836,6 @@ object MainForm: TMainForm
|
||||
Top = 2
|
||||
Width = 70
|
||||
BorderSpacing.Top = 2
|
||||
Color = clBtnFace
|
||||
Glyph.Data = {
|
||||
360D0000424D360D000000000000360400002800000030000000300000000100
|
||||
0800000000000009000000000000000000000001000000010000FFFFFF00AAAA
|
||||
@ -1966,21 +1945,20 @@ object MainForm: TMainForm
|
||||
D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7D7
|
||||
}
|
||||
GroupIndex = 1
|
||||
NumGlyphs = 0
|
||||
OnClick = QuitButtonClick
|
||||
end
|
||||
end
|
||||
end
|
||||
object StatusBar: TStatusBar
|
||||
Left = 0
|
||||
Height = 21
|
||||
Top = 562
|
||||
Height = 23
|
||||
Top = 560
|
||||
Width = 981
|
||||
Panels = <>
|
||||
end
|
||||
object ContainerPanel: TPanel
|
||||
Left = 0
|
||||
Height = 485
|
||||
Height = 483
|
||||
Top = 77
|
||||
Width = 981
|
||||
Align = alClient
|
||||
|
@ -48,38 +48,40 @@ procedure SetStatusbarText(const S: string);
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
SpeedDemo, GeneralAbilitiesDemo, DrawTreeDemo, PropertiesDemo,
|
||||
GridDemo, VisibilityDemo, AlignDemo, WindowsXPStyleDemo, MultilineDemo, HeaderCustomDrawDemo,
|
||||
States;
|
||||
States, LCLType;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
procedure LoadUnicodeStrings(const Name: string; var Strings: array of String);
|
||||
|
||||
// Loads the Unicode strings from the resource.
|
||||
|
||||
var
|
||||
Res: TLResource;
|
||||
Head, Tail: PChar;
|
||||
Stream: TResourceStream;
|
||||
Head, Tail: PAnsiChar;
|
||||
I: Integer;
|
||||
|
||||
begin
|
||||
Res := LazarusResources.Find(Name);
|
||||
if (Res <> nil) and (Res.Value <> '') then
|
||||
begin
|
||||
Head := PChar(Res.Value);
|
||||
Stream := TResourceStream.Create(HINSTANCE, Name, RT_RCDATA);
|
||||
try
|
||||
Head := Stream.Memory;
|
||||
Tail := Head;
|
||||
for I := 0 to High(Strings) do
|
||||
begin
|
||||
Head := Tail;
|
||||
while not (Tail^ in [#0, #13]) do
|
||||
while not (Ord(Tail^) in [0, 13]) do
|
||||
Inc(Tail);
|
||||
SetString(Strings[I], Head, Tail - Head);
|
||||
// Skip carriage return and linefeed.
|
||||
Inc(Tail, 2);
|
||||
end;
|
||||
finally
|
||||
Stream.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -171,10 +173,6 @@ end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
initialization
|
||||
{$i Main.lrs}
|
||||
{$i unicode.lrs}
|
||||
|
||||
end.
|
||||
|
||||
|
||||
|
@ -37,6 +37,8 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
Main, States;
|
||||
|
||||
@ -153,7 +155,5 @@ end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
initialization
|
||||
{$i MultilineDemo.lrs}
|
||||
|
||||
end.
|
||||
|
@ -54,6 +54,8 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
Editors, Math, Main, States;
|
||||
|
||||
@ -314,7 +316,5 @@ begin
|
||||
end;
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
initialization
|
||||
{$i PropertiesDemo.lrs}
|
||||
|
||||
end.
|
||||
|
@ -52,6 +52,8 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
States;
|
||||
|
||||
@ -194,8 +196,6 @@ end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
initialization
|
||||
{$i SpeedDemo.lrs}
|
||||
|
||||
end.
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
object StateForm: TStateForm
|
||||
Left = 396
|
||||
Left = 403
|
||||
Height = 589
|
||||
Top = 91
|
||||
Top = 147
|
||||
Width = 478
|
||||
HorzScrollBar.Page = 477
|
||||
VertScrollBar.Page = 588
|
||||
@ -12,7 +12,7 @@ object StateForm: TStateForm
|
||||
ClientWidth = 478
|
||||
Font.Height = -14
|
||||
Font.Name = 'Arial Narrow'
|
||||
LCLVersion = '1.4.0.4'
|
||||
LCLVersion = '1.7'
|
||||
object EnableCheckBox: TCheckBox
|
||||
Left = 9
|
||||
Height = 20
|
||||
@ -455,7 +455,7 @@ object StateForm: TStateForm
|
||||
object CheckBox22: TCheckBox
|
||||
Left = 9
|
||||
Height = 20
|
||||
Top = 109
|
||||
Top = 114
|
||||
Width = 181
|
||||
Caption = 'Default node height scale'
|
||||
Enabled = False
|
||||
|
@ -80,6 +80,8 @@ procedure UpdateStateDisplay(CurrentStates, Enter, Leave: TVirtualTreeStates);
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
@ -115,7 +117,9 @@ begin
|
||||
SetActiveState(CheckBox19, tsLeftButtonDown in NewStates);
|
||||
SetActiveState(CheckBox20, tsMouseCheckPending in NewStates);
|
||||
SetActiveState(CheckBox21, tsMiddleButtonDown in NewStates);
|
||||
//SetActiveState(CheckBox22, tsNeedScale in NewStates);
|
||||
{$if VTMajorVersion < 5}
|
||||
SetActiveState(CheckBox22, tsNeedScale in NewStates);
|
||||
{$endif}
|
||||
SetActiveState(CheckBox23, tsNeedRootCountUpdate in NewStates);
|
||||
SetActiveState(CheckBox24, tsOLEDragging in NewStates);
|
||||
SetActiveState(CheckBox25, tsOLEDragPending in NewStates);
|
||||
@ -212,7 +216,5 @@ end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
initialization
|
||||
{$i States.lrs}
|
||||
|
||||
end.
|
||||
|
@ -59,6 +59,8 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses States;
|
||||
|
||||
|
||||
@ -338,7 +340,5 @@ end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
initialization
|
||||
{$i VisibilityDemo.lrs}
|
||||
|
||||
end.
|
||||
|
@ -11,22 +11,22 @@ object WindowsXPForm: TWindowsXPForm
|
||||
Font.Height = -13
|
||||
Font.Name = 'Microsoft Sans Serif'
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.0.8.0'
|
||||
LCLVersion = '1.7'
|
||||
object Label1: TLabel
|
||||
Left = -449
|
||||
Height = 17
|
||||
Left = -448
|
||||
Height = 16
|
||||
Top = 40
|
||||
Width = 1286
|
||||
Width = 1285
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'This demo shows a tree with properties which make it look as in the new Windows XP style. Under Windows XP native theme APIs are used to paint the tree. On other system legacy code is used which simulates the look.'
|
||||
ParentColor = False
|
||||
WordWrap = True
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = -291
|
||||
Height = 17
|
||||
Left = -290
|
||||
Height = 16
|
||||
Top = 168
|
||||
Width = 1128
|
||||
Width = 1127
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'Note that the scrollbars are not drawn in the new style on non-XP systems. It would be far off the goal of the tree to reimplement a full blown scrollbar handling, which would be required otherwise.'
|
||||
ParentColor = False
|
||||
@ -34,10 +34,10 @@ object WindowsXPForm: TWindowsXPForm
|
||||
end
|
||||
object Label4: TLabel
|
||||
Cursor = crHandPoint
|
||||
Left = -617
|
||||
Height = 17
|
||||
Left = -616
|
||||
Height = 16
|
||||
Top = 290
|
||||
Width = 1454
|
||||
Width = 1453
|
||||
Anchors = [akTop, akRight]
|
||||
Caption = 'If you want to have an explorer treeview with real content then I recommend that you give Jim Kuenemann''s shell tools a try. His shell treeview (based on Virtual Treeview) is the most advanced you will find worldwide. Click here to open Yahoo Group.'
|
||||
Font.CharSet = ANSI_CHARSET
|
||||
@ -167,13 +167,14 @@ object WindowsXPForm: TWindowsXPForm
|
||||
end
|
||||
object ToolButton15: TToolButton
|
||||
Left = 241
|
||||
Height = 32
|
||||
Top = 2
|
||||
Width = 10
|
||||
Width = 8
|
||||
Caption = 'ToolButton15'
|
||||
Style = tbsSeparator
|
||||
end
|
||||
object ToolButton16: TToolButton
|
||||
Left = 251
|
||||
Left = 249
|
||||
Top = 2
|
||||
Caption = 'Click here to print the treeview.'
|
||||
ImageIndex = 24
|
||||
|
@ -37,13 +37,12 @@ type
|
||||
procedure XPTreeGetImageIndex(Sender: TBaseVirtualTree; Node: PVirtualNode; Kind: TVTImageKind;
|
||||
Column: TColumnIndex; var Ghosted: Boolean; var Index: Integer);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure XPTreeHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
procedure XPTreeInitNode(Sender: TBaseVirtualTree; ParentNode, Node: PVirtualNode;
|
||||
var InitialStates: TVirtualNodeInitStates);
|
||||
procedure XPTreeInitChildren(Sender: TBaseVirtualTree; Node: PVirtualNode; var ChildCount: Cardinal);
|
||||
procedure XPTreeGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex;
|
||||
TextType: TVSTTextType; var CellText: String);
|
||||
procedure XPTreeHeaderClickx(Sender: TVTHeader; Column: TColumnIndex; Button: TMouseButton; Shift: TShiftState;
|
||||
procedure XPTreeHeaderClick(Sender: TVTHeader; Column: TColumnIndex; Button: TMouseButton; Shift: TShiftState;
|
||||
X, Y: Integer);
|
||||
procedure XPTreeCompareNodes(Sender: TBaseVirtualTree; Node1, Node2: PVirtualNode; Column: TColumnIndex;
|
||||
var Result: Integer);
|
||||
@ -61,6 +60,8 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
States;
|
||||
|
||||
@ -130,40 +131,6 @@ begin
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
procedure TWindowsXPForm.XPTreeHeaderClick(Sender: TVTHeader;
|
||||
HitInfo: TVTHeaderHitInfo);
|
||||
begin
|
||||
with HitInfo do
|
||||
if Button = mbLeft then
|
||||
begin
|
||||
with Sender, Treeview do
|
||||
begin
|
||||
if SortColumn > NoColumn then
|
||||
Columns[SortColumn].Options := Columns[SortColumn].Options + [coParentColor];
|
||||
|
||||
// Do not sort the last column, it contains nothing to sort.
|
||||
if Column = 2 then
|
||||
SortColumn := NoColumn
|
||||
else
|
||||
begin
|
||||
if (SortColumn = NoColumn) or (SortColumn <> Column) then
|
||||
begin
|
||||
SortColumn := Column;
|
||||
SortDirection := sdAscending;
|
||||
end
|
||||
else
|
||||
if SortDirection = sdAscending then
|
||||
SortDirection := sdDescending
|
||||
else
|
||||
SortDirection := sdAscending;
|
||||
|
||||
Columns[SortColumn].Color := $F7F7F7;
|
||||
SortTree(SortColumn, SortDirection, False);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
procedure TWindowsXPForm.XPTreeInitNode(Sender: TBaseVirtualTree; ParentNode, Node: PVirtualNode;
|
||||
@ -221,11 +188,38 @@ end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
procedure TWindowsXPForm.XPTreeHeaderClickx(Sender: TVTHeader;
|
||||
Column: TColumnIndex; Button: TMouseButton; Shift: TShiftState; X, Y: Integer
|
||||
);
|
||||
procedure TWindowsXPForm.XPTreeHeaderClick(Sender: TVTHeader; Column: TColumnIndex; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
|
||||
begin
|
||||
if Button = mbLeft then
|
||||
begin
|
||||
with Sender, Treeview do
|
||||
begin
|
||||
if SortColumn > NoColumn then
|
||||
Columns[SortColumn].Options := Columns[SortColumn].Options + [coParentColor];
|
||||
|
||||
// Do not sort the last column, it contains nothing to sort.
|
||||
if Column = 2 then
|
||||
SortColumn := NoColumn
|
||||
else
|
||||
begin
|
||||
if (SortColumn = NoColumn) or (SortColumn <> Column) then
|
||||
begin
|
||||
SortColumn := Column;
|
||||
SortDirection := sdAscending;
|
||||
end
|
||||
else
|
||||
if SortDirection = sdAscending then
|
||||
SortDirection := sdDescending
|
||||
else
|
||||
SortDirection := sdAscending;
|
||||
|
||||
Columns[SortColumn].Color := $F7F7F7;
|
||||
SortTree(SortColumn, SortDirection, False);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
@ -288,7 +282,5 @@ end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
initialization
|
||||
{$i WindowsXPStyleDemo.lrs}
|
||||
|
||||
end.
|
||||
|
@ -1,10 +1,10 @@
|
||||
object Form1: TForm1
|
||||
object MainForm: TMainForm
|
||||
Left = 188
|
||||
Height = 434
|
||||
Top = 104
|
||||
Width = 648
|
||||
ActiveControl = MyTree
|
||||
Caption = 'Form1'
|
||||
Caption = 'Data Array Virtual Tree Demo'
|
||||
ClientHeight = 434
|
||||
ClientWidth = 648
|
||||
Font.Height = -11
|
||||
@ -12,7 +12,7 @@ object Form1: TForm1
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.4.0.4'
|
||||
LCLVersion = '1.7'
|
||||
object Label1: TLabel
|
||||
Left = 247
|
||||
Height = 13
|
||||
@ -104,7 +104,6 @@ object Form1: TForm1
|
||||
Width = 641
|
||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||
AutoScrollDelay = 1
|
||||
Colors.UnfocusedColor = clMedGray
|
||||
DefaultText = 'Node'
|
||||
Header.AutoSizeIndex = 0
|
||||
Header.Columns = <
|
||||
|
@ -94,9 +94,9 @@ type
|
||||
|
||||
end;
|
||||
|
||||
{ TForm1 }
|
||||
{ TMainForm }
|
||||
|
||||
TForm1 = class(TForm)
|
||||
TMainForm = class(TForm)
|
||||
Button1: TButton;
|
||||
btnDelete: TButton;
|
||||
Edit1: TEdit;
|
||||
@ -115,7 +115,12 @@ type
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure MyTreeCompareNodes(Sender: TBaseVirtualTree; Node1,
|
||||
Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
|
||||
{$if VTMajorVersion < 5}
|
||||
procedure MyTreeHeaderClick(Sender: TVTHeader; Column: TColumnIndex;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
{$else}
|
||||
procedure MyTreeHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
{$endif}
|
||||
procedure btnDeleteClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure MyTreePaintText(Sender: TBaseVirtualTree;
|
||||
@ -134,16 +139,18 @@ type
|
||||
end;
|
||||
|
||||
var
|
||||
Form1: TForm1;
|
||||
MainForm: TMainForm;
|
||||
|
||||
MyArrayData: array of TMyRecord;
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
Math;
|
||||
|
||||
procedure TForm1.MyTreeGetText(Sender: TBaseVirtualTree;
|
||||
procedure TMainForm.MyTreeGetText(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
|
||||
var CellText: String);
|
||||
var
|
||||
@ -167,7 +174,7 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.Button1Click(Sender: TObject);
|
||||
procedure TMainForm.Button1Click(Sender: TObject);
|
||||
var
|
||||
Node: PVirtualNode;
|
||||
Data: ^rTreeData;
|
||||
@ -213,7 +220,7 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.MyTreeCompareNodes(Sender: TBaseVirtualTree; Node1,
|
||||
procedure TMainForm.MyTreeCompareNodes(Sender: TBaseVirtualTree; Node1,
|
||||
Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
|
||||
var
|
||||
n1,n2: ^rTreeData;
|
||||
@ -239,41 +246,50 @@ begin
|
||||
end
|
||||
end;
|
||||
|
||||
procedure TForm1.MyTreeHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
{$if VTMajorVersion < 5}
|
||||
procedure TMainForm.MyTreeHeaderClick(Sender: TVTHeader; Column: TColumnIndex;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
{$else}
|
||||
procedure TMainForm.MyTreeHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
{$endif}
|
||||
var
|
||||
Direction : TSortDirection;
|
||||
{$if VTMajorVersion >= 5}
|
||||
Column: TColumnIndex;
|
||||
Shift: TShiftState;
|
||||
{$endif}
|
||||
begin
|
||||
|
||||
{$if VTMajorVersion >= 5}
|
||||
Column := HitInfo.Column;
|
||||
Shift := HitInfo.Shift;
|
||||
{$endif}
|
||||
// Descending order with pressed Shift, otherwise Ascending
|
||||
// Or you can save Direction or use
|
||||
// MyTree.Header.SortDirection and MyTree.Header.SortColumn
|
||||
// to get automatically Descending/Ascending sorting
|
||||
// by only clicking on header
|
||||
with HitInfo do
|
||||
|
||||
if ssShift in Shift
|
||||
then
|
||||
Direction := sdDescending
|
||||
else
|
||||
Direction := sdAscending;
|
||||
|
||||
// Sort all columns except the second
|
||||
if Column<>1 then
|
||||
begin
|
||||
if ssShift in Shift
|
||||
then
|
||||
Direction := sdDescending
|
||||
else
|
||||
Direction := sdAscending;
|
||||
// Set direction image on the sorted column
|
||||
MyTree.Header.SortColumn := Column;
|
||||
|
||||
// Sort all columns except the second
|
||||
if Column<>1 then
|
||||
begin
|
||||
// Set direction image on the sorted column
|
||||
MyTree.Header.SortColumn := Column;
|
||||
// Set the right direction image
|
||||
MyTree.Header.SortDirection := Direction;
|
||||
|
||||
// Set the right direction image
|
||||
MyTree.Header.SortDirection := Direction;
|
||||
|
||||
// Sorting process
|
||||
MyTree.SortTree(Column, Direction);
|
||||
end;
|
||||
end;
|
||||
// Sorting process
|
||||
MyTree.SortTree(Column, Direction);
|
||||
end
|
||||
end;
|
||||
|
||||
|
||||
procedure TForm1.btnDeleteClick(Sender: TObject);
|
||||
procedure TMainForm.btnDeleteClick(Sender: TObject);
|
||||
var
|
||||
Timer: cardinal;
|
||||
begin
|
||||
@ -291,7 +307,7 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
procedure TMainForm.FormCreate(Sender: TObject);
|
||||
const
|
||||
|
||||
ColumnParams: array[0..2] of
|
||||
@ -404,7 +420,7 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.MyTreeBeforeCellPaint(Sender: TBaseVirtualTree;
|
||||
procedure TMainForm.MyTreeBeforeCellPaint(Sender: TBaseVirtualTree;
|
||||
TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
|
||||
CellPaintMode: TVTCellPaintMode; CellRect: TRect; var ContentRect: TRect);
|
||||
begin
|
||||
@ -422,7 +438,7 @@ begin
|
||||
end
|
||||
end;
|
||||
|
||||
procedure TForm1.MyTreePaintText(Sender: TBaseVirtualTree;
|
||||
procedure TMainForm.MyTreePaintText(Sender: TBaseVirtualTree;
|
||||
const TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
|
||||
TextType: TVSTTextType);
|
||||
var
|
||||
@ -452,7 +468,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.MyTreeFreeNode(Sender: TBaseVirtualTree;
|
||||
procedure TMainForm.MyTreeFreeNode(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode);
|
||||
var
|
||||
n1: ^rTreeData;
|
||||
@ -475,7 +491,7 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.MyTreeFocusChanged(Sender: TBaseVirtualTree;
|
||||
procedure TMainForm.MyTreeFocusChanged(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode; Column: TColumnIndex);
|
||||
var
|
||||
n1: ^rTreeData;
|
||||
@ -498,12 +514,12 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
|
||||
begin
|
||||
btnCleanAll.Click
|
||||
end;
|
||||
|
||||
procedure TForm1.btnCleanAllClick(Sender: TObject);
|
||||
procedure TMainForm.btnCleanAllClick(Sender: TObject);
|
||||
begin
|
||||
// Fast deletion of all your data and VST nodes
|
||||
|
||||
@ -516,7 +532,7 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
procedure TForm1.Edit2Change(Sender: TObject);
|
||||
procedure TMainForm.Edit2Change(Sender: TObject);
|
||||
var
|
||||
Node: PVirtualNode;
|
||||
ind: integer;
|
||||
@ -541,7 +557,5 @@ begin
|
||||
end
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$i Main.lrs}
|
||||
|
||||
end.
|
||||
|
@ -9,6 +9,7 @@
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
@ -44,16 +45,21 @@
|
||||
<Unit1>
|
||||
<Filename Value="Main.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="Form1"/>
|
||||
<ComponentName Value="MainForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Main"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="dataarray"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
|
@ -14,7 +14,7 @@ uses
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TForm1, Form1);
|
||||
Application.CreateForm(TMainForm, MainForm);
|
||||
Application.Run;
|
||||
end.
|
||||
|
||||
|
@ -7,7 +7,7 @@ object MainForm: TMainForm
|
||||
ClientHeight = 349
|
||||
ClientWidth = 454
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.1'
|
||||
LCLVersion = '1.7'
|
||||
object VirtualStringTree1: TVirtualStringTree
|
||||
Left = 8
|
||||
Height = 315
|
||||
@ -25,6 +25,7 @@ object MainForm: TMainForm
|
||||
TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScroll, toAutoScrollOnExpand, toAutoTristateTracking, toAutoDeleteMovedNodes]
|
||||
OnDragOver = VirtualStringTree1DragOver
|
||||
OnDragDrop = VirtualStringTree1DragDrop
|
||||
OnFreeNode = VirtualStringTree1FreeNode
|
||||
OnGetText = VirtualStringTree1GetText
|
||||
OnGetNodeDataSize = VirtualStringTree1GetNodeDataSize
|
||||
OnInitNode = VirtualStringTree1InitNode
|
||||
|
@ -26,6 +26,8 @@ type
|
||||
procedure VirtualStringTree1DragOver(Sender: TBaseVirtualTree;
|
||||
Source: TObject; Shift: TShiftState; State: TDragState; const Pt: TPoint;
|
||||
Mode: TDropMode; var Effect: Integer; var Accept: Boolean);
|
||||
procedure VirtualStringTree1FreeNode(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode);
|
||||
procedure VirtualStringTree1GetNodeDataSize(Sender: TBaseVirtualTree;
|
||||
var NodeDataSize: Integer);
|
||||
procedure VirtualStringTree1GetText(Sender: TBaseVirtualTree;
|
||||
@ -136,6 +138,12 @@ begin
|
||||
Accept := (Sender = VirtualStringTree1) or (Source = ListBox1);
|
||||
end;
|
||||
|
||||
procedure TMainForm.VirtualStringTree1FreeNode(Sender: TBaseVirtualTree;
|
||||
Node: PVirtualNode);
|
||||
begin
|
||||
PNodeData(Sender.GetNodeData(Node))^.Title := '';
|
||||
end;
|
||||
|
||||
procedure TMainForm.VirtualStringTree1GetNodeDataSize(Sender: TBaseVirtualTree;
|
||||
var NodeDataSize: Integer);
|
||||
begin
|
||||
|
@ -1,7 +1,7 @@
|
||||
object Form1: TForm1
|
||||
Left = 298
|
||||
Left = 428
|
||||
Height = 440
|
||||
Top = 162
|
||||
Top = 149
|
||||
Width = 500
|
||||
ActiveControl = VST1
|
||||
Caption = 'VT - Images'
|
||||
@ -10,7 +10,7 @@ object Form1: TForm1
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.0.8.0'
|
||||
LCLVersion = '1.7'
|
||||
object VST1: TVirtualStringTree
|
||||
Cursor = 63
|
||||
Left = 0
|
||||
@ -27,7 +27,6 @@ object Form1: TForm1
|
||||
Header.AutoSizeIndex = 0
|
||||
Header.Columns = <
|
||||
item
|
||||
Hint = 'Glavna kolona'
|
||||
ImageIndex = 0
|
||||
Position = 0
|
||||
Text = 'Main'
|
||||
|
@ -41,7 +41,6 @@ type
|
||||
procedure VST1BeforeCellPaint(Sender: TBaseVirtualTree;
|
||||
TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
|
||||
CellPaintMode: TVTCellPaintMode; CellRect: TRect; var ContentRect: TRect);
|
||||
procedure VST1HeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
procedure VST1InitNode(Sender: TBaseVirtualTree; ParentNode,
|
||||
Node: PVirtualNode; var InitialStates: TVirtualNodeInitStates);
|
||||
procedure VST1GetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
@ -52,6 +51,12 @@ type
|
||||
var Ghosted: Boolean; var ImageIndex: Integer);
|
||||
procedure VST1Checking(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
var NewState: TCheckState; var Allowed: Boolean);
|
||||
{$if VTMajorVersion >= 5}
|
||||
procedure VST1HeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
{$else}
|
||||
procedure VST1HeaderClick(Sender: TVTHeader; Column: TColumnIndex;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
{$endif}
|
||||
procedure VST1CompareNodes(Sender: TBaseVirtualTree; Node1,
|
||||
Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
|
||||
private
|
||||
@ -73,6 +78,8 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses Math;
|
||||
|
||||
procedure TForm1.FormCreate(Sender: TObject);
|
||||
@ -150,26 +157,6 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.VST1HeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
begin
|
||||
// Determinate sorting direction
|
||||
if HitInfo.Button=mbLeft then
|
||||
with Sender do
|
||||
begin
|
||||
if SortColumn <> HitInfo.Column then
|
||||
SortColumn := HitInfo.Column
|
||||
else begin
|
||||
if SortDirection = sdAscending then
|
||||
SortDirection := sdDescending
|
||||
else
|
||||
SortDirection := sdAscending
|
||||
end;
|
||||
|
||||
// Initiate sorting
|
||||
VST1.SortTree(HitInfo.Column, Sender.SortDirection, False);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.VST1InitNode(Sender: TBaseVirtualTree; ParentNode,
|
||||
Node: PVirtualNode; var InitialStates: TVirtualNodeInitStates);
|
||||
var
|
||||
@ -280,6 +267,39 @@ begin
|
||||
Allowed:=true
|
||||
end;
|
||||
|
||||
{$if VTMajorVersion >= 5}
|
||||
procedure TForm1.VST1HeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
var
|
||||
Button: TMouseButton;
|
||||
Column: TColumnIndex;
|
||||
{$else}
|
||||
procedure TForm1.VST1HeaderClick(Sender: TVTHeader; Column: TColumnIndex;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
{$endif}
|
||||
begin
|
||||
{$if VTMajorVersion >= 5}
|
||||
Button := HitInfo.Button;
|
||||
Column := HitInfo.Column;
|
||||
{$endif}
|
||||
|
||||
// Determinate sorting direction
|
||||
if Button=mbLeft then
|
||||
with Sender do
|
||||
begin
|
||||
if SortColumn <> Column then
|
||||
SortColumn := Column
|
||||
else begin
|
||||
if SortDirection = sdAscending then
|
||||
SortDirection := sdDescending
|
||||
else
|
||||
SortDirection := sdAscending
|
||||
end;
|
||||
|
||||
// Initiate sorting
|
||||
VST1.SortTree(Column, Sender.SortDirection, False);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TForm1.VST1CompareNodes(Sender: TBaseVirtualTree; Node1,
|
||||
Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
|
||||
var
|
||||
@ -307,7 +327,4 @@ begin
|
||||
end
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$i Unit1.lrs}
|
||||
|
||||
end.
|
||||
|
@ -9,7 +9,11 @@
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<XPManifest>
|
||||
<DpiAware Value="True"/>
|
||||
</XPManifest>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<StringTable ProductVersion=""/>
|
||||
@ -47,13 +51,18 @@
|
||||
<ComponentName Value="Form1"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="images"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
|
@ -10,12 +10,12 @@ object MainForm: TMainForm
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '0.9.27'
|
||||
LCLVersion = '1.7'
|
||||
object Label1: TLabel
|
||||
Left = 10
|
||||
Height = 14
|
||||
Height = 13
|
||||
Top = 8
|
||||
Width = 112
|
||||
Width = 111
|
||||
Caption = 'Last operation duration:'
|
||||
ParentColor = False
|
||||
end
|
||||
@ -24,12 +24,12 @@ object MainForm: TMainForm
|
||||
Height = 360
|
||||
Top = 24
|
||||
Width = 410
|
||||
BorderStyle = bsSingle
|
||||
Colors.BorderColor = clWindowText
|
||||
Colors.HotColor = clBlack
|
||||
DefaultText = 'Node'
|
||||
Header.AutoSizeIndex = -1
|
||||
Header.Columns = <>
|
||||
Header.DefaultHeight = 17
|
||||
Header.Font.Height = -11
|
||||
Header.Font.Name = 'MS Sans Serif'
|
||||
Header.MainColumn = -1
|
||||
|
@ -42,6 +42,8 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
|
||||
type
|
||||
// This is a very simple record we use to store data in the nodes.
|
||||
@ -182,8 +184,6 @@ end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
initialization
|
||||
{$i Main.lrs}
|
||||
|
||||
end.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
@ -9,6 +9,7 @@
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
@ -40,7 +41,6 @@
|
||||
<Unit0>
|
||||
<Filename Value="minimal_lcl.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="minimal_lcl"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="Main.pas"/>
|
||||
@ -48,20 +48,22 @@
|
||||
<ComponentName Value="MainForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Main"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="minimal"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
</SyntaxOptions>
|
||||
</Parsing>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</CONFIG>
|
||||
|
@ -12,7 +12,10 @@ object fmMVCDemo: TfmMVCDemo
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.7'
|
||||
object pnlControls: TPanel
|
||||
Left = 0
|
||||
Height = 118
|
||||
Top = 400
|
||||
Width = 742
|
||||
@ -25,41 +28,37 @@ object fmMVCDemo: TfmMVCDemo
|
||||
TabOrder = 0
|
||||
object Label1: TLabel
|
||||
Left = 72
|
||||
Height = 17
|
||||
Height = 13
|
||||
Top = 7
|
||||
Width = 61
|
||||
Width = 39
|
||||
Alignment = taRightJustify
|
||||
Caption = 'Caption:'
|
||||
Color = clNone
|
||||
ParentColor = False
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 47
|
||||
Height = 17
|
||||
Height = 13
|
||||
Top = 31
|
||||
Width = 86
|
||||
Width = 57
|
||||
Alignment = taRightJustify
|
||||
Caption = 'Subcaption:'
|
||||
Color = clNone
|
||||
ParentColor = False
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 8
|
||||
Height = 17
|
||||
Height = 13
|
||||
Top = 55
|
||||
Width = 125
|
||||
Width = 83
|
||||
Alignment = taRightJustify
|
||||
Caption = 'Incidence (0..63):'
|
||||
Color = clNone
|
||||
ParentColor = False
|
||||
end
|
||||
object Label2: TLabel
|
||||
Left = 256
|
||||
Height = 97
|
||||
Height = 26
|
||||
Top = 5
|
||||
Width = 296
|
||||
Width = 707
|
||||
Caption = 'Edit the current node.'#10'Note that you are setting data in a structure without referring to a visual component except for the information about what node currently has the focus.'
|
||||
Color = clNone
|
||||
ParentColor = False
|
||||
WordWrap = True
|
||||
end
|
||||
@ -87,7 +86,6 @@ object fmMVCDemo: TfmMVCDemo
|
||||
Top = 53
|
||||
Width = 51
|
||||
OnChange = edIncidenceChange
|
||||
OnKeyDown = nil
|
||||
OnKeyPress = edIncidenceKeyPress
|
||||
TabOrder = 2
|
||||
Text = '0'
|
||||
@ -99,7 +97,10 @@ object fmMVCDemo: TfmMVCDemo
|
||||
Width = 15
|
||||
Associate = edIncidence
|
||||
Max = 63
|
||||
Min = 0
|
||||
Position = 0
|
||||
TabOrder = 3
|
||||
Wrap = False
|
||||
end
|
||||
object btnAdd: TButton
|
||||
Left = 560
|
||||
@ -123,14 +124,15 @@ object fmMVCDemo: TfmMVCDemo
|
||||
end
|
||||
object cbLive: TCheckBox
|
||||
Left = 680
|
||||
Height = 24
|
||||
Height = 19
|
||||
Top = 8
|
||||
Width = 58
|
||||
Width = 48
|
||||
Caption = 'Live!'
|
||||
Font.Height = -11
|
||||
Font.Name = 'MS Sans Serif'
|
||||
Font.Style = [fsBold]
|
||||
OnClick = cbLiveClick
|
||||
ParentFont = False
|
||||
TabOrder = 6
|
||||
end
|
||||
end
|
||||
@ -138,72 +140,167 @@ object fmMVCDemo: TfmMVCDemo
|
||||
left = 120
|
||||
top = 143
|
||||
Bitmap = {
|
||||
6C690500000010000000100000009C0100002F2A2058504D202A2F0A73746174
|
||||
69632063686172202A677261706869635B5D203D207B0A223136203136203320
|
||||
31222C0A222E2063204E6F6E65222C0A222C20632023303030303030222C0A22
|
||||
2D20632023464646464646222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E22
|
||||
2C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E
|
||||
2C2C2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E
|
||||
2E2E2E2E2E2E2E2C2D2D2D2C2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2D2C
|
||||
2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2D2C2E2E2E222C0A222E2E2E2E2E
|
||||
2E2E2E2C2D2D2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E22
|
||||
2C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C
|
||||
2C2C2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E
|
||||
2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2C2C2C2E
|
||||
2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E227D0A9C0100002F2A2058504D202A2F0A73746174
|
||||
69632063686172202A677261706869635B5D203D207B0A223136203136203320
|
||||
31222C0A222E2063204E6F6E65222C0A222C20632023303030303030222C0A22
|
||||
2D20632023303043304330222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E22
|
||||
2C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E
|
||||
2C2C2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E
|
||||
2E2E2E2E2E2E2E2C2D2D2D2C2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2D2C
|
||||
2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2D2C2E2E2E222C0A222E2E2E2E2E
|
||||
2E2E2E2C2D2D2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E22
|
||||
2C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C
|
||||
2C2C2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E
|
||||
2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2C2C2C2E
|
||||
2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E227D0A9C0100002F2A2058504D202A2F0A73746174
|
||||
69632063686172202A677261706869635B5D203D207B0A223136203136203320
|
||||
31222C0A222E2063204E6F6E65222C0A222C20632023303030303030222C0A22
|
||||
2D20632023303043303030222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E22
|
||||
2C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E
|
||||
2C2C2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E
|
||||
2E2E2E2E2E2E2E2C2D2D2D2C2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2D2C
|
||||
2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2D2C2E2E2E222C0A222E2E2E2E2E
|
||||
2E2E2E2C2D2D2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E22
|
||||
2C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C
|
||||
2C2C2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E
|
||||
2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2C2C2C2E
|
||||
2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E227D0A9C0100002F2A2058504D202A2F0A73746174
|
||||
69632063686172202A677261706869635B5D203D207B0A223136203136203320
|
||||
31222C0A222E2063204E6F6E65222C0A222C20632023303030303030222C0A22
|
||||
2D20632023464630303030222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E22
|
||||
2C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E
|
||||
2C2C2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E
|
||||
2E2E2E2E2E2E2E2C2D2D2D2C2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2D2C
|
||||
2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2D2C2E2E2E222C0A222E2E2E2E2E
|
||||
2E2E2E2C2D2D2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E22
|
||||
2C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C
|
||||
2C2C2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E
|
||||
2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2C2C2C2E
|
||||
2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E227D0A9C0100002F2A2058504D202A2F0A73746174
|
||||
69632063686172202A677261706869635B5D203D207B0A223136203136203320
|
||||
31222C0A222E2063204E6F6E65222C0A222C20632023303030303030222C0A22
|
||||
2D20632023464646463030222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E22
|
||||
2C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E
|
||||
2C2C2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E
|
||||
2E2E2E2E2E2E2E2C2D2D2D2C2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2D2C
|
||||
2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2D2C2E2E2E222C0A222E2E2E2E2E
|
||||
2E2E2E2C2D2D2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E22
|
||||
2C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C
|
||||
2C2C2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E
|
||||
2E2E2E2E2E2E2E2C2D2D2C2E2E2E2E222C0A222E2E2E2E2E2E2E2E2C2C2C2C2E
|
||||
2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E
|
||||
2E2E2E2E2E2E2E2E2E2E2E227D0A
|
||||
4C69050000001000000010000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000FF000000FF000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFFFFFFFFFFFFFFFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFFFF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFFFFFFFFFFFFFFFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFFFFFFFFFFFFFFFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFFFFFFFFFFFFFFFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF000000FF000000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFFFFFFFFFFFFFFFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFFFFFFFFFFFFFFFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF000000FF000000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000FF000000FF000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFC0C000FFC0C000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFC0C000FFC0C000FFC0C000FF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFC0C000FFC0C000FFC0C000FF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFC0C000FFC0C000FFC0C000FF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFC0C000FFC0C000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFC0C000FFC0C000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFC0C000FFC0C000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF000000FF000000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFC0C000FFC0C000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FFC0C000FFC0C000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF000000FF000000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000FF000000FF000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00C000FF00C000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00C000FF00C000FF00C000FF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00C000FF00C000FF00C000FF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00C000FF00C000FF00C000FF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00C000FF00C000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00C000FF00C000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00C000FF00C000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF000000FF000000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00C000FF00C000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00C000FF00C000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF000000FF000000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000FF000000FF000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF0000FFFF0000FFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF0000FFFF0000FFFF0000FFFF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF0000FFFF0000FFFF0000FFFF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF0000FFFF0000FFFF0000FFFF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF0000FFFF0000FFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF0000FFFF0000FFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF0000FFFF0000FFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF000000FF000000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF0000FFFF0000FFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF0000FFFF0000FFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF000000FF000000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
000000000000000000000000000000000000000000FF000000FF000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00FFFFFF00FFFFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00FFFFFF00FFFFFF00FFFFFF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00FFFFFF00FFFFFF00FFFFFF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00FFFFFF00FFFFFF00FFFFFF0000
|
||||
00FF000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00FFFFFF00FFFFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00FFFFFF00FFFFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00FFFFFF00FFFFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF000000FF000000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00FFFFFF00FFFFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF00FFFFFF00FFFFFF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000FF000000FF000000FF000000FF0000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000000000000000000000000000000000000000
|
||||
0000000000000000000000000000
|
||||
}
|
||||
end
|
||||
object timLive: TTimer
|
||||
|
@ -59,6 +59,8 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
|
||||
function TfmMVCDemo.CreateDefaultTree:TMVCTree;
|
||||
{ recurse and curse :-) }
|
||||
@ -213,6 +215,5 @@ begin
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$i MVCDemoMain.lrs}
|
||||
Randomize;
|
||||
end.
|
||||
|
@ -26,8 +26,7 @@ unit MVCPanel;
|
||||
interface
|
||||
|
||||
uses
|
||||
LCLIntf, Controls, Graphics, SysUtils, Classes, ExtCtrls, StdCtrls,
|
||||
MVCTypes, VirtualTrees;
|
||||
LCLIntf, Controls, Graphics, SysUtils, Classes, ExtCtrls, MVCTypes, VirtualTrees;
|
||||
|
||||
type TMVCPanel=class(TCustomPanel)
|
||||
private
|
||||
|
@ -58,7 +58,7 @@ interface
|
||||
|
||||
uses
|
||||
LCLIntf, Types, SysUtils, Graphics, VirtualTrees, Classes, StdCtrls,
|
||||
Controls, Forms, ImgList, LCLType, DelphiCompat, LMessages;
|
||||
Controls, Forms, ImgList, LCLType, DelphiCompat;
|
||||
|
||||
type { TMVCNode is the encapsulation of a single Node in the structure.
|
||||
This implementation is a bit bloated because in my project
|
||||
@ -217,7 +217,7 @@ type { TMVCNode is the encapsulation of a single Node in the structure.
|
||||
details on what they do and why they are overridden. }
|
||||
function DoGetNodeWidth(Node: PVirtualNode; Column: TColumnIndex; Canvas: TCanvas = nil): Integer; override;
|
||||
procedure DoPaintNode(var PaintInfo: TVTPaintInfo); override;
|
||||
function DoInitChildren(Node:PVirtualNode;var ChildCount:Cardinal): Boolean; override;
|
||||
function DoInitChildren(Node: PVirtualNode; var AChildCount: Cardinal): Boolean; override;
|
||||
procedure DoInitNode(aParent,aNode:PVirtualNode;
|
||||
var aInitStates:TVirtualNodeInitStates); override;
|
||||
procedure DoFreeNode(aNode:PVirtualNode); override;
|
||||
@ -735,10 +735,11 @@ begin
|
||||
inherited DoFreeNode(aNode);
|
||||
end;
|
||||
|
||||
function TMVCTreeView.DoInitChildren(Node:PVirtualNode;var ChildCount:Cardinal): Boolean;
|
||||
function TMVCTreeView.DoInitChildren(Node:PVirtualNode;var AChildCount:Cardinal): Boolean;
|
||||
begin
|
||||
inherited DoInitChildren(Node,ChildCount);
|
||||
ChildCount:=MVCNode[Node].ChildCount;
|
||||
inherited DoInitChildren(Node,AChildCount);
|
||||
AChildCount:=MVCNode[Node].ChildCount;
|
||||
Result := True;
|
||||
end;
|
||||
|
||||
procedure TMVCTreeView.DoInitNode(aParent,aNode:PVirtualNode;
|
||||
|
@ -9,6 +9,7 @@
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
@ -50,7 +51,6 @@
|
||||
<ComponentName Value="fmMVCDemo"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="MVCDemoMain"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="MVCPanel.pas"/>
|
||||
@ -59,13 +59,18 @@
|
||||
<Unit3>
|
||||
<Filename Value="MVCTypes.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="MVCTypes"/>
|
||||
</Unit3>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="mvcdemo"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
|
@ -11,7 +11,7 @@ object MainForm: TMainForm
|
||||
Font.Height = -12
|
||||
Font.Name = 'Arial'
|
||||
OnCreate = FormCreate
|
||||
LCLVersion = '1.1'
|
||||
LCLVersion = '1.7'
|
||||
Visible = True
|
||||
object Label1: TLabel
|
||||
Left = 8
|
||||
|
@ -84,7 +84,9 @@ var
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
implementation
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
TypInfo;
|
||||
@ -711,8 +713,6 @@ end;
|
||||
|
||||
//----------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
initialization
|
||||
{$i Main.lrs}
|
||||
|
||||
end.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
@ -9,6 +9,7 @@
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
@ -40,7 +41,6 @@
|
||||
<Unit0>
|
||||
<Filename Value="ole.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="ole"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="Main.pas"/>
|
||||
@ -48,13 +48,18 @@
|
||||
<ComponentName Value="MainForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Main"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="ole"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<CStyleOperator Value="False"/>
|
||||
@ -66,8 +71,5 @@
|
||||
<UseHeaptrc Value="True"/>
|
||||
</Debugging>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</CONFIG>
|
||||
|
@ -8,7 +8,7 @@ object MainForm: TMainForm
|
||||
ClientWidth = 613
|
||||
OnCreate = FormCreate
|
||||
Position = poDesktopCenter
|
||||
LCLVersion = '1.1'
|
||||
LCLVersion = '1.7'
|
||||
object MainNotebook: TPageControl
|
||||
Left = 0
|
||||
Height = 504
|
||||
@ -20,13 +20,13 @@ object MainForm: TMainForm
|
||||
TabOrder = 0
|
||||
object WelcomePage: TTabSheet
|
||||
Caption = 'Welcome Translations'
|
||||
ClientHeight = 465
|
||||
ClientWidth = 607
|
||||
ClientHeight = 476
|
||||
ClientWidth = 605
|
||||
object WelcomeTree: TVirtualStringTree
|
||||
Left = 3
|
||||
Height = 431
|
||||
Height = 442
|
||||
Top = 31
|
||||
Width = 601
|
||||
Width = 599
|
||||
Align = alClient
|
||||
BorderSpacing.Around = 3
|
||||
DefaultText = 'Node'
|
||||
@ -53,11 +53,11 @@ object MainForm: TMainForm
|
||||
Left = 0
|
||||
Height = 28
|
||||
Top = 0
|
||||
Width = 607
|
||||
Width = 605
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 28
|
||||
ClientWidth = 607
|
||||
ClientWidth = 605
|
||||
TabOrder = 1
|
||||
object ChooseWelcomeFontButton: TButton
|
||||
Left = 4
|
||||
@ -112,10 +112,10 @@ object MainForm: TMainForm
|
||||
end
|
||||
object TextComboBox: TComboBox
|
||||
Left = 284
|
||||
Height = 21
|
||||
Height = 23
|
||||
Top = 58
|
||||
Width = 184
|
||||
ItemHeight = 0
|
||||
ItemHeight = 15
|
||||
Items.Strings = (
|
||||
'Não'
|
||||
'Coração'
|
||||
@ -142,10 +142,9 @@ object MainForm: TMainForm
|
||||
'Coração'
|
||||
'Sim'
|
||||
)
|
||||
ItemHeight = 0
|
||||
ItemHeight = 15
|
||||
ScrollWidth = 182
|
||||
TabOrder = 5
|
||||
TopIndex = -1
|
||||
end
|
||||
object AddListTextButton: TButton
|
||||
Left = 476
|
||||
|
@ -58,6 +58,8 @@ var
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
strutils;
|
||||
|
||||
@ -210,8 +212,5 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I fmain.lrs}
|
||||
|
||||
end.
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="9"/>
|
||||
@ -40,22 +40,26 @@
|
||||
<Unit0>
|
||||
<Filename Value="unicode.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="unicode"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="fmain.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="MainForm"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="fMain"/>
|
||||
</Unit1>
|
||||
</Units>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
<Version Value="10"/>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="unicode"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
@ -69,11 +73,5 @@
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CompilerMessages>
|
||||
<UseMsgFile Value="True"/>
|
||||
</CompilerMessages>
|
||||
<CompilerPath Value="$(CompPath)"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</CONFIG>
|
||||
|
@ -11,8 +11,8 @@ object frmMain: TfrmMain
|
||||
Font.Name = 'Tahoma'
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
Position = poDefaultPosOnly
|
||||
LCLVersion = '1.4.0.4'
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.7'
|
||||
object panMain: TPanel
|
||||
Left = 0
|
||||
Height = 254
|
||||
@ -46,16 +46,16 @@ object frmMain: TfrmMain
|
||||
Top = 7
|
||||
Width = 387
|
||||
Align = alClient
|
||||
Colors.UnfocusedColor = clMedGray
|
||||
DefaultText = 'Node'
|
||||
Header.AutoSizeIndex = 0
|
||||
Header.Columns = <>
|
||||
Header.DefaultHeight = 17
|
||||
Header.Font.Height = -11
|
||||
Header.Font.Name = 'MS Shell Dlg 2'
|
||||
Header.Height = 17
|
||||
Header.MainColumn = -1
|
||||
Header.Options = [hoColumnResize, hoDrag]
|
||||
Images = imgMaster
|
||||
RootNodeCount = 5
|
||||
TabOrder = 0
|
||||
TreeOptions.PaintOptions = [toShowButtons, toShowDropmark, toShowTreeLines, toThemeAware, toUseBlendedImages]
|
||||
OnDblClick = VTDblClick
|
||||
|
@ -61,6 +61,8 @@ TfrmMain =
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
|
||||
uses
|
||||
VTNoData, VTCheckList, VTPropEdit, VTDBExample, VTEditors, ViewCode;
|
||||
@ -182,6 +184,8 @@ implementation
|
||||
sFile : string;
|
||||
f : TForm;
|
||||
begin
|
||||
if VT.FocusedNode = nil then
|
||||
Exit;
|
||||
case VT.FocusedNode.Index of
|
||||
0: sFile := 'Main' ;
|
||||
1: sFile := 'VTNoData' ;
|
||||
@ -193,8 +197,6 @@ implementation
|
||||
TfrmViewCode(f).SynEdit1.Lines.LoadFromFile( ExtractFilePath(ParamStr(0)) + sFile + '.pas' );
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I Main.lrs}
|
||||
|
||||
end.
|
||||
|
||||
|
@ -7,19 +7,26 @@ object frmVTCheckList: TfrmVTCheckList
|
||||
VertScrollBar.Page = 345
|
||||
ActiveControl = VT
|
||||
Caption = 'Generic CheckListbox selection Form (no node data used)'
|
||||
ClientHeight = 346
|
||||
ClientWidth = 401
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
OnActivate = FormActivate
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.7'
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 346
|
||||
Top = 0
|
||||
Width = 401
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
BorderWidth = 7
|
||||
Caption = 'Panel1'
|
||||
ClientHeight = 346
|
||||
ClientWidth = 401
|
||||
TabOrder = 0
|
||||
object VT: TVirtualStringTree
|
||||
Left = 7
|
||||
@ -27,13 +34,13 @@ object frmVTCheckList: TfrmVTCheckList
|
||||
Top = 7
|
||||
Width = 387
|
||||
Align = alClient
|
||||
BorderStyle = bsSingle
|
||||
CheckImageKind = ckFlat
|
||||
Header.AutoSizeIndex = 0
|
||||
Header.Columns = <>
|
||||
Header.Font.Height = -11
|
||||
Header.Font.Name = 'MS Shell Dlg 2'
|
||||
Header.MainColumn = -1
|
||||
Header.Options = [hoColumnResize, hoDrag]
|
||||
RootNodeCount = 7
|
||||
TabOrder = 0
|
||||
TreeOptions.PaintOptions = [toThemeAware, toUseBlendedImages]
|
||||
TreeOptions.SelectionOptions = [toExtendedFocus, toMultiSelect, toCenterScrollIntoView]
|
||||
@ -48,6 +55,8 @@ object frmVTCheckList: TfrmVTCheckList
|
||||
Width = 387
|
||||
Align = alBottom
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 31
|
||||
ClientWidth = 387
|
||||
TabOrder = 1
|
||||
object btnOk: TButton
|
||||
Left = 225
|
||||
|
@ -50,7 +50,7 @@ interface
|
||||
function DoVTCheckList( sl : TStringList; var sSelections : string ) : boolean;
|
||||
|
||||
implementation
|
||||
{.$R *.dfm}
|
||||
{$R *.lfm}
|
||||
|
||||
procedure DoVTCheckListExample;
|
||||
var
|
||||
@ -166,8 +166,5 @@ implementation
|
||||
------------------------------------------------------------}
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I VTCheckList.lrs}
|
||||
|
||||
end.
|
||||
|
||||
|
@ -12,13 +12,13 @@ object frmVTDBExample: TfrmVTDBExample
|
||||
OnActivate = FormActivate
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
Position = poDefaultPosOnly
|
||||
LCLVersion = '1.0.8.0'
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.7'
|
||||
object Label1: TLabel
|
||||
Left = 12
|
||||
Height = 14
|
||||
Height = 13
|
||||
Top = 12
|
||||
Width = 117
|
||||
Width = 116
|
||||
Caption = 'Last operation duration:'
|
||||
ParentColor = False
|
||||
end
|
||||
@ -113,9 +113,9 @@ object frmVTDBExample: TfrmVTDBExample
|
||||
TabOrder = 1
|
||||
object Label2: TLabel
|
||||
Left = 16
|
||||
Height = 14
|
||||
Height = 13
|
||||
Top = 12
|
||||
Width = 65
|
||||
Width = 64
|
||||
Caption = 'Add Node(s):'
|
||||
Font.Color = clBlue
|
||||
Font.Height = -11
|
||||
@ -125,9 +125,9 @@ object frmVTDBExample: TfrmVTDBExample
|
||||
end
|
||||
object Label3: TLabel
|
||||
Left = 168
|
||||
Height = 14
|
||||
Height = 13
|
||||
Top = 5
|
||||
Width = 33
|
||||
Width = 32
|
||||
Caption = 'Toggle'
|
||||
Font.Color = clBlue
|
||||
Font.Height = -11
|
||||
@ -137,9 +137,9 @@ object frmVTDBExample: TfrmVTDBExample
|
||||
end
|
||||
object Label4: TLabel
|
||||
Left = 239
|
||||
Height = 14
|
||||
Height = 13
|
||||
Top = 5
|
||||
Width = 38
|
||||
Width = 37
|
||||
Caption = 'Options'
|
||||
Font.Color = clBlue
|
||||
Font.Height = -11
|
||||
@ -155,9 +155,9 @@ object frmVTDBExample: TfrmVTDBExample
|
||||
end
|
||||
object Label5: TLabel
|
||||
Left = 307
|
||||
Height = 14
|
||||
Height = 13
|
||||
Top = 6
|
||||
Width = 197
|
||||
Width = 196
|
||||
Alignment = taCenter
|
||||
Caption = '(Tip: Start typing for incremental search)'
|
||||
Font.Color = clRed
|
||||
|
@ -57,7 +57,6 @@ interface
|
||||
procedure VTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
|
||||
var Text: String);
|
||||
procedure VTFreeNode(Sender: TBaseVirtualTree; Node: PVirtualNode);
|
||||
procedure VTHeaderClick(Sender: TVTHeader; HitInfo: TVTHeaderHitInfo);
|
||||
procedure VTInitNode(Sender: TBaseVirtualTree; ParentNode, Node: PVirtualNode;
|
||||
var InitialStates: TVirtualNodeInitStates);
|
||||
procedure FormActivate(Sender: TObject);
|
||||
@ -68,6 +67,8 @@ interface
|
||||
procedure VTPaintText(Sender: TBaseVirtualTree;
|
||||
const TargetCanvas: TCanvas; Node: PVirtualNode;
|
||||
Column: TColumnIndex; TextType: TVSTTextType);
|
||||
procedure VTHeaderClick(Sender: TVTHeader; Column: TColumnIndex;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
procedure VTCompareNodes(Sender: TBaseVirtualTree; Node1,
|
||||
Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
|
||||
procedure VTGetNodeDataSize(Sender: TBaseVirtualTree; var NodeDataSize: Integer);
|
||||
@ -90,7 +91,8 @@ interface
|
||||
end;
|
||||
|
||||
implementation
|
||||
{.$R *.DFM}
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
const
|
||||
FLDN_CustNo = 0;
|
||||
@ -212,22 +214,6 @@ implementation
|
||||
Data.bnd.Free;
|
||||
Finalize( Data^ );
|
||||
end;
|
||||
|
||||
procedure TfrmVTDBExample.VTHeaderClick(Sender: TVTHeader;
|
||||
HitInfo: TVTHeaderHitInfo);
|
||||
begin
|
||||
with HitInfo do
|
||||
begin
|
||||
if (VT.Header.SortColumn <> Column) then
|
||||
VT.Header.SortColumn := Column
|
||||
else if (VT.Header.SortDirection = sdAscending) then
|
||||
VT.Header.SortDirection := sdDescending
|
||||
else
|
||||
VT.Header.SortDirection := sdAscending;
|
||||
|
||||
VT.SortTree( Column, VT.Header.SortDirection );
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TfrmVTDBExample.VTGetText(Sender: TBaseVirtualTree; Node: PVirtualNode;
|
||||
Column: TColumnIndex; TextType: TVSTTextType; var Text: String);
|
||||
@ -357,6 +343,19 @@ implementation
|
||||
VT.Refresh;
|
||||
end;
|
||||
|
||||
procedure TfrmVTDBExample.VTHeaderClick(Sender: TVTHeader; Column: TColumnIndex;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
begin
|
||||
if (VT.Header.SortColumn <> Column) then
|
||||
VT.Header.SortColumn := Column
|
||||
else if (VT.Header.SortDirection = sdAscending) then
|
||||
VT.Header.SortDirection := sdDescending
|
||||
else
|
||||
VT.Header.SortDirection := sdAscending;
|
||||
|
||||
VT.SortTree( Column, VT.Header.SortDirection );
|
||||
end;
|
||||
|
||||
procedure TfrmVTDBExample.VTCompareNodes(Sender: TBaseVirtualTree; Node1,
|
||||
Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
|
||||
var
|
||||
@ -512,7 +511,4 @@ implementation
|
||||
Result := StrLIComp( pchar(sCompare1), pchar(sCompare2), Min(Length(sCompare1), Length(sCompare2)) )
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I VTDBExample.lrs}
|
||||
|
||||
end.
|
||||
|
@ -14,7 +14,7 @@ object frmVTNoData: TfrmVTNoData
|
||||
OnCreate = FormCreate
|
||||
OnDestroy = FormDestroy
|
||||
Position = poDefaultPosOnly
|
||||
LCLVersion = '1.0.8.0'
|
||||
LCLVersion = '1.7'
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 346
|
||||
@ -65,9 +65,9 @@ object frmVTNoData: TfrmVTNoData
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
Left = 9
|
||||
Height = 14
|
||||
Height = 13
|
||||
Top = 9
|
||||
Width = 76
|
||||
Width = 75
|
||||
Alignment = taCenter
|
||||
Caption = 'VT.TreeOptions'
|
||||
Font.Color = clRed
|
||||
|
@ -57,7 +57,8 @@ interface
|
||||
end;
|
||||
|
||||
implementation
|
||||
{.$R *.dfm}
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
procedure TfrmVTNoData.FormCreate(Sender: TObject);
|
||||
begin
|
||||
@ -170,7 +171,7 @@ implementation
|
||||
'NodeHeightDblClickResize',
|
||||
'EditOnClick',
|
||||
'EditOnDblClick',
|
||||
'ReverseFullExpandHotKey'
|
||||
'toReverseFullExpandHotKey'
|
||||
);
|
||||
|
||||
aPaintOpts : array[0..Ord(High(TVTPaintOption ))] of string[25] =
|
||||
@ -196,8 +197,8 @@ implementation
|
||||
'ChildrenAbove',
|
||||
'FixedIndent',
|
||||
'UseExplorerTheme',
|
||||
'HideTreeLinesIfThemed',
|
||||
'ShowHiddenNodes'
|
||||
'toHideTreeLinesIfThemed',
|
||||
'toShowFilteredNodes'
|
||||
);
|
||||
|
||||
aSelOpts : array[0..Ord(High(TVTSelectionOption))] of string[25] =
|
||||
@ -212,8 +213,8 @@ implementation
|
||||
'SiblingSelectConstraint' ,
|
||||
'CenterScrollIntoView',
|
||||
'SimpleDrawSelection',
|
||||
'AlwaysSelectNode',
|
||||
'RestoreSelection'
|
||||
'toAlwaysSelectNode',
|
||||
'toRestoreSelection'
|
||||
);
|
||||
|
||||
aStrOpts : array[0..Ord(High(TVTStringOption ))] of string[25] =
|
||||
@ -284,9 +285,6 @@ implementation
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I VTNoData.lrs}
|
||||
|
||||
|
||||
end.
|
||||
|
||||
|
@ -12,10 +12,12 @@ object frmVTPropEdit: TfrmVTPropEdit
|
||||
OnActivate = FormActivate
|
||||
OnClose = FormClose
|
||||
OnCreate = FormCreate
|
||||
Position = poDefaultPosOnly
|
||||
LCLVersion = '0.9.27'
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.7'
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 601
|
||||
Top = 0
|
||||
Width = 458
|
||||
Align = alClient
|
||||
BevelOuter = bvNone
|
||||
@ -38,6 +40,7 @@ object frmVTPropEdit: TfrmVTPropEdit
|
||||
Header.AutoSizeIndex = 1
|
||||
Header.Columns = <
|
||||
item
|
||||
Position = 0
|
||||
Text = 'Properties'
|
||||
Width = 186
|
||||
end
|
||||
@ -46,8 +49,9 @@ object frmVTPropEdit: TfrmVTPropEdit
|
||||
Options = [coAllowClick, coDraggable, coEnabled, coParentBidiMode, coResizable, coShowDropMark, coVisible]
|
||||
Position = 1
|
||||
Text = 'Values'
|
||||
Width = 258
|
||||
Width = 254
|
||||
end>
|
||||
Header.DefaultHeight = 17
|
||||
Header.Font.Height = -11
|
||||
Header.Font.Name = 'MS Sans Serif'
|
||||
Header.Height = 18
|
||||
@ -118,7 +122,7 @@ object frmVTPropEdit: TfrmVTPropEdit
|
||||
TabOrder = 2
|
||||
object chkTriangleButtons: TCheckBox
|
||||
Left = 321
|
||||
Height = 17
|
||||
Height = 19
|
||||
Top = 8
|
||||
Width = 98
|
||||
Caption = 'Triangle Buttons'
|
||||
|
@ -110,7 +110,8 @@ interface
|
||||
|
||||
|
||||
implementation
|
||||
{.$R *.DFM}
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
uses
|
||||
VTEditors;
|
||||
@ -389,8 +390,6 @@ implementation
|
||||
slVals.Free;
|
||||
end;
|
||||
end;
|
||||
initialization
|
||||
{$I VTPropEdit.lrs}
|
||||
|
||||
|
||||
end.
|
||||
|
@ -2,354 +2,421 @@ object frmViewCode: TfrmViewCode
|
||||
Left = 230
|
||||
Height = 354
|
||||
Top = 137
|
||||
Width = 553
|
||||
Width = 623
|
||||
HorzScrollBar.Page = 552
|
||||
VertScrollBar.Page = 353
|
||||
Caption = 'Quick Code Viewer'
|
||||
ClientHeight = 354
|
||||
ClientWidth = 553
|
||||
ClientWidth = 623
|
||||
Font.Height = -11
|
||||
Font.Name = 'Tahoma'
|
||||
OnActivate = FormActivate
|
||||
Position = poDefaultPosOnly
|
||||
LCLVersion = '0.9.25'
|
||||
object SynEdit1: TSynEdit
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.7'
|
||||
inline SynEdit1: TSynEdit
|
||||
Left = 0
|
||||
Height = 354
|
||||
Width = 553
|
||||
Top = 0
|
||||
Width = 623
|
||||
Align = alClient
|
||||
Font.Height = -16
|
||||
Font.Name = 'courier'
|
||||
Font.Pitch = fpFixed
|
||||
Font.Quality = fqNonAntialiased
|
||||
ParentColor = False
|
||||
ParentFont = False
|
||||
TabOrder = 0
|
||||
Gutter.CodeFoldingWidth = 14
|
||||
Gutter.Width = 61
|
||||
Gutter.MouseActions = <>
|
||||
RightGutter.Width = 0
|
||||
RightGutter.MouseActions = <>
|
||||
Highlighter = SynPasSyn1
|
||||
Keystrokes = <
|
||||
item
|
||||
Command = 3
|
||||
Command = ecUp
|
||||
ShortCut = 38
|
||||
end
|
||||
item
|
||||
Command = 103
|
||||
Command = ecSelUp
|
||||
ShortCut = 8230
|
||||
end
|
||||
item
|
||||
Command = 211
|
||||
Command = ecScrollUp
|
||||
ShortCut = 16422
|
||||
end
|
||||
item
|
||||
Command = 4
|
||||
Command = ecDown
|
||||
ShortCut = 40
|
||||
end
|
||||
item
|
||||
Command = 104
|
||||
Command = ecSelDown
|
||||
ShortCut = 8232
|
||||
end
|
||||
item
|
||||
Command = 212
|
||||
Command = ecScrollDown
|
||||
ShortCut = 16424
|
||||
end
|
||||
item
|
||||
Command = 1
|
||||
Command = ecLeft
|
||||
ShortCut = 37
|
||||
end
|
||||
item
|
||||
Command = 101
|
||||
Command = ecSelLeft
|
||||
ShortCut = 8229
|
||||
end
|
||||
item
|
||||
Command = 5
|
||||
Command = ecWordLeft
|
||||
ShortCut = 16421
|
||||
end
|
||||
item
|
||||
Command = 105
|
||||
Command = ecSelWordLeft
|
||||
ShortCut = 24613
|
||||
end
|
||||
item
|
||||
Command = 2
|
||||
Command = ecRight
|
||||
ShortCut = 39
|
||||
end
|
||||
item
|
||||
Command = 102
|
||||
Command = ecSelRight
|
||||
ShortCut = 8231
|
||||
end
|
||||
item
|
||||
Command = 6
|
||||
Command = ecWordRight
|
||||
ShortCut = 16423
|
||||
end
|
||||
item
|
||||
Command = 106
|
||||
Command = ecSelWordRight
|
||||
ShortCut = 24615
|
||||
end
|
||||
item
|
||||
Command = 10
|
||||
Command = ecPageDown
|
||||
ShortCut = 34
|
||||
end
|
||||
item
|
||||
Command = 110
|
||||
Command = ecSelPageDown
|
||||
ShortCut = 8226
|
||||
end
|
||||
item
|
||||
Command = 14
|
||||
Command = ecPageBottom
|
||||
ShortCut = 16418
|
||||
end
|
||||
item
|
||||
Command = 114
|
||||
Command = ecSelPageBottom
|
||||
ShortCut = 24610
|
||||
end
|
||||
item
|
||||
Command = 9
|
||||
Command = ecPageUp
|
||||
ShortCut = 33
|
||||
end
|
||||
item
|
||||
Command = 109
|
||||
Command = ecSelPageUp
|
||||
ShortCut = 8225
|
||||
end
|
||||
item
|
||||
Command = 13
|
||||
Command = ecPageTop
|
||||
ShortCut = 16417
|
||||
end
|
||||
item
|
||||
Command = 113
|
||||
Command = ecSelPageTop
|
||||
ShortCut = 24609
|
||||
end
|
||||
item
|
||||
Command = 7
|
||||
Command = ecLineStart
|
||||
ShortCut = 36
|
||||
end
|
||||
item
|
||||
Command = 107
|
||||
Command = ecSelLineStart
|
||||
ShortCut = 8228
|
||||
end
|
||||
item
|
||||
Command = 15
|
||||
Command = ecEditorTop
|
||||
ShortCut = 16420
|
||||
end
|
||||
item
|
||||
Command = 115
|
||||
Command = ecSelEditorTop
|
||||
ShortCut = 24612
|
||||
end
|
||||
item
|
||||
Command = 8
|
||||
Command = ecLineEnd
|
||||
ShortCut = 35
|
||||
end
|
||||
item
|
||||
Command = 108
|
||||
Command = ecSelLineEnd
|
||||
ShortCut = 8227
|
||||
end
|
||||
item
|
||||
Command = 16
|
||||
Command = ecEditorBottom
|
||||
ShortCut = 16419
|
||||
end
|
||||
item
|
||||
Command = 116
|
||||
Command = ecSelEditorBottom
|
||||
ShortCut = 24611
|
||||
end
|
||||
item
|
||||
Command = 223
|
||||
Command = ecToggleMode
|
||||
ShortCut = 45
|
||||
end
|
||||
item
|
||||
Command = 201
|
||||
Command = ecCopy
|
||||
ShortCut = 16429
|
||||
end
|
||||
item
|
||||
Command = 604
|
||||
Command = ecPaste
|
||||
ShortCut = 8237
|
||||
end
|
||||
item
|
||||
Command = 502
|
||||
Command = ecDeleteChar
|
||||
ShortCut = 46
|
||||
end
|
||||
item
|
||||
Command = 603
|
||||
Command = ecCut
|
||||
ShortCut = 8238
|
||||
end
|
||||
item
|
||||
Command = 501
|
||||
Command = ecDeleteLastChar
|
||||
ShortCut = 8
|
||||
end
|
||||
item
|
||||
Command = 501
|
||||
Command = ecDeleteLastChar
|
||||
ShortCut = 8200
|
||||
end
|
||||
item
|
||||
Command = 504
|
||||
Command = ecDeleteLastWord
|
||||
ShortCut = 16392
|
||||
end
|
||||
item
|
||||
Command = 601
|
||||
Command = ecUndo
|
||||
ShortCut = 32776
|
||||
end
|
||||
item
|
||||
Command = 602
|
||||
Command = ecRedo
|
||||
ShortCut = 40968
|
||||
end
|
||||
item
|
||||
Command = 509
|
||||
Command = ecLineBreak
|
||||
ShortCut = 13
|
||||
end
|
||||
item
|
||||
Command = 199
|
||||
Command = ecSelectAll
|
||||
ShortCut = 16449
|
||||
end
|
||||
item
|
||||
Command = 201
|
||||
Command = ecCopy
|
||||
ShortCut = 16451
|
||||
end
|
||||
item
|
||||
Command = 610
|
||||
Command = ecBlockIndent
|
||||
ShortCut = 24649
|
||||
end
|
||||
item
|
||||
Command = 509
|
||||
Command = ecLineBreak
|
||||
ShortCut = 16461
|
||||
end
|
||||
item
|
||||
Command = 510
|
||||
Command = ecInsertLine
|
||||
ShortCut = 16462
|
||||
end
|
||||
item
|
||||
Command = 503
|
||||
Command = ecDeleteWord
|
||||
ShortCut = 16468
|
||||
end
|
||||
item
|
||||
Command = 611
|
||||
Command = ecBlockUnindent
|
||||
ShortCut = 24661
|
||||
end
|
||||
item
|
||||
Command = 604
|
||||
Command = ecPaste
|
||||
ShortCut = 16470
|
||||
end
|
||||
item
|
||||
Command = 603
|
||||
Command = ecCut
|
||||
ShortCut = 16472
|
||||
end
|
||||
item
|
||||
Command = 507
|
||||
Command = ecDeleteLine
|
||||
ShortCut = 16473
|
||||
end
|
||||
item
|
||||
Command = 506
|
||||
Command = ecDeleteEOL
|
||||
ShortCut = 24665
|
||||
end
|
||||
item
|
||||
Command = 601
|
||||
Command = ecUndo
|
||||
ShortCut = 16474
|
||||
end
|
||||
item
|
||||
Command = 602
|
||||
Command = ecRedo
|
||||
ShortCut = 24666
|
||||
end
|
||||
item
|
||||
Command = 301
|
||||
Command = ecGotoMarker0
|
||||
ShortCut = 16432
|
||||
end
|
||||
item
|
||||
Command = 302
|
||||
Command = ecGotoMarker1
|
||||
ShortCut = 16433
|
||||
end
|
||||
item
|
||||
Command = 303
|
||||
Command = ecGotoMarker2
|
||||
ShortCut = 16434
|
||||
end
|
||||
item
|
||||
Command = 304
|
||||
Command = ecGotoMarker3
|
||||
ShortCut = 16435
|
||||
end
|
||||
item
|
||||
Command = 305
|
||||
Command = ecGotoMarker4
|
||||
ShortCut = 16436
|
||||
end
|
||||
item
|
||||
Command = 306
|
||||
Command = ecGotoMarker5
|
||||
ShortCut = 16437
|
||||
end
|
||||
item
|
||||
Command = 307
|
||||
Command = ecGotoMarker6
|
||||
ShortCut = 16438
|
||||
end
|
||||
item
|
||||
Command = 308
|
||||
Command = ecGotoMarker7
|
||||
ShortCut = 16439
|
||||
end
|
||||
item
|
||||
Command = 309
|
||||
Command = ecGotoMarker8
|
||||
ShortCut = 16440
|
||||
end
|
||||
item
|
||||
Command = 310
|
||||
Command = ecGotoMarker9
|
||||
ShortCut = 16441
|
||||
end
|
||||
item
|
||||
Command = 351
|
||||
Command = ecSetMarker0
|
||||
ShortCut = 24624
|
||||
end
|
||||
item
|
||||
Command = 352
|
||||
Command = ecSetMarker1
|
||||
ShortCut = 24625
|
||||
end
|
||||
item
|
||||
Command = 353
|
||||
Command = ecSetMarker2
|
||||
ShortCut = 24626
|
||||
end
|
||||
item
|
||||
Command = 354
|
||||
Command = ecSetMarker3
|
||||
ShortCut = 24627
|
||||
end
|
||||
item
|
||||
Command = 355
|
||||
Command = ecSetMarker4
|
||||
ShortCut = 24628
|
||||
end
|
||||
item
|
||||
Command = 356
|
||||
Command = ecSetMarker5
|
||||
ShortCut = 24629
|
||||
end
|
||||
item
|
||||
Command = 357
|
||||
Command = ecSetMarker6
|
||||
ShortCut = 24630
|
||||
end
|
||||
item
|
||||
Command = 358
|
||||
Command = ecSetMarker7
|
||||
ShortCut = 24631
|
||||
end
|
||||
item
|
||||
Command = 359
|
||||
Command = ecSetMarker8
|
||||
ShortCut = 24632
|
||||
end
|
||||
item
|
||||
Command = 360
|
||||
Command = ecSetMarker9
|
||||
ShortCut = 24633
|
||||
end
|
||||
item
|
||||
Command = 231
|
||||
Command = ecNormalSelect
|
||||
ShortCut = 24654
|
||||
end
|
||||
item
|
||||
Command = 232
|
||||
Command = ecColumnSelect
|
||||
ShortCut = 24643
|
||||
end
|
||||
item
|
||||
Command = 233
|
||||
Command = ecLineSelect
|
||||
ShortCut = 24652
|
||||
end
|
||||
item
|
||||
Command = 612
|
||||
Command = ecTab
|
||||
ShortCut = 9
|
||||
end
|
||||
item
|
||||
Command = 613
|
||||
Command = ecShiftTab
|
||||
ShortCut = 8201
|
||||
end
|
||||
item
|
||||
Command = 250
|
||||
Command = ecMatchBracket
|
||||
ShortCut = 24642
|
||||
end>
|
||||
MouseActions = <>
|
||||
MouseTextActions = <>
|
||||
MouseSelActions = <>
|
||||
Lines.Strings = (
|
||||
'SynEdit1'
|
||||
)
|
||||
VisibleSpecialChars = [vscSpace, vscTabAtLast]
|
||||
SelectedColor.BackPriority = 50
|
||||
SelectedColor.ForePriority = 50
|
||||
SelectedColor.FramePriority = 50
|
||||
SelectedColor.BoldPriority = 50
|
||||
SelectedColor.ItalicPriority = 50
|
||||
SelectedColor.UnderlinePriority = 50
|
||||
SelectedColor.StrikeOutPriority = 50
|
||||
BracketHighlightStyle = sbhsBoth
|
||||
BracketMatchColor.Background = clNone
|
||||
BracketMatchColor.Foreground = clNone
|
||||
BracketMatchColor.Style = [fsBold]
|
||||
FoldedCodeColor.Background = clNone
|
||||
FoldedCodeColor.Foreground = clGray
|
||||
FoldedCodeColor.FrameColor = clGray
|
||||
MouseLinkColor.Background = clNone
|
||||
MouseLinkColor.Foreground = clBlue
|
||||
LineHighlightColor.Background = clNone
|
||||
LineHighlightColor.Foreground = clNone
|
||||
inline SynLeftGutterPartList1: TSynGutterPartList
|
||||
object SynGutterMarks1: TSynGutterMarks
|
||||
Width = 24
|
||||
MouseActions = <>
|
||||
end
|
||||
object SynGutterLineNumber1: TSynGutterLineNumber
|
||||
Width = 21
|
||||
MouseActions = <>
|
||||
MarkupInfo.Background = clBtnFace
|
||||
MarkupInfo.Foreground = clNone
|
||||
DigitCount = 2
|
||||
ShowOnlyLineNumbersMultiplesOf = 1
|
||||
ZeroStart = False
|
||||
LeadingZeros = False
|
||||
end
|
||||
object SynGutterChanges1: TSynGutterChanges
|
||||
Width = 4
|
||||
MouseActions = <>
|
||||
ModifiedColor = 59900
|
||||
SavedColor = clGreen
|
||||
end
|
||||
object SynGutterSeparator1: TSynGutterSeparator
|
||||
Width = 2
|
||||
MouseActions = <>
|
||||
MarkupInfo.Background = clWhite
|
||||
MarkupInfo.Foreground = clGray
|
||||
end
|
||||
object SynGutterCodeFolding1: TSynGutterCodeFolding
|
||||
MouseActions = <>
|
||||
MarkupInfo.Background = clNone
|
||||
MarkupInfo.Foreground = clGray
|
||||
MouseActionsExpanded = <>
|
||||
MouseActionsCollapsed = <>
|
||||
end
|
||||
end
|
||||
end
|
||||
object SynPasSyn1: TSynPasSyn
|
||||
Enabled = False
|
||||
CompilerMode = pcmDelphi
|
||||
NestedComments = False
|
||||
left = 61
|
||||
top = 109
|
||||
end
|
||||
|
@ -4,7 +4,7 @@ interface
|
||||
|
||||
uses
|
||||
DelphiCompat, LCLIntf, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, LResources, SynHighlighterPas, SynEdit, LCLType;
|
||||
Dialogs, SynHighlighterPas, SynEdit, LCLType;
|
||||
|
||||
type
|
||||
|
||||
@ -24,6 +24,8 @@ interface
|
||||
|
||||
implementation
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
procedure TfrmViewCode.FormActivate(Sender: TObject);
|
||||
var
|
||||
r : TRect;
|
||||
@ -37,7 +39,4 @@ implementation
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
initialization
|
||||
{$I ViewCode.lrs}
|
||||
|
||||
end.
|
||||
|
@ -9,6 +9,7 @@
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<ResourceType Value="res"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
@ -54,7 +55,6 @@
|
||||
<ComponentName Value="frmMain"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Main"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
<Filename Value="VTEditors.pas"/>
|
||||
@ -66,7 +66,6 @@
|
||||
<ComponentName Value="frmVTNoData"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="VTNoData"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="VTPropEdit.pas"/>
|
||||
@ -84,6 +83,7 @@
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="frmViewCode"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
</Unit6>
|
||||
<Unit7>
|
||||
<Filename Value="VTCheckList.pas"/>
|
||||
@ -104,6 +104,12 @@
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<Target>
|
||||
<Filename Value="vtbasic"/>
|
||||
</Target>
|
||||
<SearchPaths>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
<SyntaxOptions>
|
||||
<UseAnsiStrings Value="False"/>
|
||||
|
@ -43,33 +43,33 @@ end;"/>
|
||||
<Version Major="5" Minor="3" Release="2" Build="1"/>
|
||||
<Files Count="7">
|
||||
<Item1>
|
||||
<Filename Value="virtualtrees.lrs"/>
|
||||
<Type Value="LRS"/>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="VirtualTrees.pas"/>
|
||||
<UnitName Value="VirtualTrees"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
</Item1>
|
||||
<Item2>
|
||||
<Filename Value="VTHeaderPopup.pas"/>
|
||||
<UnitName Value="VTHeaderPopup"/>
|
||||
</Item3>
|
||||
<Item4>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Filename Value="registervirtualtreeview.pas"/>
|
||||
<HasRegisterProc Value="True"/>
|
||||
<UnitName Value="registervirtualtreeview"/>
|
||||
</Item4>
|
||||
<Item5>
|
||||
</Item3>
|
||||
<Item4>
|
||||
<Filename Value="ideicons.lrs"/>
|
||||
<Type Value="LRS"/>
|
||||
</Item5>
|
||||
<Item6>
|
||||
</Item4>
|
||||
<Item5>
|
||||
<Filename Value="VTConfig.inc"/>
|
||||
<Type Value="Include"/>
|
||||
</Item6>
|
||||
<Item7>
|
||||
</Item5>
|
||||
<Item6>
|
||||
<Filename Value="VTGraphics.pas"/>
|
||||
<UnitName Value="VTGraphics"/>
|
||||
</Item6>
|
||||
<Item7>
|
||||
<Filename Value="VirtualTrees.res"/>
|
||||
<Type Value="Binary"/>
|
||||
</Item7>
|
||||
</Files>
|
||||
<RequiredPkgs Count="2">
|
||||
|
Reference in New Issue
Block a user