* Fixed compilation and cleaned the demos applications

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@412 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2008-04-10 03:06:03 +00:00
parent 4c622efc11
commit 40fa686aa4
19 changed files with 6603 additions and 3783 deletions

View File

@ -1,7 +1,7 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="\"/> <PathDelim Value="/"/>
<Version Value="6"/> <Version Value="6"/>
<General> <General>
<Flags> <Flags>
@ -9,7 +9,7 @@
</Flags> </Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value=".\"/> <IconPath Value="./"/>
<TargetFileExt Value=".exe"/> <TargetFileExt Value=".exe"/>
</General> </General>
<VersionInfo> <VersionInfo>
@ -23,7 +23,7 @@
<RunParams> <RunParams>
<local> <local>
<FormatVersion Value="1"/> <FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/> <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local> </local>
</RunParams> </RunParams>
<RequiredPackages Count="3"> <RequiredPackages Count="3">
@ -152,7 +152,6 @@
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="5"/>
<PathDelim Value="\"/>
<CodeGeneration> <CodeGeneration>
<Generate Value="Faster"/> <Generate Value="Faster"/>
</CodeGeneration> </CodeGeneration>

View File

@ -7,38 +7,38 @@ object Form1: TForm1
VertScrollBar.Page = 436 VertScrollBar.Page = 436
ActiveControl = Button1 ActiveControl = Button1
Caption = 'Form1' Caption = 'Form1'
ClientHeight = 437
ClientWidth = 612
Font.Height = -11 Font.Height = -11
Font.Name = 'MS Sans Serif' Font.Name = 'MS Sans Serif'
OnClose = FormClose OnClose = FormClose
OnCreate = FormCreate OnCreate = FormCreate
LCLVersion = '0.9.25'
object Label1: TLabel object Label1: TLabel
Left = 204 Left = 129
Height = 14 Height = 17
Top = 351 Top = 348
Width = 152 Width = 227
Anchors = [akRight, akBottom] Anchors = [akRight, akBottom]
Caption = 'Array data of the clicked node' Caption = 'Array data of the clicked node'
Color = clNone
ParentColor = False ParentColor = False
end end
object Label2: TLabel object Label2: TLabel
Left = 362 Left = 249
Height = 14 Height = 17
Top = 335 Top = 332
Width = 227 Width = 340
Anchors = [akRight, akBottom] Anchors = [akRight, akBottom]
Caption = 'Find and show the node by specific array index' Caption = 'Find and show the node by specific array index'
Color = clNone
ParentColor = False ParentColor = False
end end
object Label3: TLabel object Label3: TLabel
Left = 358 Left = 241
Height = 14 Height = 17
Top = 351 Top = 348
Width = 246 Width = 363
Anchors = [akRight, akBottom] Anchors = [akRight, akBottom]
Caption = 'Type index to get related tree node on the screen:' Caption = 'Type index to get related tree node on the screen:'
Color = clNone
ParentColor = False ParentColor = False
end end
object Button1: TButton object Button1: TButton

View File

