changed lazarus to use the widgetset it is compiled with as the default when building projects

+ added WidgetSetName function to TWidgetSet.
+ changed the order of units on qtint and fpguiint

git-svn-id: trunk@10216 -
This commit is contained in:
andrew 2006-11-18 13:45:28 +00:00
parent a51b2a96e2
commit 5302d4b562
21 changed files with 74 additions and 22 deletions

View File

@ -178,11 +178,6 @@ begin
List.Add('/var/tmp/');
end;
function GetDefaultLCLWidgetType: string;
begin
Result:='gtk';
end;
procedure GetDefaultBrowser(var Browser, Params: string);
function Find(const ShortFilename: string; var Filename: string): boolean;

View File

@ -151,11 +151,6 @@ begin
List.Add('c:\windows\temp\');
end;
function GetDefaultLCLWidgetType: string;
begin
Result:='win32';
end;
procedure GetDefaultBrowser(var Browser, Params: string);
begin
Browser:= SearchFileInPath('rundll32.exe','',

View File

@ -150,11 +150,6 @@ begin
List.Add('c:\windows\temp\');
end;
function GetDefaultLCLWidgetType: string;
begin
Result:='win32';
end;
procedure GetDefaultBrowser(var Browser, Params: string);
begin
Browser:= SearchFileInPath('rundll32.exe','',

View File

@ -46,7 +46,7 @@ interface
{$endif}
uses
SysUtils, Classes, FileUtil;
SysUtils, Classes, FileUtil, InterfaceBase;
type
TLCLPlatform = (
@ -143,6 +143,11 @@ begin
[sffDontSearchInBasePath]);
end;
function GetDefaultLCLWidgetType: string;
begin
Result:=WidgetSet.WidgetSetName;
end;
function GetDefaultLCLLibPaths(const Prefix, Postfix, Separator: string): string;
var
List: TStringList;

View File

@ -46,3 +46,9 @@ procedure TWidgetSet.AppSetTitle(const ATitle: string);
begin
Debugln('TWidgetSet.AppSetTitle not implemented by ', ClassName);
end;
function TWidgetSet.WidgetSetName: string;
begin
Result := '';
Debugln('TWidgetSet.WidgetSetName not implemented by ', ClassName);
end;

View File

@ -67,6 +67,8 @@ type
procedure AppMinimize; virtual; abstract;
procedure AppBringToFront; virtual; abstract;
procedure AppSetTitle(const ATitle: string); virtual;
function WidgetSetName: string; virtual;
function DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor; virtual; abstract;
procedure DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor); virtual; abstract;

View File

@ -70,6 +70,7 @@ type
procedure AppTerminate; override;
procedure AppMinimize; override;
procedure AppBringToFront; override;
function WidgetSetName: string; override;
function DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor; override;
procedure DCSetPixel(CanvasHandle: HDC; X, Y: integer; AColor: TGraphicsColor); override;

View File

@ -350,6 +350,11 @@ begin
end;
function TCarbonWidgetSet.WidgetSetName: string;
begin
Result:='carbon';
end;
function TCarbonWidgetSet.DCGetPixel(CanvasHandle: HDC; X, Y: integer
): TGraphicsColor;
begin

View File

@ -34,10 +34,12 @@ interface
{$endif}
uses
// FCL
Classes, Types, SysUtils, Math,
// LCL
Types, InterfaceBase, SysUtils, LCLProc, LCLType, LMessages, Classes,
InterfaceBase, LCLProc, LCLType, LMessages,
Controls, ExtCtrls, Forms, Dialogs, StdCtrls, Comctrls, LCLIntf,
GraphType, Math;
GraphType;
type
@ -55,6 +57,7 @@ type
procedure AppMinimize; override;
procedure AppBringToFront; override;
// procedure AppSetTitle(const ATitle: string); override;
function WidgetSetName: string; override;
public
constructor Create;
destructor Destroy; override;

View File

@ -145,6 +145,11 @@ begin
end;
function TFpGuiWidgetSet.WidgetSetName: string;
begin
Result:='fpgui';
end;
function TFpGuiWidgetSet.DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor;
begin
Result:=clNone;

View File

@ -44,6 +44,9 @@ uses
libgnome, libart, libgnomeui;
type
{ TGnomeWidgetSet }
TGnomeWidgetSet = class(TGtkWidgetSet)
private
procedure PassCmdLineOptions; override;
@ -55,6 +58,7 @@ type
function CreateComponent(Sender: TObject): THandle; override;
public
function WidgetSetName: string; override;
{$I gnomewinapih.inc}
end;
@ -289,6 +293,11 @@ begin
Result:=THandle(P);
end;
function TGnomeWidgetSet.WidgetSetName: string;
begin
Result:='gnome';
end;
{$I gnomewinapi.inc}
end.

View File

@ -310,6 +310,7 @@ type
procedure AppMinimize; override;
procedure AppBringToFront; override;
procedure AppSetTitle(const ATitle: string); override;
function WidgetSetName: string; override;
public
constructor Create;
destructor Destroy; override;

View File

@ -1968,6 +1968,11 @@ begin
end;
function TGTKWidgetSet.WidgetSetName: string;
begin
Result:='gtk';
end;
{------------------------------------------------------------------------------
Method: TGtkWidgetSet.RecreateWnd
Params: Sender: TObject - the lcl wincontrol, that is to recreated

View File

@ -74,7 +74,8 @@ type
SelWidget: PGtkWidget); override;
procedure CreatePreviewDialogControl(
PreviewDialog: TPreviewFileDialog; SelWidget: PGtkWidget); override;
public
public
function WidgetSetName: string; override;
{$I gtk2winapih.inc}
{$I gtk2lclintfh.inc}
end;

View File

@ -1007,6 +1007,11 @@ begin
gtk_widget_show(PreviewWidget);
end;
function TGtk2WidgetSet.WidgetSetName: string;
begin
Result:='gtk2';
end;
{$IFDEF ASSERT_IS_ON}
{$UNDEF ASSERT_IS_ON}
{$C-}

View File

@ -36,10 +36,11 @@ interface
uses
// Bindings - qt4 must come first to avoid type redefinition problems on Windows
qt4,
// FPC
Classes, SysUtils, Math, Types,
// LCL
Types, InterfaceBase, SysUtils, LCLProc, LCLType, LMessages, Classes,
Controls, ExtCtrls, Forms, Dialogs, StdCtrls, Comctrls, LCLIntf,
GraphType, Math;
InterfaceBase, LCLProc, LCLType, LMessages, Controls, ExtCtrls, Forms,
Dialogs, StdCtrls, Comctrls, LCLIntf, GraphType;
type
@ -58,6 +59,7 @@ type
procedure AppMinimize; override;
procedure AppBringToFront; override;
// procedure AppSetTitle(const ATitle: string); override;
function WidgetSetName: string; override;
public
constructor Create;
destructor Destroy; override;

View File

@ -145,6 +145,11 @@ begin
end;
function TQtWidgetSet.WidgetSetName: string;
begin
Result:='qt';
end;
function TQtWidgetSet.DCGetPixel(CanvasHandle: HDC; X, Y: integer): TGraphicsColor;
{var
Color: QColorH;}

View File

@ -186,6 +186,7 @@ Type
procedure AppWaitMessage; override;
Procedure AppTerminate; Override;
procedure AppSetTitle(const ATitle: string); override;
function WidgetSetName: string; override;
Function InitHintFont(HintFont: TObject): Boolean; Override;
Procedure AttachMenuToWindow(AMenuObject: TComponent); Override;

View File

@ -418,6 +418,11 @@ begin
{$endif}
end;
function TWin32WidgetSet.WidgetSetName: string;
begin
Result:='win32';
end;
{------------------------------------------------------------------------------
Function: CreateTimer
Params: Interval:

View File

@ -176,6 +176,7 @@ type
procedure AppProcessMessages; override;
procedure AppWaitMessage; override;
Procedure AppTerminate; Override;
function WidgetSetName: string; override;
Function InitHintFont(HintFont: TObject): Boolean; override;
Procedure AttachMenuToWindow(AMenuObject: TComponent); override;
procedure AppRun(const ALoop: TApplicationMainLoop); override;

View File

@ -301,6 +301,11 @@ begin
PostQuitMessage(0);
end;
function TWinCEWidgetSet.WidgetSetName: string;
begin
Result:='wince';
end;
function TWinCEWidgetSet.InitHintFont(HintFont: TObject): Boolean;
begin