亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? shintmanager.pas

?? AlphaControls是一個Delphi標準控件的集合
?? PAS
?? 第 1 頁 / 共 5 頁
字號:
unit sHintManager;

{$I sDefs.inc}

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  sGraphUtils, sConst, sUtils, ExtCtrls, sStylePassive, IniFiles, sHtmlParse;

const
//@EXCLUDE
  DefStyle = hsEllipse;

type
  { Mouse positions relative to hint body. Can be mpLeftTop, mpLeftBottom, mpRightTop and mpRightBottom}
  TsMousePosition = (mpLeftTop, mpLeftBottom, mpRightTop, mpRightBottom);

  TsHintManager = class;

  { Component has been written for changing of standard hints outlook. For using this component just place it on Main form of your application. That all. After that you can change properties according as you want}
  TsHintManager = class(TComponent)
  private
    FsStyle : TsPassivePaintStyle;
    FBevelWidth : integer;
    FBlur: integer;
    FMarginH: integer;
    FMarginV : integer;
    FFont : TFont;
    FStyle : TsHintStyle;
    FRadius : integer;
    FExOffset : integer;
    FMaxWidth : integer;
    FPauseHide: integer;
    FHTMLMode : boolean;
    FPredefinitions: TsHintsPredefinitions;
    FHintsDesigner: integer;
    FOnShowHint: TShowHintEvent;
    procedure SetFont(const Value: TFont);
    procedure SetStyle(const Value: TsHintStyle);
    procedure SetNewStyle(hs: TsHintStyle);
    procedure SetPredefinitions(const Value: TsHintsPredefinitions);
  protected
    function DefStored: boolean;
  public
    FForm: TCustomForm;
    OldshowHintProc : pointer;
    procedure OnShowHintApp(var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo);
    constructor Create (AOwner: TComponent); override;
    destructor Destroy; override;
    procedure Loaded; override;
    procedure Invalidate;
    procedure SetCustomDefinition;
    { The Assign method copies all properties from a Source component to method owner}
//    procedure Assign(Source, Dest: TsHintManager);
    procedure AssignTo(Dest: TPersistent); override;
    procedure PaintBG(BGBmp : TBitmap; R : TRect; ci : TCacheInfo);

    { The SaveToFile method copies all properties of the method owner to file "FileName" in section "Section"}
    procedure SaveToFile(FileName, Section : string);
    { The LoadFromFile method copies all properties from file "FileName" to method owner}
    procedure LoadFromFile(FileName, Section : string);
    procedure ShowHint(p : TPoint; Hint : string); // For future improvement
  published
    property HTMLMode : boolean read FHTMLMode write FHTMLMode default False;
    { Main property for component drawing. (Compatible with sStyle property from TsStyle pack)}
    property sStyle : TsPassivePaintStyle read FsStyle write FsStyle;
    { Set a radius of corners for some styles of hints}
    property Radius : integer read FRadius write FRadius default 20;
    { Set a width of borders for some styles of hints}
    property BevelWidth : integer read FBevelWidth write FBevelWidth default 1;
    { Set a blur for borders for some styles of hints}
    property Blur : integer read FBlur write FBlur default 1;
    { Distance from mouse position to hint body}
    property ExOffset : integer read FExOffset write FExOffset default 32;
    { Pause for hints hiding in msecs}
    property PauseHide : integer read FPauseHide write FPauseHide default 5000;
    { Horizontal margin from borders to text}
    property MarginH : integer read FMarginH write FMarginH default 15;
    { Vertical margin from borders to text}
    property MarginV : integer read FMarginV write FMarginV default 10;
    { Maximal width for hints bodyes}
    property MaxWidth : integer read FMaxWidth write FMaxWidth default 200;
    { Styles for hints (@link(TsHintStyle)). Can be hsSimply, hsExtended, hsEllipse, hsStandard and hsNone. If Style = hsNone, then hints are not shown}
    property Style: TsHintStyle read FStyle write SetStyle default DefStyle;
    { Font for text in hints}
    property Font: TFont read FFont write SetFont;

    property PreDefinitions : TsHintsPredefinitions read FPredefinitions write SetPredefinitions default shEllipse;
    property HintsDesigner : integer read FHintsDesigner write FHintsDesigner;
    property OnShowHint: TShowHintEvent read FOnShowHint write FOnShowHint;
  end;

  { Custom parent window for all sHints styles. In this window hooked WM_ERASEBKGND, WM_NCPAINT and overrided methods @Link(CalcHintRect), @Link(Paint) and @Link(ActivateHint)}
  TsCustomHintWindow = class(THintWindow)
  private
    procedure WMEraseBkGND (var Message: TWMPaint); message WM_ERASEBKGND;
    procedure WMNCPaint (var Message: TWMPaint); message WM_NCPaint;
  protected
    { @EXCLUDE}
    dx, dy : integer;
    { @EXCLUDE}
    FMousePos : TsMousePosition;
    procedure CreateParams(var Params: TCreateParams); override;
    { Function GetMousePosition returns mouse position relative to hint body}
    function GetMousePosition : TPoint; virtual; abstract;
    { Method PaintShadow paints shadow for hint body(if needed)}
    procedure PaintShadow; virtual; abstract;
    { Method GetMask returns mask bitmap for hint body}
    function GetMask : TBitmap; virtual; abstract;
    { Method GetBody returns painted body for hint}
    function GetBody : TBitmap; virtual; abstract;
    { Function MainRect calculates and returns rectangle for hint body without shadow}
    function MainRect: TRect; dynamic;
    { Correct the shadow transparency value if hint body is transparent too}
    function ShadowTransparency : integer;
  public
    { Function CalcHintRect calculates and returns rectangle for hint window on the screen}
    function CalcHintRect(MaxWidth: Integer; const AHint: string; AData: Pointer): TRect; override;
    { @EXCLUDE}
