| Class TMarquee (unit Marquee) |
TPaintBox
| Constructors |
constructor Create( owner: TComponent );| Functions |
destructor Destroy;
procedure Regen;
procedure RepaintMe;
procedure SetColour( dim, bright: TColor );
procedure Loaded;
procedure Paint;
procedure SetAlignment( how: TAlignment );
procedure SetBrightColour( bright: TColor );
procedure SetDimColour( dim: TColor );
procedure SetMaxCharacters( messageWidth: Integer );
procedure SetMaxProgress( maxValue: Longint );
procedure SetMessage( const s: String32 );
procedure SetPixelSize( pixels: Integer );
procedure SetProgress( myProgress: Longint );
procedure AnimationPause;
procedure AssembleBits( const s: String );
procedure AssembleProgressBits( myProgress: Longint );
procedure DrawChaseLeft;
procedure DrawChaseRight;
procedure DrawNewWhite;
procedure DrawNormal;
procedure DrawPaintRandom;
procedure DrawPixel( col, row: Integer; isDim: Boolean );
procedure DrawPopDown;
procedure DrawPopDownNew;
procedure DrawPopUp;
procedure DrawPopUpNew;
procedure DrawRunLeft;
procedure DrawRunRight;
procedure DrawSlide;
procedure DrawSlideChase;
procedure DrawVerticalSlide;
procedure DrawWipe;
procedure FillRectangle;
procedure RecomputeMaxchars;
procedure Redraw;| Properties |
property Alignment : TAlignment
property AnimationSpeed : TAnimationSpeed
property AnimationStyle : TDrawMode
property BrightColor : TColor
property Caption : String32
property CodePage : Integer
property DimColor : TColor
property Enabled : Boolean
property MaxChars : Integer
property MechanicalEffect : Boolean
property PipSize : Integer
property Pixel3D : TPixelAppearance
property Progress : Longint
property ProgressMax : Longint
property RedrawIfUnchanged : Boolean
property ShowProgressPercent : Boolean| Events |
| Variables |
drawMode : TDrawMode;
drawSame : Boolean;
FMechanicalEffect : Boolean;
captionText : String32;
FBrightColour : TColor;
FCodePage : Integer;
FDimColour : TColor;
FDisplayRack : array[ 0..PIXEL_HEIGHT, 0..MAXWIDTH ] of Byte;
FHorizontalPixels : Integer;
FInvalidateDisplay : Boolean;
FLeftIndent : Integer;
FPixelAppearance : TPixelAppearance;
FPixelSize : Integer;
FPixelSizeM1 : Integer;
FPriorRack : array[ 0..PIXEL_HEIGHT, 0..MAXWIDTH ] of Byte;
FShowPercentageNumber : Boolean;
FTopIndent : Integer;
FWorkRack : array[ 0..PIXEL_HEIGHT, 0..MAXWIDTH ] of Byte;
invalidateBrightOnly : Boolean;
isAlive : Boolean;
maxCharacters : Integer;
maximum : Longint;
myAlignment : TAlignment;
myAnimationSpeed : TAnimationSpeed;
prevProgress : Longint;
prevText : String32;
thisText : String32;
userMaxChars : Integer;| Constructors |
constructor Create( owner: TComponent );western european codepage 1252
| Functions |
destructor Destroy;VCL Registration function.
procedure Regen;absolute has not changed
procedure RepaintMe;
procedure SetColour( dim, bright: TColor );prevent re-entrancy - these things have a way of "stack" ing up!
procedure Loaded;overridden methods
procedure Paint;special case of changing FBrightColour only
procedure SetAlignment( how: TAlignment );sets the colour of the "off" pixels inputs: dim colour of "off" pixels outputs: none returns: none
procedure SetBrightColour( bright: TColor );sets the size of a pixel; default is three.
procedure SetDimColour( dim: TColor );sets the colour of the "on" pixels inputs: bright colour of "on" pixels outputs: none returns: none
procedure SetMaxCharacters( messageWidth: Integer );If the marquis is being used as a progress meter, this function is used to set the maximum progress value inputs: maxValue value equal to 100% of progress outputs: none returns: none
procedure SetMaxProgress( maxValue: Longint );and let us not forget the top indentation!
procedure SetMessage( const s: String32 );
procedure SetPixelSize( pixels: Integer );problems drawing a 1 x 1 rectangle.
procedure SetProgress( myProgress: Longint );copy next bit in from FWorkRack (front to end) to rightmost bit of display rack
procedure AnimationPause;the last display
procedure AssembleBits( const s: String );center the text [n[n]]n% in the box and flip its bits } { calculate first pixel to draw in to center text
procedure AssembleProgressBits( myProgress: Longint );We fudge things a little by stopping the shuffle when 1/50th of the bits remain and assign the balance of the bits (just a few) linearly. We do this because at this point, the probability of the random number generator selecting a novel destination is 50 to 1, which means it would otherwise spend a lot of time trying to randomly assign the last few cells.
procedure DrawChaseLeft;old string exits to the left then new string enters from the left.
procedure DrawChaseRight;place next character in rightmost position
procedure DrawNewWhite;7 - bit -- filling from the top, drop in bottom bits first
procedure DrawNormal;either 1 or 0
procedure DrawPaintRandom;establish defaults: FMechanicalEffect: NO drawSame: NO FPixelSize: 3 drawMode: Normal colour: Aqua dots on Navy background enabled: TRUE } { allocate memory for the pattern buffer the first time
procedure DrawPixel( col, row: Integer; isDim: Boolean );Repaints the entire display. Attached to an OnPaint event.
procedure DrawPopDown;filling from the bottom, drop in top bits first
procedure DrawPopDownNew;rotate this character in
procedure DrawPopUp;place next character (end characters first) in leftmost position
procedure DrawPopUpNew;wipe in the new display
procedure DrawRunLeft;Just display the new text.
procedure DrawRunRight;old string exits to the right then new string enters from the right
procedure DrawSlide;7 - bit -- filling from the top, drop in bottom bits first
procedure DrawSlideChase;rotate next pixel, from bottom to top, into the top position
procedure DrawVerticalSlide;place next character (end characters first) in leftmost position
procedure DrawWipe;so it gets regenerated!
procedure FillRectangle;
procedure RecomputeMaxchars;
procedure Redraw;then forget the whole thing!
| Properties |
property Alignment : TAlignment
property AnimationSpeed : TAnimationSpeed
property AnimationStyle : TDrawMode
property BrightColor : TColor
property Caption : String32
property CodePage : Integer
property DimColor : TColor
property Enabled : Boolean
property MaxChars : Integer
property MechanicalEffect : Boolean
property PipSize : Integer
property Pixel3D : TPixelAppearance
property Progress : Longint
property ProgressMax : Longint
property RedrawIfUnchanged : Boolean
property ShowProgressPercent : Boolean| Events |
| Variables |
drawMode : TDrawMode;should we use the mechanical effect? (one pos too far then backs up)
drawSame : Boolean;
FMechanicalEffect : Boolean;if text does not change but a setmessage() happens, should we redraw anyhow?
captionText : String32;
FBrightColour : TColor;
FCodePage : Integer;
FDimColour : TColor;
FDisplayRack : array[ 0..PIXEL_HEIGHT, 0..MAXWIDTH ] of Byte;what's going to be displayed
FHorizontalPixels : Integer;indentation required to center our text in the paintbox
FInvalidateDisplay : Boolean;
FLeftIndent : Integer;one less than the size of a pixel - computation speed enhancer
FPixelAppearance : TPixelAppearance;
FPixelSize : Integer;ANSI code page for character generator
FPixelSizeM1 : Integer;size of a pixel
FPriorRack : array[ 0..PIXEL_HEIGHT, 0..MAXWIDTH ] of Byte;what's being displayed
FShowPercentageNumber : Boolean;
FTopIndent : Integer;
FWorkRack : array[ 0..PIXEL_HEIGHT, 0..MAXWIDTH ] of Byte;previous display characters
invalidateBrightOnly : Boolean;
isAlive : Boolean;
maxCharacters : Integer;user's specified # chars across
maximum : Longint;
myAlignment : TAlignment;number of characters across
myAnimationSpeed : TAnimationSpeed;
prevProgress : Longint;
prevText : String32;
thisText : String32;
userMaxChars : Integer;number of dots across