// Borland C++ Builder
// Copyright (c) 1995, 1998 by Borland International
// All rights reserved

// (DO NOT EDIT: machine generated header) 'TB97.pas' rev: 3.00

#ifndef TB97HPP
#define TB97HPP
#include <ExtCtrls.hpp>
#include <StdCtrls.hpp>
#include <Buttons.hpp>
#include <Graphics.hpp>
#include <Menus.hpp>
#include <Forms.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <SysInit.hpp>
#include <System.hpp>

//-- user supplied -----------------------------------------------------------

namespace Tb97
{
//-- type declarations -------------------------------------------------------
enum TDockBoundLinesValues { blTop, blBottom, blLeft, blRight };

typedef Set<TDockBoundLinesValues, blTop, blRight>  TDockBoundLines;

enum TDockPosition { dpTop, dpBottom, dpLeft, dpRight };

enum TDockType { dtNotDocked, dtTopBottom, dtLeftRight };

typedef Set<TDockPosition, dpTop, dpRight>  TDockableTo;

class DELPHICLASS TCustomToolWindow97;
typedef void __fastcall (__closure *TInsertRemoveEvent)(System::TObject* Sender, bool Inserting, TCustomToolWindow97* 
	Bar);

typedef void __fastcall (__closure *TRequestDockEvent)(System::TObject* Sender, TCustomToolWindow97* 
	Bar, bool &Accept);

class DELPHICLASS TDock97;
class PASCALIMPLEMENTATION TDock97 : public Controls::TCustomControl 
{
	typedef Controls::TCustomControl inherited;
	
private:
	TDockPosition FPosition;
	bool FAllowDrag;
	TDockBoundLines FBoundLines;
	Graphics::TBitmap* FBkg;
	Graphics::TBitmap* FBkgCache;
	bool FBkgTransparent;
	bool FBkgOnToolbars;
	bool FFixAlign;
	bool FLimitToOneRow;
	TInsertRemoveEvent FOnInsertRemoveBar;
	TRequestDockEvent FOnRequestDock;
	Classes::TNotifyEvent FOnResize;
	int DisableArrangeToolbars;
	Classes::TList* DockList;
	Classes::TList* RowSizes;
	void __fastcall SetAllowDrag(bool Value);
	void __fastcall SetBackground(Graphics::TBitmap* Value);
	void __fastcall SetBackgroundOnToolbars(bool Value);
	void __fastcall SetBackgroundTransparent(bool Value);
	void __fastcall SetBoundLines(TDockBoundLines Value);
	void __fastcall SetFixAlign(bool Value);
	void __fastcall SetPosition(TDockPosition Value);
	int __fastcall GetToolbarCount(void);
	TCustomToolWindow97* __fastcall GetToolbars(int Index);
	void __fastcall FreeRowInfo(void);
	int __fastcall GetRowOf(const int XY, bool &Before);
	int __fastcall GetDesignModeRowOf(const int XY);
	int __fastcall GetHighestRow(void);
	int __fastcall GetNumberOfToolbarsOnRow(const int Row, const TCustomToolWindow97* NotIncluding);
	void __fastcall RemoveBlankRows(void);
	void __fastcall InsertRowBefore(const int BeforeRow);
	void __fastcall BuildRowInfo(void);
	void __fastcall ChangeDockList(const bool Insert, const TCustomToolWindow97* Bar, const bool IsVisible
		);
	void __fastcall ChangeWidthHeight(const bool IsClientWidthAndHeight, int NewWidth, int NewHeight);
	void __fastcall ArrangeToolbars(void);
	void __fastcall DrawBackground(const HDC DC, const Windows::TRect &IntersectClippingRect, const Windows::PRect 
		ExcludeClippingRect, const Windows::TRect &DrawRect);
	void __fastcall InvalidateBackgrounds(void);
	void __fastcall BackgroundChanged(System::TObject* Sender);
	bool __fastcall UsingBackground(void);
	HIDESBASE MESSAGE void __fastcall CMColorChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMSysColorChange(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMMove(Messages::TWMMove &Message);
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
	MESSAGE void __fastcall WMNCCalcSize(Messages::TWMNCCalcSize &Message);
	MESSAGE void __fastcall WMNCPaint(Messages::TMessage &Message);
	
protected:
	virtual void __fastcall AlignControls(Controls::TControl* AControl, Windows::TRect &Rect);
	DYNAMIC HPALETTE __fastcall GetPalette(void);
	virtual void __fastcall Loaded(void);
	virtual void __fastcall SetParent(Controls::TWinControl* AParent);
	virtual void __fastcall Paint(void);
	DYNAMIC void __fastcall VisibleChanging(void);
	
public:
	__fastcall virtual TDock97(Classes::TComponent* AOwner);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	__fastcall virtual ~TDock97(void);
	int __fastcall GetRowSize(const int Row, const TCustomToolWindow97* DefaultToolbar);
	__property int ToolbarCount = {read=GetToolbarCount, nodefault};
	__property TCustomToolWindow97* Toolbars[int Index] = {read=GetToolbars};
	
__published:
	__property bool AllowDrag = {read=FAllowDrag, write=SetAllowDrag, default=1};
	__property Graphics::TBitmap* Background = {read=FBkg, write=SetBackground};
	__property bool BackgroundOnToolbars = {read=FBkgOnToolbars, write=SetBackgroundOnToolbars, default=1
		};
	__property bool BackgroundTransparent = {read=FBkgTransparent, write=SetBackgroundTransparent, default=0
		};
	__property TDockBoundLines BoundLines = {read=FBoundLines, write=SetBoundLines, default=0};
	__property Color ;
	__property bool FixAlign = {read=FFixAlign, write=SetFixAlign, default=0};
	__property bool LimitToOneRow = {read=FLimitToOneRow, write=FLimitToOneRow, default=0};
	__property PopupMenu ;
	__property TDockPosition Position = {read=FPosition, write=SetPosition, default=0};
	__property TInsertRemoveEvent OnInsertRemoveBar = {read=FOnInsertRemoveBar, write=FOnInsertRemoveBar
		};
	__property TRequestDockEvent OnRequestDock = {read=FOnRequestDock, write=FOnRequestDock};
	__property Classes::TNotifyEvent OnResize = {read=FOnResize, write=FOnResize};
public:
	/* TWinControl.CreateParented */ __fastcall TDock97(HWND ParentWindow) : Controls::TCustomControl(ParentWindow
		) { }
	
};

enum TToolWindowArrangeType { atNone, atMoveControls, atMoveControlsAndResize };

#pragma pack(push, 1)
struct TToolWindowParams
{
	bool CallAlignControls;
	bool ResizeEightCorner;
	bool ResizeClipCursor;
} ;
#pragma pack(pop)

typedef int __fastcall (*TPositionReadIntProc)(const System::AnsiString ToolbarName, const System::AnsiString 
	Value, const int Default, const void * ExtraData);

typedef System::AnsiString __fastcall (*TPositionReadStringProc)(const System::AnsiString ToolbarName
	, const System::AnsiString Value, const System::AnsiString Default, const void * ExtraData);

typedef void __fastcall (*TPositionWriteIntProc)(const System::AnsiString ToolbarName, const System::AnsiString 
	Value, const int Data, const void * ExtraData);

typedef void __fastcall (*TPositionWriteStringProc)(const System::AnsiString ToolbarName, const System::AnsiString 
	Value, const System::AnsiString Data, const void * ExtraData);

class PASCALIMPLEMENTATION TCustomToolWindow97 : public Controls::TCustomControl 
{
	typedef Controls::TCustomControl inherited;
	
private:
	int FDockPos;
	int FDockRow;
	bool FDocked;
	TDock97* FDockedTo;
	TDock97* FDefaultDock;
	Classes::TNotifyEvent FOnClose;
	Classes::TNotifyEvent FOnDockChanged;
	Classes::TNotifyEvent FOnDockChanging;
	Classes::TNotifyEvent FOnRecreated;
	Classes::TNotifyEvent FOnRecreating;
	Classes::TNotifyEvent FOnResize;
	Classes::TNotifyEvent FOnVisibleChanged;
	bool FActivateParent;
	bool FHideWhenInactive;
	bool FCloseButton;
	bool FFullSize;
	bool FResizable;
	bool FDragHandle;
	TDockableTo FDockableTo;
	TToolWindowParams FParams;
	int FUpdatingBounds;
	int FDisableArrangeControls;
	int FHidden;
	bool FArrangeNeeded;
	bool FInactiveCaption;
	tagPOINT FFloatingTopLeft;
	Controls::TWinControl* FloatParent;
	Forms::TForm* MDIParentForm;
	bool NotOnScreen;
	bool CloseButtonDown;
	void __fastcall SetCloseButton(bool Value);
	void __fastcall SetDefaultDock(TDock97* Value);
	void __fastcall SetDockedTo(TDock97* Value);
	void __fastcall SetDockPos(int Value);
	void __fastcall SetDockRow(int Value);
	void __fastcall SetDragHandle(bool Value);
	void __fastcall SetFullSize(bool Value);
	void __fastcall SetResizable(bool Value);
	void __fastcall MoveOnScreen(const bool OnlyIfFullyOffscreen);
	void __fastcall CustomArrangeControls(const TToolWindowArrangeType ArrangeType, const TDock97* WasDockedTo
		, const TDock97* DockingTo, tagPOINT &NewClientSize);
	void __fastcall ArrangeControls(void);
	void __fastcall DrawDraggingOutline(const HDC DC, const Windows::PRect NewRect, const Windows::PRect 
		OldRect, const bool NewDocking, const bool OldDocking);
	/*         class method */ static bool __fastcall NewMainWindowHook(System::TMetaClass* vmt, Messages::TMessage 
		&Message);
	void __fastcall BeginMoving(const int InitX, const int InitY);
	void __fastcall BeginSizing(const int HitTestValue, bool &Accept, Windows::TRect &NewRect);
	void __fastcall DrawFloatingNCArea(const HRGN Clip, const bool RedrawBorder, const bool RedrawCaption
		, const bool RedrawCloseButton);
	void __fastcall DrawDockedNCArea(const HRGN Clip);
	void __fastcall InvalidateDockedNCArea(void);
	void __fastcall ValidateDockedNCArea(void);
	void __fastcall SetNotOnScreen(const bool Value);
	void __fastcall SetInactiveCaption(const bool Value);
	HIDESBASE MESSAGE void __fastcall CMColorChanged(Messages::TMessage &Message);
	MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMShowingChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMVisibleChanged(Messages::TMessage &Message);
	MESSAGE void __fastcall WMActivate(Messages::TWMActivate &Message);
	MESSAGE void __fastcall WMClose(Messages::TWMNoParams &Message);
	MESSAGE void __fastcall WMGetMinMaxInfo(Messages::TWMGetMinMaxInfo &Message);
	HIDESBASE MESSAGE void __fastcall WMMove(Messages::TWMMove &Message);
	MESSAGE void __fastcall WMMouseActivate(Messages::TWMMouseActivate &Message);
	MESSAGE void __fastcall WMNCCalcSize(Messages::TWMNCCalcSize &Message);
	HIDESBASE MESSAGE void __fastcall WMNCHitTest(Messages::TWMNCHitTest &Message);
	HIDESBASE MESSAGE void __fastcall WMNCLButtonDown(Messages::TWMNCHitMessage &Message);
	MESSAGE void __fastcall WMNCPaint(Messages::TMessage &Message);
	MESSAGE void __fastcall WMTB97PaintDockedNCArea(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
	
protected:
	__property bool ActivateParent = {read=FActivateParent, write=FActivateParent, default=1};
	__property Color ;
	__property bool CloseButton = {read=FCloseButton, write=SetCloseButton, default=1};
	__property TDock97* DefaultDock = {read=FDefaultDock, write=SetDefaultDock};
	__property TDockableTo DockableTo = {read=FDockableTo, write=FDockableTo, default=15};
	__property TDock97* DockedTo = {read=FDockedTo, write=SetDockedTo};
	__property int DockPos = {read=FDockPos, write=SetDockPos, default=-1};
	__property int DockRow = {read=FDockRow, write=SetDockRow, default=0};
	__property bool DragHandle = {read=FDragHandle, write=SetDragHandle, default=1};
	__property bool FullSize = {read=FFullSize, write=SetFullSize, default=0};
	__property bool HideWhenInactive = {read=FHideWhenInactive, write=FHideWhenInactive, default=1};
	__property TToolWindowParams Params = {read=FParams};
	__property bool Resizable = {read=FResizable, write=SetResizable, default=1};
	__property Classes::TNotifyEvent OnClose = {read=FOnClose, write=FOnClose};
	__property Classes::TNotifyEvent OnDockChanged = {read=FOnDockChanged, write=FOnDockChanged};
	__property Classes::TNotifyEvent OnDockChanging = {read=FOnDockChanging, write=FOnDockChanging};
	__property Classes::TNotifyEvent OnRecreated = {read=FOnRecreated, write=FOnRecreated};
	__property Classes::TNotifyEvent OnRecreating = {read=FOnRecreating, write=FOnRecreating};
	__property Classes::TNotifyEvent OnResize = {read=FOnResize, write=FOnResize};
	__property Classes::TNotifyEvent OnVisibleChanged = {read=FOnVisibleChanged, write=FOnVisibleChanged
		};
	virtual void __fastcall AlignControls(Controls::TControl* AControl, Windows::TRect &Rect);
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	DYNAMIC HPALETTE __fastcall GetPalette(void);
	virtual void __fastcall Loaded(void);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, 
		int Y);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
		);
	virtual void __fastcall Paint(void);
	DYNAMIC bool __fastcall PaletteChanged(bool Foreground);
	virtual void __fastcall SetParent(Controls::TWinControl* AParent);
	DYNAMIC void __fastcall ReadPositionData(const TPositionReadIntProc ReadIntProc, const TPositionReadStringProc 
		ReadStringProc, const void * ExtraData);
	DYNAMIC void __fastcall DoneReadingPositionData(void);
	DYNAMIC void __fastcall WritePositionData(const TPositionWriteIntProc WriteIntProc, const TPositionWriteStringProc 
		WriteStringProc, const void * ExtraData);
	DYNAMIC void __fastcall GetParams(TToolWindowParams &Params);
	DYNAMIC void __fastcall ResizeBegin(int HitTestValue);
	DYNAMIC void __fastcall ResizeTrack(Windows::TRect &Rect, const Windows::TRect &OrigRect);
	DYNAMIC void __fastcall ResizeEnd(bool Accept);
	virtual void __fastcall GetBarSize(int &ASize, const TDockType DockType) = 0;
	void __fastcall GetDockRowSize(int &AHeightOrWidth);
	virtual void __fastcall GetMinimumSize(int &AClientWidth, int &AClientHeight) = 0;
	DYNAMIC void __fastcall InitializeOrdering(void);
	virtual void __fastcall OrderControls(const bool CanMoveControls, const TDock97* WasDockedTo, const 
		TDock97* DockingTo, tagPOINT &NewClientSize) = 0;
	virtual void __fastcall SizeChanging(const int AWidth, const int AHeight);
	
public:
	__property bool Docked = {read=FDocked, nodefault};
	__fastcall virtual TCustomToolWindow97(Classes::TComponent* AOwner);
	__fastcall virtual ~TCustomToolWindow97(void);
	virtual void __fastcall SetBounds(int ALeft, int ATop, int AWidth, int AHeight);
	void __fastcall BeginUpdate(void);
	void __fastcall EndUpdate(void);
	
__published:
	__property Height  = {stored=false};
	__property Width  = {stored=false};
	__property ClientHeight  = {stored=true};
	__property ClientWidth  = {stored=true};
public:
	/* TWinControl.CreateParented */ __fastcall TCustomToolWindow97(HWND ParentWindow) : Controls::TCustomControl(
		ParentWindow) { }
	
};

class DELPHICLASS TCustomToolbar97;
class PASCALIMPLEMENTATION TCustomToolbar97 : public Tb97::TCustomToolWindow97 
{
	typedef Tb97::TCustomToolWindow97 inherited;
	
private:
	int FFloatingRightX;
	void *SizeData;
	Classes::TList* SlaveInfo;
	Classes::TList* GroupInfo;
	Classes::TList* LineSeps;
	Classes::TList* OrderList;
	int __fastcall GetOrderIndex(Controls::TControl* Control);
	void __fastcall SetOrderIndex(Controls::TControl* Control, int Value);
	bool __fastcall ShouldBeVisible(const Controls::TControl* Control, const bool LeftOrRight, const bool 
		SetIt);
	void __fastcall FreeGroupInfo(const Classes::TList* List);
	void __fastcall BuildGroupInfo(const Classes::TList* List, const bool TranslateSlave, const TDockType 
		OldDockType, const TDockType NewDockType);
	HIDESBASE MESSAGE void __fastcall CMControlListChange(Controls::TCMControlListChange &Message);
	
protected:
	virtual void __fastcall Paint(void);
	DYNAMIC void __fastcall ReadPositionData(const TPositionReadIntProc ReadIntProc, const TPositionReadStringProc 
		ReadStringProc, const void * ExtraData);
	DYNAMIC void __fastcall WritePositionData(const TPositionWriteIntProc WriteIntProc, const TPositionWriteStringProc 
		WriteStringProc, const void * ExtraData);
	DYNAMIC void __fastcall GetParams(TToolWindowParams &Params);
	DYNAMIC void __fastcall ResizeBegin(int HitTestValue);
	DYNAMIC void __fastcall ResizeTrack(Windows::TRect &Rect, const Windows::TRect &OrigRect);
	DYNAMIC void __fastcall ResizeEnd(bool Accept);
	virtual void __fastcall GetBarSize(int &ASize, const TDockType DockType);
	virtual void __fastcall GetMinimumSize(int &AClientWidth, int &AClientHeight);
	DYNAMIC void __fastcall InitializeOrdering(void);
	virtual void __fastcall OrderControls(const bool CanMoveControls, const TDock97* WasDockedTo, const 
		TDock97* DockingTo, tagPOINT &NewClientSize);
	
public:
	__property int OrderIndex[Controls::TControl* Control] = {read=GetOrderIndex, write=SetOrderIndex};
		
	__fastcall virtual TCustomToolbar97(Classes::TComponent* AOwner);
	__fastcall virtual ~TCustomToolbar97(void);
	void __fastcall SetSlaveControl(const Controls::TControl* ATopBottom, const Controls::TControl* ALeftRight
		);
	
__published:
	__property ClientHeight  = {stored=false};
	__property ClientWidth  = {stored=false};
public:
	/* TWinControl.CreateParented */ __fastcall TCustomToolbar97(HWND ParentWindow) : Tb97::TCustomToolWindow97(
		ParentWindow) { }
	
};

class DELPHICLASS TToolbar97;
class PASCALIMPLEMENTATION TToolbar97 : public Tb97::TCustomToolbar97 
{
	typedef Tb97::TCustomToolbar97 inherited;
	
__published:
	__property ActivateParent ;
	__property Caption ;
	__property Color ;
	__property CloseButton ;
	__property DefaultDock ;
	__property DockableTo ;
	__property DockedTo ;
	__property DockPos ;
	__property DockRow ;
	__property DragHandle ;
	__property FullSize ;
	__property HideWhenInactive ;
	__property ParentShowHint ;
	__property PopupMenu ;
	__property ShowHint ;
	__property TabOrder ;
	__property Visible ;
	__property OnClose ;
	__property OnDragDrop ;
	__property OnDragOver ;
	__property OnRecreated ;
	__property OnRecreating ;
	__property OnDockChanged ;
	__property OnDockChanging ;
	__property OnResize ;
	__property OnVisibleChanged ;
public:
	/* TCustomToolbar97.Create */ __fastcall virtual TToolbar97(Classes::TComponent* AOwner) : Tb97::TCustomToolbar97(
		AOwner) { }
	/* TCustomToolbar97.Destroy */ __fastcall virtual ~TToolbar97(void) { }
	
public:
	/* TWinControl.CreateParented */ __fastcall TToolbar97(HWND ParentWindow) : Tb97::TCustomToolbar97(
		ParentWindow) { }
	
};

class DELPHICLASS TToolWindow97;
class PASCALIMPLEMENTATION TToolWindow97 : public Tb97::TCustomToolWindow97 
{
	typedef Tb97::TCustomToolWindow97 inherited;
	
private:
	int FMinClientWidth;
	int FMinClientHeight;
	int FBarHeight;
	int FBarWidth;
	
protected:
	virtual void __fastcall CreateParams(Controls::TCreateParams &Params);
	DYNAMIC void __fastcall ReadPositionData(const TPositionReadIntProc ReadIntProc, const TPositionReadStringProc 
		ReadStringProc, const void * ExtraData);
	DYNAMIC void __fastcall WritePositionData(const TPositionWriteIntProc WriteIntProc, const TPositionWriteStringProc 
		WriteStringProc, const void * ExtraData);
	virtual void __fastcall GetBarSize(int &ASize, const TDockType DockType);
	virtual void __fastcall GetMinimumSize(int &AClientWidth, int &AClientHeight);
	virtual void __fastcall OrderControls(const bool CanMoveControls, const TDock97* WasDockedTo, const 
		TDock97* DockingTo, tagPOINT &NewClientSize);
	virtual void __fastcall SizeChanging(const int AWidth, const int AHeight);
	
public:
	__fastcall virtual TToolWindow97(Classes::TComponent* AOwner);
	
__published:
	__property ActivateParent ;
	__property Caption ;
	__property Color ;
	__property CloseButton ;
	__property DefaultDock ;
	__property DockableTo ;
	__property DockedTo ;
	__property DockPos ;
	__property DockRow ;
	__property DragHandle ;
	__property FullSize ;
	__property HideWhenInactive ;
	__property int MinClientHeight = {read=FMinClientHeight, write=FMinClientHeight, default=32};
	__property int MinClientWidth = {read=FMinClientWidth, write=FMinClientWidth, default=32};
	__property ParentShowHint ;
	__property PopupMenu ;
	__property Resizable ;
	__property ShowHint ;
	__property TabOrder ;
	__property Visible ;
	__property OnClose ;
	__property OnDragDrop ;
	__property OnDragOver ;
	__property OnDockChanged ;
	__property OnDockChanging ;
	__property OnRecreated ;
	__property OnRecreating ;
	__property OnResize ;
	__property OnVisibleChanged ;
public:
	/* TCustomToolWindow97.Destroy */ __fastcall virtual ~TToolWindow97(void) { }
	
public:
	/* TWinControl.CreateParented */ __fastcall TToolWindow97(HWND ParentWindow) : Tb97::TCustomToolWindow97(
		ParentWindow) { }
	
};

typedef int TToolbarSepSize;

class DELPHICLASS TToolbarSep97;
class PASCALIMPLEMENTATION TToolbarSep97 : public Controls::TGraphicControl 
{
	typedef Controls::TGraphicControl inherited;
	
private:
	bool FBlank;
	TToolbarSepSize FSizeHorz;
	TToolbarSepSize FSizeVert;
	void __fastcall SetBlank(bool Value);
	void __fastcall SetSizeHorz(TToolbarSepSize Value);
	void __fastcall SetSizeVert(TToolbarSepSize Value);
	
protected:
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, 
		int Y);
	virtual void __fastcall Paint(void);
	virtual void __fastcall SetParent(Controls::TWinControl* AParent);
	
public:
	__fastcall virtual TToolbarSep97(Classes::TComponent* AOwner);
	
__published:
	__property Width  = {stored=false};
	__property Height  = {stored=false};
	__property bool Blank = {read=FBlank, write=SetBlank, default=0};
	__property TToolbarSepSize SizeHorz = {read=FSizeHorz, write=SetSizeHorz, default=6};
	__property TToolbarSepSize SizeVert = {read=FSizeVert, write=SetSizeVert, default=6};
public:
	/* TGraphicControl.Destroy */ __fastcall virtual ~TToolbarSep97(void) { }
	
};

enum TButtonDisplayMode { dmBoth, dmGlyphOnly, dmTextOnly };

enum TButtonState97 { bsUp, bsDisabled, bsDown, bsExclusive, bsMouseIn };

typedef Shortint TNumGlyphs97;

class DELPHICLASS TToolbarButton97;
class PASCALIMPLEMENTATION TToolbarButton97 : public Controls::TGraphicControl 
{
	typedef Controls::TGraphicControl inherited;
	
private:
	bool FAllowAllUp;
	TButtonDisplayMode FDisplayMode;
	bool FDown;
	bool FDropdownArrow;
	bool FDropdownCombo;
	Menus::TPopupMenu* FDropdownMenu;
	bool FFlat;
	void *FGlyph;
	int FGroupIndex;
	TButtonLayout FLayout;
	int FMargin;
	Forms::TModalResult FModalResult;
	bool FNoBorder;
	bool FOldDisabledStyle;
	bool FOpaque;
	bool FRepeating;
	int FRepeatDelay;
	int FRepeatInterval;
	bool FShowBorderWhenInactive;
	int FSpacing;
	bool FWordWrap;
	Classes::TNotifyEvent FOnMouseEnter;
	Classes::TNotifyEvent FOnMouseExit;
	bool FInClick;
	bool FMouseInControl;
	bool FMouseIsDown;
	bool FMenuIsDown;
	bool FHooked;
	bool FUsesDropdown;
	Extctrls::TTimer* FRepeatTimer;
	void __fastcall GlyphChanged(System::TObject* Sender);
	void __fastcall UpdateExclusive(void);
	void __fastcall SetAllowAllUp(bool Value);
	bool __fastcall GetCallDormant(void);
	void __fastcall SetCallDormant(bool Value);
	void __fastcall SetDown(bool Value);
	void __fastcall SetDisplayMode(TButtonDisplayMode Value);
	void __fastcall SetDropdownArrow(bool Value);
	void __fastcall SetDropdownCombo(bool Value);
	void __fastcall SetDropdownMenu(Menus::TPopupMenu* Value);
	void __fastcall SetFlat(bool Value);
	Graphics::TBitmap* __fastcall GetGlyph(void);
	void __fastcall SetGlyph(Graphics::TBitmap* Value);
	Graphics::TBitmap* __fastcall GetGlyphMask(void);
	void __fastcall SetGlyphMask(Graphics::TBitmap* Value);
	void __fastcall SetGroupIndex(int Value);
	void __fastcall SetLayout(Buttons::TButtonLayout Value);
	void __fastcall SetMargin(int Value);
	void __fastcall SetNoBorder(bool Value);
	TNumGlyphs97 __fastcall GetNumGlyphs(void);
	void __fastcall SetNumGlyphs(TNumGlyphs97 Value);
	void __fastcall SetOldDisabledStyle(bool Value);
	void __fastcall SetOpaque(bool Value);
	void __fastcall SetSpacing(int Value);
	void __fastcall SetWordWrap(bool Value);
	void __fastcall UpdateTracking(void);
	void __fastcall Redraw(const bool Erase);
	bool __fastcall PointInButton(int X, int Y);
	void __fastcall ButtonMouseTimerHandler(System::TObject* Sender);
	void __fastcall RepeatTimerHandler(System::TObject* Sender);
	/*         class method */ static bool __fastcall DeactivateHook(System::TMetaClass* vmt, Messages::TMessage 
		&Message);
	HIDESBASE MESSAGE void __fastcall WMLButtonDblClk(Messages::TWMMouse &Message);
	HIDESBASE MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message);
	MESSAGE void __fastcall CMButtonPressed(Messages::TMessage &Message);
	MESSAGE void __fastcall CMDialogChar(Messages::TWMKey &Message);
	HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
	MESSAGE void __fastcall CMTextChanged(Messages::TMessage &Message);
	MESSAGE void __fastcall CMSysColorChange(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMCancelMode(Messages::TWMNoParams &Message);
	
protected:
	TButtonState97 FState;
	DYNAMIC HPALETTE __fastcall GetPalette(void);
	virtual void __fastcall Loaded(void);
	virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
		);
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, 
		int Y);
	DYNAMIC void __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int 
		Y);
	virtual void __fastcall Paint(void);
	
public:
	__property bool CallDormant = {read=GetCallDormant, write=SetCallDormant, nodefault};
	__fastcall virtual TToolbarButton97(Classes::TComponent* AOwner);
	__fastcall virtual ~TToolbarButton97(void);
	DYNAMIC void __fastcall Click(void);
	void __fastcall MouseEntered(void);
	void __fastcall MouseLeft(void);
	
__published:
	__property bool AllowAllUp = {read=FAllowAllUp, write=SetAllowAllUp, default=0};
	__property int GroupIndex = {read=FGroupIndex, write=SetGroupIndex, default=0};
	__property TButtonDisplayMode DisplayMode = {read=FDisplayMode, write=SetDisplayMode, default=0};
	__property bool Down = {read=FDown, write=SetDown, default=0};
	__property DragCursor ;
	__property DragMode ;
	__property bool DropdownArrow = {read=FDropdownArrow, write=SetDropdownArrow, default=1};
	__property bool DropdownCombo = {read=FDropdownCombo, write=SetDropdownCombo, default=0};
	__property Menus::TPopupMenu* DropdownMenu = {read=FDropdownMenu, write=SetDropdownMenu};
	__property Caption ;
	__property Enabled ;
	__property bool Flat = {read=FFlat, write=SetFlat, default=1};
	__property Font ;
	__property Graphics::TBitmap* Glyph = {read=GetGlyph, write=SetGlyph};
	__property Graphics::TBitmap* GlyphMask = {read=GetGlyphMask, write=SetGlyphMask};
	__property Buttons::TButtonLayout Layout = {read=FLayout, write=SetLayout, default=0};
	__property int Margin = {read=FMargin, write=SetMargin, default=-1};
	__property Forms::TModalResult ModalResult = {read=FModalResult, write=FModalResult, default=0};
	__property bool NoBorder = {read=FNoBorder, write=SetNoBorder, default=0};
	__property TNumGlyphs97 NumGlyphs = {read=GetNumGlyphs, write=SetNumGlyphs, default=1};
	__property bool OldDisabledStyle = {read=FOldDisabledStyle, write=SetOldDisabledStyle, default=0};
	__property bool Opaque = {read=FOpaque, write=SetOpaque, default=1};
	__property ParentFont ;
	__property ParentShowHint ;
	__property bool Repeating = {read=FRepeating, write=FRepeating, default=0};
	__property int RepeatDelay = {read=FRepeatDelay, write=FRepeatDelay, default=400};
	__property int RepeatInterval = {read=FRepeatInterval, write=FRepeatInterval, default=100};
	__property bool ShowBorderWhenInactive = {read=FShowBorderWhenInactive, write=FShowBorderWhenInactive
		, default=0};
	__property ShowHint ;
	__property int Spacing = {read=FSpacing, write=SetSpacing, default=4};
	__property Visible ;
	__property bool WordWrap = {read=FWordWrap, write=SetWordWrap, default=0};
	__property OnClick ;
	__property OnDblClick ;
	__property OnDragDrop ;
	__property OnDragOver ;
	__property OnEndDrag ;
	__property OnMouseDown ;
	__property Classes::TNotifyEvent OnMouseEnter = {read=FOnMouseEnter, write=FOnMouseEnter};
	__property Classes::TNotifyEvent OnMouseExit = {read=FOnMouseExit, write=FOnMouseExit};
	__property OnMouseMove ;
	__property OnMouseUp ;
	__property OnStartDrag ;
};

class DELPHICLASS TEdit97;
class PASCALIMPLEMENTATION TEdit97 : public Stdctrls::TCustomEdit 
{
	typedef Stdctrls::TCustomEdit inherited;
	
private:
	bool MouseInControl;
	void __fastcall RedrawBorder(const HRGN Clip);
	void __fastcall NewAdjustHeight(void);
	HIDESBASE MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMMouseEnter(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall CMMouseLeave(Messages::TMessage &Message);
	HIDESBASE MESSAGE void __fastcall WMSetFocus(Messages::TWMSetFocus &Message);
	HIDESBASE MESSAGE void __fastcall WMKillFocus(Messages::TWMKillFocus &Message);
	MESSAGE void __fastcall WMNCCalcSize(Messages::TWMNCCalcSize &Message);
	MESSAGE void __fastcall WMNCPaint(Messages::TMessage &Message);
	
protected:
	virtual void __fastcall Loaded(void);
	
public:
	__fastcall virtual TEdit97(Classes::TComponent* AOwner);
	
__published:
	__property CharCase ;
	__property DragCursor ;
	__property DragMode ;
	__property Enabled ;
	__property Font ;
	__property HideSelection ;
	__property ImeMode ;
	__property ImeName ;
	__property MaxLength ;
	__property OEMConvert ;
	__property ParentColor ;
	__property ParentCtl3D ;
	__property ParentFont ;
	__property ParentShowHint ;
	__property PasswordChar ;
	__property PopupMenu ;
	__property ReadOnly ;
	__property ShowHint ;
	__property TabOrder ;
	__property TabStop ;
	__property Text ;
	__property Visible ;
	__property OnChange ;
	__property OnClick ;
	__property OnDblClick ;
	__property OnDragDrop ;
	__property OnDragOver ;
	__property OnEndDrag ;
	__property OnEnter ;
	__property OnExit ;
	__property OnKeyDown ;
	__property OnKeyPress ;
	__property OnKeyUp ;
	__property OnMouseDown ;
	__property OnMouseMove ;
	__property OnMouseUp ;
	__property OnStartDrag ;
public:
	/* TWinControl.CreateParented */ __fastcall TEdit97(HWND ParentWindow) : Stdctrls::TCustomEdit(ParentWindow
		) { }
	/* TWinControl.Destroy */ __fastcall virtual ~TEdit97(void) { }
	
};

//-- var, const, procedure ---------------------------------------------------
#define Toolbar97Version "1.63"
#define WM_TB97DoneCreating (Word)(6062)
#define WM_TB97DoneCreating_Magic (int)(1940230388)
#define WM_TB97PaintDockedNCArea (Word)(6063)
extern PACKAGE TToolbarButton97* ButtonMouseInControl;
extern PACKAGE void __fastcall Register(void);
extern PACKAGE void __fastcall AddFloatingNCAreaToRect(Windows::TRect &R, const bool Resizable);
extern PACKAGE TDockType __fastcall GetDockTypeOf(const TDock97* Control);
extern PACKAGE void __fastcall CustomLoadToolbarPositions(const Forms::TForm* Form, const TPositionReadIntProc 
	ReadIntProc, const TPositionReadStringProc ReadStringProc, const void * ExtraData);
extern PACKAGE void __fastcall CustomSaveToolbarPositions(const Forms::TForm* Form, const TPositionWriteIntProc 
	WriteIntProc, const TPositionWriteStringProc WriteStringProc, const void * ExtraData);
extern PACKAGE void __fastcall IniLoadToolbarPositions(const Forms::TForm* Form, const System::AnsiString 
	Filename);
extern PACKAGE void __fastcall IniSaveToolbarPositions(const Forms::TForm* Form, const System::AnsiString 
	Filename);
extern PACKAGE void __fastcall RegLoadToolbarPositions(const Forms::TForm* Form, const System::AnsiString 
	BaseRegistryKey);
extern PACKAGE void __fastcall RegSaveToolbarPositions(const Forms::TForm* Form, const System::AnsiString 
	BaseRegistryKey);

}	/* namespace Tb97 */
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Tb97;
#endif
//-- end unit ----------------------------------------------------------------
#endif	// TB97
