Unit Marquee

Classes

TMarquee -

Functions

MarqueeDispose - define the maximum width of the marquis, in text characters.
Register - have we built the bit patterns yet?

Types

String32
TAnimationSpeed
TDrawMode
TPixelAppearance

Constants

MAXCHARS_AUTO
MAXWIDTH
MAX_CHARS
PIXEL_HEIGHT
PROGRESS_METER

Variables


Functions


procedure MarqueeDispose;

define the maximum width of the marquis, in text characters. inputs: messageWidth number of characters, or 0 to base on frame's width outputs: none returns: none

procedure Register;

have we built the bit patterns yet?

Types


String32 = String[ MAX_CHARS ]
number of pips across the screen
TAnimationSpeed = ( anSlow, anMedium, anFast );

TDrawMode = (
                    dmRandom,       {    select a mode at random }
                    dmNormal,       {    just display the information - default }
                    dmSlide,        {  A alt. rows slide out r/l, then slide in }
                    dmVerticalSlide,{  A alt. cols slide out u/d, then slide in }
                    dmSlideChase,   {  A alt. rows slide out r/l, simult slide in }
                    dmWipe,         {  A individual characters wipe out then in }
                    dmNewWhite,     {  A draws characters one at a time, the new one in white }
                    dmRunLeft,      { MA text runs out then in from the right }
                    dmRunRight,     { MA text runs out then in from the left }
                    dmChaseLeft,    { MA new text chases old text off to the left }
                    dmChaseRight,   { MA new text chases old text off to the right }
                    dmPopUp,        { MA old drops and new rises }
                    dmPaintRandom,  {  A paints dots in random groups }
                    dmPopUpNew,     { MA popup new characters only }
                    dmPopDownNew,   { MA drop-in new characters only }
                    dmPopDown       { MA old rises and new drops }
                );
Following are the possible draw modes. Modes with descriptions preceded by 'M' are affected by the setting of mechanicalEffect, 'A' are affected by the setting of animationSpeed
TPixelAppearance = ( paFlat, paInset, paRaised );
an AnimationSpeed of anSlow pauses 3/18 second between draws an AnimationSpeed of anMedium pauses 1/18 second between draws an AnimationSPeed of anFast does not pause between draws.

Constants

MAXCHARS_AUTO = 0

MAXWIDTH = ( 6 * MAX_CHARS ) - 1

max. characters permitted irregardless

MAX_CHARS = 40

allow frame dimensions to dictate max width

PIXEL_HEIGHT = 9

MARQUEE.PAS - support for an "LCD style" marquee that contains up to forty characters across that can be drawn in cool ways. Functions as either a label or a progress meter. Copyright (C) 1997 Midnight Software, Inc., All Rights Reserved. Installation: Delphi 1.0: Copy MARQUEE.PAS and MARQUEE.D16 into your components library directory. Rename MARQUEE.D16 to MARQUEE.DCR. Add MARQUEE.PAS to your library. Delphi 2.0 and above: Copy MARQUEE.PAS and MARQUEE.DCR to your components library directory. Add MARQUEE.PAS to your library. Use: Place the component onto your form (d-uh???) Always set these properties: BrightColor the colour of the "lit" pixels DimColor the colour of the "dark" pixels (usu. Navy) PipSize the size of a "pixel". If you want to use the Marquee as a progress indicator, set these: ShowProgressPercent TRUE = print "XX%" in the middle of the bar, FALSE = just show the meter running across. Progress n/ProgressMax - current completion percentage ProgressMax Progress value indicating 100% completion If you want to use the Marquee as a label, set these: MaxChars Leave alone to fill the cell with characters, or specify a >0 value to limit to that many characters. Caption Just like any other caption CodePage leave as 0 for default codepage, otherwise set to 1250 (Eastern Europe) or 1252 (Western Europe) NOTE: Delphi 1.0 users: only supported "default" codepage is 1252 -- Western Europe. AnimationSpeed anFast as fast as it will draw anMedium not quite as fast anSlow slow AnimationStyle dmNormal just paint the text dmSlide, dmVerticalSlide, dmSlideChase, dmWipe, dmNewWhite, dmRunLeft, dmRunRight, dmChaseLeft, dmChaseRight, dmPopUp, dmPaintRandom, dmPopUpNew, dmPopDownNew, dmPopDown: various drawing effects - try 'em all! FREEWARE NOTICE: You may incorporate this component into any derivitave work including component libraries and executable programs, with no consideration to Midnight Software whatsoever, except as noted below. You may NOT include this component in any component library for which there is a charge of greater than USA$50.00, UNLESS the purpose of this library is primary educational (e.g., as part of a Delphi book or companion CD-ROM) If you are going to redistribute this component alone or with other components as a component library, you MUST include all source code. This component may NOT be modified to function as an ActiveX(tm) component, nor may it be modified in any other way to make it compatible with any Microsoft(tm) software development product. Midnight Software's intent is that this component is for the exclusive use of developers using Borland tools. ActiveX(tm) and Microsoft(tm) are registered trademarks of Microsoft Corporation. ... and PLEASE ... * Let me know who you are!!! If you are using this component, please let me know if it suits your needs! My e-mail address is GutterBoy@mindless.com * If you make any significant enhancements or correct any bugs, I would appreciate a copy. ... and, of course ... Midnight Software makes no claims about the merchantability of this product. THIS COMPONENT IS PROVIDED "AS IS" WITH NO WARRANTIES NOR GUARANTEES OF ANY KIND. By using this component, you agree to assume all risks associated with its use or misuse. Midnight Software, Inc., shall be held harmless for any incidental or consequential damages resulting from the use or misuse of this component. REVISION HISTORY 31 Dec 1996 rdk Added AnimationSpeed property ***** VERSION 1.00 ***** 11 Jul 1997 rdk Replaced MoveTo/LineTo with Rectangle or Pixel. It's a _lot_ faster! ***** VERSION 1.01 ***** 24 Jul 1997 rdk Support for Eastern/Western European Code Pages. Thanks to Ivo Eichler for the idea and the bitmaps! dmDrawNewWhite and dmPaintRandom now work! END OF HISTORY To do list: * Add other effects: OpenDoors - new text replaces old from the middle two chars outward. CloseDoors - reverse of opendoors. * implement mechanicalEffect flag -- before text stops, it goes one pixel too far then backs up into place. * support for a display of several rows of characters. * support for 3-D pips when pixel size is 3 or greater: FPixelAppearance = paFlat, paInset, paRaised (L=light color, N=normal pip color, S=shadow pip color) - special effect that has pips appear to "rise" and "fall" out of and into the screen. 3: 4: 5: LLN LLLN LLLLN LNS LNNS LNNNS NSS LNNS LNNNS NSSS LNNNS NSSSS

PROGRESS_METER = -1


Variables