//    function GetGradWidth: integer;
    { Method, that make drawing of hint}
    procedure Paint; override;
    { Method, that make background filling}
    procedure PaintBG(Bmp: TBitmap; aRect: TRect); dynamic;
    { Method, that make borders for hints}
    procedure PaintBorder(Bmp: TBitmap); dynamic;
    { Method writes text on hint body}
    procedure TextOut(Bmp: TBitmap); dynamic;
    { Overrided method for hint window activation}
    procedure ActivateHint(Rect: TRect; const AHint: string); override;
    { @EXCLUDE}
    constructor Create(AOwner:TComponent); override;
  end;

  { Hint window type for style hsSimply}
  TsSimplyHintWindow = class(TsCustomHintWindow)
  private
  protected
    procedure PaintShadow; override;
    function GetMask : TBitmap; override;
    function GetBody : TBitmap; override;
    function GetMousePosition : TPoint; override;
  public
    procedure PaintBorder(Bmp: TBitmap); override;
  end;

  { Hint window type for style hsComics}
  TsComicsHintWindow = class(TsCustomHintWindow)
  private
  protected
    function MainRect: TRect; override;
    procedure PaintShadow; override;
    function GetMask : TBitmap; override;
    function GetMousePosition : TPoint; override;
    function GetArrowPosition : TPoint;
  public
    function CalcHintRect(MaxWidth: Integer; const AHint: string; AData: Pointer): TRect; override;
    function GetBody : TBitmap; override;
    procedure PaintBorder(Bmp: TBitmap); override;
  end;

  { Hint window type for style hsEllipse}
  TsEllipseHintWindow = class(TsCustomHintWindow)
  private
  protected
    function GetArrowPosition : TPoint;
    function GetBody : TBitmap; override;
    function GetMask : TBitmap; override;
    function GetMousePosition : TPoint; override;
    function MainRect: TRect; override;
    procedure PaintShadow; override;
  public
    function CalcHintRect(MaxWidth: Integer; const AHint: string; AData: Pointer): TRect; override;
    procedure PaintBorder(Bmp: TBitmap); override;
  end;

  { Hint window type for style hsBalloon}
  TsBalloonHintWindow = class(TsCustomHintWindow)
  private
  protected
    procedure PaintShadow; override;
    function GetMask : TBitmap; override;
    function GetCustMask(Shadow : boolean) : TBitmap;
    function GetBody : TBitmap; override;
    function GetMousePosition : TPoint; override;
    function GetArrowPosition : TPoint;
  public
    { @EXCLUDE}
    BalloonCount : integer;
    { @EXCLUDE}
    Divid : integer;
    function CalcHintRect(MaxWidth: Integer; const AHint: string; AData: Pointer): TRect; override;
    { @EXCLUDE}
    constructor Create(AOwner:TComponent); override;
    function MainRect: TRect; override;
    procedure PaintBorder(Bmp: TBitmap); override;
  end;

