The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....



Interface of SDL_SevenSeg

const
{$IFDEF PAIDVERS}
  SDLVersionInfo = 'sevenseg_r1050_full';
  IsLightEd = false;
{$ELSE}
  SDLVersionInfo = 'sevenseg_r1050_lighted';
  IsLightEd = true;
{$ENDIF}
  release = 1050;
  Max7SegChars = 21;
  SevenSegCharList: array[1..Max7SegChars] of char = // list of avail. characters
                       ('0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
                        '-', '+', ':', '', 'A', 'B', 'C', 'D', 'E', 'F',
                        '.');

type
  TSevenSeg = class (TGraphicControl)
              private
                FColorBakG    : TColor;           { color of button background }
                FColorTxt     : TColor;             { color of left/right text }
                DigImg        : TBitMap;
                FNumDigits    : integer;             // number of display digits
                FCaption      : string;                 // value to be displayed
                FFrameStyle   : TFrameStyle;                  { style of frame }
                FMargin       : integer;
                FInterDigDist : integer;
                FWidth        : integer;
                FHeight       : integer;
                SegHorz       : TBitMap;
                SegVert       : TBitMap;
                SegDot        : TBitMap;
                SegPlus       : TBitMap;
                SegColon      : TBitMap;
                SegDeg        : TBitMap;
                ImgCache      : TBitMap;
                FColBlackLine : TColor;             { colors to draw the frame }
                FColGrayLine  : TColor;                          { -"- }
                FColWhiteLine : TColor;                          { -"- }
                FColorScheme  : TColorScheme;         { color scheme of frames }
                procedure SetColorText (value: TColor);
                procedure SetColorBakG (value: TColor);
                procedure SetCaption (value: string);
                procedure SetInterDigDist (value: integer);
                procedure SetMargin (value: integer);
                procedure SetNumDigits (value: integer);
                procedure SetFrameStyle (value: TFrameStyle);
                procedure SetColorScheme (Value: TColorScheme);
                procedure ProcessResize(Sender: TObject);
              protected
                procedure AssignTo (Dest: TPersistent); override;
                procedure Paint; override;
                procedure ColorizeSegments (Col: TColor);
                procedure CreateDigit (Digit: char; DecPoint: boolean);
                procedure CreateImageCache;
              public
                procedure   Assign(Source: TPersistent); override;
                constructor Create(AOwner: TComponent); override;
                destructor  Destroy; override;
              published
                property Align;
                property Anchors;
                property Caption: string read FCaption write SetCaption;
                property ColorBackGnd: TColor read FColorBakG write SetColorBakG;
                property ColorScheme: TColorScheme
                             read FColorScheme write SetColorScheme;
                property ColorText: TColor read FColorTxt write SetColorText;
                property FrameStyle: TFrameStyle
                             read FFrameStyle write SetFrameStyle;
                property InterDigDist: integer
                             read FInterDigDist write SetInterDigDist;
                property Margin: integer read FMargin write SetMargin;
                property NumDigits: integer read FNumDigits write SetNumDigits;
                property ParentShowHint;
                property PopupMenu;
                property ShowHint;
{$IFDEF GE_LEV17}
(**)              property StyleElements;
{$ENDIF}
                property Visible;
                property OnClick;
                property OnDblClick;
                property OnMouseMove;
                property OnMouseDown;
                property OnMouseUp;
                property OnResize;
              end;





Last Update: 2012-Oct-20