+ Made template compile

git-svn-id: trunk@10088 -
This commit is contained in:
marc 2006-10-17 14:28:23 +00:00
parent e1d232dcdf
commit 766d00f56a
4 changed files with 403 additions and 0 deletions

3
.gitattributes vendored
View File

@ -2258,6 +2258,8 @@ lcl/interfaces/carbon/carbonwstoolwin.pp svneol=native#text/pascal
lcl/interfaces/carbon/fpcmacosall.pas svneol=native#text/plain
lcl/interfaces/carbon/interfaces.pas svneol=native#text/pascal
lcl/interfaces/fpgui/Makefile.fpc svneol=native#text/plain
lcl/interfaces/fpgui/fpguiint.pp svneol=native#text/pascal
lcl/interfaces/fpgui/fpguiobject.inc svneol=native#text/pascal
lcl/interfaces/fpgui/fpguiwsactnlist.pp svneol=native#text/pascal
lcl/interfaces/fpgui/fpguiwsarrow.pp svneol=native#text/pascal
lcl/interfaces/fpgui/fpguiwsbuttons.pp svneol=native#text/pascal
@ -2283,6 +2285,7 @@ lcl/interfaces/fpgui/fpguiwspairsplitter.pp svneol=native#text/pascal
lcl/interfaces/fpgui/fpguiwsspin.pp svneol=native#text/pascal
lcl/interfaces/fpgui/fpguiwsstdctrls.pp svneol=native#text/pascal
lcl/interfaces/fpgui/fpguiwstoolwin.pp svneol=native#text/pascal
lcl/interfaces/fpgui/interfaces.pp svneol=native#text/pascal
lcl/interfaces/gnome/gnomeint.pp svneol=native#text/pascal
lcl/interfaces/gnome/gnomelclintf.inc svneol=native#text/pascal
lcl/interfaces/gnome/gnomelclintfh.inc svneol=native#text/pascal

View File

@ -0,0 +1,133 @@
{ $Id: qtint.pp 10067 2006-10-15 13:27:27Z andrew $ }
{
/***************************************************************************
FpGui.pp - FpGuiInterface Object
-------------------
Initial Revision : Thu July 1st CST 1999
***************************************************************************/
*****************************************************************************
* *
* This file is part of the Lazarus Component Library (LCL) *
* *
* See the file COPYING.modifiedLGPL, included in this distribution, *
* for details about the copyright. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* *
*****************************************************************************
}
unit fpguiint;
{$mode objfpc}{$H+}
interface
{$ifdef Trace}
{$ASSERTIONS ON}
{$endif}
uses
// LCL
Types, InterfaceBase, SysUtils, LCLProc, LCLType, LMessages, Classes,
Controls, ExtCtrls, Forms, Dialogs, StdCtrls, Comctrls, LCLIntf,
GraphType, Math;
type
{ TFpGuiWidgetSet }
TFpGuiWidgetSet = Class(TWidgetSet)
private
public
// Application
procedure AppInit(var ScreenInfo: TScreenInfo); override;
procedure AppRun(const ALoop: TApplicationMainLoop); override;
procedure AppWaitMessage; override;
procedure AppProcessMessages; override;
procedure AppTerminate; override;
procedure AppMinimize; override;
procedure AppBringToFront; override;
// procedure AppSetTitle(const ATitle: string); override;
public
constructor Create;
destructor Destroy; override;
function DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor; override;
procedure DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor); override;
procedure DCRedraw(CanvasHandle: HDC); override;
procedure SetDesigning(AComponent: TComponent); override;
function InitHintFont(HintFont: TObject): Boolean; override;
// create and destroy
function CreateComponent(Sender : TObject): THandle; override; // deprecated
function CreateTimer(Interval: integer; TimerFunc: TFNTimerProc): THandle; override;
function DestroyTimer(TimerHandle: THandle): boolean; override;
// device contexts
function IsValidDC(const DC: HDC): Boolean; virtual;
function IsValidGDIObject(const GDIObject: HGDIOBJ): Boolean; virtual;
public
{.$I fpguiwinapih.inc}
{.$I fpguilclintfh.inc}
end;
var
FpGuiWidgetSet: TFpGuiWidgetSet;
implementation
uses
////////////////////////////////////////////////////
// I M P O R T A N T
////////////////////////////////////////////////////
// To get as little as possible circles,
// uncomment only those units with implementation
////////////////////////////////////////////////////
// FpGuiWSActnList,
// FpGuiWSArrow,
// FpGuiWSButtons,
// FpGuiWSCalendar,
// FpGuiWSCheckLst,
// FpGuiWSCListBox,
// FpGuiWSComCtrls,
// FpGuiWSControls,
// FpGuiWSDbCtrls,
// FpGuiWSDBGrids,
// FpGuiWSDialogs,
// FpGuiWSDirSel,
// FpGuiWSEditBtn,
// FpGuiWSExtCtrls,
// FpGuiWSExtDlgs,
// FpGuiWSFileCtrl,
// FpGuiWSForms,
// FpGuiWSGrids,
// FpGuiWSImgList,
// FpGuiWSMaskEdit,
// FpGuiWSMenus,
// FpGuiWSPairSplitter,
// FpGuiWSSpin,
// FpGuiWSStdCtrls,
// FpGuiWSToolwin,
////////////////////////////////////////////////////
Graphics, buttons, Menus;
{$I fpguiobject.inc}
{.$I fpguiwinapi.inc}
{.$I fpguilclintf.inc}
{.$I fpguicallback.inc}
initialization
finalization
end.