var
  { @EXCLUDE}
  Manager : TsHintManager;
  ActiveManagers : integer = 0;

implementation

uses sGradient, sAlphaGraph;

{ TsHintManager }

procedure TsHintManager.AssignTo(Dest: TPersistent);
begin
  TsHintManager(Dest).FBevelWidth           := BevelWidth;
  TsHintManager(Dest).FBlur                 := Blur;
  TsHintManager(Dest).FExOffset             := ExOffset;

  TsHintManager(Dest).FFont.Charset         := Font.Charset;
  TsHintManager(Dest).FFont.Color           := Font.Color;
  TsHintManager(Dest).FFont.Name            := Font.Name;
  TsHintManager(Dest).FFont.Style           := Font.Style;
  TsHintManager(Dest).FFont.Size            := Font.Size;
  TsHintManager(Dest).FFont.Style           := Font.Style;
  TsHintManager(Dest).FMarginH              := MarginH;
  TsHintManager(Dest).FMarginV              := MarginV;
  TsHintManager(Dest).FPauseHide            := FPauseHide;
  TsHintManager(Dest).FRadius               := Radius;

  TsHintManager(Dest).sStyle.Background.Gradient.Data := sStyle.Background.Gradient.Data;
  TsHintManager(Dest).sStyle.Background.Gradient.Percent := sStyle.Background.Gradient.Percent;
  TsHintManager(Dest).sStyle.Background.Image.Image.Assign(sStyle.Background.Image.Image);
  TsHintManager(Dest).sStyle.Background.Image.Percent   := sStyle.Background.Image.Percent;

  TsHintManager(Dest).sStyle.Painting.Bevel              := sStyle.Painting.Bevel;
  TsHintManager(Dest).sStyle.Painting.Color              := sStyle.Painting.Color;
  TsHintManager(Dest).sStyle.Painting.ColorBorderTop     := sStyle.Painting.ColorBorderTop;
  TsHintManager(Dest).sStyle.Painting.ColorBorderBottom  := sStyle.Painting.ColorBorderBottom;
  TsHintManager(Dest).sStyle.Painting.Transparency       := sStyle.Painting.Transparency;

  TsHintManager(Dest).sStyle.Shadow.Blur            := sStyle.Shadow.Blur;
  TsHintManager(Dest).sStyle.Shadow.Color           := sStyle.Shadow.Color;
  TsHintManager(Dest).sStyle.Shadow.Enabled         := sStyle.Shadow.Enabled;
  TsHintManager(Dest).sStyle.Shadow.Offset          := sStyle.Shadow.Offset;
  TsHintManager(Dest).sStyle.Shadow.Transparency    := sStyle.Shadow.Transparency;

  TsHintManager(Dest).Style := Style;

  TsHintManager(Dest).FPreDefinitions        := PreDefinitions;
end;