@ -116,7 +116,7 @@ type
procedure FormCreate(Sender: TObject); procedure FormCreate(Sender: TObject);
procedure MyTreeBeforeCellPaint(Sender: TBaseVirtualTree; procedure MyTreeBeforeCellPaint(Sender: TBaseVirtualTree;
TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex; TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
CellRect: TRect); const CellRect: TRect);
procedure MyTreePaintText(Sender: TBaseVirtualTree; procedure MyTreePaintText(Sender: TBaseVirtualTree;
const TargetCanvas: TCanvas; Node: PVirtualNode; const TargetCanvas: TCanvas; Node: PVirtualNode;
Column: TColumnIndex; TextType: TVSTTextType); Column: TColumnIndex; TextType: TVSTTextType);
@ -139,22 +139,8 @@ var
implementation implementation
uses Math; uses
Math;
//fpc 204 does not have comparevalue
function CompareValue ( const A, B : Integer) : Integer;
begin
result:=1;
if a=b then
result:=0
else
if a<b then
result:=-1;
end;
procedure TForm1.MyTreeGetText(Sender: TBaseVirtualTree; procedure TForm1.MyTreeGetText(Sender: TBaseVirtualTree;
Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType; Node: PVirtualNode; Column: TColumnIndex; TextType: TVSTTextType;
@ -420,7 +406,7 @@ end;
procedure TForm1.MyTreeBeforeCellPaint(Sender: TBaseVirtualTree; procedure TForm1.MyTreeBeforeCellPaint(Sender: TBaseVirtualTree;
TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex; TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex;
CellRect: TRect); const CellRect: TRect);
begin begin
// This is example how to conditionally // This is example how to conditionally

View File

@ -2,7 +2,7 @@
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <PathDelim Value="/"/>
<Version Value="5"/> <Version Value="6"/>
<General> <General>
<Flags> <Flags>
<AlwaysBuild Value="False"/> <AlwaysBuild Value="False"/>

File diff suppressed because it is too large Load Diff

View File

@ -2,15 +2,27 @@ program images;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
{$define DEBUG_VTV}
uses uses
{$IFDEF UNIX}{$IFDEF UseCThreads} {$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads, cthreads,
{$ENDIF}{$ENDIF} {$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset Interfaces, // this includes the LCL widgetset
Forms Forms
{ add your units here }, Unit1; { add your units here }, Unit1
{$ifdef DEBUG_VTV}
,ipcchannel, vtlogger
{$endif}
;
begin begin
{$ifdef DEBUG_VTV}
Logger.Channels.Add(TIPCChannel.Create);
Logger.Clear;
Logger.ActiveClasses := [lcHeaderOffset];
{$endif}
Application.Initialize; Application.Initialize;
Application.CreateForm(TForm1, Form1); Application.CreateForm(TForm1, Form1);
Application.Run; Application.Run;

View File

@ -2,7 +2,7 @@
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="/"/> <PathDelim Value="/"/>
<Version Value="5"/> <Version Value="6"/>
<General> <General>
<Flags> <Flags>
<AlwaysBuild Value="False"/> <AlwaysBuild Value="False"/>

View File

@ -1,15 +1,15 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="\"/> <PathDelim Value="/"/>
<Version Value="5"/> <Version Value="6"/>
<General> <General>
<Flags> <Flags>
<AlwaysBuild Value="False"/> <AlwaysBuild Value="False"/>
</Flags> </Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value=".\"/> <IconPath Value="./"/>
<TargetFileExt Value=".exe"/> <TargetFileExt Value=".exe"/>
</General> </General>
<VersionInfo> <VersionInfo>
@ -23,7 +23,7 @@
<RunParams> <RunParams>
<local> <local>
<FormatVersion Value="1"/> <FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/> <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local> </local>
</RunParams> </RunParams>
<RequiredPackages Count="3"> <RequiredPackages Count="3">
@ -65,7 +65,6 @@
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="5"/>
<PathDelim Value="\"/>
<CodeGeneration> <CodeGeneration>
<Generate Value="Faster"/> <Generate Value="Faster"/>
</CodeGeneration> </CodeGeneration>

File diff suppressed because it is too large Load Diff

View File

@ -19,8 +19,8 @@ unit Main;
interface interface
uses uses
LCLIntf, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, LCLIntf, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, VirtualTrees, ImgList, ExtCtrls, StdCtrls, Buttons, LResources; Dialogs, VirtualTrees, ExtCtrls, StdCtrls, Buttons, LResources;
type type
TfrmMain = TfrmMain =

View File

@ -22,8 +22,8 @@ unit VTDBExample;
interface interface
uses uses
delphicompat, LCLIntf, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, delphicompat, LCLIntf, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
VirtualTrees, StdCtrls, ExtCtrls, sqlite3ds, DB, Menus, VTreeData, ImgList, Buttons, LResources; VirtualTrees, StdCtrls, ExtCtrls, sqlite3ds, Menus, VTreeData, Buttons, LResources;
type type
@ -113,11 +113,15 @@ implementation
r : TRect; r : TRect;
begin begin
{get size of desktop} {get size of desktop}
//todo: not implemented under gtk
{$ifdef Windows}
SystemParametersInfo(SPI_GETWORKAREA, 0, @r, 0); SystemParametersInfo(SPI_GETWORKAREA, 0, @r, 0);
Height := r.Bottom-Top; Height := r.Bottom-Top;
Width := r.Right-Left; Width := r.Right-Left;
Application.ProcessMessages; Application.ProcessMessages;
{$endif}
LoadDataset; LoadDataset;
end; end;

View File

@ -93,8 +93,8 @@ interface
implementation implementation
uses //uses
CommCtrl; // CommCtrl;
(* (*
uses uses
PropertiesDemo, GridDemo; PropertiesDemo, GridDemo;

File diff suppressed because it is too large Load Diff

View File

@ -19,8 +19,8 @@ unit VTNoData;
interface interface
uses uses
delphicompat, LCLIntf, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, delphicompat, LCLIntf, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, VirtualTrees, ImgList, ExtCtrls, StdCtrls, LResources; Dialogs, VirtualTrees, ExtCtrls, StdCtrls, LResources;
type type
TfrmVTNoData = TfrmVTNoData =
@ -264,8 +264,10 @@ implementation
r : TRect; r : TRect;
begin begin
{get size of desktop} {get size of desktop}
{$ifdef Windows}
SystemParametersInfo(SPI_GETWORKAREA, 0, @r, 0); SystemParametersInfo(SPI_GETWORKAREA, 0, @r, 0);
Height := r.Bottom-Top; Height := r.Bottom-Top;
{$endif}
end; end;
initialization initialization

View File

@ -6,10 +6,13 @@ object frmViewCode: TfrmViewCode
HorzScrollBar.Page = 552 HorzScrollBar.Page = 552
VertScrollBar.Page = 353 VertScrollBar.Page = 353
Caption = 'Quick Code Viewer' Caption = 'Quick Code Viewer'
ClientHeight = 354
ClientWidth = 553
Font.Height = -11 Font.Height = -11
Font.Name = 'Tahoma' Font.Name = 'Tahoma'
OnActivate = FormActivate OnActivate = FormActivate
Position = poDefaultPosOnly Position = poDefaultPosOnly
LCLVersion = '0.9.25'
object SynEdit1: TSynEdit object SynEdit1: TSynEdit
Height = 354 Height = 354
Width = 553 Width = 553
@ -18,8 +21,6 @@ object frmViewCode: TfrmViewCode
Font.Name = 'courier' Font.Name = 'courier'
ParentColor = False ParentColor = False
TabOrder = 0 TabOrder = 0
BookMarkOptions.OnChange = nil
Gutter.OnChange = nil
Gutter.CodeFoldingWidth = 14 Gutter.CodeFoldingWidth = 14
Highlighter = SynPasSyn1 Highlighter = SynPasSyn1
Keystrokes = < Keystrokes = <
@ -346,7 +347,6 @@ object frmViewCode: TfrmViewCode
Lines.Strings = ( Lines.Strings = (
'SynEdit1' 'SynEdit1'
) )
SelectedColor.OnChange = nil
end end
object SynPasSyn1: TSynPasSyn object SynPasSyn1: TSynPasSyn
Enabled = False Enabled = False

View File

@ -29,9 +29,11 @@ implementation
r : TRect; r : TRect;
begin begin
{get size of desktop} {get size of desktop}
{$ifdef Windows}
SystemParametersInfo(SPI_GETWORKAREA, 0, @r, 0); SystemParametersInfo(SPI_GETWORKAREA, 0, @r, 0);
Height := r.Bottom-Top; Height := r.Bottom-Top;
Width := r.Right-Left; Width := r.Right-Left;
{$endif}
end; end;
initialization initialization

View File

@ -1,15 +1,15 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<CONFIG> <CONFIG>
<ProjectOptions> <ProjectOptions>
<PathDelim Value="\"/> <PathDelim Value="/"/>
<Version Value="5"/> <Version Value="6"/>
<General> <General>
<Flags> <Flags>
<AlwaysBuild Value="False"/> <AlwaysBuild Value="False"/>
</Flags> </Flags>
<SessionStorage Value="InProjectDir"/> <SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/> <MainUnit Value="0"/>
<IconPath Value=".\"/> <IconPath Value="./"/>
<TargetFileExt Value=".exe"/> <TargetFileExt Value=".exe"/>
</General> </General>
<VersionInfo> <VersionInfo>
@ -23,7 +23,7 @@
<RunParams> <RunParams>
<local> <local>
<FormatVersion Value="1"/> <FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/> <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local> </local>
</RunParams> </RunParams>
<RequiredPackages Count="4"> <RequiredPackages Count="4">
@ -109,7 +109,6 @@
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
<Version Value="5"/> <Version Value="5"/>
<PathDelim Value="\"/>
<CodeGeneration> <CodeGeneration>
<Generate Value="Faster"/> <Generate Value="Faster"/>
</CodeGeneration> </CodeGeneration>

View File

@ -8,12 +8,18 @@ uses
{$ENDIF}{$ENDIF} {$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset Interfaces, // this includes the LCL widgetset
Forms Forms
{ add your units here }, Main,vtlogger,ipcchannel, lclextensions_package; { add your units here }, Main
{$ifdef DEBUG_VTV}
,vtlogger, ipcchannel
{$endif}
;
begin begin
{$ifdef DEBUG_VTV}
Logger.Channels.Add(TIPCChannel.Create); Logger.Channels.Add(TIPCChannel.Create);
Logger.Clear; Logger.Clear;
Logger.ActiveClasses:=[lcScroll,lcWarning]; Logger.ActiveClasses := [lcScroll, lcWarning];
{$endif}
Application.Initialize; Application.Initialize;
Application.CreateForm(TfrmMain, frmMain); Application.CreateForm(TfrmMain, frmMain);
Application.Run; Application.Run;