📄 jvqwinamplabel.pas
字号:
{******************************************************************************}
{* WARNING: JEDI VCL To CLX Converter generated unit. *}
{* Manual modifications will be lost on next release. *}
{******************************************************************************}
{-----------------------------------------------------------------------------
The contents of this file are subject to the Mozilla Public License
Version 1.1 (the "License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.mozilla.org/MPL/MPL-1.1.html
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for
the specific language governing rights and limitations under the License.
The Original Code is: JvWinampLabel.PAS, released on 2001-02-28.
The Initial Developer of the Original Code is S閎astien Buysse [sbuysse att buypin dott com]
Portions created by S閎astien Buysse are Copyright (C) 2001 S閎astien Buysse.
All Rights Reserved.
Contributor(s): Michael Beck [mbeck att bigfoot dott com].
You may retrieve the latest version of this file at the Project JEDI's JVCL home page,
located at http://jvcl.sourceforge.net
Known Issues:
-----------------------------------------------------------------------------}
// $Id: JvQWinampLabel.pas,v 1.25 2005/02/06 14:06:32 asnepvangers Exp $
unit JvQWinampLabel;
{$I jvcl.inc}
interface
uses
SysUtils, Classes, QWindows, QMessages, QGraphics, QControls, QStdCtrls,
JvQExStdCtrls;
type
TJvWinampThread = class(TThread)
protected
procedure Draw;
procedure Execute; override;
public
FDelay: Cardinal;
FOnDraw: TNotifyEvent;
end;
TJvWinampLabel = class(TJvExCustomLabel)
private
FBitmap: TBitmap;
FPicture: TPicture;
FTimer: TJvWinampThread;
FScrollInterval: Cardinal;
FActive: Boolean;
FStretch: Boolean;
FScrollTextBy: Integer;
FCurPos: Integer;
FWait: Integer;
FWaiting: Boolean;
FScale: Real;
// (p3) renamed
FText: TCaption;
FCharHeight: Integer;
FCharWidth: Integer;
function GetScrollTextBy: Integer;
procedure SetActive(Value: Boolean);
procedure SetStretch(Value: Boolean);
procedure SetInterval(Value: Cardinal);
procedure SetPicture(Value: TPicture);
procedure FillBitmap;
procedure Activate;
procedure Deactivate;
procedure UpdatePos;
procedure DoOnTimer(Sender: TObject);
protected
function GetText: TCaption; override;
procedure SetText(const Value: TCaption); override;
function GetCol(Ch: WideChar): Word;
function GetRow(Ch: WideChar): Word;
procedure ColorChanged; override;
procedure Paint; override;
// (rom) made protected property
property CharHeight: Integer read FCharHeight;
property CharWidth: Integer read FCharWidth;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
published
property Active: Boolean read FActive write SetActive;
property Stretch: Boolean read FStretch write SetStretch;
property ScrollTextBy: Integer read GetScrollTextBy write FScrollTextBy;
property ScrollInterval: Cardinal read FScrollInterval write SetInterval;
property WaitOnEnd: Integer read FWait write FWait;
property Skin: TPicture read FPicture write SetPicture;
property Color;
property Text: TCaption read FText write SetText;
property Align;
property Alignment;
property FocusControl;
property DragMode;
property ParentColor;
property ShowHint;
property ParentShowHint;
property Layout;
property Left;
property Transparent;
property PopupMenu;
property Visible;
property Top;
property Height;
property Width;
property Cursor;
property Enabled;
property Hint;
property OnClick;
property OnDblClick;
property OnDragDrop;
property OnDragOver;
property OnEndDrag;
property OnMouseMove;
property OnMouseDown;
property OnMouseUp;
property OnStartDrag;
end;
implementation
uses
{$IFDEF UNITVERSIONING}
JclUnitVersioning,
{$ENDIF UNITVERSIONING}
JvQTypes, JvQResources;
{$IFDEF MSWINDOWS}
{$R ..\Resources\JvWinampLabel.res}
{$ENDIF MSWINDOWS}
{$IFDEF UNIX}
{$R ../Resources/JvWinampLabel.res}
{$ENDIF UNIX}
const
// (p3) fixed as suggested by Remko Bonte
Row1: string[31] = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ"@ ';
Row2: string[31] = '0123456789._:()-''!_+\/[]^&%.=$#';
Row3: string[31] = '轮
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -