📄 flexbase.int
字号:
FAutoNames: boolean;
FAutoNameNumbs: boolean;
FSelectAsFilled: boolean;
FSelectPartialOverlapped: boolean;
FGridControl: TFlexGrid;
FToolMode: TFlexToolMode;
FDefaultToolMode: TFlexToolMode;
FAutoDragEnabled: boolean;
FLayers: TFlexLayers;
FActiveLayer: TFlexLayer;
FSchemes: TFlexSchemes;
FActiveScheme: TFlexCustomScheme;
FSelList: TList;
FInDesign: boolean;
FViewing: boolean;
FModified: boolean;
FIdPool: TIdPool;
FIdChangeControl: TFlexControl;
FConnectorsMinGap: integer;
FMouseAnchor: TPoint;
FMoveStart: TPoint;
FResizeRect: TRect;
FMarqueeRect: TRect;
FCreatingControlClass: TFlexControlClass;
FShowEditPointGuide: boolean;
FEditPointGuide: TFlexEditPointGuide;
FEditPointControl: TFlexControl;
FEditPointSelected: TSelectedArray;
FEditPointSelCount: integer;
FUseOriginalBezier: boolean;
FUseImageClipTransparent: boolean;
FWMPaintProcessing: boolean;
FNotifyLink: TNotifyLink;
FAlphaBuffer: TAlphaBuffer;
FFrostPan: boolean;
FFrostPanFullDoc: boolean;
FOnControlCreate: TFlexControlCreateEvent;
FOnUpdateCursor: TFlexUpdateCursorEvent;
FOnPropBeforeChanged: TPropChangedEvent;
FOnPropChanged: TPropChangedEvent;
FOnPaintScheme: TFlexPaintEvent;
FOnPaintOver: TFlexPaintEvent;
FOnNotify: TFlexNotifyEvent;
FOnBeginSelectionUpdate: TNotifyEvent;
FOnEndSelectionUpdate: TNotifyEvent;
FOnProgress: TFlexProgressEvent;
FOnToolMode: TNotifyEvent;
FOnNeedHint: TFlexNeedHintEvent;
FOnShowHint: TFlexShowHintEvent;
FOnMouseControlChange: TNotifyEvent;
procedure SetBorderStyle(Value: TBorderStyle);
procedure SetInDesign(const Value: boolean);
procedure SetActiveLayer(const Value: TFlexLayer);
procedure SetActiveScheme(const Value: TFlexCustomScheme);
function GetSelected(Index: integer): TFlexControl;
function GetSelectedCount: integer;
procedure SetToolMode(const Value: TFlexToolMode);
procedure SetCreatingControlClass(const Value: TFlexControlClass);
function GetCppCreatingControlClass: cardinal;
procedure SetCppCreatingControlClass(const Value: cardinal);
procedure SetDocHeight(const Value: integer);
procedure SetDocWidth(const Value: integer);
procedure SetDocFrameColor(const Value: TColor);
procedure SetDocShadowColor(const Value: TColor);
procedure SetDocSpaceFill(const Value: boolean);
function GetDocFrameVisible: boolean;
procedure SetDocClipping(const Value: boolean);
procedure SetShowDocFrame(const Value: boolean);
procedure SetScale(Value: integer);
function GetShowGrid: boolean;
procedure SetShowGrid(const Value: boolean);
function GetShowPixGrid: boolean;
procedure SetShowPixGrid(const Value: boolean);
function GetGridHorizSize: integer;
function GetGridVertSize: integer;
procedure SetGridHorizSize(const Value: integer);
procedure SetGridVertSize(const Value: integer);
function GetGridStyle: TFlexGridStyle;
procedure SetGridStyle(const Value: TFlexGridStyle);
function GetSnapToGrid: boolean;
procedure SetSnapToGrid(const Value: boolean);
function GetSnapStyle: TFlexSnaps;
procedure SetSnapStyle(const Value: TFlexSnaps);
function GetGridColor: TColor;
procedure SetGridColor(const Value: TColor);
procedure SetMarqueeRect(const Value: TRect);
procedure SetEditPointControl(Value: TFlexControl);
function GetDefaultScheme: TFlexCustomScheme;
function GetGridPixColor: TColor;
procedure SetGridPixColor(const Value: TColor);
procedure SetHorzExtraSpace(const Value: integer);
procedure SetVertExtraSpace(const Value: integer);
procedure DocSpaceBrushChanged(Sender: TObject);
procedure SetSchemeBkStretch(const Value: boolean);
procedure FilerProgress(Sender: TObject; Progress: integer;
Process: TFlexFilerProcess);
procedure SetDocSpaceBrush(const Value: TBrush);
function GetControlCount(Control: TFlexControl): integer;
function GetEditPointSelected(Index: integer): boolean;
procedure SetEditPointSelected(Index: integer; Value: boolean);
function GetEditPointsCaps: TPathEditFuncs;
function GetIsLoading: boolean;
procedure SetHideSelection(const Value: boolean);
procedure UpdateMouseData;
function IsEditCloseFigure: boolean;
function CloseFigureByPoint(Index: integer): boolean;
procedure SetShowEditPointGuide(const Value: boolean);
function GetNotifyLink: TNotifyLink;
procedure SetAutoZoom(const Value: boolean);
procedure SetGridControl(const Value: TFlexGrid);
procedure SetFrostPan(const Value: boolean);
procedure CMHintShow(var Message: TMessage); message CM_HINTSHOW;
procedure CMCtl3DChanged(var Message: TMessage); message CM_CTL3DCHANGED;
procedure WMPaint(var Message: TWMPaint); message WM_PAINT;
procedure WMSize(var Message: TWMSize); message WM_SIZE;
procedure WMHScroll(var Message: TWMHScroll); message WM_HSCROLL;
procedure WMVScroll(var Message: TWMVScroll); message WM_VSCROLL;
procedure WMNCHitTest(var Message: TMessage); message WM_NCHITTEST;
procedure WMNCCalcSize(var Message: TMessage); message WM_NCCALCSIZE;
protected
FHistory: TFlexPanelHistory;
FCreateInDesignAction: THistoryGroup;
FWithoutParent: TList;
FFlexCursor: TCursor;
FOrigin: TPoint;
FClientDocRect: TRect;
FFilerProcess: TFlexFilerProcess;
FPaintCache: TFlexPaintCache;
FPaintWidth: integer;
FPaintHeight: integer;
FPaintRect: TRect;
FPaintForExport: boolean;
FPaintSchemeBackground: boolean;
FInPaintOrigin: TPoint;
FInPaintScale: integer;
FScale: integer; { in percents MinScale..MaxScale}
FZoomingIn: boolean;
FZoomMouseStart: TPoint;
FIsPointAlter: boolean;
FIsOverPoint: boolean;
FIsOverCurveSegment: boolean;
FIsOverSegment: boolean;
FOverCurveNearest: TNearestPoint;
FMouseControl: TFlexControl;
FMouseSubControl: TFlexControl;
FHideSelection: boolean;
FHintControl: TFlexControl;
FEditPointIndex: integer;
FIsLoading: integer;
FLoadFunc: TFlexLoadFunc;
FLastMousePos: TPoint;
FLastKeyShift: TShiftState;
FSelRect: TRect;
FSelUpdateCounter: integer;
FSelNeedUpdate: boolean;
FResizeCursor: TResizeCursor;
FPointsRgn: HRGN;
FPointsRgnExact: boolean;
FDragObject: TFlexDragObject;
FRefPropsList: TPropRefList;
FDefaultLinkPoint: TLinkPointInfo;
FLastMovedPos: TPoint;
FPaintList: TFlexPaintList;
FHorzExtraSpace: integer;
FVertExtraSpace: integer;
FSaveAsBinary: boolean;
FFrostPanImage: TBitmap;
function AddWithoutParent(Control: TFlexControl): integer;
function RemoveWithoutParent(Control: TFlexControl): boolean;
function WithoutParentFindById(ControlID: LongWord): TFlexControl;
procedure CreateParams(var Params: TCreateParams); override;
procedure DoNotify(Control: TFlexControl; Notify: TFlexNotify); virtual;
function IsInternalControl(Control: TFlexControl): boolean;
procedure UpdateOrigin;
procedure UpdateScrollBars;
procedure Paint(ACanvas: TCanvas; AControl: TFlexControl;
ChildrenOnly, SelectedOnly: boolean); virtual;
procedure PaintPoints(ACanvas: TCanvas); virtual;
procedure PaintLinkPoint(ACanvas: TCanvas); virtual;
function GetAnchorRect(AControl: TFlexControl; Inflate: integer = 0): TRect;
function GetEditPointRect(Index: integer; Inflate: integer = 0): TRect;
function DoPointEdit(Control: TFlexControl;
Index, DocX, DocY: integer): boolean;
procedure DoEnter; override;
procedure DoExit; override;
procedure DoMouseControlChange; virtual;
procedure UpdatePoints;
function UpdatePointGuide(Region: HRGN = 0): boolean;
function UpdatePointTangents(Region: HRGN = 0): boolean;
procedure UpdateEditPointIndex;
procedure FindControlPoints(PointIndex: integer; out PrevNode,
NextNode: integer);
function FindFirstOrLastNodeIfEqual(Index: integer;
AControl: TFlexControl): integer;
procedure InvalidateSelection;
procedure PaintSelection(ACanvas: TCanvas); virtual;
procedure PaintMarquee(ACanvas: TCanvas); virtual;
procedure DoNeedHint(var IsNeedHint: boolean); virtual;
procedure DoShowHint(var HintInfo: THintInfo; var IsShowHint: boolean); virtual;
procedure DoStartDrag(var DragObject: TDragObject); override;
procedure DragOver(Source: TObject; X, Y: Integer;
State: TDragState; var Accept: Boolean); override;
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
X, Y: Integer); override;
procedure MouseUp(Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
override;
procedure MouseMove(Shift: TShiftState; X, Y: Integer); override;
procedure UpdateToolMode(Shift: TShiftState; X, Y: Integer);
procedure KeyDown(var Key: Word; Shift: TShiftState); override;
procedure KeyUp(var Key: Word; Shift: TShiftState); override;
function ValidateID(Control: TFlexControl; LastID: LongWord): boolean;
procedure PropBeforeChanged(Sender: TObject; Prop: TCustomProp); virtual;
procedure PropChanged(Sender: TObject; Prop: TCustomProp); virtual;
function CreateSelMarkersRgn: HRGN; virtual;
function GetSelResizeCursor(PaintX,
PaintY: integer): TResizeCursor; virtual;
procedure UpdateSelection(Control: TFlexControl);
procedure SetConnectorsMinGap(const Value: integer); virtual;
procedure SetMouseControl(Control: TFlexControl;
SubControl: TFlexControl = Nil); virtual;
property Canvas: TCanvas read FCanvas;
property MarqueeRect: TRect read FMarqueeRect write SetMarqueeRect;
property AlphaBuffer: TAlphaBuffer read FAlphaBuffer;
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure Assign(Source: TPersistent); override;
procedure Click; override;
procedure AutoSize;
procedure BeginLoading; virtual;
procedure EndLoading; virtual;
function CreateControl(ControlClass: TFlexControlClass;
ALeft, ATop, AWidth, AHeight: integer;
Scheme: TFlexCustomScheme = Nil; Layer: TFlexLayer = Nil;
UseGrid: boolean = true): TFlexControl; virtual;
procedure PaintTo(ACanvas: TCanvas; const APaintRect: TRect;
const AOrigin: TPoint; AScale: integer; AControl: TFlexControl;
Clipping, ChildrenOnly, SelectedOnly, ForExport: boolean;
AUseOriginalBezier: boolean = false;
AUseImageClipTransparent: boolean = false);
procedure PaintEmptyPicture(ACanvas: TCanvas;
APicture: TFlexControl); virtual;
procedure InvalidateDocRect(const DocRect: TRect);
// Return TRUE if AControl invalidated and child controls also needs to invalidate
function InvalidateControl(AControl: TFlexControl): boolean; virtual;
procedure EmptyDocument;
procedure NewDocument;
procedure UpdateCursor; virtual;
function FindControl(const AName: string;
From: TFlexControl = Nil): TFlexControl;
function FindControlByID(ControlID: LongWord;
From: TFlexControl = Nil): TFlexControl;
function FindControlAtPoint(x, y: integer): TFlexControl; virtual;
function GetDefaultNewName(Control: TFlexControl;
RootControl: TFlexControl = Nil; GenerateNumb: boolean = False): string;
procedure GenerateID(Control: TFlexControl);
procedure DoSnapToGrid(HStep, VStep: integer; const SnapRect: TRect;
var Delta: TPoint; SnapTo: TFlexSnaps = [snAll];
ResizeCursor: TResizeCursor = rcrNone;
HOffset: integer = 0; VOffset: integer = 0); virtual;
function StartDrag(AControl: TFlexControl;
ChildrenOnly, SelectedOnly: boolean; const MousePos, AOrigin: TPoint;
AScale: integer; const DragName: string = ''): TFlexDragObject;
function CreateDragObject(AControl: TFlexControl;
ChildrenOnly, SelectedOnly: boolean; DragName: string = ''): TFlexDragObject;
procedure DragDrop(Source: TObject; X, Y: Integer); override;
function CreateFlexFiler(AStream: TStream;
Process: TFlexFilerProcess; ABinary: boolean = False): TFlexFiler;
function LoadFromStream(Stream: TStream): boolean;
function LoadFromFile(const Filename: string): boolean;
function LoadFromFiler(Filer: TFlexFiler;
LoadFunc: TFlexLoadFunc): boolean; virtual;
function LoadFlexControl(Filer: TFlexFiler; AParent: TFlexControl;
const First: string; WithoutParent: boolean = false): TFlexControl; virtual;
function SaveToFile(const Filename: string): boolean;
function SaveToStream(Stream: TStream): boolean;
function SaveToFiler(Filer: TFlexFiler; SelectedOnly: boolean = false;
AControl: TFlexControl = Nil; ChildrenOnly: boolean = false): boolean;
procedure Print(APrinter: TPrinter; PrintBackground, SelectedOnly: boolean);
procedure TransformRect(var R: TRect);
procedure TransformPoint(var px, py: integer);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -