Class TProgressUserInterface

Unit

Declaration

type TProgressUserInterface = class(TObject)

Description

Abstract user interface of the progress bar. See TProgress for information how to use progress bars.

Hierarchy

  • TObject
  • TProgressUserInterface

Overview

Fields

Public nested const DefaultBarYPosition = 0.5;

Methods

Public constructor Create;
Public destructor Destroy; override;
Public procedure Init(Progress: TProgress); virtual; abstract;
Public procedure Update(Progress: TProgress); virtual; abstract;
Public procedure Fini(Progress: TProgress); virtual; abstract;

Properties

Public property Image: TObject read FImage write SetImage;
Public property OwnsImage: boolean read FOwnsImage write FOwnsImage default false;
Public property BarYPosition: Single read FBarYPosition write FBarYPosition default DefaultBarYPosition ;
Public property ImageBarYPosition: Single read FBarYPosition write FBarYPosition default DefaultBarYPosition; deprecated;

Description

Fields

Public nested const DefaultBarYPosition = 0.5;
 

Methods

Public constructor Create;
 
Public destructor Destroy; override;
 
Public procedure Init(Progress: TProgress); virtual; abstract;

Show progress bar.

Public procedure Update(Progress: TProgress); virtual; abstract;

Update progress bar (because Progress.Position changed).

Public procedure Fini(Progress: TProgress); virtual; abstract;

Hide progress bar.

Properties

Public property Image: TObject read FImage write SetImage;

Image displayed as a background of the progress bar.

Not all progress bar interfaces support it, some simply ignore it. You can leave it Nil, then the interface will use whatever is suitable (e.g. capture screen contents each time the progress bar starts).

Whether the image assigned here is "owned" (that is, "automatically freed") by TProgressUserInterface instance depends on OwnsImage. In any case, we don't modify the image (if we need to resize it to fit the screen size, we do it on a temporary copy).

The type of this must be CastleImages.TRGBImage, but it cannot be declared as such here, we want this unit to be part of base units, not dependent on images.

Public property OwnsImage: boolean read FOwnsImage write FOwnsImage default false;
 
Public property BarYPosition: Single read FBarYPosition write FBarYPosition default DefaultBarYPosition ;

Vertical position of the displayed progress bar. This feature is supposed to indicate a suitable free space on the background Image where we can nicely fit the progress bar UI.

Not all progress bar interfaces support it, some simply ignore it.

0 means the middle of progress bar is at the bottom of the image, 1 means at the top. 0.5 indicates the middle, and it's the default.

Public property ImageBarYPosition: Single read FBarYPosition write FBarYPosition default DefaultBarYPosition; deprecated;

Warning: this symbol is deprecated.

Deprecated name for BarYPosition.


Generated by PasDoc 0.15.0.