mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 20:01:45 +02:00
Fixes compilation of TTrayIcon example
git-svn-id: trunk@15369 -
This commit is contained in:
parent
bc0e2703a9
commit
ac9c5de1ef
@ -1,7 +1,7 @@
|
|||||||
object frmTrayTest: TfrmTrayTest
|
object frmTrayTest: TfrmTrayTest
|
||||||
Left = 290
|
Left = 183
|
||||||
Height = 249
|
Height = 249
|
||||||
Top = 175
|
Top = 176
|
||||||
Width = 393
|
Width = 393
|
||||||
HorzScrollBar.Page = 392
|
HorzScrollBar.Page = 392
|
||||||
VertScrollBar.Page = 248
|
VertScrollBar.Page = 248
|
||||||
@ -54,9 +54,9 @@ object frmTrayTest: TfrmTrayTest
|
|||||||
end
|
end
|
||||||
object chkOnPaintDrawing: TCheckBox
|
object chkOnPaintDrawing: TCheckBox
|
||||||
Left = 32
|
Left = 32
|
||||||
Height = 18
|
Height = 19
|
||||||
Top = 152
|
Top = 152
|
||||||
Width = 335
|
Width = 261
|
||||||
Caption = 'Test drawing the icon in the Form''s OnPaint event'
|
Caption = 'Test drawing the icon in the Form''s OnPaint event'
|
||||||
OnChange = chkOnPaintDrawingChange
|
OnChange = chkOnPaintDrawingChange
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
|
@ -1,49 +1,27 @@
|
|||||||
{ This is an automatically generated lazarus resource file }
|
{ This is an automatically generated lazarus resource file }
|
||||||
|
|
||||||
LazarusResources.Add('TfrmTrayTest','FORMDATA',[
|
LazarusResources.Add('TfrmTrayTest','FORMDATA',[
|
||||||
'TPF0'#12'TfrmTrayTest'#11'frmTrayTest'#4'Left'#3'"'#1#6'Height'#3#249#0#3'To'
|
'TPF0'#12'TfrmTrayTest'#11'frmTrayTest'#4'Left'#3#183#0#6'Height'#3#249#0#3'T'
|
||||||
+'p'#3#175#0#5'Width'#3#137#1#18'HorzScrollBar.Page'#3#136#1#18'VertScrollBar'
|
+'op'#3#176#0#5'Width'#3#137#1#18'HorzScrollBar.Page'#3#136#1#18'VertScrollBa'
|
||||||
+'.Page'#3#248#0#13'ActiveControl'#7#7'btnShow'#7'Caption'#6#26'TTrayIcon tes'
|
+'r.Page'#3#248#0#13'ActiveControl'#7#7'btnShow'#7'Caption'#6#26'TTrayIcon te'
|
||||||
+'t application'#12'ClientHeight'#3#249#0#11'ClientWidth'#3#137#1#8'OnCreate'
|
+'st application'#12'ClientHeight'#3#249#0#11'ClientWidth'#3#137#1#8'OnCreate'
|
||||||
+#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#7'OnPaint'#7#9'FormPaint'#10
|
+#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#7'OnPaint'#7#9'FormPaint'#10
|
||||||
+'LCLVersion'#6#6'0.9.25'#0#7'TButton'#7'btnShow'#4'Left'#2' '#6'Height'#2'!'
|
+'LCLVersion'#6#6'0.9.25'#0#7'TButton'#7'btnShow'#4'Left'#2' '#6'Height'#2'!'
|
||||||
+#3'Top'#2' '#5'Width'#3#136#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6
|
+#3'Top'#2' '#5'Width'#3#136#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6
|
||||||
+#4'Show'#7'OnClick'#7#12'btnShowClick'#8'TabOrder'#2#0#0#0#7'TButton'#7'btnH'
|
+#4'Show'#7'OnClick'#7#12'btnShowClick'#8'TabOrder'#2#0#0#0#7'TButton'#7'btnH'
|
||||||
+'ide'#4'Left'#2' '#6'Height'#2'!'#3'Top'#2'X'#5'Width'#3#136#0#25'BorderSpac'
|
+'ide'#4'Left'#2' '#6'Height'#2'!'#3'Top'#2'X'#5'Width'#3#136#0#25'BorderSpac'
|
||||||
+'ing.InnerBorder'#2#4#7'Caption'#6#4'Hide'#7'OnClick'#7#12'btnHideClick'#8'T'
|
+'ing.InnerBorder'#2#4#7'Caption'#6#4'Hide'#7'OnClick'#7#12'btnHideClick'#8'T'
|
||||||
+'abOrder'#2#1#0#0#7'TButton'#12'btnPaintTest'#4'Left'#3#216#0#6'Height'#2'!'
|
+'abOrder'#2#1#0#0#7'TButton'#12'btnPaintTest'#4'Left'#3#216#0#6'Height'#2'!'
|
||||||
+#3'Top'#2' '#5'Width'#3#136#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6
|
+#3'Top'#2' '#5'Width'#3#136#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6
|
||||||
+#14'Raw Paint Test'#7'OnClick'#7#17'btnPaintTestClick'#8'TabOrder'#2#2#0#0#7
|
+#14'Raw Paint Test'#7'OnClick'#7#17'btnPaintTestClick'#8'TabOrder'#2#2#0#0#7
|
||||||
+'TButton'#17'btnDisplayMessage'#4'Left'#3#216#0#6'Height'#2'!'#3'Top'#2'X'#5
|
+'TButton'#17'btnDisplayMessage'#4'Left'#3#216#0#6'Height'#2'!'#3'Top'#2'X'#5
|
||||||
+'Width'#3#136#0#7'Caption'#6#15'Display Message'#7'OnClick'#7#11'HandleClick'
|
+'Width'#3#136#0#7'Caption'#6#15'Display Message'#7'OnClick'#7#11'HandleClick'
|
||||||
+#8'TabOrder'#2#3#0#0#9'TCheckBox'#17'chkOnPaintDrawing'#4'Left'#2' '#6'Heigh'
|
+#8'TabOrder'#2#3#0#0#9'TCheckBox'#17'chkOnPaintDrawing'#4'Left'#2' '#6'Heigh'
|
||||||
+'t'#2#18#3'Top'#3#152#0#5'Width'#3'O'#1#7'Caption'#6'1Test drawing the icon '
|
+'t'#2#19#3'Top'#3#152#0#5'Width'#3#5#1#7'Caption'#6'1Test drawing the icon i'
|
||||||
+'in the Form''s OnPaint event'#8'OnChange'#7#23'chkOnPaintDrawingChange'#8'T'
|
+'n the Form''s OnPaint event'#8'OnChange'#7#23'chkOnPaintDrawingChange'#8'Ta'
|
||||||
+'abOrder'#2#4#0#0#10'TPopupMenu'#9'PopupMenu'#4'left'#3#136#0#3'top'#3#184#0
|
+'bOrder'#2#4#0#0#10'TPopupMenu'#9'PopupMenu'#4'left'#3#136#0#3'top'#3#184#0#0
|
||||||
+#0#9'TMenuItem'#9'MenuItem1'#7'Caption'#6#9'New Item1'#0#0#9'TMenuItem'#9'Me'
|
+#9'TMenuItem'#9'MenuItem1'#7'Caption'#6#9'New Item1'#0#0#9'TMenuItem'#9'Menu'
|
||||||
+'nuItem3'#7'Caption'#6#9'New Item3'#0#0#9'TMenuItem'#9'MenuItem2'#7'Caption'
|
+'Item3'#7'Caption'#6#9'New Item3'#0#0#9'TMenuItem'#9'MenuItem2'#7'Caption'#6
|
||||||
+#6#9'New Item2'#0#0#0#9'TTrayIcon'#11'SystrayIcon'#4'left'#3#181#0#3'top'#3
|
+#9'New Item2'#0#0#0#9'TTrayIcon'#11'SystrayIcon'#4'left'#3#181#0#3'top'#3#184
|
||||||
+#184#0#0#0#0#12'TfrmTrayTest'#11'frmTrayTest'#4'Left'#3'"'#1#6'Height'#3#249
|
+#0#0#0#0
|
||||||
+#0#3'Top'#3#175#0#5'Width'#3#137#1#18'HorzScrollBar.Page'#3#136#1#18'VertScr'
|
]);
|
||||||
+'ollBar.Page'#3#248#0#13'ActiveControl'#7#7'btnShow'#7'Caption'#6#26'TTrayIc'
|
|
||||||
+'on test application'#12'ClientHeight'#3#249#0#11'ClientWidth'#3#137#1#8'OnC'
|
|
||||||
+'reate'#7#10'FormCreate'#9'OnDestroy'#7#11'FormDestroy'#7'OnPaint'#7#9'FormP'
|
|
||||||
+'aint'#10'LCLVersion'#6#6'0.9.25'#0#7'TButton'#7'btnShow'#4'Left'#2' '#6'Hei'
|
|
||||||
+'ght'#2'!'#3'Top'#2' '#5'Width'#3#136#0#25'BorderSpacing.InnerBorder'#2#4#7
|
|
||||||
+'Caption'#6#4'Show'#7'OnClick'#7#12'btnShowClick'#8'TabOrder'#2#0#0#0#7'TBut'
|
|
||||||
+'ton'#7'btnHide'#4'Left'#2' '#6'Height'#2'!'#3'Top'#2'X'#5'Width'#3#136#0#25
|
|
||||||
+'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#4'Hide'#7'OnClick'#7#12'btnHide'
|
|
||||||
+'Click'#8'TabOrder'#2#1#0#0#7'TButton'#12'btnPaintTest'#4'Left'#3#216#0#6'He'
|
|
||||||
+'ight'#2'!'#3'Top'#2' '#5'Width'#3#136#0#25'BorderSpacing.InnerBorder'#2#4#7
|
|
||||||
+'Caption'#6#14'Raw Paint Test'#7'OnClick'#7#17'btnPaintTestClick'#8'TabOrder'
|
|
||||||
+#2#2#0#0#7'TButton'#17'btnDisplayMessage'#4'Left'#3#216#0#6'Height'#2'!'#3'T'
|
|
||||||
+'op'#2'X'#5'Width'#3#136#0#7'Caption'#6#15'Display Message'#7'OnClick'#7#11
|
|
||||||
+'HandleClick'#8'TabOrder'#2#3#0#0#9'TCheckBox'#17'chkOnPaintDrawing'#4'Left'
|
|
||||||
+#2' '#6'Height'#2#18#3'Top'#3#152#0#5'Width'#3'O'#1#7'Caption'#6'1Test drawi'
|
|
||||||
+'ng the icon in the Form''s OnPaint event'#8'OnChange'#7#23'chkOnPaintDrawin'
|
|
||||||
+'gChange'#8'TabOrder'#2#4#0#0#10'TPopupMenu'#9'PopupMenu'#4'left'#3#136#0#3
|
|
||||||
+'top'#3#184#0#0#9'TMenuItem'#9'MenuItem1'#7'Caption'#6#9'New Item1'#0#0#9'TM'
|
|
||||||
+'enuItem'#9'MenuItem3'#7'Caption'#6#9'New Item3'#0#0#9'TMenuItem'#9'MenuItem'
|
|
||||||
+'2'#7'Caption'#6#9'New Item2'#0#0#0#9'TTrayIcon'#11'SystrayIcon'#4'left'#3
|
|
||||||
+#181#0#3'top'#3#184#0#0#0#0
|
|
||||||
]);
|
|
||||||
|
@ -1,199 +1,199 @@
|
|||||||
{
|
{
|
||||||
frmtest.dpr
|
frmtest.dpr
|
||||||
|
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* *
|
* *
|
||||||
* This demonstration program is public domain, which means no copyright, *
|
* This demonstration program is public domain, which means no copyright, *
|
||||||
* but also no warranty! *
|
* but also no warranty! *
|
||||||
* *
|
* *
|
||||||
* This program is distributed in the hope that it will be useful, *
|
* This program is distributed in the hope that it will be useful, *
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
* *
|
* *
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
|
|
||||||
Author: Felipe Monteiro de Carvalho
|
Author: Felipe Monteiro de Carvalho
|
||||||
}
|
}
|
||||||
unit frmtest;
|
unit frmtest;
|
||||||
|
|
||||||
{$ifdef fpc}
|
{$ifdef fpc}
|
||||||
{$mode delphi}{$H+}
|
{$mode delphi}{$H+}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils,
|
Classes, SysUtils,
|
||||||
{$ifdef fpc}
|
{$ifdef fpc}
|
||||||
LResources,
|
LResources,
|
||||||
{$endif}
|
{$endif}
|
||||||
Forms, Controls, Graphics, Dialogs, Buttons, StdCtrls, Menus,
|
Forms, Controls, Graphics, Dialogs, Buttons, StdCtrls, Menus,
|
||||||
ExtCtrls;
|
ExtCtrls;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
{ TfrmTrayTest }
|
{ TfrmTrayTest }
|
||||||
|
|
||||||
TfrmTrayTest = class(TForm)
|
TfrmTrayTest = class(TForm)
|
||||||
btnShow: TButton;
|
btnShow: TButton;
|
||||||
btnHide: TButton;
|
btnHide: TButton;
|
||||||
btnPaintTest: TButton;
|
btnPaintTest: TButton;
|
||||||
btnDisplayMessage: TButton;
|
btnDisplayMessage: TButton;
|
||||||
chkOnPaintDrawing: TCheckBox;
|
chkOnPaintDrawing: TCheckBox;
|
||||||
MenuItem1: TMenuItem;
|
MenuItem1: TMenuItem;
|
||||||
MenuItem2: TMenuItem;
|
MenuItem2: TMenuItem;
|
||||||
MenuItem3: TMenuItem;
|
MenuItem3: TMenuItem;
|
||||||
PopupMenu: TPopupMenu;
|
PopupMenu: TPopupMenu;
|
||||||
SystrayIcon: TTrayIcon;
|
SystrayIcon: TTrayIcon;
|
||||||
procedure btnShowClick(Sender: TObject);
|
procedure btnShowClick(Sender: TObject);
|
||||||
procedure btnHideClick(Sender: TObject);
|
procedure btnHideClick(Sender: TObject);
|
||||||
procedure btnPaintTestClick(Sender: TObject);
|
procedure btnPaintTestClick(Sender: TObject);
|
||||||
procedure chkOnPaintDrawingChange(Sender: TObject);
|
procedure chkOnPaintDrawingChange(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormDestroy(Sender: TObject);
|
procedure FormDestroy(Sender: TObject);
|
||||||
procedure FormPaint(Sender: TObject);
|
procedure FormPaint(Sender: TObject);
|
||||||
procedure HandleClick(Sender: TObject);
|
procedure HandleClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
{ private declarations }
|
{ private declarations }
|
||||||
pathMedia: string;
|
pathMedia: string;
|
||||||
MyImage: TIcon;
|
MyImage: TIcon;
|
||||||
procedure DoPaint(Sender: TObject);
|
procedure DoPaint(Sender: TObject);
|
||||||
public
|
public
|
||||||
{ public declarations }
|
{ public declarations }
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
frmTrayTest: TfrmTrayTest;
|
frmTrayTest: TfrmTrayTest;
|
||||||
|
|
||||||
{$ifndef fpc}
|
{$ifndef fpc}
|
||||||
{$R frmtest.dfm}
|
{$R frmtest.dfm}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$ifdef Windows}
|
{$ifdef Windows}
|
||||||
uses Windows;
|
uses Windows;
|
||||||
{$endif}
|
{$endif}
|
||||||
{$IFDEF Darwin}
|
{$IFDEF Darwin}
|
||||||
uses
|
uses
|
||||||
{$ifdef ver2_2_0}
|
{$ifdef ver2_2_0}
|
||||||
FPCMacOSAll;
|
FPCMacOSAll;
|
||||||
{$else}
|
{$else}
|
||||||
MacOSAll;
|
MacOSAll;
|
||||||
{$endif}
|
{$endif}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
{ TfrmTrayTest }
|
{ TfrmTrayTest }
|
||||||
|
|
||||||
procedure TfrmTrayTest.btnShowClick(Sender: TObject);
|
procedure TfrmTrayTest.btnShowClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
SystrayIcon.Visible := True;
|
SystrayIcon.Visible := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTrayTest.btnHideClick(Sender: TObject);
|
procedure TfrmTrayTest.btnHideClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
SystrayIcon.Visible := False;
|
SystrayIcon.Visible := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTrayTest.btnPaintTestClick(Sender: TObject);
|
procedure TfrmTrayTest.btnPaintTestClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
SecondImage: TIcon;
|
SecondImage: TIcon;
|
||||||
begin
|
begin
|
||||||
SecondImage := TIcon.Create;
|
SecondImage := TIcon.Create;
|
||||||
|
|
||||||
try
|
try
|
||||||
SecondImage.Height := 22;
|
SecondImage.Height := 22;
|
||||||
SecondImage.Width := 22;
|
SecondImage.Width := 22;
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
SecondImage.Canvas.Draw(0, 0, MyImage);
|
SecondImage.Canvas.Draw(0, 0, MyImage);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Canvas.Draw(0, 0, SecondImage);
|
Canvas.Draw(0, 0, SecondImage);
|
||||||
finally
|
finally
|
||||||
SecondImage.Free;
|
SecondImage.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTrayTest.chkOnPaintDrawingChange(Sender: TObject);
|
procedure TfrmTrayTest.chkOnPaintDrawingChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Invalidate;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTrayTest.FormCreate(Sender: TObject);
|
procedure TfrmTrayTest.FormCreate(Sender: TObject);
|
||||||
const
|
const
|
||||||
IDI_ICON1 = 101;
|
IDI_ICON1 = 101;
|
||||||
IDI_ICON2 = 115;
|
IDI_ICON2 = 115;
|
||||||
BundleResourceFolder = '/Contents/Resources/';
|
BundleResourceFolder = '/Contents/Resources/';
|
||||||
var
|
{$IFDEF Darwin}
|
||||||
{$IFDEF Darwin}
|
var
|
||||||
pathRef: CFURLRef;
|
pathRef: CFURLRef;
|
||||||
pathCFStr: CFStringRef;
|
pathCFStr: CFStringRef;
|
||||||
pathStr: shortstring;
|
pathStr: shortstring;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
begin
|
begin
|
||||||
pathMedia := '';
|
pathMedia := '';
|
||||||
|
|
||||||
// Under Mac OS X we need to get the location of the bundle
|
// Under Mac OS X we need to get the location of the bundle
|
||||||
{$IFDEF Darwin}
|
{$IFDEF Darwin}
|
||||||
pathRef := CFBundleCopyBundleURL(CFBundleGetMainBundle());
|
pathRef := CFBundleCopyBundleURL(CFBundleGetMainBundle());
|
||||||
pathCFStr := CFURLCopyFileSystemPath(pathRef, kCFURLPOSIXPathStyle);
|
pathCFStr := CFURLCopyFileSystemPath(pathRef, kCFURLPOSIXPathStyle);
|
||||||
CFStringGetPascalString(pathCFStr, @pathStr, 255, CFStringGetSystemEncoding());
|
CFStringGetPascalString(pathCFStr, @pathStr, 255, CFStringGetSystemEncoding());
|
||||||
CFRelease(pathRef);
|
CFRelease(pathRef);
|
||||||
CFRelease(pathCFStr);
|
CFRelease(pathCFStr);
|
||||||
|
|
||||||
pathMedia := pathStr + BundleResourceFolder;
|
pathMedia := pathStr + BundleResourceFolder;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
{$ifdef Windows}
|
{$ifdef Windows}
|
||||||
SystrayIcon.Icon.Handle := LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1));
|
SystrayIcon.Icon.Handle := LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1));
|
||||||
|
|
||||||
// Loading from a file should also work
|
// Loading from a file should also work
|
||||||
// SystrayIcon.Icon.LoadFromFile('icon.ico');
|
// SystrayIcon.Icon.LoadFromFile('icon.ico');
|
||||||
{$else}
|
{$else}
|
||||||
SystrayIcon.Icon.LoadFromFile(pathMedia + 'icon.ico');
|
SystrayIcon.Icon.LoadFromFile(pathMedia + 'icon.ico');
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
SystrayIcon.Hint := 'my tool tip';
|
SystrayIcon.Hint := 'my tool tip';
|
||||||
|
|
||||||
SystrayIcon.OnClick := HandleClick;
|
SystrayIcon.OnClick := HandleClick;
|
||||||
|
|
||||||
// SystrayIcon.OnPaint := DoPaint;
|
// SystrayIcon.OnPaint := DoPaint;
|
||||||
|
|
||||||
SystrayIcon.PopUpMenu := PopupMenu;
|
SystrayIcon.PopUpMenu := PopupMenu;
|
||||||
|
|
||||||
// Loads the icon
|
// Loads the icon
|
||||||
|
|
||||||
MyImage := TIcon.Create;
|
MyImage := TIcon.Create;
|
||||||
|
|
||||||
MyImage.LoadFromFile(pathMedia + 'icon.ico');
|
MyImage.LoadFromFile(pathMedia + 'icon.ico');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTrayTest.FormDestroy(Sender: TObject);
|
procedure TfrmTrayTest.FormDestroy(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
MyImage.Free;
|
MyImage.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTrayTest.FormPaint(Sender: TObject);
|
procedure TfrmTrayTest.FormPaint(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if chkOnPaintDrawing.Checked then btnPaintTestClick(Sender);
|
if chkOnPaintDrawing.Checked then btnPaintTestClick(Sender);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTrayTest.HandleClick(Sender: TObject);
|
procedure TfrmTrayTest.HandleClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Application.MessageBox('Text', 'Caption', 0);
|
Application.MessageBox('Text', 'Caption', 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmTrayTest.DoPaint(Sender: TObject);
|
procedure TfrmTrayTest.DoPaint(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
{$IFDEF FPC}
|
{$IFDEF FPC}
|
||||||
SystrayIcon.Canvas.Draw(0, 0, MyImage);
|
SystrayIcon.Canvas.Draw(0, 0, MyImage);
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
WriteLn('Paint');
|
WriteLn('Paint');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
{$ifdef fpc}
|
{$ifdef fpc}
|
||||||
{$I frmtest.lrs}
|
{$I frmtest.lrs}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -1,66 +1,67 @@
|
|||||||
<?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>
|
||||||
<SaveClosedFiles Value="False"/>
|
<SaveClosedFiles Value="False"/>
|
||||||
<SaveOnlyProjectUnits Value="True"/>
|
<SaveOnlyProjectUnits Value="True"/>
|
||||||
</Flags>
|
</Flags>
|
||||||
<SessionStorage Value="InProjectDir"/>
|
<SessionStorage Value="InProjectDir"/>
|
||||||
<MainUnit Value="0"/>
|
<MainUnit Value="0"/>
|
||||||
<IconPath Value="./"/>
|
<IconPath Value=".\"/>
|
||||||
<TargetFileExt Value=""/>
|
<TargetFileExt Value=""/>
|
||||||
</General>
|
</General>
|
||||||
<PublishOptions>
|
<PublishOptions>
|
||||||
<Version Value="2"/>
|
<Version Value="2"/>
|
||||||
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
<DestinationDirectory Value="$(TestDir)\publishedproject\"/>
|
||||||
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
|
||||||
</PublishOptions>
|
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
|
||||||
<RunParams>
|
</PublishOptions>
|
||||||
<local>
|
<RunParams>
|
||||||
<FormatVersion Value="1"/>
|
<local>
|
||||||
<LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
|
<FormatVersion Value="1"/>
|
||||||
</local>
|
<LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/>
|
||||||
</RunParams>
|
</local>
|
||||||
<RequiredPackages Count="1">
|
</RunParams>
|
||||||
<Item1>
|
<RequiredPackages Count="1">
|
||||||
<PackageName Value="LCL"/>
|
<Item1>
|
||||||
</Item1>
|
<PackageName Value="LCL"/>
|
||||||
</RequiredPackages>
|
</Item1>
|
||||||
<Units Count="2">
|
</RequiredPackages>
|
||||||
<Unit0>
|
<Units Count="2">
|
||||||
<Filename Value="wndtray.dpr"/>
|
<Unit0>
|
||||||
<IsPartOfProject Value="True"/>
|
<Filename Value="wndtray.dpr"/>
|
||||||
<UnitName Value="wndtray"/>
|
<IsPartOfProject Value="True"/>
|
||||||
</Unit0>
|
<UnitName Value="wndtray"/>
|
||||||
<Unit1>
|
</Unit0>
|
||||||
<Filename Value="frmtest.pas"/>
|
<Unit1>
|
||||||
<ComponentName Value="frmTrayTest"/>
|
<Filename Value="frmtest.pas"/>
|
||||||
<HasResources Value="True"/>
|
<ComponentName Value="frmTrayTest"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<ResourceFilename Value="frmtest.lrs"/>
|
<ResourceFilename Value="frmtest.lrs"/>
|
||||||
<UnitName Value="frmtest"/>
|
<UnitName Value="frmtest"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="5"/>
|
<Version Value="5"/>
|
||||||
<SearchPaths>
|
<PathDelim Value="\"/>
|
||||||
<SrcPath Value="/Users/felipe/Programas/lazarus-ccr/bindings/objc/;/Users/felipe/Programas/lazarus-ccr/bindings/pascocoa/applicationservices/coregraphics/;/Users/felipe/Programas/lazarus-ccr/bindings/pascocoa/appkit/;/Users/felipe/Programas/lazarus-ccr/bindings/pascocoa/foundation/"/>
|
<SearchPaths>
|
||||||
</SearchPaths>
|
<SrcPath Value="\Users\felipe\Programas\lazarus-ccr\bindings\objc\;\Users\felipe\Programas\lazarus-ccr\bindings\pascocoa\applicationservices\coregraphics\;\Users\felipe\Programas\lazarus-ccr\bindings\pascocoa\appkit\;\Users\felipe\Programas\lazarus-ccr\bindings\pascocoa\foundation\"/>
|
||||||
<CodeGeneration>
|
</SearchPaths>
|
||||||
<Generate Value="Faster"/>
|
<CodeGeneration>
|
||||||
</CodeGeneration>
|
<Generate Value="Faster"/>
|
||||||
<Linking>
|
</CodeGeneration>
|
||||||
<Options>
|
<Linking>
|
||||||
<LinkerOptions Value="-framework Qt4Intf -framework carbon -lobjc"/>
|
<Options>
|
||||||
</Options>
|
<LinkerOptions Value="-framework Qt4Intf -framework carbon -lobjc"/>
|
||||||
</Linking>
|
</Options>
|
||||||
<Other>
|
</Linking>
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
<Other>
|
||||||
</Other>
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
</CompilerOptions>
|
</Other>
|
||||||
</CONFIG>
|
</CompilerOptions>
|
||||||
|
</CONFIG>
|
||||||
|
Loading…
Reference in New Issue
Block a user