📄 flexbase.int
字号:
FLinkSavedBounds: TRect;
FResizingTopLeft: TPoint;
FResizingRect: TRect;
FResizingLinkPoints: TPointArray;
FUserObject: TObject;
FPaintAlphaBufferMode: TFlexAlphaBufferMode;
FPaintAlphaBuffer: TAlphaBuffer;
FGroupUngroupLevel: integer;
procedure InitializeControl(AParent: TFlexControl;
ALayer: TFlexLayer); virtual;
procedure FinalizeControl; virtual;
procedure CreateProperties; virtual;
procedure ControlCreate; virtual;
procedure ControlDestroy; virtual;
procedure ControlTranslate(const TranslateInfo: TTranslateInfo); virtual;
procedure BeginTranslate;
procedure EndTranslate;
procedure BeginSelectionTransformation; virtual;
procedure EndSelectionTransformation; virtual;
procedure MirrorInResize(HMirror, VMirror: boolean); virtual;
procedure ConnectorMinGapChanged; virtual;
procedure CreateInDesign(var Info: TFlexCreateInDesignInfo); virtual;
function CreateCurveControl: TFlexControl; virtual;
procedure CreateCurveGuide(const NewPoint: TPoint;
var Guide: TFlexEditPointGuide); virtual;
function MovePathPoints(PointIndex: integer; var Delta: TPoint;
Selected: TSelectedArray; Smooth: boolean = false;
Symmetric: boolean = false): boolean; virtual;
function MovePathSegment(FirstIndex, NextIndex: integer;
var Delta: TPoint; const SegmentCurvePos: double): boolean; virtual;
procedure DoNotify(Notify: TFlexNotify); virtual;
procedure DoNeedHint(var HintInfo: THintInfo;
var IsShowHint: boolean); virtual;
procedure Paint(Canvas: TCanvas; var PaintRect: TRect); virtual;
procedure PaintAll(Canvas: TCanvas; PaintX, PaintY: integer); virtual;
procedure StartResizing(const SelRect: TRect); virtual;
procedure FinishResizing; virtual;
procedure PropBeforeChanged(Sender: TObject; Prop: TCustomProp); virtual;
procedure PropChanged(Sender: TObject; Prop: TCustomProp); virtual;
procedure PropStored(Sender: TObject; Prop: TCustomProp;
var IsStored: boolean; const PropName: string = ''); virtual;
procedure PropReadOnly(Sender: TObject; Prop: TCustomProp;
var IsReadOnly: boolean); virtual;
procedure PropHistoryAction(Sender: TObject; Prop: TCustomProp;
var ActionClass: THistoryActionClass); virtual;
function GetAnchorPoint: TPoint; virtual;
procedure GetLinkProps(var LinkFirst, LinkLast: TLinkPointProp); virtual;
function GetDefaultLinkPoint(Index: integer): TPoint; virtual;
function GetDefaultLinkPointCount: integer; virtual;
function GetPoint(Index: integer): TPoint; virtual;
procedure SetPoint(Index: integer; const Value: TPoint); virtual;
function GetPointType(Index: integer): TPointType; virtual;
procedure SetPointType(Index: integer; const Value: TPointType); virtual;
function GetPointCount: integer; virtual;
function GetIsPointsClosed: boolean; virtual;
procedure SetIsPointsClosed(Value: boolean); virtual;
function GetPointsInfo: PPathInfo; virtual;
procedure SetDocRect(Value: TRect); virtual;
function ValidateName(CheckEmpty, CheckUnique: boolean): boolean; virtual;
function GetRefreshRect(RefreshX, RefreshY: integer): TRect; virtual;
function GetNotifyLink: TNotifyLink; virtual;
procedure LinkPointsTranslate(const TranslateInfo: TTranslateInfo); virtual;
procedure LinkPointsResize(const OldDocRect, NewDocRect: TRect); virtual;
function GetIsSelectable: boolean; virtual;
function GetIsUngroupable: boolean; virtual;
property NonVisual: boolean read FNonVisual write FNonVisual;
property NoPaintRectCheck: boolean read FNoPaintRectCheck
write FNoPaintRectCheck;
property TranslateCount: integer read FTranslateCount;
public
constructor Create(AOwner: TFlexPanel; AParent: TFlexControl;
ALayer: TFlexLayer); virtual;
destructor Destroy; override;
{$IFDEF FG_CBUILDER}
procedure AfterConstruction; override;
// We strongly recommend to use these routine to create flex-control
// in C++Builder environment instead of native object creation via
// Control = new TFlexControl(...). It prevents from some incompatibility in
// object initialization section in Delphi and C++Builder. You also can use
// TFlexPanel::CreateControl() method to create flex-controls in definite flex
// panel.
class function CppCreate(AOwner: TFlexPanel; AParent: TFlexControl;
ALayer: TFlexLayer): TFlexControl;
{$ENDIF}
class function CursorInCreate: TCursor; virtual;
class function GetToolInfo(ToolIcon: TBitmap; var Hint: string): boolean;
virtual;
class function IsConnectorControl: boolean; virtual;
function BeginUpdate: boolean; virtual;
function EndUpdate: boolean; virtual;
function BeginGroupUngroup: boolean; virtual;
function EndGroupUngroup: boolean; virtual;
procedure Invalidate; virtual;
function Add(AControl: TFlexControl): integer; virtual;
function IndexOf(AControl: TFlexControl): integer;
procedure Delete(Index: integer); virtual;
procedure Remove(AControl: TFlexControl);
procedure Extract(AControl: TFlexControl); virtual;
procedure Clear; virtual;
procedure ChangeOrder(CurIndex, NewIndex: integer); virtual;
procedure ToFront;
procedure ToBack;
procedure ForwardOne;
procedure BackOne;
function FindControlAtPoint(x, y: integer): TFlexControl; virtual;
function FindByID(ControlID: LongWord): TFlexControl;
function FindByName(const AName: string): TFlexControl;
procedure BeginPointsDesigning; virtual;
procedure EndPointsDesigning; virtual;
function CreatePointsPath(DC: HDC): boolean;
function GetNodeIndex(Index: integer): integer; virtual;
function GetPointIndex(NodeIndex: integer): integer; virtual;
function InsertPoint(Index: integer; const Point: TPoint): integer; virtual;
function InsertCurvePoints(Index: integer; const Point, CtrlPointA,
CtrlPointB: TPoint): integer; virtual;
procedure DeletePoint(Index: integer); virtual;
function AddCurvePoints(const Point, CtrlPointA, CtrlPointB: TPoint): integer;
function AddPoint(const Point: TPoint): integer;
function InsertCurveNode(NodeIndex: integer; const Point,
CtrlPointA, CtrlPointB: TPoint): integer;
procedure DeleteNode(NodeIndex: integer);
function InsertNearestPoint(const Point: TPoint): integer; virtual;
procedure EndFigure(Close: boolean = true);
procedure SetPoints(const APoints: TPointArray);
procedure SetPointsEx(const APoints: TPointArray;
const ATypes: TPointTypeArray); virtual;
procedure GetPointsEx(out APoints: TPointArray;
out ATypes: TPointTypeArray); virtual;
function EditPoints(Func: TPathEditFunc; const Selected: TSelectedArray;
Params: PPathEditParams = Nil): boolean; virtual;
function EditPointsCaps(const Selected: TSelectedArray): TPathEditFuncs;
virtual;
function FlattenPoints(const Curvature: single): boolean; virtual;
function FindNearestPoint(const Point: TPoint;
var Nearest: TNearestPoint): boolean; virtual;
function FindNearestPathSegment(const Point: TPoint; var FirstIndex,
NextIndex: integer; Nearest: PNearestPoint = Nil;
ForInsert: boolean = true; ForSelect: boolean = false): boolean; virtual;
function GetTransformPoints(OfsX, OfsY, Scale: integer): TPointArray;
function IsPointInside(PaintX, PaintY: integer): boolean; virtual;
function AddLinkPoint(Point: PPoint): integer; virtual;
function IndexOfLinkPoint(Point: PPoint): integer; virtual;
procedure DeleteLinkPoint(Index: integer); virtual;
procedure RemoveLinkPoint(Point: PPoint);
function ClientToOwner(const Point: TPoint): TPoint;
function OwnerToClient(const Point: TPoint): TPoint;
procedure Translate(const TranslateInfo: TTranslateInfo); virtual;
procedure SaveToFiler(Filer: TFlexFiler; const Indent: string); virtual;
procedure LoadFromFiler(Filer: TFlexFiler); virtual;
property Owner: TFlexPanel read FOwner write SetOwner;
property Parent: TFlexControl read FParent write SetParent;
property ParentScheme: TFlexCustomScheme read GetParentScheme;
property State: TFlexState read FState;
property Layer: TFlexLayer read FLayer write SetLayer;
property Visual: boolean read GetVisual;
property UpdateCounter: integer read FUpdateCounter;
property PointsDesigning: integer read FPointsDesigning;
property DocRect: TRect read GetDocRect write SetDocRect;
property PaintRect: TRect read GetPaintRect;
property IsSelected: boolean read GetIsSelected write SetIsSelected;
property IsSelectable: boolean read GetIsSelectable;
property IsUngroupable: boolean read GetIsUngroupable;
property Count: integer read GetCount;
property Controls[Index: integer]: TFlexControl read GetControl; default;
property ByName[const Name: string]: TFlexControl read GetByName;
property Props: TPropList read FProps;
property AnchorEnabled: boolean read FAnchorEnabled;
property AnchorPoint: TPoint read GetAnchorPoint;
property PointCount: integer read GetPointCount;
property Points[Index: integer]: TPoint read GetPoint write SetPoint;
property PointTypes[Index: integer]: TPointType read GetPointType write
SetPointType;
property PointsInfo: PPathInfo read GetPointsInfo;
property NodeCount: integer read GetNodeCount;
property Nodes[NodeIndex: integer]: TPoint read GetNode write SetNode;
property NodeTypes[NodeIndex: integer]: TPointType read GetNodeType
write SetNodeType;
property IsPointsClosed: boolean read GetIsPointsClosed write
SetIsPointsClosed;
property LinkPointCount: integer read GetLinkPointCount;
property LinkPoints[Index: integer]: TPoint read GetLinkPoint
write SetLinkPoint;
property DefaultLinkPointCount: integer read GetDefaultLinkPointCount;
property DefaultLinkPoints[Index: integer]: TPoint read GetDefaultLinkPoint;
property NotifyLink: TNotifyLink read GetNotifyLink write FNotifyLink;
property NameProp: TStrProp read FNameProp;
property LeftProp: TIntProp read FLeftProp;
property TopProp: TIntProp read FTopProp;
property WidthProp: TIntProp read FWidthProp;
property HeightProp: TIntProp read FHeightProp;
property IdProp: TLongWordProp read FIdProp;
property TagProp: TIntProp read FTagProp;
property VisibleProp: TBoolProp read FVisibleProp;
property LayerProp: TLayerProp read FLayerProp;
property HintProp: TStrListProp read FHintProp;
property ShowHintProp: TBoolProp read FShowHintProp;
property ReferenceProp: TSchemeRefProp read FReferenceProp;
property TransparencyProp: TIntProp read FTransparencyProp;
property SelectableProp: TBoolProp read FSelectableProp;
//property UserDataProp: TUserDataProp read FUserDataProp;
property UserData: TUserDataProp read FUserDataProp;
property UserObject: TObject read FUserObject write FUserObject;
public
procedure BeforeDestruction; override;
property Name: string read GetName write SetName;
property ID: LongWord read GetID write SetID;
property Tag: integer read GetTag write SetTag;
property Left: integer read GetLeft write SetLeft;
property Top: integer read GetTop write SetTop;
property Width: integer read GetWidth write SetWidth;
property Height: integer read GetHeight write SetHeight;
property Visible: boolean read GetVisible write SetVisible;
property Hint: string read GetHint write SetHint;
property ShowHint: boolean read GetShowHint write SetShowHint;
property Reference: TFlexCustomScheme read GetRef write SetRef;
property Transparency: integer read GetTransparency write SetTransparency;
property Selectable: boolean read GetSelectable write SetSelectable;
end;
// Use TFlexServiceControl to identify "structure" controls that destroys
// manualy in TFlexPanel.
// All that controls is derived from TFlexServiceControl:
// TFlexCustomScheme, TFlexSchemes, TFlexLayer, TFlexLayers, TFlexGrid
TFlexServiceControl = class(TFlexControl);
TFlexGroupClass = class of TFlexGroup;
TFlexGroup = class(TFlexControl)
private
FGroupResize: boolean;
FGroupMove: boolean;
FBoundsChanging: boolean;
FOldDocRect: TRect;
FNeedRefreshBounds: boolean;
protected
procedure ControlCreate; override;
procedure ControlTranslate(const TranslateInfo: TTranslateInfo); override;
function GetRefreshRect(RefreshX, RefreshY: integer): TRect; override;
procedure PropBeforeChanged(Sender: TObject; Prop: TCustomProp); override;
procedure PropChanged(Sender: TObject; Prop: TCustomProp); override;
procedure RefreshBounds;
function GetIsUngroupable: boolean; override;
public
function EndGroupUngroup: boolean; override;
function IsPointInside(PaintX, PaintY: integer): boolean; override;
procedure Translate(const TranslateInfo: TTranslateInfo); override;
end;
TFlexCloneClass = class of TFlexClone;
TFlexClone = class(TFlexControl)
private
FSourceProp: TLinkProp;
FAutoSizeProp: TBoolProp;
FSizeLock: boolean;
procedure SetSizeLock(Value: boolean);
protected
procedure CreateProperties; override;
procedure ControlCreate; override;
procedure ControlDestroy; override;
function GetRefreshRect(RefreshX, RefreshY: integer): TRect; override;
procedure PropChanged(Sender: TObject; Prop: TCustomProp); override;
procedure PropStored(Sender: TObject; Prop: TCustomProp;
var IsStored: boolean; const PropName: string = ''); override;
procedure Paint(Canvas: TCanvas; var PaintRect: TRect); override;
procedure SourceLinkNotify(Sender: TObject; Source: TNotifyLink;
const Info: TNotifyLinkInfo);
procedure SetSizeFromLinkedControl;
function OpenMetafile(const Bounds: TRect): TMetafile;
procedure CloseMetafile(Metafile: TMetafile);
property SizeLock: boolean read FSizeLock write SetSizeLock;
public
property SourceProp: TLinkProp read FSourceProp;
property AutoSizeProp: TBoolProp read FAutoSizeProp;
end;
TFlexGrid = class(TFlexServiceControl)
private
FSnap: boolean;
FSnapTo: TFlexSnaps;
FShowPixGrid: boolean;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -