Skip to content

Commit

Permalink
LuiCairo
Browse files Browse the repository at this point in the history
* Fix LuiBar demo compilation
* Setup svn configuration
  • Loading branch information
luizamericop committed Aug 18, 2014
1 parent aa6b5ef commit 19580cf
Show file tree
Hide file tree
Showing 20 changed files with 121 additions and 96 deletions.
8 changes: 7 additions & 1 deletion luicairo/demos/luibar/fmain.lfm
Expand Up @@ -8,9 +8,11 @@ object FormMain: TFormMain
ClientWidth = 755
OnCreate = FormCreate
Position = poScreenCenter
LCLVersion = '0.9.25'
LCLVersion = '1.3'
object LeftPanel: TPanel
Left = 0
Height = 543
Top = 0
Width = 224
Align = alLeft
ClientHeight = 543
Expand All @@ -22,20 +24,24 @@ object FormMain: TFormMain
Top = 1
Width = 222
Align = alClient
ItemHeight = 0
OnSelectionChange = SamplesListSelectionChange
TabOrder = 0
end
end
object SamplesNotebook: TNotebook
Left = 229
Height = 543
Top = 0
Width = 526
Align = alClient
TabOrder = 1
TabStop = True
end
object SplitterVertical: TSplitter
Left = 224
Height = 543
Top = 0
Width = 5
end
end
11 changes: 4 additions & 7 deletions luicairo/demos/luibar/fmain.pas
Expand Up @@ -31,6 +31,8 @@ TFormMain = class(TForm)

implementation

{$R *.lfm}

uses
FolhaSample, YahooSample, UolSample, MSSDKSample, UbuntuSample,
ConversaAfiadaSample, YouTubeSample, LgMobileLuiBarSample, xpStyleLuiBarSample,
Expand All @@ -43,7 +45,7 @@ procedure TFormMain.SamplesListSelectionChange(Sender: TObject; User: boolean);
begin
if SamplesList.ItemIndex = -1 then
Exit;
SamplesNotebook.ActivePageComponent := TPage(SamplesList.Items.Objects[SamplesList.ItemIndex]);
SamplesNotebook.PageIndex := SamplesList.ItemIndex;
end;

procedure TFormMain.FormCreate(Sender: TObject);
Expand All @@ -64,19 +66,14 @@ procedure TFormMain.FormCreate(Sender: TObject);
RegisterSample('GnomeDo', TGnomeDoLuiBarSample.Create(Self));
RegisterSample('Media Control (aTunes)', TMediaControlLuiBarSample.Create(Self));
RegisterSample('Lui Widgets', TWidgetLuiBarSample.Create(Self));
SamplesList.ItemIndex := 0;
end;

procedure TFormMain.RegisterSample(const AName: String; APage: TPage);
begin
APage.Parent := SamplesNotebook;
{$if defined(LCLGtk) or defined(LCLWin32)}
APage.TabVisible := False;
{$endif}
SamplesList.Items.AddObject(AName, APage);
end;

initialization
{$I fmain.lrs}

end.

Binary file added luicairo/demos/luibar/luibar_samples.ico
Binary file not shown.
34 changes: 22 additions & 12 deletions luicairo/demos/luibar/luibar_samples.lpi
@@ -1,20 +1,27 @@
<?xml version="1.0"?>
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<PathDelim Value="\"/>
<Version Value="7"/>
<General>
<Flags>
<AlwaysBuild Value="False"/>
<LRSInOutputDirectory Value="False"/>
</Flags>
<SessionStorage Value="InProjectDir"/>
<MainUnit Value="0"/>
<TargetFileExt Value=".exe"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<XPManifest>
<DpiAware Value="True"/>
</XPManifest>
<Icon Value="0"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1">
<Item1 Name="default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<IgnoreBinaries Value="False"/>
Expand All @@ -39,12 +46,12 @@
<Unit0>
<Filename Value="luibar_samples.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="luibar_samples"/>
</Unit0>
<Unit1>
<Filename Value="fmain.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="FormMain"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="fMain"/>
</Unit1>
Expand Down Expand Up @@ -131,12 +138,18 @@
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="8"/>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="resources\"/>
<OtherUnitFiles Value="samples\"/>
<IncludeFiles Value="resources"/>
<OtherUnitFiles Value="samples"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Parsing>
<SyntaxOptions>
<UseAnsiStrings Value="False"/>
</SyntaxOptions>
</Parsing>
<Linking>
<Debugging>
<UseHeaptrc Value="True"/>
Expand All @@ -147,8 +160,5 @@
</Win32>
</Options>
</Linking>
<Other>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
</CONFIG>
2 changes: 2 additions & 0 deletions luicairo/demos/luibar/luibar_samples.lpr
Expand Up @@ -10,6 +10,8 @@
Forms
{ you can add units after this }, fMain;

{$R *.res}

begin
Application.Initialize;
Application.CreateForm(TFormMain, FormMain);
Expand Down
Binary file added luicairo/demos/luibar/luibar_samples.res
Binary file not shown.
4 changes: 2 additions & 2 deletions luicairo/demos/luibar/samples/conversaafiadasample.pas
Expand Up @@ -14,7 +14,7 @@ interface
TConversaAfiadaLuiBarSample = class(TPage)
private
FBar: TLuiBar;
procedure CreatePattern(Sender: TLuiBar; PatternType: TLuiBarPatternType; var Pattern: TCairoPattern);
procedure CreatePattern(Sender: TCustomLuiBar; PatternType: TLuiBarPatternType; var Pattern: TCairoPattern);
public
constructor Create(AOwner: TComponent); override;
end;
Expand All @@ -23,7 +23,7 @@ implementation

{ TConversaAfiadaLuiBarSample }

procedure TConversaAfiadaLuiBarSample.CreatePattern(Sender: TLuiBar;
procedure TConversaAfiadaLuiBarSample.CreatePattern(Sender: TCustomLuiBar;
PatternType: TLuiBarPatternType; var Pattern: TCairoPattern);
begin
case PatternType of
Expand Down
8 changes: 4 additions & 4 deletions luicairo/demos/luibar/samples/globoluibarsample.pas
Expand Up @@ -14,8 +14,8 @@ interface
TGloboLuiBarSample = class(TPage)
private
FBar: TLuiBar;
procedure DrawCell(Sender: TLuiBar; Cell: TLuiBarCell);
procedure Drawing(Sender: TLuiBar; Cell: TLuiBarCell;
procedure DrawCell(Sender: TCustomLuiBar; Cell: TLuiBarCell);
procedure Drawing(Sender: TCustomLuiBar; Cell: TLuiBarCell;
DrawType: TLuiBarDrawType; var Allowed: Boolean);
public
constructor Create(AOwner: TComponent); override;
Expand All @@ -24,7 +24,7 @@ TGloboLuiBarSample = class(TPage)
implementation


procedure TGloboLuiBarSample.DrawCell(Sender: TLuiBar; Cell: TLuiBarCell);
procedure TGloboLuiBarSample.DrawCell(Sender: TCustomLuiBar; Cell: TLuiBarCell);
var
CellColor: TCairoColor;
begin
Expand All @@ -42,7 +42,7 @@ procedure TGloboLuiBarSample.DrawCell(Sender: TLuiBar; Cell: TLuiBarCell);
Sender.Context.Fill;
end;

procedure TGloboLuiBarSample.Drawing(Sender: TLuiBar; Cell: TLuiBarCell;
procedure TGloboLuiBarSample.Drawing(Sender: TCustomLuiBar; Cell: TLuiBarCell;
DrawType: TLuiBarDrawType; var Allowed: Boolean);
begin
Allowed := DrawType <> dtCell;
Expand Down
16 changes: 8 additions & 8 deletions luicairo/demos/luibar/samples/gnomedoluibarsample.pas
Expand Up @@ -15,11 +15,11 @@ TGnomeDoLuiBarSample = class(TPage)
private
FBar: TLuiBar;
FImages: TImageList;
procedure CreatePattern(Sender: TLuiBar; PatternType: TLuiBarPatternType; var Pattern: TCairoPattern);
procedure GetImageInfo(Sender: TLuiBar; Cell: TLuiBarCell; var ImageInfo: TLuiBarImageInfo);
procedure GetCellPattern(Sender: TLuiBar; Cell: TLuiBarCell; PatternType: TLuiBarPatternType;
procedure CreatePattern(Sender: TCustomLuiBar; PatternType: TLuiBarPatternType; var Pattern: TCairoPattern);
procedure GetImageInfo(Sender: TCustomLuiBar; Cell: TLuiBarCell; var ImageInfo: TLuiBarImageInfo);
procedure GetCellPattern(Sender: TCustomLuiBar; Cell: TLuiBarCell; PatternType: TLuiBarPatternType;
var Pattern: TCairoPattern);
procedure DrawBackground(Sender: TLuiBar);
procedure DrawBackground(Sender: TCustomLuiBar);
public
constructor Create(AOwner: TComponent); override;
end;
Expand All @@ -34,7 +34,7 @@ implementation

{ TGnomeDoLuiBarSample }

procedure TGnomeDoLuiBarSample.CreatePattern(Sender: TLuiBar;
procedure TGnomeDoLuiBarSample.CreatePattern(Sender: TCustomLuiBar;
PatternType: TLuiBarPatternType; var Pattern: TCairoPattern);
begin
case PatternType of
Expand All @@ -47,14 +47,14 @@ procedure TGnomeDoLuiBarSample.CreatePattern(Sender: TLuiBar;
end;
end;

procedure TGnomeDoLuiBarSample.GetImageInfo(Sender: TLuiBar;
procedure TGnomeDoLuiBarSample.GetImageInfo(Sender: TCustomLuiBar;
Cell: TLuiBarCell; var ImageInfo: TLuiBarImageInfo);
begin
ImageInfo.Index := Cell.Index;
//ImageInfo.Effect := ;
end;

procedure TGnomeDoLuiBarSample.GetCellPattern(Sender: TLuiBar;
procedure TGnomeDoLuiBarSample.GetCellPattern(Sender: TCustomLuiBar;
Cell: TLuiBarCell; PatternType: TLuiBarPatternType; var Pattern: TCairoPattern
);
begin
Expand All @@ -63,7 +63,7 @@ procedure TGnomeDoLuiBarSample.GetCellPattern(Sender: TLuiBar;
Pattern := Sender.Patterns[SelectedOutlinePatternId];
end;

procedure TGnomeDoLuiBarSample.DrawBackground(Sender: TLuiBar);
procedure TGnomeDoLuiBarSample.DrawBackground(Sender: TCustomLuiBar);
var
R: TDoubleRect;
RoundInfo: TRoundedRectInfo;
Expand Down
19 changes: 10 additions & 9 deletions luicairo/demos/luibar/samples/lgmobileluibarsample.pas
Expand Up @@ -15,11 +15,11 @@ TLgMobileLuiBarSample = class(TPage)
private
FBar: TLuiBar;
FImages: TImageList;
procedure GetImageInfo(Sender: TLuiBar; Cell: TLuiBarCell; var ImageInfo: TLuiBarImageInfo);
procedure GetCellPattern(Sender: TLuiBar; Cell: TLuiBarCell; PatternType: TLuiBarPatternType;
procedure GetImageInfo(Sender: TCustomLuiBar; Cell: TLuiBarCell; var ImageInfo: TLuiBarImageInfo);
procedure GetCellPattern(Sender: TCustomLuiBar; Cell: TLuiBarCell; PatternType: TLuiBarPatternType;
var Pattern: TCairoPattern);
procedure DrawCellPath(Sender: TLuiBar; Cell: TLuiBarCell);
procedure Drawing(Sender: TLuiBar; Cell: TLuiBarCell;
procedure DrawCellPath(Sender: TCustomLuiBar; Cell: TLuiBarCell);
procedure Drawing(Sender: TCustomLuiBar; Cell: TLuiBarCell;
DrawType: TLuiBarDrawType; var Allowed: Boolean);
public
constructor Create(AOwner: TComponent); override;
Expand All @@ -34,14 +34,14 @@ implementation

{ TLgMobileLuiBarSample }

procedure TLgMobileLuiBarSample.GetImageInfo(Sender: TLuiBar;
procedure TLgMobileLuiBarSample.GetImageInfo(Sender: TCustomLuiBar;
Cell: TLuiBarCell; var ImageInfo: TLuiBarImageInfo);
begin
ImageInfo.Index := Cell.Index;
//ImageInfo.Effect := ;
end;

procedure TLgMobileLuiBarSample.GetCellPattern(Sender: TLuiBar;
procedure TLgMobileLuiBarSample.GetCellPattern(Sender: TCustomLuiBar;
Cell: TLuiBarCell; PatternType: TLuiBarPatternType; var Pattern: TCairoPattern
);
begin
Expand All @@ -54,7 +54,8 @@ procedure TLgMobileLuiBarSample.GetCellPattern(Sender: TLuiBar;
Pattern := Sender.Patterns[HoverOutlinePattern]
end;

procedure TLgMobileLuiBarSample.DrawCellPath(Sender: TLuiBar; Cell: TLuiBarCell);
procedure TLgMobileLuiBarSample.DrawCellPath(Sender: TCustomLuiBar;
Cell: TLuiBarCell);
begin
with Sender.Context do
begin
Expand All @@ -63,8 +64,8 @@ procedure TLgMobileLuiBarSample.DrawCellPath(Sender: TLuiBar; Cell: TLuiBarCell)
end;
end;

procedure TLgMobileLuiBarSample.Drawing(Sender: TLuiBar; Cell: TLuiBarCell;
DrawType: TLuiBarDrawType; var Allowed: Boolean);
procedure TLgMobileLuiBarSample.Drawing(Sender: TCustomLuiBar;
Cell: TLuiBarCell; DrawType: TLuiBarDrawType; var Allowed: Boolean);
begin
Allowed := DrawType <> dtCellPath;
end;
Expand Down
21 changes: 11 additions & 10 deletions luicairo/demos/luibar/samples/mediacontrolluibarsample.pas
Expand Up @@ -18,13 +18,13 @@ TMediaControlLuiBarSample = class(TPage)
FPlaying: Boolean;
FAudioOn: Boolean;
FButtonPressed: Boolean;
procedure GetCellPattern(Sender: TLuiBar; Cell: TLuiBarCell; PatternType: TLuiBarPatternType;
procedure GetCellPattern(Sender: TCustomLuiBar; Cell: TLuiBarCell; PatternType: TLuiBarPatternType;
var Pattern: TCairoPattern);
procedure GetImageInfo(Sender: TLuiBar; Cell: TLuiBarCell; var ImageInfo: TLuiBarImageInfo);
procedure CreatePattern(Sender: TLuiBar; PatternType: TLuiBarPatternType;
procedure GetImageInfo(Sender: TCustomLuiBar; Cell: TLuiBarCell; var ImageInfo: TLuiBarImageInfo);
procedure CreatePattern(Sender: TCustomLuiBar; PatternType: TLuiBarPatternType;
var Pattern: TCairoPattern);
procedure DrawCellPath(Sender: TLuiBar; Cell: TLuiBarCell);
procedure CellSelect(Sender: TLuiBar);
procedure DrawCellPath(Sender: TCustomLuiBar; Cell: TLuiBarCell);
procedure CellSelect(Sender: TCustomLuiBar);
procedure MouseDownHandle(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure MouseUpHandle(Sender: TObject; Button: TMouseButton;
Expand All @@ -44,7 +44,7 @@ implementation

{ MediaControlLuiBarSample }

procedure TMediaControlLuiBarSample.GetCellPattern(Sender: TLuiBar;
procedure TMediaControlLuiBarSample.GetCellPattern(Sender: TCustomLuiBar;
Cell: TLuiBarCell; PatternType: TLuiBarPatternType; var Pattern: TCairoPattern
);
begin
Expand All @@ -56,7 +56,7 @@ procedure TMediaControlLuiBarSample.GetCellPattern(Sender: TLuiBar;
Pattern := Sender.Patterns[ButtonPressedPatternId];
end;

procedure TMediaControlLuiBarSample.GetImageInfo(Sender: TLuiBar;
procedure TMediaControlLuiBarSample.GetImageInfo(Sender: TCustomLuiBar;
Cell: TLuiBarCell; var ImageInfo: TLuiBarImageInfo);
begin
case Cell.Index of
Expand Down Expand Up @@ -89,7 +89,7 @@ procedure TMediaControlLuiBarSample.GetImageInfo(Sender: TLuiBar;
end;
end;

procedure TMediaControlLuiBarSample.CreatePattern(Sender: TLuiBar;
procedure TMediaControlLuiBarSample.CreatePattern(Sender: TCustomLuiBar;
PatternType: TLuiBarPatternType; var Pattern: TCairoPattern);
begin
case PatternType of
Expand All @@ -116,7 +116,8 @@ procedure TMediaControlLuiBarSample.CreatePattern(Sender: TLuiBar;
end;
end;

procedure TMediaControlLuiBarSample.DrawCellPath(Sender: TLuiBar; Cell: TLuiBarCell);
procedure TMediaControlLuiBarSample.DrawCellPath(Sender: TCustomLuiBar;
Cell: TLuiBarCell);
var
R: TDoubleRect;
RoundInfo: TRoundedRectInfo;
Expand Down Expand Up @@ -157,7 +158,7 @@ procedure TMediaControlLuiBarSample.DrawCellPath(Sender: TLuiBar; Cell: TLuiBarC
end;
end;

procedure TMediaControlLuiBarSample.CellSelect(Sender: TLuiBar);
procedure TMediaControlLuiBarSample.CellSelect(Sender: TCustomLuiBar);
begin
case Sender.SelectedIndex of
2: FPlaying := not FPlaying;
Expand Down

0 comments on commit 19580cf

Please sign in to comment.