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

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

?? gradedit.pas

?? RX Library contains a large number of components, objects and routines for Borland Delphi with full
?? PAS
字號:
{*******************************************************}
{                                                       }
{     Delphi VCL Extensions (RX)                        }
{                                                       }
{     Copyright (c) 1998 Master-Bank                    }
{     Copyright (c) 1998 Ritting Information Systems    }
{                                                       }
{*******************************************************}

unit GradEdit;

{$I RX.INC}

interface

uses
  Windows, SysUtils, Messages, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, Mask, ToolEdit, RxGrdCpt, RTLConsts, DesignIntf, DesignEditors, VCLEditors, RXCtrls, Placemnt;

{$IFNDEF RX_D4}
type
  IDesigner = TDesigner;
{$ENDIF}

type
  TGradCaptionsEditor = class(TForm)
    ApplyButton: TButton;
    CancelButton: TButton;
    OkButton: TButton;
    GroupBox2: TGroupBox;
    Label1: TLabel;
    Label3: TLabel;
    CaptionText: TEdit;
    CaptionInactiveColor: TComboBox;
    GroupBox1: TGroupBox;
    CaptionList: TTextListBox;
    NewButton: TButton;
    DeleteButton: TButton;
    CaptionParentFont: TCheckBox;
    CaptionGlueNext: TCheckBox;
    CaptionVisible: TCheckBox;
    Label2: TLabel;
    CaptionFont: TComboEdit;
    GradientCaption: TRxGradientCaption;
    FontDialog: TFontDialog;
    ColorDialog: TColorDialog;
    FormStorage: TFormStorage;
    procedure FormCreate(Sender: TObject);
    procedure CaptionListClick(Sender: TObject);
    procedure CaptionListDragDrop(Sender, Source: TObject; X, Y: Integer);
    procedure CaptionListDragOver(Sender, Source: TObject; X, Y: Integer;
      State: TDragState; var Accept: Boolean);
    procedure NewButtonClick(Sender: TObject);
    procedure DeleteButtonClick(Sender: TObject);
    procedure OkButtonClick(Sender: TObject);
    procedure ApplyButtonClick(Sender: TObject);
    procedure CaptionInactiveColorDblClick(Sender: TObject);
    procedure ControlExit(Sender: TObject);
    procedure CaptionTextChange(Sender: TObject);
    procedure CaptionFontButtonClick(Sender: TObject);
    procedure CheckBoxClick(Sender: TObject);
  private
    { Private declarations }
    FComponent: TRxGradientCaption;
    FDesigner: IDesigner;
    FUpdating: Boolean;
    procedure AddColorItem(const ColorName: string);
    procedure EnableControls(Enable: Boolean);
    procedure UpdateCaptionList(Index: Integer);
    procedure ReadControls;
    procedure UpdateControls;
    procedure ClearControls;
    function GetActiveCaption: TRxCaption;
    procedure ApplyChanges;
  public
    { Public declarations }
    procedure SetGradientCaption(Component: TRxGradientCaption;
      Designer: IDesigner);
    property ActiveCaption: TRxCaption read GetActiveCaption;
  end;

{ TGradientCaptionEditor }

  TGradientCaptionEditor = class(TComponentEditor)
    procedure Edit; override;
    procedure ExecuteVerb(Index: Integer); override;
    function GetVerb(Index: Integer): string; override;
    function GetVerbCount: Integer; override;
  end;

{$IFNDEF RX_D3}

{ TGradientCaptionsProperty }

  TGradientCaptionsProperty = class(TClassProperty)
    function GetAttributes: TPropertyAttributes; override;
    procedure Edit; override;
  end;
  
{$ENDIF}

function EditGradientCaption(Component: TRxGradientCaption;
  Designer: IDesigner): Boolean;

implementation

uses VCLUtils, BoxProcs, RxConst, RxLConst;

{$R *.DFM}

function EditGradientCaption(Component: TRxGradientCaption; Designer: IDesigner): Boolean;
  var gce : TGradCaptionsEditor;
