mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-14 07:59:35 +02:00
fixed updating codetools on changing pkg output dir
git-svn-id: trunk@4538 -
This commit is contained in:
parent
495577e5b8
commit
67c3678880
@ -1239,7 +1239,14 @@ type
|
||||
|
||||
TDockZone = class
|
||||
private
|
||||
function GetChildCount: Integer;
|
||||
FChildControl: TControl;
|
||||
FChildCount: integer;
|
||||
FTree: TDockTree;
|
||||
FZoneLimit: integer;
|
||||
FParentZone: TDockZone;
|
||||
FOrientation: TDockOrientation;
|
||||
FNextSibling: TDockZone;
|
||||
//FPrevSibling: TDockZone;
|
||||
function GetHeight: Integer;
|
||||
function GetLeft: Integer;
|
||||
function GetLimitBegin: Integer;
|
||||
@ -1250,8 +1257,10 @@ type
|
||||
function GetWidth: Integer;
|
||||
function GetZoneLimit: Integer;
|
||||
procedure SetZoneLimit(const AValue: Integer);
|
||||
function IsOrientationValid: boolean;
|
||||
function GetNextVisibleZone: TDockZone;
|
||||
public
|
||||
constructor Create(Tree: TDockTree);
|
||||
constructor Create(TheTree: TDockTree);
|
||||
procedure ExpandZoneLimit(NewLimit: Integer);
|
||||
function FirstVisibleChild: TDockZone;
|
||||
function NextVisible: TDockZone;
|
||||
@ -1259,7 +1268,8 @@ type
|
||||
procedure ResetChildren;
|
||||
procedure ResetZoneLimits;
|
||||
procedure Update;
|
||||
property ChildCount: Integer read GetChildCount;
|
||||
property Tree: TDockTree read FTree;
|
||||
property ChildCount: Integer read FChildCount;
|
||||
property Height: Integer read GetHeight;
|
||||
property Left: Integer read GetLeft;
|
||||
property LimitBegin: Integer read GetLimitBegin;
|
||||
@ -1830,6 +1840,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.147 2003/08/27 20:55:51 mattias
|
||||
fixed updating codetools on changing pkg output dir
|
||||
|
||||
Revision 1.146 2003/08/27 11:01:10 mattias
|
||||
started TDockTree
|
||||
|
||||
|
@ -18,12 +18,6 @@
|
||||
*****************************************************************************
|
||||
}
|
||||
|
||||
function TDockZone.GetChildCount: Integer;
|
||||
begin
|
||||
// ToDo
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
function TDockZone.GetHeight: Integer;
|
||||
begin
|
||||
// ToDo
|
||||
@ -37,15 +31,37 @@ begin
|
||||
end;
|
||||
|
||||
function TDockZone.GetLimitBegin: Integer;
|
||||
// retunrs the zone limits. All childs are bounded to this value.
|
||||
// Aka returns top for orientation doHorizontal and left for doVertical
|
||||
var
|
||||
Zone: TDockZone;
|
||||
begin
|
||||
// ToDo
|
||||
Result:=0;
|
||||
if FTree.FTopZone = Self then
|
||||
Zone := Self
|
||||
else
|
||||
Zone := FParentZone;
|
||||
if Zone.FOrientation = doHorizontal then
|
||||
Result := Top
|
||||
else if Zone.FOrientation = doVertical then
|
||||
Result := Left
|
||||
else
|
||||
raise Exception.Create('TDockZone.GetLimitBegin');
|
||||
end;
|
||||
|
||||
function TDockZone.GetLimitSize: Integer;
|
||||
var
|
||||
Zone: TDockZone;
|
||||
begin
|
||||
// ToDo
|
||||
Result:=0;
|
||||
if FTree.FTopZone = Self then
|
||||
Zone := Self
|
||||
else
|
||||
Zone := FParentZone;
|
||||
if Zone.FOrientation = doHorizontal then
|
||||
Result := Height
|
||||
else if Zone.FOrientation = doVertical then
|
||||
Result := Width
|
||||
else
|
||||
raise Exception.Create('TDockZone.GetLimitSize');
|
||||
end;
|
||||
|
||||
function TDockZone.GetTop: Integer;
|
||||
@ -55,15 +71,33 @@ begin
|
||||
end;
|
||||
|
||||
function TDockZone.GetVisible: Boolean;
|
||||
var
|
||||
Zone: TDockZone;
|
||||
begin
|
||||
// ToDo
|
||||
Result:=false;
|
||||
if Assigned(FChildControl) then
|
||||
Result := FChildControl.Visible
|
||||
else
|
||||
begin
|
||||
Result := True;
|
||||
Zone := FirstVisibleChild;
|
||||
while Assigned(Zone) do begin
|
||||
if Zone.Visible then Exit;
|
||||
Zone := Zone.FNextSibling;
|
||||
end;
|
||||
Result := False;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TDockZone.GetVisibleChildCount: Integer;
|
||||
var
|
||||
Zone: TDockZone;
|
||||
begin
|
||||
// ToDo
|
||||
Result:=0;
|
||||
Result := 0;
|
||||
Zone := FirstVisibleChild;
|
||||
while Zone <> nil do begin
|
||||
Zone := Zone.NextVisible;
|
||||
Inc(Result);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TDockZone.GetWidth: Integer;
|
||||
@ -74,18 +108,34 @@ end;
|
||||
|
||||
function TDockZone.GetZoneLimit: Integer;
|
||||
begin
|
||||
// ToDo
|
||||
Result:=0;
|
||||
if (not Visible) and IsOrientationValid then
|
||||
// LimitSize will be zero and zone will take up no space
|
||||
Result := GetLimitBegin
|
||||
else
|
||||
Result := FZoneLimit;
|
||||
end;
|
||||
|
||||
procedure TDockZone.SetZoneLimit(const AValue: Integer);
|
||||
begin
|
||||
// ToDo
|
||||
FZoneLimit := AValue;
|
||||
end;
|
||||
|
||||
constructor TDockZone.Create(Tree: TDockTree);
|
||||
function TDockZone.IsOrientationValid: boolean;
|
||||
begin
|
||||
// ToDo
|
||||
Result := (Assigned(FParentZone) and (FParentZone.FOrientation <> doNoOrient))
|
||||
or ((FTree.FTopZone = Self) and (FOrientation <> doNoOrient));
|
||||
end;
|
||||
|
||||
function TDockZone.GetNextVisibleZone: TDockZone;
|
||||
begin
|
||||
Result := FNextSibling;
|
||||
while Assigned(Result) and not Result.Visible do
|
||||
Result := Result.FNextSibling;
|
||||
end;
|
||||
|
||||
constructor TDockZone.Create(TheTree: TDockTree);
|
||||
begin
|
||||
FTree:=TheTree;
|
||||
end;
|
||||
|
||||
procedure TDockZone.ExpandZoneLimit(NewLimit: Integer);
|
||||
|
@ -22,8 +22,7 @@
|
||||
|
||||
unit Gtk2Int;
|
||||
|
||||
{$mode objfpc}
|
||||
{$LONGSTRINGS ON}
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
@ -32,9 +31,7 @@ interface
|
||||
{$endif}
|
||||
|
||||
uses
|
||||
Classes, SysUtils, InterfaceBase, gdk2pixbuf, gtk2, gdk2, glib2, LMessages,
|
||||
Controls, Forms, VclGlobals, LCLLinux, LCLType, gtkDef, DynHashArray,
|
||||
LazQueue, GraphType, GraphMath, gtkInt;
|
||||
Classes, SysUtils, gdk2pixbuf, gtk2, gdk2, glib2, gtkInt;
|
||||
|
||||
type
|
||||
TGtk2Object = class(TGtkObject)
|
||||
@ -43,16 +40,14 @@ type
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
Graphics, Buttons, Menus, GTKWinApiWindow, StdCtrls, ComCtrls, CListBox,
|
||||
KeyMap, Calendar, Arrow, Spin, CommCtrl, ExtCtrls, Dialogs, FileCtrl,
|
||||
LResources, Math, gtkglobals, gtkproc, LCLStrConsts;
|
||||
|
||||
|
||||
end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.2 2003/08/27 20:55:51 mattias
|
||||
fixed updating codetools on changing pkg output dir
|
||||
|
||||
Revision 1.1 2002/12/15 11:52:28 mattias
|
||||
started gtk2 interface
|
||||
|
||||
@ -99,6 +94,4 @@ end.
|
||||
|
||||
Revision 1.3 2002/10/10 13:29:08 lazarus
|
||||
AJ: added LoadStockPixmap routine & minor fixes to/for GNOMEInt
|
||||
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<CONFIG>
|
||||
<Package>
|
||||
<Name Value="GTK2Interface"/>
|
||||
<Files Count="2">
|
||||
<Files Count="3">
|
||||
<Item1>
|
||||
<Filename Value="interfaces.pas"/>
|
||||
<UnitName Value="Interfaces"/>
|
||||
@ -11,6 +11,10 @@
|
||||
<Filename Value="gtk2int.pas"/>
|
||||
<UnitName Value="Gtk2Int"/>
|
||||
</Item2>
|
||||
<Item3>
|
||||
<Filename Value="../gtk/gtkglobals.pp"/>
|
||||
<UnitName Value="GTKGlobals"/>
|
||||
</Item3>
|
||||
</Files>
|
||||
<Type Value="RunAndDesignTime"/>
|
||||
<RequiredPkgs Count="2">
|
||||
@ -32,7 +36,7 @@
|
||||
</Package>
|
||||
<CompilerOptions>
|
||||
<SearchPaths>
|
||||
<OtherUnitFiles Value=".;../gtk/;../../units"/>
|
||||
<OtherUnitFiles Value="./;../gtk/;../../units/"/>
|
||||
<UnitOutputDirectory Value="../../units/gtk2"/>
|
||||
<LCLWidgetType Value="gtk"/>
|
||||
</SearchPaths>
|
||||
|
@ -350,6 +350,7 @@ type
|
||||
property LazPackage: TLazPackage read FLazPackage;
|
||||
end;
|
||||
|
||||
|
||||
{ TLazPackageDefineTemplates }
|
||||
|
||||
TLazPkgDefineTemplatesFlag = (
|
||||
@ -2926,6 +2927,8 @@ begin
|
||||
FOutputDir.SetDefineOwner(LazPackage,false);
|
||||
FOutputDir.SetFlags([dtfAutoGenerated],[],false);
|
||||
FMain.AddChild(FOutputDir);
|
||||
end else begin
|
||||
FOutputDir.Value:=LazPackage.GetOutputDirectory;
|
||||
end;
|
||||
|
||||
if (FOutPutSrcPath=nil)
|
||||
|
Loading…
Reference in New Issue
Block a user