// Borland C++ Builder
// Copyright (c) 1995, 2005 by Borland Software Corporation
// All rights reserved

// (DO NOT EDIT: machine generated header) 'Dstaskbar.pas' rev: 10.00

#ifndef DstaskbarHPP
#define DstaskbarHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member functions
#pragma pack(push,8)
#include <System.hpp>	// Pascal unit
#include <Sysinit.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Messages.hpp>	// Pascal unit
#include <Sysutils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Forms.hpp>	// Pascal unit
#include <Dialogs.hpp>	// Pascal unit
#include <Extctrls.hpp>	// Pascal unit
#include <Buttons.hpp>	// Pascal unit
#include <Comctrls.hpp>	// Pascal unit
#include <Menus.hpp>	// Pascal unit
#include <Dsmarker.hpp>	// Pascal unit

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

namespace Dstaskbar
{
//-- type declarations -------------------------------------------------------
#pragma option push -b-
enum dsTaskBar__1 { tbeOpera };
#pragma option pop

typedef Set<dsTaskBar__1, tbeOpera, tbeOpera>  TTaskBarEmulate;

#pragma option push -b-
enum TGradOrientation { goNone, goVertical, goHorizontal };
#pragma option pop

#pragma option push -b-
enum TScrollType { stNone, stLeft, stLeftRight };
#pragma option pop

#pragma option push -b-
enum TScrollDirection { sdLeft, sdRight };
#pragma option pop

class DELPHICLASS TTaskBarButton;
typedef void __fastcall (__closure *TOnAddButton)(System::TObject* Sender, TTaskBarButton* Button);

typedef void __fastcall (__closure *TSimilarGroupEvent)(System::TObject* Sender, Forms::TCustomForm* Form1, Forms::TCustomForm* Form2, bool &Result);

class DELPHICLASS TdsTaskBar;
class PASCALIMPLEMENTATION TdsTaskBar : public Extctrls::TCustomPanel 
{
	typedef Extctrls::TCustomPanel inherited;
	
private:
	bool FFlat;
	int FButtonWidth;
	bool FAutoCreateButtons;
	TTaskBarEmulate FEmulate;
	TScrollType FScrollType;
	bool FHideMinimizedMDI;
	Extctrls::TTimer* FTimer;
	Graphics::TColor FColor1;
	Graphics::TColor FColor2;
	TGradOrientation FGradOrientation;
	bool FSyncCaptions;
	bool FDragDropReorder;
	Dsmarker::TdsMarker* FDragDropMarker;
	bool FAlwaysMaximized;
	bool FGroupSimilar;
	Menus::TPopupMenu* FGroupMenu;
	TOnAddButton FOnAddButton;
	TSimilarGroupEvent FIsSimilarGroup;
	Classes::TNotifyEvent OldActiveFormChange;
	void __fastcall SetFlat(bool Value);
	void __fastcall SetAutoCreateButtons(bool Value);
	void __fastcall SetButtonWidth(int Value);
	void __fastcall SetScrollType(TScrollType Value);
	void __fastcall SetHideMinimizedMDI(bool Value);
	void __fastcall SetColor1(Graphics::TColor Value);
	void __fastcall SetColor2(Graphics::TColor Value);
	void __fastcall SetGradOrientation(TGradOrientation Value);
	void __fastcall SetGroupSimilar(bool Value);
	void __fastcall SetButtonDown(TTaskBarButton* Value);
	void __fastcall SetButtonsWidths(void);
	void __fastcall ActiveFormChange(System::TObject* Sender);
	void __fastcall GroupMenuClick(System::TObject* Sender);
	void __fastcall MeasureMenuItem(System::TObject* Sender, Graphics::TCanvas* ACanvas, int &Width, int &Height);
	void __fastcall DrawMenuItem(System::TObject* Sender, Graphics::TCanvas* ACanvas, const Types::TRect &ARect, bool Selected);
	void __fastcall ScrollButtonsCaptions(System::TObject* Sender);
	void __fastcall GroupButtons(void);
	void __fastcall UngroupButtons(void);
	void __fastcall CreateDragDropMarker(TTaskBarButton* Sender);
	void __fastcall FreeDragDropMarker(void);
	void __fastcall SetDragDropPosition(TTaskBarButton* Sender);
	int __fastcall GetButtonCount(void);
	TTaskBarButton* __fastcall GetButton(int index);
	TTaskBarButton* __fastcall GetButtonDown(void);
	
protected:
	DYNAMIC void __fastcall Resize(void);
	DYNAMIC void __fastcall VisibleChanging(void);
	virtual void __fastcall Paint(void);
	virtual bool __fastcall FindGroup(Forms::TCustomForm* Form1, Forms::TCustomForm* Form2);
	
public:
	__fastcall virtual TdsTaskBar(Classes::TComponent* AOwner);
	TTaskBarButton* __fastcall AddButton(Forms::TForm* AForm)/* overload */;
	TTaskBarButton* __fastcall AddButton(Forms::TForm* AForm, bool Group)/* overload */;
	TTaskBarButton* __fastcall ButtonByForm(Forms::TForm* AForm);
	void __fastcall FocusNext(void);
	void __fastcall FocusPrior(void);
	__property int ButtonCount = {read=GetButtonCount, nodefault};
	__property TTaskBarButton* Buttons[int Index] = {read=GetButton};
	
__published:
	__property bool AutoCreateButtons = {read=FAutoCreateButtons, write=SetAutoCreateButtons, nodefault};
	__property bool AlwaysMaximized = {read=FAlwaysMaximized, write=FAlwaysMaximized, nodefault};
	__property int ButtonWidth = {read=FButtonWidth, write=SetButtonWidth, nodefault};
	__property bool Flat = {read=FFlat, write=SetFlat, nodefault};
	__property TTaskBarEmulate Emulate = {read=FEmulate, write=FEmulate, default=0};
	__property TOnAddButton OnAddButton = {read=FOnAddButton, write=FOnAddButton};
	__property TScrollType ScrollType = {read=FScrollType, write=SetScrollType, nodefault};
	__property bool HideMinimizedMDI = {read=FHideMinimizedMDI, write=SetHideMinimizedMDI, nodefault};
	__property Graphics::TColor Color1 = {read=FColor1, write=SetColor1, nodefault};
	__property Graphics::TColor Color2 = {read=FColor2, write=SetColor2, nodefault};
	__property TGradOrientation GradOrientation = {read=FGradOrientation, write=SetGradOrientation, nodefault};
	__property bool GroupSimilar = {read=FGroupSimilar, write=SetGroupSimilar, nodefault};
	__property TSimilarGroupEvent IsSimilarGroup = {read=FIsSimilarGroup, write=FIsSimilarGroup};
	__property bool SyncCaptions = {read=FSyncCaptions, write=FSyncCaptions, nodefault};
	__property bool DragDropReorder = {read=FDragDropReorder, write=FDragDropReorder, nodefault};
	__property Align  = {default=0};
	__property BevelInner  = {default=0};
	__property BevelOuter  = {default=2};
	__property BorderStyle  = {default=0};
	__property BorderWidth  = {default=0};
	__property Font ;
	__property ShowHint ;
	__property Visible  = {default=1};
public:
	#pragma option push -w-inl
	/* TCustomControl.Destroy */ inline __fastcall virtual ~TdsTaskBar(void) { }
	#pragma option pop
	
public:
	#pragma option push -w-inl
	/* TWinControl.CreateParented */ inline __fastcall TdsTaskBar(HWND ParentWindow) : Extctrls::TCustomPanel(ParentWindow) { }
	#pragma option pop
	
};


class PASCALIMPLEMENTATION TTaskBarButton : public Buttons::TSpeedButton 
{
	typedef Buttons::TSpeedButton inherited;
	
private:
	TdsTaskBar* FTaskBar;
	AnsiString FFullText;
	bool FDragging;
	TTaskBarButton* FGroupButton;
	TTaskBarButton* FTextButton;
	int FGroupCount;
	int ScrollPosition;
	TScrollDirection ScrollDirection;
	int ScrollTimeOut;
	Forms::TWindowState OldWindowState;
	Classes::TWndMethod OldWindowProc;
	void __fastcall FormWindowProc(Messages::TMessage &Message);
	void __fastcall AssignGlyphIcon(void);
	void __fastcall BringFormToFront(void);
	void __fastcall SetFullText(const AnsiString Value);
	Forms::TForm* __fastcall GetForm(void);
	int __fastcall GetCanvasWidth(void);
	
protected:
	DYNAMIC void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall MouseUp(Controls::TMouseButton Button, Classes::TShiftState Shift, int X, int Y);
	DYNAMIC void __fastcall DragOver(System::TObject* Source, int X, int Y, Controls::TDragState State, bool &Accept);
	DYNAMIC void __fastcall DoEndDrag(System::TObject* Target, int X, int Y);
	virtual void __fastcall Paint(void);
	
public:
	__fastcall virtual TTaskBarButton(Classes::TComponent* AOwner);
	__fastcall virtual ~TTaskBarButton(void);
	DYNAMIC void __fastcall Click(void);
	DYNAMIC void __fastcall DragDrop(System::TObject* Source, int X, int Y);
	void __fastcall ResetCaption(void);
	void __fastcall ScrollCaption(void);
	__property Forms::TForm* Form = {read=GetForm};
	__property AnsiString FullText = {read=FFullText, write=SetFullText};
	__property TTaskBarButton* GroupButton = {read=FGroupButton};
};


//-- var, const, procedure ---------------------------------------------------
extern PACKAGE void __fastcall SetGlobalTaskBar(TdsTaskBar* tb);
extern PACKAGE void __fastcall AddToGlobalTaskBar(Forms::TForm* F, bool Group = false);
extern PACKAGE TdsTaskBar* __fastcall GetGlobalTaskBar(void);
extern PACKAGE void __fastcall Register(void);

}	/* namespace Dstaskbar */
using namespace Dstaskbar;
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// Dstaskbar