begin
  gce := TGradCaptionsEditor.Create(Application);
  try
    gce.SetGradientCaption(Component, Designer);
    Result := gce.ShowModal = mrOk;
  finally
    gce.Free;
  end;
end;

{ TGradientCaptionEditor }

procedure TGradientCaptionEditor.Edit;
begin
  EditGradientCaption(TRxGradientCaption(Component), Designer);
end;

procedure TGradientCaptionEditor.ExecuteVerb(Index: Integer);
begin
  if Index = 0 then Edit;
end;

function TGradientCaptionEditor.GetVerb(Index: Integer): string;
begin
  if Index = 0 then Result := LoadStr(srCaptionDesigner)
  else Result := '';
end;

function TGradientCaptionEditor.GetVerbCount: Integer;
begin
  Result := 1;
end;

{$IFNDEF RX_D3}

{ TGradientCaptionsProperty }

function TGradientCaptionsProperty.GetAttributes: TPropertyAttributes;
begin
  Result := [paDialog, paReadOnly];
end;

procedure TGradientCaptionsProperty.Edit;
begin
  if EditGradientCaption(TRxGradientCaption(GetComponent(0)), Designer) then
    Modified;
end;

{$ENDIF RX_D3}

{ TGradCaptionsEditor }

procedure TGradCaptionsEditor.UpdateCaptionList(Index: Integer);
var
  I, Save: Integer;
begin
  if Index >= 0 then Save := Index
  else Save := CaptionList.ItemIndex;
  CaptionList.Items.BeginUpdate;
  try
    CaptionList.Items.Clear;
    for I := 0 to GradientCaption.Captions.Count - 1 do
      CaptionList.Items.Add(Format('%s[%d]', [LoadStr(srGradientCaptions), I]));
    if Save < 0 then Save := 0;
    if Save >= CaptionList.Items.Count then
      Save := CaptionList.Items.Count - 1;
  finally
    CaptionList.Items.EndUpdate;
    CaptionList.ItemIndex := Save;
  end;
end;

function TGradCaptionsEditor.GetActiveCaption: TRxCaption;
var
  I: Integer;
begin
  Result := nil;
  I := CaptionList.ItemIndex;
  if (I >= 0) and (I < GradientCaption.Captions.Count) then
    Result := GradientCaption.Captions[I];
end;

procedure TGradCaptionsEditor.SetGradientCaption(Component: TRxGradientCaption;
  Designer: IDesigner);
begin
  FComponent := Component;
  FDesigner := Designer;
  if Component <> nil then begin
    with GradientCaption do begin
      Active := False;
      Font := Component.Font;
      DefaultFont := Component.DefaultFont;
      FontInactiveColor := Component.FontInactiveColor;
      GradientActive := Component.GradientActive;
      GradientInactive := Component.GradientInactive;
      StartColor := Component.StartColor;
      HideDirection := Component.HideDirection;
      GradientSteps := Component.GradientSteps;
      Captions := Component.Captions;
      if Component.Name <> '' then
        FormCaption := Format('%s.%s', [Component.Name,
          LoadStr(srGradientCaptions)])
      else
        FormCaption := Format('%s.%s', [Component.ClassName,
          LoadStr(srGradientCaptions)]);
      Active := True;
    end;
  end;
  UpdateCaptionList(-1);
  UpdateControls;
end;

procedure TGradCaptionsEditor.ApplyChanges;
begin
  ReadControls;
  if Assigned(FComponent) then begin
    FComponent.Captions := GradientCaption.Captions;
    if Assigned(FDesigner) then FDesigner.Modified;
  end;
end;

procedure TGradCaptionsEditor.AddColorItem(const ColorName: string);
begin
  CaptionInactiveColor.Items.Add(ColorName);
end;

procedure TGradCaptionsEditor.UpdateControls;
begin
  if ActiveCaption = nil then begin
    ClearControls;
    EnableControls(False);
  end else
  with ActiveCaption do begin
    FUpdating := True;
    try
      FontDialog.Font := Font;
      CaptionText.Text := Caption;
      CaptionInactiveColor.ItemIndex := -1;
      CaptionInactiveColor.Text := ColorToString(InactiveColor);
      CaptionFont.Text := Font.Name;
      CaptionParentFont.Checked := ParentFont;
      CaptionGlueNext.Checked := GlueNext;
      CaptionVisible.Checked := Visible;
      EnableControls(True);
    finally
      FUpdating := False;
    end;
  end;