View File

@ -0,0 +1,219 @@
{%MainUnit fpguiint.pp}
{
*****************************************************************************
* *
* This file is part of the Lazarus Component Library (LCL) *
* *
* See the file COPYING.modifiedLGPL, included in this distribution, *
* for details about the copyright. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* *
*****************************************************************************
}
//---------------------------------------------------------------
{------------------------------------------------------------------------------
Method: TFpGuiWidgetSet.Create
Params: None
Returns: Nothing
Contructor for the class.
------------------------------------------------------------------------------}
constructor TFpGuiWidgetSet.Create;
begin
inherited Create;
FpGuiWidgetSet := Self;
end;
{------------------------------------------------------------------------------
Method: TFpGuiWidgetSet.Destroy
Params: None
Returns: Nothing
Destructor for the class.
------------------------------------------------------------------------------}
destructor TFpGuiWidgetSet.Destroy;
begin
FpGuiWidgetSet := nil;
inherited Destroy;
end;
{------------------------------------------------------------------------------
Method: TFpGuiWidgetSet.CreateTimer
Params: None
Returns: Nothing
Creates a new timer and sets the callback event.
------------------------------------------------------------------------------}
function TFpGuiWidgetSet.CreateTimer(Interval: integer; TimerFunc: TFNTimerProc): THandle;
begin
Result := PtrInt(0);
end;
{------------------------------------------------------------------------------
Method: TFpGuiWidgetSet.DestroyTimer
Params: None
Returns: Nothing
Destroys a timer.
------------------------------------------------------------------------------}
function TFpGuiWidgetSet.DestroyTimer(TimerHandle: THandle): boolean;
begin
Result := True;
end;
{------------------------------------------------------------------------------
Method: TFpGuiWidgetSet.AppInit
Params: None
Returns: Nothing
Initializes the application
------------------------------------------------------------------------------}
procedure TFpGuiWidgetSet.AppInit(var ScreenInfo: TScreenInfo);
begin
end;
{------------------------------------------------------------------------------
Method: TFpGuiWidgetSet.AppRun
Params: None
Returns: Nothing
Enter the main message loop
------------------------------------------------------------------------------}
procedure TFpGuiWidgetSet.AppRun(const ALoop: TApplicationMainLoop);
begin
end;
{------------------------------------------------------------------------------
Method: TFpGuiWidgetSet.AppWaitMessage
Params: None
Returns: Nothing
Wait till an OS application message is received
------------------------------------------------------------------------------}
procedure TFpGuiWidgetSet.AppWaitMessage;
begin
end;
{------------------------------------------------------------------------------
Method: TFpGuiWidgetSet.AppProcessMessage
Params: None
Returns: Nothing
Handle the messages in the queue
------------------------------------------------------------------------------}
procedure TFpGuiWidgetSet.AppProcessMessages;
begin
end;
{------------------------------------------------------------------------------
Method: TFpGuiWidgetSet.AppTerminate
Params: None
Returns: Nothing
Implements Application.Terminate and MainForm.Close.
------------------------------------------------------------------------------}
procedure TFpGuiWidgetSet.AppTerminate;
begin
end;
{------------------------------------------------------------------------------
Method: TFpGuiWidgetSet.AppMinimize
Params: None
Returns: Nothing
Minimizes the application window.
------------------------------------------------------------------------------}
procedure TFpGuiWidgetSet.AppMinimize;
begin
end;
{------------------------------------------------------------------------------
Method: TFpGuiWidgetSet.AppBringToFront
Params: None
Returns: Nothing
Brings the application window to the front
------------------------------------------------------------------------------}
procedure TFpGuiWidgetSet.AppBringToFront;
begin
end;
function TFpGuiWidgetSet.DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor;
begin
Result:=clNone;
end;
procedure TFpGuiWidgetSet.DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor);
begin
end;
procedure TFpGuiWidgetSet.DCRedraw(CanvasHandle: HDC);
begin
end;
procedure TFpGuiWidgetSet.SetDesigning(AComponent: TComponent);
begin
end;
function TFpGuiWidgetSet.InitHintFont(HintFont: TObject): Boolean;
begin
Result:=false;
end;
{------------------------------------------------------------------------------
Function: TFpGuiWidgetSet.CreateComponent
Params: sender - object for which to create visual representation
Returns: nothing
Deprecated, never call this function
------------------------------------------------------------------------------}
function TFpGuiWidgetSet.CreateComponent(Sender : TObject): THandle;
begin
Result := 0;
end;
{------------------------------------------------------------------------------
Function: TFpGuiWidgetSet.IsValidDC
Params: DC - handle to a device context (TFpGuiDeviceContext)
Returns: True - if the DC is valid
------------------------------------------------------------------------------}
function TFpGuiWidgetSet.IsValidDC(const DC: HDC): Boolean;
begin
Result := (DC <> 0);
end;
{------------------------------------------------------------------------------
Function: TFpGuiWidgetSet.IsValidGDIObject
Params: GDIObject - handle to a GDI Object (TFpGuiFont, TFpGuiBrush, etc)
Returns: True - if the DC is valid
Remark: All handles for GDI objects must be pascal objects so we can
distinguish between them
------------------------------------------------------------------------------}
function TFpGuiWidgetSet.IsValidGDIObject(const GDIObject: HGDIOBJ): Boolean;
var
aObject: TObject;
begin
Result := False;
if GDIObject = 0 then Exit;
aObject := TObject(GDIObject);
if aObject is TObject then
begin
// Result := (aObject is TFpGuiFont) or (aObject is TFpGuiBrush) or (aObject is TFpGuiImage);
end;
end;
//------------------------------------------------------------------------

View File

@ -0,0 +1,48 @@
{
/***************************************************************************
Interfaces.pp - determines what interface to use
-------------------
Initial Revision : Thu July 1st CST 1999
***************************************************************************/
*****************************************************************************
* *
* This file is part of the Lazarus Component Library (LCL) *
* *
* See the file COPYING.modifiedLGPL, included in this distribution, *
* for details about the copyright. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
* *
*****************************************************************************
}
unit interfaces;
{$mode objfpc}
interface
uses
InterfaceBase;
implementation
uses
fpguiint, Forms;
initialization
WidgetSet := TFpGuiWidgetSet.Create;
finalization
WidgetSet.Free;
end.