home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 2002 by Borland Software Corporation
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'FormMagnet.pas' rev: 6.00
-
- #ifndef FormMagnetHPP
- #define FormMagnetHPP
-
- #pragma delphiheader begin
- #pragma option push -w-
- #pragma option push -Vx
- #include <Forms.hpp> // Pascal unit
- #include <Classes.hpp> // Pascal unit
- #include <Messages.hpp> // Pascal unit
- #include <Windows.hpp> // Pascal unit
- #include <SysInit.hpp> // Pascal unit
- #include <System.hpp> // Pascal unit
-
- //-- user supplied -----------------------------------------------------------
-
- namespace Formmagnet
- {
- //-- type declarations -------------------------------------------------------
- class DELPHICLASS TMagnetFormHookComponent;
- class PASCALIMPLEMENTATION TMagnetFormHookComponent : public Classes::TComponent
- {
- typedef Classes::TComponent inherited;
-
- private:
- bool Hooked;
- Forms::TForm* FParentForm;
- unsigned FParentHandle;
- void *FOldWndProc;
- void *FNewWndProc;
- void __fastcall HookWndProc(Messages::TMessage &Message);
-
- protected:
- virtual void __fastcall MessageBefore(Messages::TMessage &Message, bool &Handled);
- virtual void __fastcall MessageAfter(Messages::TMessage &Message);
- virtual void __fastcall FormRecreate(void);
- virtual unsigned __fastcall GetParentHandle(void);
-
- public:
- __fastcall virtual TMagnetFormHookComponent(Classes::TComponent* aOwner);
- __fastcall virtual ~TMagnetFormHookComponent(void);
- __property Forms::TForm* ParentForm = {read=FParentForm};
- __property unsigned ParentHandle = {read=FParentHandle, nodefault};
- __property void * OldWndProc = {read=FOldWndProc};
- };
-
-
- #pragma option push -b-
- enum TScreenArea { saFullScreen, saWorkArea };
- #pragma option pop
-
- class DELPHICLASS TScreenMagnet;
- class PASCALIMPLEMENTATION TScreenMagnet : public Classes::TPersistent
- {
- typedef Classes::TPersistent inherited;
-
- private:
- TScreenArea FArea;
- Byte FDesktopPower;
- bool FTop;
- bool FBottom;
- bool FLeft;
- bool FRight;
-
- public:
- __fastcall TScreenMagnet(void);
-
- __published:
- __property TScreenArea Area = {read=FArea, write=FArea, nodefault};
- __property Byte DesktopPower = {read=FDesktopPower, write=FDesktopPower, nodefault};
- __property bool Top = {read=FTop, write=FTop, nodefault};
- __property bool Bottom = {read=FBottom, write=FBottom, nodefault};
- __property bool Left = {read=FLeft, write=FLeft, nodefault};
- __property bool Right = {read=FRight, write=FRight, nodefault};
- public:
- #pragma option push -w-inl
- /* TPersistent.Destroy */ inline __fastcall virtual ~TScreenMagnet(void) { }
- #pragma option pop
-
- };
-
-
- class DELPHICLASS TGluedObject;
- class DELPHICLASS TFormMagnet;
- #pragma option push -b-
- enum TMagnetType { mkOnMoving, mkAfterMoving };
- #pragma option pop
-
- typedef void __fastcall (__closure *TOnGlue)(System::TObject* Sender, Forms::TForm* AnotherForm, bool &AllowGlue);
-
- typedef void __fastcall (__closure *TOnMagnet)(System::TObject* Sender, Forms::TForm* AnotherForm, bool &AllowMagnet);
-
- class DELPHICLASS TGlueList;
- class PASCALIMPLEMENTATION TGlueList : public Classes::TList
- {
- typedef Classes::TList inherited;
-
- public:
- bool __fastcall IsGluedTo(TFormMagnet* Magnet);
- Types::TPoint __fastcall GetFormPositionByMagnet(TFormMagnet* Magnet);
- public:
- #pragma option push -w-inl
- /* TList.Destroy */ inline __fastcall virtual ~TGlueList(void) { }
- #pragma option pop
-
- public:
- #pragma option push -w-inl
- /* TObject.Create */ inline __fastcall TGlueList(void) : Classes::TList() { }
- #pragma option pop
-
- };
-
-
- class PASCALIMPLEMENTATION TFormMagnet : public TMagnetFormHookComponent
- {
- typedef TMagnetFormHookComponent inherited;
-
- private:
- bool FActive;
- bool FGlue;
- bool FFormDragable;
- TMagnetType FMagnetType;
- Byte FPower;
- TScreenMagnet* FScreenMagnet;
- TOnGlue FOnGlue;
- TOnMagnet FOnMagnet;
- Classes::TNotifyEvent FOnDragMove;
- bool Suspended;
- TGlueList* GluedTo;
- bool Moving;
- #pragma pack(push, 1)
- Types::TPoint BeginMovingPos;
- #pragma pack(pop)
-
- void __fastcall SetActive(bool Value);
- bool __fastcall AllowGlueTo(TFormMagnet* AnotherMagnet);
- bool __fastcall AllowMagnetTo(TFormMagnet* AnotherMagnet);
- void __fastcall RecalculateGluing(void);
- void __fastcall MagnetByDraggingRect(Types::TRect &DraggingRect, bool CalculateRelativePlacement, bool GlueOnly);
-
- protected:
- virtual void __fastcall MessageBefore(Messages::TMessage &Message, bool &Handled);
- virtual void __fastcall MessageAfter(Messages::TMessage &Message);
- virtual void __fastcall Loaded(void);
-
- public:
- __fastcall virtual TFormMagnet(Classes::TComponent* aOwner);
- __fastcall virtual ~TFormMagnet(void);
- void __fastcall DoMagnet(void);
-
- __published:
- __property bool Active = {read=FActive, write=SetActive, nodefault};
- __property bool Glue = {read=FGlue, write=FGlue, nodefault};
- __property bool FormDragable = {read=FFormDragable, write=FFormDragable, nodefault};
- __property TMagnetType MagnetType = {read=FMagnetType, write=FMagnetType, nodefault};
- __property Byte Power = {read=FPower, write=FPower, nodefault};
- __property TScreenMagnet* ScreenMagnet = {read=FScreenMagnet, write=FScreenMagnet};
- __property TOnGlue OnGlue = {read=FOnGlue, write=FOnGlue};
- __property TOnMagnet OnMagnet = {read=FOnMagnet, write=FOnMagnet};
- __property Classes::TNotifyEvent OnDragMove = {read=FOnDragMove, write=FOnDragMove};
- };
-
-
- class PASCALIMPLEMENTATION TGluedObject : public System::TObject
- {
- typedef System::TObject inherited;
-
- private:
- TFormMagnet* Magnet;
- #pragma pack(push, 1)
- Types::TPoint Position;
- #pragma pack(pop)
-
-
- public:
- __fastcall TGluedObject(TFormMagnet* aMagnet, int aLeft, int aTop);
- public:
- #pragma option push -w-inl
- /* TObject.Destroy */ inline __fastcall virtual ~TGluedObject(void) { }
- #pragma option pop
-
- };
-
-
- //-- var, const, procedure ---------------------------------------------------
- extern PACKAGE void __fastcall Register(void);
-
- } /* namespace Formmagnet */
- using namespace Formmagnet;
- #pragma option pop // -w-
- #pragma option pop // -Vx
-
- #pragma delphiheader end.
- //-- end unit ----------------------------------------------------------------
- #endif // FormMagnet
-