1 unit sparta_InterfacesMDI; 2 3 {$WARNING Package Sparta_MDI is deprecated} 4 {$WARNING It will be removed from Lazarus sources in next major release} 5 {$mode objfpc}{$H+} 6 7 interface 8 9 uses 10 Classes, SysUtils, Controls, Forms, ExtCtrls; 11 12 type 13 IDesignedRealForm = interface 14 ['{AAEC32EE-4ABE-4691-A172-FC67B66118DD}'] 15 // bounds GetRealBoundsnull16 function GetRealBounds(AIndex: Integer): Integer; 17 procedure SetRealBounds(AIndex: Integer; AValue: Integer); 18 19 property RealLeft: Integer index 0 read GetRealBounds write SetRealBounds; 20 property RealTop: Integer index 1 read GetRealBounds write SetRealBounds; 21 property RealWidth: Integer index 2 read GetRealBounds write SetRealBounds; 22 property RealHeight: Integer index 3 read GetRealBounds write SetRealBounds; 23 24 // setters 25 procedure SetRealBorderStyle(AVal: TFormBorderStyle); 26 procedure SetRealBorderIcons(AVal: TBorderIcons); 27 procedure SetRealFormStyle(AVal: TFormStyle); 28 procedure SetRealPopupMode(AVal: TPopupMode); 29 procedure SetRealPopupParent(AVal: TCustomForm); 30 31 // getters GetRealBorderStylenull32 function GetRealBorderStyle: TFormBorderStyle; GetRealBorderIconsnull33 function GetRealBorderIcons: TBorderIcons; GetRealFormStylenull34 function GetRealFormStyle: TFormStyle; GetRealPopupModenull35 function GetRealPopupMode: TPopupMode; GetRealPopupParentnull36 function GetRealPopupParent: TCustomForm; 37 38 // properties 39 property RealBorderStyle: TFormBorderStyle read GetRealBorderStyle write SetRealBorderStyle; 40 property RealBorderIcons: TBorderIcons read GetRealBorderIcons write SetRealBorderIcons; 41 property RealFormStyle: TFormStyle read GetRealFormStyle write SetRealFormStyle; 42 43 property RealPopupMode: TPopupMode read GetRealPopupMode write SetRealPopupMode; 44 property RealPopupParent: TCustomForm read GetRealPopupParent write SetRealPopupParent; 45 end; 46 47 IDesignedForm = interface(IDesignedRealForm) 48 ['{5D30C0DE-4D51-4FB5-99FC-88900FAE6B66}'] 49 procedure BeginUpdate; 50 procedure EndUpdate(AModified: Boolean = False); 51 GetUpdatenull52 function GetUpdate: Boolean; 53 property Update: Boolean read GetUpdate; 54 55 procedure ShowWindow; 56 procedure HideWindow; PositionDeltanull57 function PositionDelta: TPoint; 58 59 // hacked values GetPublishedBoundsnull60 function GetPublishedBounds(AIndex: Integer): Integer; 61 procedure SetPublishedBounds(AIndex: Integer; AValue: Integer); 62 property Left: Integer index 0 read GetPublishedBounds write SetPublishedBounds; 63 property Top: Integer index 1 read GetPublishedBounds write SetPublishedBounds; 64 property Width: Integer index 2 read GetPublishedBounds write SetPublishedBounds; 65 property Height: Integer index 3 read GetPublishedBounds write SetPublishedBounds; 66 67 // design form scroll system 68 procedure SetHorzScrollPosition(AValue: Integer); 69 procedure SetVertScrollPosition(AValue: Integer); GetHorzScrollPositionnull70 function GetHorzScrollPosition: Integer; GetVertScrollPositionnull71 function GetVertScrollPosition: Integer; 72 property HorzScrollPosition: Integer read GetHorzScrollPosition write SetHorzScrollPosition; 73 property VertScrollPosition: Integer read GetVertScrollPosition write SetVertScrollPosition; 74 75 // on notify change 76 procedure SetOnChangeHackedBounds(const AValue: TNotifyEvent); GetOnChangeHackedBoundsnull77 function GetOnChangeHackedBounds: TNotifyEvent; 78 property OnChangeHackedBounds: TNotifyEvent read GetOnChangeHackedBounds write SetOnChangeHackedBounds; 79 80 // GetFormnull81 function GetForm: TCustomForm; 82 property Form: TCustomForm read GetForm; 83 end; 84 85 IDesignedRealFormHelper = interface(IDesignedRealForm) 86 ['{7EF20246-A8B4-4919-8C33-20E07C24F0E9}'] GetLogicalClientRectnull87 function GetLogicalClientRect(ALogicalClientRect: TRect): TRect; 88 end; 89 90 IResizeFrame = interface 91 ['{A674B2AF-4984-433D-8872-5B5825F345D7}'] 92 procedure HideSizeRects; 93 procedure ShowSizeRects; 94 procedure PositionNodes; DesignedWidthToScrollnull95 function DesignedWidthToScroll: Integer; DesignedHeightToScrollnull96 function DesignedHeightToScroll: Integer; 97 procedure ClientChangeBounds; 98 procedure DesignerSetFocus; 99 procedure OnModified; 100 GetFramenull101 function GetFrame: TCustomFrame; GetVerticalScrollPosnull102 function GetVerticalScrollPos: Integer; 103 procedure SetVerticalScrollPos(AValue: Integer); GetHorizontalScrollPosnull104 function GetHorizontalScrollPos: Integer; 105 procedure SetHorizontalScrollPos(AValue: Integer); GetBackgroundPanelnull106 function GetBackgroundPanel: TPanel; GetBackgroundMarginnull107 function GetBackgroundMargin(const AIndex: Integer): Integer; GetNewSizenull108 function GetNewSize: TPoint; GetFormHandlernull109 function GetFormHandler: TPanel; GetNodePositioningnull110 function GetNodePositioning: Boolean; GetDesignedFormnull111 function GetDesignedForm: IDesignedForm; 112 procedure SetDesignedForm(const AValue: IDesignedForm); 113 GetSizerRectSizenull114 function GetSizerRectSize: Integer; GetSizerLineWidthnull115 function GetSizerLineWidth: Integer; 116 117 property Frame: TCustomFrame read GetFrame; 118 property VerticalScrollPos: Integer read GetVerticalScrollPos write SetVerticalScrollPos; 119 property HorizontalScrollPos: Integer read GetHorizontalScrollPos write SetHorizontalScrollPos; 120 property BgPanel: TPanel read GetBackgroundPanel; 121 122 property BgLeftMargin: Integer index 0 read GetBackgroundMargin; 123 property BgTopMargin: Integer index 1 read GetBackgroundMargin; 124 property BgRightMargin: Integer index 2 read GetBackgroundMargin; 125 property BgBottomMargin: Integer index 3 read GetBackgroundMargin; 126 127 property NewSize: TPoint read GetNewSize; 128 property FormHandler: TPanel read GetFormHandler; 129 property NodePositioning: Boolean read GetNodePositioning; 130 property DesignedForm: IDesignedForm read GetDesignedForm write SetDesignedForm; 131 132 property SizerRectSize: Integer read GetSizerRectSize; 133 property SizerLineWidth: Integer read GetSizerLineWidth; 134 end; 135 136 IDesignedFormBackground = interface 137 ['{AC7F6594-1C2D-4424-977B-28053A79CE99}'] GetMarginnull138 function GetMargin(const AIndex: Integer): Integer; 139 140 property LeftMargin: Integer index 0 read GetMargin; 141 property TopMargin: Integer index 1 read GetMargin; 142 property RightMargin: Integer index 2 read GetMargin; 143 property BottomMargin: Integer index 3 read GetMargin; 144 145 procedure SetParent(AValue: TWinControl); GetParentnull146 function GetParent: TWinControl; 147 property Parent: TWinControl read GetParent write SetParent; 148 GetDesignedFormnull149 function GetDesignedForm: IDesignedForm; 150 property DesignedForm: IDesignedForm read GetDesignedForm; 151 GetResizeFramenull152 function GetResizeFrame: IResizeFrame; 153 procedure SetResizeFrame(AValue: IResizeFrame); 154 property ResizeFrame: IResizeFrame read GetResizeFrame write SetResizeFrame; 155 156 procedure RefreshValues; 157 end; 158 159 IResizer = interface 160 ['{C3D1A2C0-8AED-493B-9809-1F5C3A54A8A8}'] 161 procedure TryBoundSizerToDesignedForm(Sender: TObject); GetActiveResizeFramenull162 function GetActiveResizeFrame: IResizeFrame; 163 property ActiveResizeFrame: IResizeFrame read GetActiveResizeFrame; GetActiveDesignedFormnull164 function GetActiveDesignedForm: IDesignedForm; 165 property ActiveDesignedForm: IDesignedForm read GetActiveDesignedForm; 166 end; 167 168 implementation 169 170 end. 171 172