constructor TsHintManager.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);
{
  if ActiveManagers > 0 then begin
    ShowWarning('Only one exemplar of TsHintManager must be used in application!');
  end;
}
  inc(ActiveManagers);
  FsStyle := TsPassivePaintStyle.Create(Self);
  FForm := GetParentForm(TControl(AOwner));
  FFont := TFont.Create;
  sStyle.COC := COC_TsHintManager;

  sStyle.GroupIndex := -101;
  sStyle.Background.ListenMSG := False;

  FRadius := 20;
  FBevelWidth :=  1;
  FBlur := 1;
  FExOffset := 32;
  FPauseHide := 5000;
  FMarginH := 15;
  FMarginV := 10;
  FMaxWidth := 200;
  FStyle := DefStyle;

  FHTMLMode := False;
  FPauseHide := 5000;
  Application.HintPause := 500;
  Application.HintShortPause := 200;

  FPreDefinitions := shEllipse;
  if csDesigning in ComponentState then begin
    SetPredefinitions(FPreDefinitions);
  end
  else Application.OnShowHint := OnShowHintApp;
end;

function TsHintManager.DefStored: boolean;
begin
  Result := FPredefinitions = shCustom;
end;

destructor TsHintManager.Destroy;
begin
  FreeAndNil(FsStyle);
  FreeAndNil(FFont);
  dec(ActiveManagers);
  inherited;
end;

procedure TsHintManager.Invalidate;
begin
  PreDefinitions := FPreDefinitions;
  if Assigned(sStyle) then begin
    SetNewStyle(Style);
  end;
end;

procedure TsHintManager.Loaded;
begin          
  inherited;
  if Assigned(sStyle) then begin
    SetNewStyle(Style);
  end;
end;

procedure TsHintManager.LoadFromFile(FileName, Section: string);
var
  IniFile : TIniFile;
begin
  if not FileExists(FileName) then Exit;
  IniFile := TIniFile.Create(FileName);

  // Background
  with sStyle do begin
    Style := aHintStyles[IniFile.ReadInteger(Section, 'HintStyle', 0)];
    Radius := IniFile.ReadInteger(Section, 'Radius', 8);
    Blur := IniFile.ReadInteger(Section, 'Blur', 0);
    BevelWidth := IniFile.ReadInteger(Section, 'BevelWidth', 1);
    MarginV := IniFile.ReadInteger(Section, 'MarginV', 8);
    MarginH := IniFile.ReadInteger(Section, 'MarginH', 8);
    MaxWidth := IniFile.ReadInteger(Section, 'MaxWidth', 200);
    ExOffset := IniFile.ReadInteger(Section, 'ExOffset', 32);


    Background.Gradient.Data   := IniFile.ReadString(Section, 'Gradient_Data', '');
    Background.Gradient.Percent   := IniFile.ReadInteger(Section, 'Gradient_Percent', integer(70));
    Background.Image.ImageName := IniFile.ReadString(Section, 'Pattern', '');
//    sGraphUtils.LoadJpegOrBmp(Background.Image, Background.ImageFileName, False);
    Background.Image.Percent   := IniFile.ReadInteger(Section, 'Image_Percent', integer(70));

    // Painting
    Painting.Color     := IniFile.ReadInteger(Section, 'Color', integer(clBtnFace));
    Painting.ColorBorderTop    := IniFile.ReadInteger(Section, 'ColorBorderTop', integer(clWhite));
    Painting.ColorBorderBottom := IniFile.ReadInteger(Section, 'ColorBorderBottom', integer(clBtnShadow));
    Painting.Bevel             := aControlBevels[IniFile.ReadInteger(Section, 'PaintBevel', 1)];
    Painting.Transparency      := IniFile.ReadInteger(Section, 'PaintingTransparency', 25);

    // Shadow
    Shadow.Color   := IniFile.ReadInteger(Section, 'ShadowColor', integer(clBlack));
    Shadow.Enabled := IniFile.ReadString(Section, 'ShadowEnabled', 'True') = 'True';
    Shadow.Offset  := IniFile.ReadInteger(Section, 'ShadowOffset', 8);
    Shadow.Blur    := IniFile.ReadInteger(Section, 'ShadowBlur', 4);
    Shadow.Transparency := IniFile.ReadInteger(Section, 'ShadowTransparency', 60);

  end;

  FreeAndNil(IniFile);
end;

procedure TsHintManager.OnShowHintApp(var HintStr: string; var CanShow: Boolean; var HintInfo: THintInfo);
begin
  if assigned(FOnShowHint)
    then FOnShowHint(HintStr, CanShow, HintInfo)
    else inherited;
end;

procedure TsHintManager.PaintBG(BGBmp: TBitmap; R: TRect; ci: TCacheInfo);
var
  aRect, cRect: TRect;
  Bmp : TBitmap;
  TransColor : TsColor;
  iDrawed : boolean;
  procedure FillCanvas(bmp : TBitmap); begin
    BMP.Canvas.Pen.Style := psClear;
    BMP.Canvas.Brush.Style := bsSolid;
    BMP.Canvas.Brush.Color := ColorToRGB(FsStyle.Painting.Color);
    BMP.Canvas.Rectangle(aRect);
  end;
  procedure PaintAddons; begin
    iDrawed := False;
    // BGImage painting
    if (FsStyle.Background.Image.Percent > 0) and Assigned(FsStyle.Background.Image.Image)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
另类的小说在线视频另类成人小视频在线 | 日本道精品一区二区三区| 日本高清免费不卡视频| 日韩欧美一级二级三级| 一区二区三区在线免费| 精品无码三级在线观看视频 | 中文子幕无线码一区tr| 性做久久久久久久免费看| 成人性色生活片免费看爆迷你毛片| 9191成人精品久久| 亚洲码国产岛国毛片在线| 国产激情视频一区二区在线观看| 欧美日韩一区二区三区视频| 亚洲人妖av一区二区| 国产自产高清不卡| 欧美一三区三区四区免费在线看| 伊人婷婷欧美激情| 丰满少妇久久久久久久| 日韩三级av在线播放| 亚洲永久精品国产| 91麻豆免费看| 国产精品网站导航| 国产不卡高清在线观看视频| 精品国产一区二区三区久久影院| 亚洲国产视频在线| 91精品福利在线| 一区二区三区在线观看欧美| 不卡视频一二三四| 中文字幕免费观看一区| 国产一本一道久久香蕉| 久久午夜羞羞影院免费观看| 毛片一区二区三区| 日韩欧美电影在线| 精品在线一区二区| 国产性天天综合网| 国产精品一级片在线观看| 久久综合九色综合97婷婷| 美女视频黄频大全不卡视频在线播放| 在线91免费看| 久久精品国产亚洲高清剧情介绍| 日韩免费电影一区| 国产91精品一区二区麻豆亚洲| 久久久久久久久一| 丁香一区二区三区| 久久免费视频一区| 麻豆成人免费电影| 久久亚洲一区二区三区明星换脸| 国产综合久久久久久鬼色| 国产精品素人视频| 一本大道av伊人久久综合| 一区二区三区在线观看网站| 欧美日韩国产一区| 奇米精品一区二区三区在线观看| 日韩一级精品视频在线观看| 韩国精品主播一区二区在线观看 | 亚洲人成精品久久久久| 色综合久久久久综合体| 亚洲成人av中文| 日韩欧美一区电影| 丁香六月久久综合狠狠色| 亚洲视频在线一区二区| 91福利国产精品| 日韩电影一区二区三区| 欧美激情一区二区三区四区| 在线视频一区二区免费| 美美哒免费高清在线观看视频一区二区 | 欧美日韩国产三级| 久久激情五月激情| 中文字幕亚洲精品在线观看| 欧美日韩一区不卡| 国产成人av电影在线播放| 亚洲乱码中文字幕| 日韩视频123| 99热精品国产| 久久精品国产在热久久| 亚洲精品自拍动漫在线| 精品久久久久久久久久久院品网| 不卡的av在线| 精品写真视频在线观看| 亚洲成人自拍偷拍| 国产精品女同一区二区三区| 欧美狂野另类xxxxoooo| 成人精品鲁一区一区二区| 日韩黄色一级片| 国产区在线观看成人精品| 欧美人体做爰大胆视频| 99国产精品国产精品久久| 麻豆视频观看网址久久| 一区二区三区在线不卡| 久久精品无码一区二区三区| 欧美久久久影院| 91免费国产视频网站| 国产成人综合在线观看| 日本美女一区二区三区| 一区二区视频免费在线观看| 国产人成亚洲第一网站在线播放| 日韩欧美一二三四区| 欧美日韩免费电影| 91丨porny丨最新| 青青草一区二区三区| 亚洲综合免费观看高清完整版在线| 亚洲国产精品成人综合| 欧美mv和日韩mv国产网站| 欧美日韩激情在线| 91久久精品一区二区二区| 本田岬高潮一区二区三区| 国产一区欧美日韩| 国产一区二区精品在线观看| 日韩高清不卡在线| 婷婷综合久久一区二区三区| 一区二区三区精品在线| 中文字幕一区av| 国产精品色哟哟| 国产精品沙发午睡系列990531| 久久综合一区二区| 欧美精品一区二区三区很污很色的 | 日韩一区和二区| 欧美日产在线观看| 欧美精品久久一区| 欧美精品成人一区二区三区四区| 色诱亚洲精品久久久久久| voyeur盗摄精品| 成人av网站在线| 99视频在线精品| 日本高清免费不卡视频| 欧美三电影在线| 欧美日本一区二区三区| 欧美精品成人一区二区三区四区| 欧美狂野另类xxxxoooo| 欧美一区二区久久久| 日韩精品在线看片z| 久久久精品免费观看| 亚洲国产精品国自产拍av| 国产精品国产三级国产aⅴ中文| 国产精品青草综合久久久久99| 国产精品亲子乱子伦xxxx裸| 亚洲欧美日韩中文字幕一区二区三区| 亚洲精品视频在线观看免费| 亚洲国产精品久久人人爱| 免费在线欧美视频| 国产精品一区在线观看乱码| 成人伦理片在线| 91国产成人在线| 欧美日韩国产成人在线免费| 日韩欧美视频一区| 国产精品久久久久天堂| 亚洲成人福利片| 国产在线精品一区二区不卡了| 成人午夜免费av| 欧美久久一二区| 国产日产欧美一区二区视频| 亚洲另类在线一区| 免费亚洲电影在线| 成人一区二区视频| 欧美日韩色综合| 欧美精品一区二区三区在线| 中文字幕在线观看不卡视频| 午夜免费久久看| 国产精品18久久久久久久久| 在线观看av一区| 欧美mv日韩mv亚洲| 一区二区三区四区五区视频在线观看| 青椒成人免费视频| 色综合久久久久| 久久午夜老司机| 丝袜亚洲精品中文字幕一区| 成人国产精品免费观看| 日韩一级片网站| 亚洲精品成a人| 国产黄色精品视频| 91精品国产综合久久香蕉麻豆| 国产精品初高中害羞小美女文| 日本va欧美va瓶| 91蜜桃在线免费视频| 国产人久久人人人人爽| 日韩在线一二三区| av欧美精品.com| 久久先锋影音av鲁色资源网| 午夜国产精品一区| 色菇凉天天综合网| 国产校园另类小说区| 久久97超碰国产精品超碰| 欧美日韩卡一卡二| 亚洲视频小说图片| 国产成人av影院| 日韩免费高清视频| 日本美女视频一区二区| 欧美丰满一区二区免费视频| 亚洲精品一二三四区| 成人av片在线观看| 国产亚洲精品资源在线26u| 免费亚洲电影在线| 日韩视频在线永久播放| 日欧美一区二区| 欧美亚洲愉拍一区二区| 亚洲精品乱码久久久久久久久 | 国产高清视频一区| 精品欧美黑人一区二区三区| 肉色丝袜一区二区| 4438x亚洲最大成人网|