activated Idle actions

git-svn-id: trunk@5190 -
This commit is contained in:
mattias 2004-02-10 02:00:13 +00:00
parent f52b2cbb54
commit 3e893c428f
3 changed files with 22 additions and 14 deletions

View File

@ -799,7 +799,7 @@ type
procedure SetTitle(const AValue: String); override; procedure SetTitle(const AValue: String); override;
procedure StartHintTimer(Interval: integer; TimerType: TAppHintTimerType); procedure StartHintTimer(Interval: integer; TimerType: TAppHintTimerType);
procedure UpdateVisible; procedure UpdateVisible;
procedure DoActionIdle; procedure DoIdleActions;
public public
constructor Create(AOwner: TComponent); override; constructor Create(AOwner: TComponent); override;
destructor Destroy; override; destructor Destroy; override;

View File

@ -301,6 +301,7 @@ begin
NotifyIdleHandler; NotifyIdleHandler;
if Done then begin if Done then begin
// wait till something happens // wait till something happens
DoIdleActions;
Include(FFlags,AppWaiting); Include(FFlags,AppWaiting);
Exclude(FFlags,AppIdleEndSent); Exclude(FFlags,AppIdleEndSent);
InterfaceObject.WaitMessage; InterfaceObject.WaitMessage;
@ -635,7 +636,7 @@ begin
end; end;
procedure TApplication.DoActionIdle; procedure TApplication.DoIdleActions;
var var
i: Integer; i: Integer;
CurForm: TCustomForm; CurForm: TCustomForm;
@ -1160,6 +1161,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.71 2004/02/10 02:00:13 mattias
activated Idle actions
Revision 1.70 2004/02/02 17:39:10 mattias Revision 1.70 2004/02/02 17:39:10 mattias
added TActionList - actions need testing added TActionList - actions need testing

View File

@ -908,18 +908,19 @@ end;
procedure TCustomForm.UpdateActions; procedure TCustomForm.UpdateActions;
procedure TraverseClients(Container: TWinControl); procedure RecursiveInitiate(Container: TWinControl);
var var
I: Integer; i: Integer;
Control: TControl; CurControl: TControl;
begin begin
if Container.Showing then if not Container.Showing then exit;
for I := 0 to Container.ControlCount - 1 do begin for i := 0 to Container.ControlCount - 1 do begin
Control := Container.Controls[I]; CurControl := Container.Controls[i];
if (csActionClient in Control.ControlStyle) and Control.Visible then if (csActionClient in CurControl.ControlStyle)
Control.InitiateAction; and CurControl.Visible then
if Control is TWinControl then CurControl.InitiateAction;
TraverseClients(TWinControl(Control)); if CurControl is TWinControl then
RecursiveInitiate(TWinControl(CurControl));
end; end;
end; end;
@ -935,7 +936,7 @@ begin
with Menu.Items[I] do with Menu.Items[I] do
if Visible then InitiateAction; if Visible then InitiateAction;
// update all controls // update all controls
TraverseClients(Self); RecursiveInitiate(Self);
end; end;
{------------------------------------------------------------------------------} {------------------------------------------------------------------------------}
@ -1581,6 +1582,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.126 2004/02/10 02:00:13 mattias
activated Idle actions
Revision 1.125 2004/02/02 17:39:10 mattias Revision 1.125 2004/02/02 17:39:10 mattias
added TActionList - actions need testing added TActionList - actions need testing