end;

procedure TGradCaptionsEditor.EnableControls(Enable: Boolean);
begin
  CaptionText.Enabled := Enable;
  CaptionInactiveColor.Enabled := Enable;
  CaptionFont.Enabled := Enable;
  CaptionParentFont.Enabled := Enable;
  CaptionGlueNext.Enabled := Enable;
  CaptionVisible.Enabled := Enable;
  DeleteButton.Enabled := Enable;
end;

procedure TGradCaptionsEditor.ClearControls;
begin
  FUpdating := True;
  try
    CaptionText.Text := '';
    CaptionInactiveColor.ItemIndex := -1;
    CaptionInactiveColor.Text := '';
    CaptionFont.Text := '';
    CaptionParentFont.Checked := False;
    CaptionGlueNext.Checked := False;
    CaptionVisible.Checked := False;
  finally
    FUpdating := False;  
  end;
end;

procedure TGradCaptionsEditor.ReadControls;
begin
  if not FUpdating and (ActiveCaption <> nil) then begin
    GradientCaption.Captions.BeginUpdate;
    FUpdating := True;
    try
      with ActiveCaption do begin
        Caption := CaptionText.Text;
        InactiveColor := StringToColor(CaptionInactiveColor.Text);
        ParentFont := CaptionParentFont.Checked;
        GlueNext := CaptionGlueNext.Checked;
        Visible := CaptionVisible.Checked;
      end;
    finally
      GradientCaption.Captions.EndUpdate;
      FUpdating := False;
    end;
  end;
end;

procedure TGradCaptionsEditor.FormCreate(Sender: TObject);
begin
  FormStorage.IniFileName := SDelphiKey;
  CaptionInactiveColor.Items.BeginUpdate;
  try
    GetColorValues(AddColorItem);
  finally
    CaptionInactiveColor.Items.EndUpdate;
  end;
end;

procedure TGradCaptionsEditor.CaptionListClick(Sender: TObject);
begin
  if not FUpdating then UpdateControls;
end;

procedure TGradCaptionsEditor.CaptionListDragDrop(Sender, Source: TObject; X,
  Y: Integer);
var
  I: Integer;
begin
  I := CaptionList.ItemAtPos(Point(X, Y), True);
  if (I >= 0) and (I < CaptionList.Items.Count) and
    (I <> CaptionList.ItemIndex) then
  begin
    GradientCaption.MoveCaption(CaptionList.ItemIndex, I);
    CaptionList.ItemIndex := I;
    if not FUpdating then UpdateControls;
  end;
end;

procedure TGradCaptionsEditor.CaptionListDragOver(Sender, Source: TObject; X,
  Y: Integer; State: TDragState; var Accept: Boolean);
begin
  BoxDragOver(CaptionList, Source, X, Y, State, Accept, CaptionList.Sorted);
end;

procedure TGradCaptionsEditor.NewButtonClick(Sender: TObject);
begin
  if GradientCaption.Captions.Add <> nil then begin
    UpdateCaptionList(GradientCaption.Captions.Count - 1);
    UpdateControls;
    if CaptionText.CanFocus then ActiveControl := CaptionText; 
  end;
end;

procedure TGradCaptionsEditor.DeleteButtonClick(Sender: TObject);
begin
  if ActiveCaption <> nil then begin
    ActiveCaption.Free;
    UpdateCaptionList(-1);
    UpdateControls;
  end;
end;

procedure TGradCaptionsEditor.OkButtonClick(Sender: TObject);
begin
  ApplyChanges;
  ModalResult := mrOk;
end;

procedure TGradCaptionsEditor.ApplyButtonClick(Sender: TObject);
begin
  ApplyChanges;
end;

procedure TGradCaptionsEditor.CaptionInactiveColorDblClick(
  Sender: TObject);
begin
  with ColorDialog do begin
    Color := StringToColor(CaptionInactiveColor.Text);
    if Execute then begin
      CaptionInactiveColor.Text := ColorToString(Color);
      if not FUpdating and (ActiveCaption <> nil) then
        ActiveCaption.InactiveColor := Color;
    end;
  end;
end;

procedure TGradCaptionsEditor.ControlExit(Sender: TObject);
begin
  if not FUpdating then ReadControls;
end;

procedure TGradCaptionsEditor.CaptionTextChange(Sender: TObject);
begin
  if not FUpdating and (ActiveCaption <> nil) then
    ActiveCaption.Caption := CaptionText.Text;
end;

procedure TGradCaptionsEditor.CaptionFontButtonClick(Sender: TObject);
begin
  if ActiveCaption <> nil then begin
    with FontDialog do begin
      Font := ActiveCaption.Font;
      Font.Color := ColorToRGB(ActiveCaption.Font.Color);
      if Execute then begin
        FUpdating := True;
        try
          CaptionFont.Text := Font.Name;
          ActiveCaption.Font := Font;
          CaptionParentFont.Checked := ActiveCaption.ParentFont;
        finally
          FUpdating := False;
        end;
      end;
    end;
  end
  else Beep;
end;

procedure TGradCaptionsEditor.CheckBoxClick(Sender: TObject);
begin
  if not FUpdating then ReadControls;
end;

end.

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品在线观| 久久狠狠亚洲综合| 亚洲夂夂婷婷色拍ww47| 国产91精品一区二区麻豆亚洲| 精品国产污网站| 精品一区二区日韩| 欧美成人女星排名| 国产一区二区三区免费播放| 久久在线免费观看| 国产一区在线观看视频| 久久久影视传媒| 成人午夜视频在线观看| 国产欧美日韩在线视频| 国产精品一区三区| 国产精品久久久久桃色tv| 97成人超碰视| 亚洲一二三四区| 欧美老女人第四色| 蜜臀av性久久久久蜜臀aⅴ流畅| 在线免费不卡视频| 亚洲大片精品永久免费| 日韩欧美亚洲国产另类| 韩国v欧美v亚洲v日本v| 久久精品视频免费| 91久久精品午夜一区二区| 裸体在线国模精品偷拍| 亚洲色图另类专区| 日韩女优电影在线观看| 成人美女在线视频| 天堂在线亚洲视频| 亚洲欧洲av另类| 日韩一二三四区| 91精品一区二区三区在线观看| 精品综合免费视频观看| 亚洲日穴在线视频| 久久伊人中文字幕| 欧美曰成人黄网| 国产成人8x视频一区二区 | 亚洲视频免费看| 日韩一级大片在线观看| 在线观看欧美日本| 国产成人综合在线播放| 日韩不卡手机在线v区| 亚洲欧洲av一区二区三区久久| 欧美va亚洲va| 欧美亚洲综合久久| 粉嫩aⅴ一区二区三区四区 | 亚洲欧美精品午睡沙发| 欧美精品一区男女天堂| 欧美影院精品一区| 91免费看`日韩一区二区| 激情成人午夜视频| 免费在线视频一区| 亚洲国产aⅴ成人精品无吗| 国产精品萝li| 国产三级一区二区三区| 欧美一级片在线观看| 欧美一a一片一级一片| 不卡视频免费播放| 国产91露脸合集magnet| 国产自产高清不卡| 麻豆91在线观看| 奇米在线7777在线精品| 视频在线在亚洲| 亚洲国产精品视频| 一区二区三区在线观看国产| 无吗不卡中文字幕| 综合久久给合久久狠狠狠97色 | 国产乱子轮精品视频| 日日骚欧美日韩| 日韩高清欧美激情| 日韩电影在线免费看| 亚洲国产精品一区二区久久| 亚洲午夜久久久久久久久电影网 | 欧美亚洲综合色| 欧美熟乱第一页| 欧美日韩高清在线播放| 欧美日韩久久不卡| 91精品国产福利在线观看 | 久88久久88久久久| 国产剧情在线观看一区二区 | av不卡在线观看| 91香蕉视频污在线| 欧美亚洲精品一区| 91精品久久久久久久久99蜜臂| 91精品国产综合久久小美女| 日韩一区二区三区视频| 精品理论电影在线| 欧美国产精品一区二区| 亚洲日本乱码在线观看| 一片黄亚洲嫩模| 偷拍亚洲欧洲综合| 狂野欧美性猛交blacked| 国产麻豆成人传媒免费观看| 丁香婷婷综合五月| 色婷婷综合在线| 日韩一区二区免费在线观看| 亚洲同性gay激情无套| 一区二区三区四区视频精品免费| 性久久久久久久久久久久 | 国产精品1区2区| 91色porny蝌蚪| 欧美无人高清视频在线观看| 91精品国产手机| 国产欧美精品一区二区三区四区 | 亚洲乱码国产乱码精品精98午夜| 亚洲激情男女视频| 毛片一区二区三区| 成人免费毛片app| 欧美麻豆精品久久久久久| 久久久亚洲精品石原莉奈| 亚洲色图欧美偷拍| 蜜臀精品一区二区三区在线观看 | 一本一道波多野结衣一区二区 | 久久久亚洲精华液精华液精华液| 中文乱码免费一区二区| 午夜视频在线观看一区| 国产精品综合一区二区| 欧美亚州韩日在线看免费版国语版| 91精品国产色综合久久不卡蜜臀| 国产免费久久精品| 午夜在线电影亚洲一区| 国产99精品国产| 555www色欧美视频| 中文字幕一区二区三区色视频 | 亚洲午夜精品17c| 成人午夜在线视频| 欧美一区二区三区思思人| 亚洲色图丝袜美腿| 国产大陆精品国产| 91麻豆精品国产91久久久 | 激情亚洲综合在线| 欧美少妇xxx| 综合激情网...| 国产在线精品一区二区| 欧美日韩综合在线免费观看| 国产精品每日更新| 韩国av一区二区三区四区| 欧美日韩不卡在线| 亚洲精品成人精品456| 国产99一区视频免费| 日韩午夜小视频| 视频一区中文字幕国产| 色综合亚洲欧洲| 国产精品免费视频观看| 国产精品亚洲一区二区三区在线| 91麻豆精品国产91久久久使用方法| 一区二区三区蜜桃| 91在线你懂得| 中文字幕一区二区三区精华液| 国产一二三精品| 欧美电影免费观看高清完整版 | 国产不卡高清在线观看视频| 日韩一卡二卡三卡国产欧美| 性欧美大战久久久久久久久| 色网站国产精品| 亚洲免费看黄网站| 97久久精品人人澡人人爽| 亚洲成人av福利| 欧美日韩精品一区二区三区| 亚洲图片一区二区| 欧美在线观看禁18| 亚洲午夜免费视频| 欧美日韩综合一区| 偷拍与自拍一区| 欧美一区二区三区免费视频 | 日本道免费精品一区二区三区| 亚洲欧美一区二区三区极速播放| av成人免费在线观看| 中文字幕亚洲电影| 91福利在线观看| 性感美女久久精品| 日韩视频免费观看高清完整版 | 亚洲另类中文字| 欧美日韩一区在线| 午夜精品一区二区三区电影天堂 | 国产亚洲综合色| 处破女av一区二区| 亚洲精品成a人| 欧美日韩成人综合| 另类综合日韩欧美亚洲| 亚洲精品在线免费播放| 成人综合婷婷国产精品久久 | 成人精品小蝌蚪| 亚洲毛片av在线| 欧美精品亚洲一区二区在线播放| 毛片av一区二区| 国产精品天干天干在线综合| 色先锋资源久久综合| 日韩高清在线一区| 国产丝袜美腿一区二区三区| 色噜噜狠狠成人网p站| 午夜精品影院在线观看| 久久综合九色综合久久久精品综合| 国产成人av一区二区三区在线| 亚洲色图视频免费播放| 欧美一区二区精品| 成人高清免费观看| 亚洲永久免费av| 久久视频一区二区|