📄 ezbase.pas
字号:
Property Color: TColor Read GetColor Write SetColor;
Property Style: TFontStyles Read GetStyle Write SetStyle;
End;
{ TEzPolyClipTool}
TEzPolyClipTool = Class( TPersistent )
Private
Procedure SetOperation( value: TEzPolyClipOp );
Procedure SetPreserveOriginals( value: Boolean );
Public
FOperation: TEzPolyClipOp;
FPreserveOriginals: boolean;
Constructor Create;
Procedure LoadFromStream( Stream: TStream );
Procedure SaveToStream( Stream: TStream );
Procedure Assign( Source: TPersistent ); Override;
Published
Property Operation: TEzPolyClipOp Read FOperation Write SetOperation Default pcUNION;
Property PreserveOriginals: boolean Read FPreserveOriginals Write SetPreserveOriginals Default True;
End;
{ TEzScreenGrid }
TEzScreenGrid = Class( TPersistent )
Private
FColor: TColor;
FShow: Boolean;
FStep: TEzPointTool;
Procedure SetStep( value: TEzPointTool );
Procedure SetColor( value: TColor );
Procedure SetShow( value: Boolean );
Public
Constructor Create;
Destructor Destroy; Override;
Procedure LoadFromStream( Stream: TStream );
Procedure SaveToStream( Stream: TStream );
Procedure Assign( Source: TPersistent ); Override;
Published
Property Color: TColor Read FColor Write SetColor Default clSilver;
Property Show: Boolean Read FShow Write SetShow Default False;
Property Step: TEzPointTool Read FStep Write SetStep;
End;
{ TEzThematicSeriesColor }
TEzThematicSeriesColor = Class
Private
FList: TList;
Function GetItem( Index: Integer ): TColor;
Procedure SetItem( Index: Integer; Value: TColor );
Public
Constructor Create;
Destructor Destroy; Override;
Procedure Add( Value: TColor );
Function Count: Integer;
Property Items[Index: Integer]: TColor Read GetItem Write SetItem; Default;
End;
{-----------------------------------------------------------------------------}
{ The global map preferences }
{-----------------------------------------------------------------------------}
TEzPreferences = Class
Private
{ objects }
FDefPenStyle: TEzPenTool;
FDefBrushStyle: TEzBrushTool;
FDefSymbolStyle: TEzSymbolTool;
FDefFontStyle: TEzFontTool;
FDefTTFontStyle: TEzFontTool;
FSelectionPen: TEzPenTool;
FSelectionBrush: TEzBrushTool;
FPreloadedImages: TStrings;
FPreloadedBandedImages: TStrings;
FPreloadedBlocks: TStrings;
FDirectionArrowSize: Double;
{ ordinal types }
FPointEntitySize: Integer;
FUsePreloadedBlocks: Boolean;
FUsePreloadedImages: Boolean;
FUsePreloadedBandedImages: Boolean;
FBandsBitmapChunkSize: Integer;
FControlPointsWidth: integer;
FApertureWidth: integer;
FMinDrawLimit: integer;
FAerialMinDrawLimit: integer;
FShowText: Boolean;
FSelectPickingInside: Boolean;
FPlineGen: Boolean;
FSplineSegs: Integer;
FArcSegs: Integer;
FEllipseSegs: Integer;
FCommonSubDir: String;
FGNumPoint: Integer;
FGRotatePoint: TEzPoint;
FPatternPlotterOptimized: Boolean;
FHintColor: TColor;
FHintFont: TFont;
FOnChange: TNotifyEvent;
{ object types }
Procedure SetDefPenStyle( value: TEzPenTool );
Procedure SetDefBrushStyle( value: TEzBrushTool );
Procedure SetDefSymbolStyle( value: TEzSymbolTool );
Procedure SetDefFontStyle( value: TEzFontTool );
Procedure SetDefTTFontStyle( value: TEzFontTool );
Procedure SetSelectionPen( value: TEzPenTool );
Procedure SetSelectionBrush( value: TEzBrushTool );
Procedure SetBandsBitmapChunkSize( value: Integer );
Procedure SetCommonSubDir( Const value: String );
Procedure SetHintFont( Value: TFont );
Public
{ methods }
Constructor Create;
Destructor Destroy; Override;
Procedure ApplyChanges;
Procedure Assign( Source: TEzPreferences );
Procedure LoadFromFile( Const Filename: String );
Procedure SaveToFile( Const FileName: String );
Procedure SetToDefault;
Procedure AddPreloadedImage( Const FileName: String );
Procedure AddPreloadedBandedImage( Const FileName: String );
Procedure AddPreloadedBlock( Const FileName: String );
Procedure DeletePreloadedImage( Const FileName: String );
Procedure DeletePreloadedBandedImage( Const FileName: String );
Procedure DeletePreloadedBlock( Const FileName: String );
Procedure ClearPreloadedImages;
Procedure ClearPreloadedBandedImages;
Procedure ClearPreloadedBlocks;
{properties}
Property GRotatePoint: TEzPoint Read FGRotatePoint Write FGRotatePoint;
Property GNumPoint: Integer Read FGNumPoint Write FGNumPoint;
Property DirectionArrowSize: Double read FDirectionArrowSize write FDirectionArrowSize;
Property PointEntitySize: Integer Read FPointEntitySize Write FPointEntitySize;
Property PreloadedBlocks: TStrings Read FPreloadedBlocks;
Property PreloadedImages: TStrings Read FPreloadedImages;
Property PreloadedBandedImages: TStrings Read FPreloadedBandedImages;
Property UsePreloadedBlocks: Boolean Read FUsePreloadedBlocks Write FUsePreloadedBlocks;
Property UsePreloadedImages: Boolean Read FUsePreloadedImages Write FUsePreloadedImages;
Property UsePreloadedBandedImages: Boolean Read FUsePreloadedBandedImages Write FUsePreloadedBandedImages;
Property PatternPlotterOptimized: Boolean Read FPatternPlotterOptimized Write FPatternPlotterOptimized;
Property PlineGen: Boolean Read FPlineGen Write FPlineGen;
Property SplineSegs: Integer Read FSplineSegs Write FSplineSegs;
Property EllipseSegs: Integer Read FEllipseSegs Write FEllipseSegs;
Property ArcSegs: Integer Read FArcSegs Write FArcSegs;
Property CommonSubDir: String Read FCommonSubDir Write SetCommonSubDir;
Property BandsBitmapChunkSize: Integer Read FBandsBitmapChunkSize Write SetBandsBitmapChunkSize;
Property DefPenStyle: TEzPenTool Read FDefPenStyle Write SetDefPenStyle;
Property DefBrushStyle: TEzBrushTool Read FDefBrushStyle Write SetDefBrushStyle;
Property DefSymbolStyle: TEzSymbolTool Read FDefSymbolStyle Write SetDefSymbolStyle;
Property DefFontStyle: TEzFontTool Read FDefFontStyle Write SetDefFontStyle;
Property DefTTFontStyle: TEzFontTool Read FDefTTFontStyle Write SetDefTTFontStyle;
Property ShowText: boolean Read FShowText Write FShowText;
Property SelectionPen: TEzPenTool Read FSelectionPen Write SetSelectionPen;
Property SelectionBrush: TEzBrushTool Read FSelectionBrush Write SetSelectionBrush;
Property ControlPointsWidth: integer Read FControlPointsWidth Write FControlPointsWidth;
Property ApertureWidth: integer Read FApertureWidth Write FApertureWidth;
Property MinDrawLimit: integer Read FMinDrawLimit Write FMinDrawLimit;
Property AerialMinDrawLimit: integer Read FAerialMinDrawLimit Write FAerialMinDrawLimit;
Property SelectPickingInside: Boolean Read FSelectPickingInside Write FSelectPickingInside;
Property HintColor: TColor Read FHintColor Write FHintColor;
Property HintFont: TFont Read FHintFont Write SetHintFont;
{ events }
Property OnChange: TNotifyEvent Read FOnChange Write FOnChange;
End;
{ TEzModifyPreferences - a bridge to the global variable
ezsystem.Ez_Preferences: TEzPreferences }
TEzAbout = Type string;
TEzModifyPreferences = Class( TComponent )
Private
FOnChange: TNotifyEvent;
Function GetDefBrushStyle: TEzBrushTool;
Function GetDefPenStyle: TEzPenTool;
Function GetAerialMinDrawLimit: integer;
Function GetApertureWidth: integer;
Function GetArcSegs: Integer;
Function GetBandsBitmapChunkSize: Integer;
Function GetControlPointsWidth: integer;
Function GetDefFontStyle: TEzFontTool;
Function GetDefSymbolStyle: TEzSymbolTool;
Function GetDefTTFontStyle: TEzFontTool;
Function GetEllipseSegs: Integer;
Function GetHintColor: TColor;
Function GetHintFont: TFont;
Function GetCommonSubDir: String;
Function GetMinDrawLimit: integer;
Function GetPatternPlotterOptimized: Boolean;
Function GetPlineGen: Boolean;
Function GetPointEntitySize: Integer;
Function GetDirectionArrowSize: Double;
function GetPreloadedBlocks: TStrings;
Function GetPreloadedImages: TStrings;
Function GetPreloadedBandedImages: TStrings;
Function GetSelectionBrush: TEzBrushTool;
Function GetSelectionPen: TEzPenTool;
Function GetSelectPickingInside: Boolean;
Function GetShowText: boolean;
Function GetSplineSegs: Integer;
function GetUsePreloadedBlocks: Boolean;
Function GetUsePreloadedBandedImages: Boolean;
Function GetUsePreloadedImages: Boolean;
Procedure SetAerialMinDrawLimit( Const Value: integer );
Procedure SetApertureWidth( Const Value: integer );
Procedure SetArcSegs( Const Value: Integer );
Procedure SetBandsBitmapChunkSize( Const Value: Integer );
Procedure SetControlPointsWidth( Const Value: integer );
Procedure SetDefBrushStyle( Const Value: TEzBrushTool );
Procedure SetDefFontStyle( Const Value: TEzFontTool );
Procedure SetDefPenStyle( Const Value: TEzPenTool );
Procedure SetDefSymbolStyle( Const Value: TEzSymbolTool );
Procedure SetDefTTFontStyle( Const Value: TEzFontTool );
Procedure SetEllipseSegs( Const Value: Integer );
Procedure SetHintColor( Const Value: TColor );
Procedure SetHintFont( Const Value: TFont );
Procedure SetCommonSubDir( Const Value: String );
Procedure SetMinDrawLimit( Const Value: integer );
Procedure SetPatternPlotterOptimized( Const Value: Boolean );
Procedure SetPlineGen( Const Value: Boolean );
Procedure SetPointEntitySize( Const Value: Integer );
Procedure SetDirectionArrowSize(const Value: Double);
Procedure SetSelectionBrush( Const Value: TEzBrushTool );
Procedure SetSelectionPen( Const Value: TEzPenTool );
Procedure SetSelectPickingInside( Const Value: Boolean );
Procedure SetShowText( Const Value: boolean );
Procedure SetSplineSegs( Const Value: Integer );
Procedure SetUsePreloadedBandedImages( Const Value: Boolean );
Procedure SetUsePreloadedImages( Const Value: Boolean );
procedure SetUsePreloadedBlocks(const Value: Boolean);
function GetAbout: TEzAbout;
procedure SetAbout(const Value: TEzAbout);
Public
{ methods }
Procedure ApplyChanges;
Procedure LoadFromFile( Const Filename: String );
Procedure SaveToFile( Const FileName: String );
Procedure AddPreloadedBlock( Const FileName: String );
Procedure AddPreloadedImage( Const FileName: String );
Procedure AddPreloadedBandedImage( Const FileName: String );
Procedure ClearPreloadedBlocks;
Procedure ClearPreloadedImages;
Procedure ClearPreloadedBandedImages;
Property PreloadedBlocks: TStrings Read GetPreloadedBlocks;
Property PreloadedImages: TStrings Read GetPreloadedImages;
Property PreloadedBandedImages: TStrings Read GetPreloadedBandedImages;
Published
{properties}
Property About: TEzAbout read GetAbout write SetAbout;
Property PointEntitySize: Integer Read GetPointEntitySize Write SetPointEntitySize;
Property DirectionArrowSize: Double Read GetDirectionArrowSize Write SetDirectionArrowSize;
Property UsePreloadedBlocks: Boolean Read GetUsePreloadedBlocks Write SetUsePreloadedBlocks;
Property UsePreloadedImages: Boolean Read GetUsePreloadedImages Write SetUsePreloadedImages;
Property UsePreloadedBandedImages: Boolean Read GetUsePreloadedBandedImages Write SetUsePreloadedBandedImages;
Property PatternPlotterOptimized: Boolean Read GetPatternPlotterOptimized Write SetPatternPlotterOptimized;
Property PlineGen: Boolean Read GetPlineGen Write SetPlineGen;
Property SplineSegs: Integer Read GetSplineSegs Write SetSplineSegs;
Property EllipseSegs: Integer Read GetEllipseSegs Write SetEllipseSegs;
Property ArcSegs: Integer Read GetArcSegs Write SetArcSegs;
Property CommonSubDir: String Read GetCommonSubDir Write SetCommonSubDir;
Property BandsBitmapChunkSize: Integer Read GetBandsBitmapChunkSize Write SetBandsBitmapChunkSize;
Property DefPenStyle: TEzPenTool Read GetDefPenStyle Write SetDefPenStyle;
Property DefBrushStyle: TEzBrushTool Read GetDefBrushStyle Write SetDefBrushStyle;
Property DefSymbolStyle: TEzSymbolTool Read GetDefSymbolStyle Write SetDefSymbolStyle;
Property DefFontStyle: TEzFontTool Read GetDefFontStyle Write SetDefFontStyle;
Property DefTTFontStyle: TEzFontTool Read GetDefTTFontStyle Write SetDefTTFontStyle;
Property ShowText: boolean Read GetShowText Write SetShowText;
Property SelectionPen: TEzPenTool Read GetSelectionPen Write SetSelectionPen;
Property SelectionBrush: TEzBrushTool Read GetSelectionBrush Write SetSelectionBrush;
Property ControlPointsWidth: integer Read GetControlPointsWidth Write SetControlPointsWidth;
Property ApertureWidth: integer Read GetApertureWidth Write SetApertureWidth;
Property MinDrawLimit: integer Read GetMinDrawLimit Write SetMinDrawLimit;
Property AerialMinDrawLimit: integer Read GetAerialMinDrawLimit Write SetAerialMinDrawLimit;
Property SelectPickingInside: Boolean Read GetSelectPickingInside Write SetSelectPickingInside;
Property HintColor: TColor Read GetHintColor Write SetHintColor;
Property HintFont: TFont Read GetHintFont Write SetHintFont;
{ events }
Property OnChange: TNotifyEvent Read FOnChange Write FOnChange;
End;
{ TEzGridInfo }
TEzGridInfo = Class( TPersistent )
Private
Procedure SetShowGrid( value: boolean );
Procedure SetGridColor( value: TColor );
Procedure SetGridOffset( value: TEzPointTool );
Procedure SetGrid( value: TEzPointTool );
Procedure SetDrawAsCross( value: boolean );
Procedure SetSnapToGrid( value: boolean );
Procedure SetGridSnap( value: TEzPointTool );
Public
{ this is here for fast access}
FShowGrid: Boolean;
FGrid: TEzPointTool;
FGridColor: TColor;
FGridOffset: TEzPointTool;
FDrawAsCross: Boolean;
FSnapToGrid: Boolean;
FGridSnap: TEzPointTool;
Constructor Create;
Destructor Destroy; Override;
Procedure Assign( Source: TPersistent ); Override;
Procedure LoadFromStream( Stream: TStream );
Procedure SaveToStream( Stream: TStream );
Published
Property ShowGrid: Boolean Read FShowGrid Write SetShowGrid Default false;
Property Grid: TEzPointTool Read FGrid Write SetGrid;
Property GridColor: TColor Read FGridColor Write SetGridColor Default clBlack;
Property GridOffset: TEzPointTool Read FGridOffset Write SetGridOffset;
Property DrawAsCross: Boolean Read FDrawAsCross Write SetDrawAsCross Default False;
Property SnapToGrid: Boolean Read FSnapToGrid Write SetSnapToGrid Default False;
Property GridSnap: TEzPointTool Read FGridSnap Write SetGridSnap;
End;
{-------------------------------------------------------------------------------}
{ TEzSortField to sort with variable type columns }
{-------------------------------------------------------------------------------}
TEzSortFields = class;
TEzSortField = Class( TObject )
Private
FFields: TEzSortFields;
FDataType: TExprType;
FDataSize: Integer;
FDesc: Boolean;
FBufferOffset: Integer;
Function GetData( Buffer: Pointer ): Boolean;
Procedure SetData( Buffer: Pointer );
Protected
Function GetAsString: String; Virtual; Abstract;
Procedure SetAsString( Const Value: String ); Virtual; Abstract;
Function GetAsFloat: double; Virtual; Abstract;
Procedure SetAsFloat( Value: double ); Virtual; Abstract;
Function GetAsInteger: Longint; Virtual; Abstract;
Procedure SetAsInteger( Value: Longint ); Virtual; Abstract;
Function GetAsBoolean: Boolean; Virtual; Abstract;
Procedure SetAsBoolean( Value: Boolean ); Virtual; Abstract;
Procedure SetDataType( Value: TExprType );
Public
Constructor Create( Fields: TEzSortFields ); Virtual;
Property DataType: TExprType Read FDataType Write SetDataType;
Property DataSize: Integer Read FDataSize Write FDataSize;
Property Desc: Boolean Read FDesc Write FDesc;
Property BufferOffset: Integer Read FBufferOffset Write FBufferOffset;
Property AsString: String Read GetAsString Write SetAsString;
Property AsFloat: Double Read GetAsFloat Write SetAsFloat;
Property AsInteger: Longint Read GetAsInteger Write SetAsInteger;
Property AsBoolean: Boolean Read GetAsBoolean Write SetAsBoolean;
End;
{-------------------------------------------------------------------------------}
{ TEzSortStringField }
{-------------------------------------------------------------------------------}
TEzSortStringField = Class( TEzSortField )
Private
Function GetValue( Var Value: String ): Boolean;
Protected
Function GetAsString: String; Override;
Procedure SetAsString( Const Value: String ); Override;
Function GetAsFloat: double; Override;
Procedure SetAsFloat( Value: double ); Override;
Function GetAsInteger: Longint; Override;
Procedure SetAsInteger( Value: Longint ); Override;
Function GetAsBoolean: Boolean; Override;
Procedure SetAsBoolean( Value: Boolean ); Override;
Public
Constructor Create( Fields: TEzSortFields ); Override;
End;
{-------------------------------------------------------------------------------}
{ Define TEzSortFloatField }
{-------------------------------------------------------------------------------}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -