Class TAttrManager (unit DConsole) |
Inherits from
TPersistent
constructor Create;
- ************** TAttrManager ****************} { The list of free slots in the TAttrManager's FList is
maintained in the unused pointer slots inside the FList.
function Allocate(F: TFixedFont): Integer;
procedure Clear;
No match found, so create a new TAttr in an empty slot
destructor Destroy;
procedure Reference(Index: Integer; Delta: Integer);
function AllocIndex: Integer;
function FirstFreeIndex: Integer;
function GetAttr(Index: Integer): TAttr;
function InFreeList(P: Pointer): Boolean;
function NextFreeIndex(P: Pointer): Integer;
procedure SetAttr(Index: Integer; NewAttr: TAttr);
procedure SetFree(Index: Integer);
function GetCount: Integer;
property Attr : TAttr
property Count : Integer
FCache : TAttr;
FCacheIndex : Integer;
FFreeList : Integer;
FList : TList;
constructor Create;
************** TAttrManager ****************} { The list of free slots in the TAttrManager's FList is
maintained in the unused pointer slots inside the FList.
FFreeList is the index of the first free slot, or -1 if
there are no free slots. The pointer FList[FFreeList]
contains the negative of the integer index of the next
free slot, and so on. In 16 bit, this code assumes $FFFF
will never appear as a selector. In 32 bit, this code
would assume FList indexes and pointers stored in the
FList are positive (>=0) when evaluated as signed integers.
function Allocate(F: TFixedFont): Integer;
procedure Clear;
No match found, so create a new TAttr in an empty slot
destructor Destroy;
procedure Reference(Index: Integer; Delta: Integer);
function AllocIndex: Integer;
function FirstFreeIndex: Integer;
function GetAttr(Index: Integer): TAttr;
function InFreeList(P: Pointer): Boolean;
function NextFreeIndex(P: Pointer): Integer;
procedure SetAttr(Index: Integer; NewAttr: TAttr);
procedure SetFree(Index: Integer);
function GetCount: Integer;
property Attr : TAttr
property Count : Integer
FCache : TAttr;
FCacheIndex : Integer;
FFreeList : Integer;
FList : TList;