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

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

?? faxfield.bak

?? 將圖像轉換為傳真文件
?? BAK
?? 第 1 頁 / 共 5 頁
字號:
unit FaxField;

{$I AWDEFINE.INC}

interface

uses
  {$IFDEF Win32} Windows, {$ELSE} WinTypes, WinProcs, {$ENDIF}
  Messages, Classes, Graphics, Controls, Forms, StdCtrls, ExtCtrls,
  {$IFDEF DELPHI3} ExtDlgs, {$ENDIF}
  Dialogs, Ruler,jpeg,menus;


type
  {Records used for saving cover page to a disk file}
  TUserDataArray = array[0..1023] of Byte;

  TPageRecord = packed record
    prVersionNum       : string[11];
    prPageWidthPixels  : LongInt;
    prPageHeightPixels : LongInt;
    prPageWidthInches  : Double;
    prPageHeightInches : Double;
    prIsMetric         : Boolean;
    {Extra field for storing miscellaneous additional data}
    prUserData         : TUserDataArray;
  end;

  TFieldRecord = packed record
    frLeftInches   : Double;
    frTopInches    : Double;
    frWidthInches  : Double;
    frHeightInches : Double;
  end;

  TFontRecord = packed record
    frCharSet       : Byte;
    frColor         : LongInt;
    frHeight        : LongInt;
    frName          : string[255];
    frPitch         : Byte;
    frSize          : LongInt;
    frFontBold      : Boolean;
    frFontItalic    : Boolean;
    frFontUnderline : Boolean;
    frFontStrikeout : Boolean;
  end;

  TStretchModes = (smNone, smDrag, smE, smW, smS, smN, smNE, smSW, smSE, smNW);

  TStretchHandle = class(TPaintBox)
  private
    FHandlePosition : TStretchModes;
  protected
    procedure Paint; override;
  public
    constructor Create(AOwner : TComponent); override;
    property HandlePosition : TStretchModes
      read FHandlePosition write FHandlePosition;
  end;

  TStretchHandleArray = array[0..7] of TStretchHandle;

  TBaseField = class(TShape)
  private
    FSelected        : Boolean;
    FStretchMode     : TStretchModes;
    bfStretchHandles : TStretchHandleArray;
  protected
    procedure bfMouseDown(Sender: TObject; Button: TMouseButton;
                          Shift: TShiftState; X, Y: Integer);
    procedure bfMouseUp(Sender: TObject; Button: TMouseButton;
                        Shift: TShiftState; X, Y: Integer);
    procedure bfMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
    procedure SetParent(AParent: TWinControl); override;
    procedure SetSelected(IsSelected : Boolean);
    function GetStretchHandleCoords(WhichHandle : TStretchModes) : TPoint;
      {-Returns the coordinates (Left, Top) where the StretchHandle should be drawn}
    procedure Write(Stream : TStream); virtual;
      {-Writes all necessary TBaseField properties out to Stream}
    procedure Read(Stream : TStream); virtual;
      {-Reads BaseField properties from Stream and assigns those properties to Self}
    procedure Draw(ACanvas : TCanvas); virtual; abstract;
      {-Draws Self on ACanvas}
  public
    procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
    constructor Create(AOwner: TComponent); override;
    property Selected : Boolean read FSelected write SetSelected;
    property StretchMode : TStretchModes read FStretchMode write FStretchMode;
  end;

  TTextField = class(TBaseField)
  protected
    FMemo : TMemo;
    FPopupMenu:TPopupMenu;
    procedure SetParent(AParent: TWinControl); override;
    function GetTextHeight : Integer;
      {-Returns the height of one row of text, including external leading, given the
        current font assigned to the field}
    function GetText : string;
    procedure Write(Stream : TStream); override;
      {-Writes all necessary properties out to Stream}
    procedure Read(Stream : TStream); override;
      {-Reads properties from Stream and assigns those properties to Self}
    procedure Draw(ACanvas : TCanvas); override;
      {-Draws Self on ACanvas}
    procedure tfEnter(Sender : TObject);
    procedure tfExit(Sender : TObject);

  public
    procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
    constructor Create(AOwner: TComponent); override;
    procedure MemoDblClick(Sender: TObject);
    procedure OnLoadFromFile(Sender: TObject);
    procedure SetFocus;
    property Text : string read GetText;
  end;

  TImageField = class(TBaseField)
  protected
    FImage : TImage;
    procedure SetParent(AParent: TWinControl); override;
    function GetPicture : TPicture;
    procedure Write(Stream : TStream); override;
      {-Writes all necessary properties out to Stream}
    procedure Read(Stream : TStream); override;
      {-Reads properties from Stream and assigns those properties to Self}
    procedure Draw(ACanvas : TCanvas); override;
      {-Draws Self on ACanvas}
  public
    procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
    constructor Create(AOwner: TComponent); override;
    procedure ImageDblClick(Sender: TObject);
    property Picture : TPicture read GetPicture;
  end;

  TSelectionChangeEvent = procedure(IsFieldSelected : Boolean) of object;
  TPositionChangeEvent = procedure(Left, Top, Width, Height : Integer) of object;

  TFaxPanel = class(TPanel)
  private
    FShowGrid               : Boolean;
    FSnapToGrid             : Boolean;
    FGridSpacingX           : Integer;
    FGridSpacingY           : Integer;
    FPageWidthInches        : Double;
    FPageHeightInches       : Double;
    FEditMode               : Boolean; {Are we in Edit Mode or Design Mode}
    FStretchMode            : TStretchModes;
    FOnFieldSelectionChange : TSelectionChangeEvent;
    FOnFieldPositionChange  : TPositionChangeEvent;
    FNeedsSaving            : Boolean;

    FPageCount              : Integer;
    FPageNumber             : Integer;
    FSender                 : string;
    FRecipient              : string;
    FPageTitle              : string;
    FStationID              : string;

    fpDragging              : Boolean;
    fpMaxGridLine           : TPoint;
    fpHorzPixelsPerInch     : Double;
    fpVertPixelsPerInch     : Double;
    fpMouseAnchor           : TPoint;
    fpIsMouseDown           : Boolean;
    fpFieldList             : TList;

    function GetFieldCount : Integer;
    function GetField(Index : Integer) : TBaseField;
    function GetSelectedField : TBaseField;
    procedure SetEditMode(Value : Boolean);
    procedure SetPageWidthInches(AWidth : Double);
    procedure SetPageHeightInches(AHeight : Double);
    procedure SetShowGrid(AShowGrid : Boolean);
    procedure SetSnapToGrid(ASnapToGrid : Boolean);
    procedure SetGridSpacingX(GridSpacing : Integer);
    procedure SetGridSpacingY(GridSpacing : Integer);
    procedure AdjustLeftToGrid(var ALeft : Integer);
      {-If SnapToGrid is True, adjusts ALeft to be on the nearest grid line}
    procedure AdjustTopToGrid(var ATop : Integer);
      {-If SnapToGrid is True, adjusts ATop to be on the nearest grid line}
    procedure AdjustWidthToGrid(ALeft : Integer; var AWidth : Integer);
      {-If SnapToGrid is True, adjusts AWidth to be on the nearest grid line.
        Caller should ensure that ALeft is already on a grid line, possibly by
        calling AdjustLeftToGrid.}
    procedure AdjustHeightToGrid(ATop : Integer; var AHeight : Integer);
      {-If SnapToGrid is True, adjusts AHeight to be on the nearest grid line.
        Caller should ensure that ATop is already on a grid line, possibly by
        calling AdjustTopToGrid.}
    function GetDrawAdjustFactor : Double;
    function GetDrawWidth : Integer;
      {-Returns the width that the TCanvas passed to the Draw method should be}
    function GetDrawHeight : Integer;
      {-Returns the height that the TCanvas passed to the Draw method should be}
    procedure SetStretchMode(NewStretchMode : TStretchModes);
    procedure DeselectAllFields;
    procedure DeleteAllFields;
    procedure AddField(Field : TBaseField);

  protected
    procedure Paint; override;
    procedure fpResize(Sender : TObject);
    procedure fpMouseUp(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure fpMouseDown(Sender: TObject; Button: TMouseButton;
      Shift: TShiftState; X, Y: Integer);
    procedure fpMouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
    procedure FieldSelectionChange(IsFieldSelected : Boolean);
      {-Calls OnFieldSelectionChange event handler when a field becomes
        deselected or when a new field becomes selected}
    procedure FieldPositionChange(ALeft, ATop, AWidth, AHeight : Integer);
      {-Calls OnFieldPositionChange event handler when the location or size of
        the currently-selected field changes}
    procedure FieldChange(Sender : TObject);
    property Canvas;
    property StretchMode : TStretchModes read FStretchMode write SetStretchMode;
    property PageWidthInches : Double read FPageWidthInches write SetPageWidthInches;
    property PageHeightInches : Double read FPageHeightInches write SetPageHeightInches;
    property DrawAdjustFactor : Double read GetDrawAdjustFactor;
  public
    procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
    constructor Create(AOwner : TComponent); override;
    destructor Destroy; override;
    function HorzPixelsToInches(P : Integer) : Double;
      {-Returns the value of P converted to inches given the current values of
        Width and PageWidthInches}
    function VertPixelsToInches(P : Integer) : Double;
      {-Returns the value of P converted to inches given the current values of
        Height and PageHeightInches}
    function HorzInchesToPixels(Inches : Double) : Integer;
      {-Returns the value of Inches converted to pixels given the current values
        of Width and PageWidthInches}
    function VertInchesToPixels(Inches : Double) : Integer;
      {-Returns the value of Inches converted to pixels given the current values
        of Height and PageHeightInches}
    procedure SizeMove(Sender : TObject; Key : Word; Shift : TShiftState);
      {-move/size the field}
    function AddTextField : TTextField;
    function AddImageField : TImageField;
    procedure DeleteSelectedField;
      {-Deletes currently selected field}
    procedure CenterSelectedField(IsHorizontal : Boolean);
      {-Centers the currently-selected field within the panel. IsHorizontal
        specifies whether the field will be centered vertically or horizontally.}
    function SelectedFieldsExist : Boolean;
      {-Returns True if the panel contains at least one selected field}
    procedure FieldPositionChangeForSelectedField;
      {-If a selected field exists, calls FieldPositionChange with that field's
        coordinates}
    procedure Write(Stream : TStream);
      {-Writes all defining information out to Stream}
    procedure Read(Stream : TStream);
      {-Reads Stream and loads its properties into Self}
    procedure Draw(ACanvas : TCanvas);
      {-Draws an image of Self, including all fields, on ACanvas}
    property ShowGrid : Boolean read FShowGrid write SetShowGrid;
    property SnapToGrid : Boolean read FSnapToGrid write SetSnapToGrid;
    property GridSpacingX : Integer read FGridSpacingX write SetGridSpacingX;
    property GridSpacingY : Integer read FGridSpacingY write SetGridSpacingY;
    property EditMode : Boolean
      read FEditMode
      write SetEditMode;
    property NeedsSaving : Boolean read FNeedsSaving write FNeedsSaving;
    property OnFieldSelectionChange : TSelectionChangeEvent
      read FOnFieldSelectionChange write FOnFieldSelectionChange;
    property OnFieldPositionChange : TPositionChangeEvent
      read FOnFieldPositionChange write FOnFieldPositionChange;

    {When creating a bitmap for use in creating an APF file, the bitmap's width
     should be set to TFaxPanel.DrawWidth, and the bitmap's height should be
     set to TFaxPanel.DrawHeight.}
    property DrawWidth : Integer read GetDrawWidth;
      {-Returns the width that the TCanvas passed to the Draw method should be}
    property DrawHeight : Integer read GetDrawHeight;
      {-Returns the height that the TCanvas passed to the Draw method should be}
    property FieldCount : Integer
      read GetFieldCount;
    property Field[Index : Integer] : TBaseField
      read GetField;
    property SelectedField : TBaseField
      read GetSelectedField;

    {These properties are the values that are substituted for replacement tags
     when the cover page is saved as an APF file}
    property PageCount : Integer read FPageCount write FPageCount;
      {-Value substituted for $N replacement tag}
    property PageNumber : Integer read FPageNumber write FPageNumber;
      {-Value substituted for $P replacement tag}
    property Sender : string read FSender write FSender;
      {-Value substituted for $F replacement tag}
    property Recipient : string read FRecipient write FRecipient;
      {-Value substituted for $R replacement tag}
    property PageTitle : string read FPageTitle write FPageTitle;
      {-Value substituted for $S replacement tag}
    property StationID : string read FStationID write FStationID;
      {-Value substituted for $I replacement tag}
  end;

  TFaxScrollBox = class(TScrollBox)
  private
    FOnHorzScroll : TScrollEvent;
    FOnVertScroll : TScrollEvent;
    procedure WMHScroll(var Message : TWMHScroll); message WM_HSCROLL;
    procedure WMVScroll(var Message : TWMVScroll); message WM_VSCROLL;
  public
    property OnHorzScroll : TScrollEvent read FOnHorzScroll write FOnHorzScroll;
    property OnVertScroll : TScrollEvent read FOnVertScroll write FOnVertScroll;
  end;

  TFaxDesigner = class(TPanel)
  private
    FFaxPanel   : TFaxPanel;
    FIsNew      : Boolean;
    FIsMetric   : Boolean;
    FUserData   : TUserDataArray;
    fdHorzRuler : TRuler;
    fdVertRuler : TRuler;
    fdScrollBox : TFaxScrollBox;
    procedure HorzScroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer);
    procedure VertScroll(Sender: TObject; ScrollCode: TScrollCode; var ScrollPos: Integer);
    function GetPageWidthPixels : Integer;
    procedure SetPageWidthPixels(AWidth : Integer);
    function GetPageHeightPixels : Integer;
    procedure SetPageHeightPixels(AHeight : Integer);
    function GetPageWidthInches : Double;
    procedure SetPageWidthInches(AWidth : Double);
    function GetPageHeightInches : Double;
    procedure SetPageHeightInches(AHeight : Double);
    procedure SetIsMetric(AIsMetric : Boolean);
    procedure SetMarkPositions(ALeft, ATop, AWidth, AHeight : Integer);
      {-Sets the position of the red position marks on the Ruler bars. To
        suppress drawing of the marks, set to a negative value.}
  protected
    procedure SetParent(AParent: TWinControl); override;
  public
    procedure SetBounds(ALeft, ATop, AWidth, AHeight: Integer); override;
    constructor Create(AOwner : TComponent); override;
    procedure Write(Stream : TStream);
      {-Writes all defining information out to Stream}
    procedure Read(Stream : TStream);
      {-Reads Stream and loads its properties into Self}
    property FaxPanel : TFaxPanel read FFaxPanel;
    property PageWidthPixels  : Integer read GetPageWidthPixels write SetPageWidthPixels;
    property PageHeightPixels : Integer read GetPageHeightPixels write SetPageHeightPixels;
    property PageWidthInches  : Double read GetPageWidthInches write SetPageWidthInches;
    property PageHeightInches : Double read GetPageHeightInches write SetPageHeightInches;
    property IsMetric : Boolean read FIsMetric write SetIsMetric;
    property UserData : TUserDataArray read FUserData write FUserData;
      {-Misc data field. Gets written to and read from the Stream when Write or
        Read are called}
    property IsNew : Boolean read FIsNew write FIsNew;
      {-Returns True if this is a new cover page that hasn't been given a real
        name yet. Returns False if this cover page was read in using the Read
        method or if it was written out using the Write method.}
  end;


implementation

uses SysUtils;


const
  ctVersionNum   = '1.00';
  ftTextField    = 0;
  ftImageField   = 1;

  ctGridStart    = 1;
  ctGridSpacingX = 20;
  ctGridSpacingY = 20;
  ctDefaultWidthPixels  = 600;
  ctDefaultHeightPixels = 776;
  ctDefaultWidthInches  = 8.5;
  ctDefaultHeightInches = 11.0;
  ctStretchHandleSize   = 5; {Stretch handles are 5 x 5 pixels}


procedure Constrain(var X : Integer; MinVal, MaxVal : Integer);
  {-Forces an integer between two values}
begin
  if X > MaxVal then
    X := MaxVal
  else if X < MinVal then
    X := MinVal;
end;  { Constrain }

procedure ConvertCoords(Source, Target : TControl; var X, Y : Integer);
  {-Converts Source coordinates X, Y to Target coordinates}
var

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区精品葵司在线| 亚洲欧美国产77777| 国产精品区一区二区三| 日本美女一区二区三区| av在线综合网| 日韩免费高清电影| 亚洲资源中文字幕| 国产91在线|亚洲| 91精品久久久久久蜜臀| 日韩美女精品在线| 婷婷一区二区三区| 色婷婷av一区二区三区gif| 久久网站最新地址| 丝袜国产日韩另类美女| 国产91精品入口| 久久久久99精品一区| 免费不卡在线视频| 欧美日韩成人在线一区| 一级中文字幕一区二区| 91在线码无精品| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 91小视频免费观看| 久久久久久久久久久久久女国产乱| 日韩国产欧美一区二区三区| 欧美丝袜丝交足nylons| 一区二区三区日韩精品视频| 成人精品国产免费网站| 国产三级精品在线| 国产精品一区二区男女羞羞无遮挡| 日韩色视频在线观看| 青青草成人在线观看| 日韩一区二区不卡| 久久精品国产精品亚洲红杏| 精品国产乱码久久久久久免费| 蜜桃一区二区三区在线观看| 日韩一区二区视频| 捆绑调教美女网站视频一区| 日韩精品一区二区三区视频播放 | voyeur盗摄精品| 国产精品系列在线| 成人激情校园春色| 亚洲免费在线电影| 欧美三级乱人伦电影| 亚洲成人在线免费| 欧美一区二区免费视频| 久久电影国产免费久久电影| 久久久一区二区| 99精品欧美一区二区三区综合在线| 国产精品三级av在线播放| 99精品欧美一区二区三区小说| 亚洲色图制服诱惑 | 99久久精品国产网站| 最新国产の精品合集bt伙计| 欧美亚洲国产一区在线观看网站| 亚洲第一福利视频在线| 日韩精品一区二区在线| 国产成人午夜精品5599| 亚洲精品国产精华液| 91精品国产免费久久综合| 波多野结衣在线一区| 亚洲激情中文1区| 欧美mv和日韩mv的网站| 成人免费毛片高清视频| 一区二区三区丝袜| 日韩欧美中文一区| 国产成人精品免费网站| 亚洲精品菠萝久久久久久久| 日韩网站在线看片你懂的| 另类欧美日韩国产在线| 国产精品高潮呻吟久久| 欧美日韩免费观看一区二区三区 | 蜜臀av一区二区三区| 国产欧美日韩精品一区| 欧美三级在线视频| 国产成人在线影院 | 国产精品系列在线观看| 亚洲裸体在线观看| 精品国产一区二区三区久久影院| 成人激情文学综合网| 日本在线观看不卡视频| 国产精品美女久久久久久久久久久| 欧美日韩精品免费| 成人av电影免费在线播放| 视频一区二区国产| 亚洲人成亚洲人成在线观看图片| 久久久亚洲国产美女国产盗摄| 欧美日产国产精品| 99r精品视频| 国产一区二区主播在线| 亚洲已满18点击进入久久| 国产精品三级久久久久三级| 精品剧情在线观看| 欧美顶级少妇做爰| 91在线视频观看| 成人精品国产免费网站| 国产毛片精品一区| 蜜臀国产一区二区三区在线播放| 亚洲自拍偷拍av| 亚洲精品五月天| 国产精品夫妻自拍| 国产视频一区在线播放| 欧美成人免费网站| 欧美福利一区二区| 欧美视频三区在线播放| 色国产精品一区在线观看| www.色精品| 成人精品鲁一区一区二区| 国产成人在线影院| 国产成人夜色高潮福利影视| 国产在线观看一区二区| 精品无码三级在线观看视频| 免费欧美日韩国产三级电影| 日韩不卡一区二区三区| 久久精品国产亚洲a| 蜜桃视频在线一区| 久久成人av少妇免费| 久久电影网站中文字幕| 精品亚洲免费视频| 韩国女主播成人在线观看| 久久国产剧场电影| 国产成人精品一区二| 成人黄色网址在线观看| 99精品黄色片免费大全| 在线观看欧美黄色| 欧美日本一道本| 精品奇米国产一区二区三区| 26uuu色噜噜精品一区| 国产欧美综合色| 有坂深雪av一区二区精品| 五月婷婷久久丁香| 国内一区二区在线| 99久久国产综合精品女不卡| 在线观看视频一区二区| 91精品国模一区二区三区| 亚洲精品一区二区三区福利| 国产精品免费久久| 亚洲国产aⅴ天堂久久| 捆绑紧缚一区二区三区视频| 成人网页在线观看| 欧美日韩在线播放三区| www国产成人免费观看视频 深夜成人网| 国产亚洲精品精华液| 一区二区三区四区高清精品免费观看 | 狠狠色综合色综合网络| a级精品国产片在线观看| 欧美精品久久久久久久多人混战| 精品精品欲导航| 一区二区三区在线观看欧美| 精品一区二区影视| 91麻豆国产精品久久| 日韩天堂在线观看| 亚洲黄色免费电影| 国产高清不卡一区| 欧美日韩国产片| 国产精品网站一区| 日本亚洲免费观看| aaa亚洲精品| 久久综合色8888| 亚洲成人激情av| 97se亚洲国产综合自在线不卡| 日韩美女主播在线视频一区二区三区| 国产精品国产三级国产普通话三级| 亚洲国产cao| 91亚洲精华国产精华精华液| 日韩一区二区三| 一区二区三区影院| 成人一级片在线观看| 日韩欧美电影一区| 亚洲一区在线观看免费观看电影高清| 国产精品99久久久| 911精品产国品一二三产区| **欧美大码日韩| 国产成人午夜片在线观看高清观看| 欧美日韩国产精品成人| 亚洲色图清纯唯美| 国产91露脸合集magnet| 欧美精品一区二区三区蜜臀| 日韩高清不卡一区二区三区| 欧美视频一区二区三区| 亚洲伦在线观看| 91网页版在线| 国产精品久久久久久福利一牛影视 | 欧美aaaaa成人免费观看视频| av在线这里只有精品| 国产日韩欧美高清在线| 激情综合色综合久久| 日韩欧美亚洲国产另类| 午夜精品一区二区三区三上悠亚| 一本到三区不卡视频| 日韩一区在线免费观看| yourporn久久国产精品| 亚洲国产电影在线观看| 粉嫩在线一区二区三区视频| 久久久欧美精品sm网站 | 日韩中文字幕91| 欧美三级三级三级爽爽爽| 一区二区三区在线视频免费| 一本色道久久综合狠狠躁的推荐| 亚洲欧洲制服丝袜| 在线精品视频一区二区三四|