// Borland C++ Builder // Copyright (c) 1995, 1999 by Borland International // All rights reserved // (DO NOT EDIT: machine generated header) 'ShowAVLTree.pas' rev: 5.00 #ifndef ShowAVLTreeHPP #define ShowAVLTreeHPP #pragma delphiheader begin #pragma option push -w- #pragma option push -Vx #include // Pascal unit #include // Pascal unit #include // Pascal unit #include // Pascal unit #include // Pascal unit #include // Pascal unit #include // Pascal unit #include // Pascal unit //-- user supplied ----------------------------------------------------------- namespace Showavltree { //-- type declarations ------------------------------------------------------- #pragma option push -b- enum __BalanceCondition { left, right, equal }; #pragma option pop struct __tree; typedef __tree *__ptree; struct __tree { int data; __BalanceCondition balance; __tree *left; __tree *right; } ; class DELPHICLASS TShowAVLTree; class PASCALIMPLEMENTATION TShowAVLTree : public Controls::TGraphicControl { typedef Controls::TGraphicControl inherited; private: int FRadius; int FVsep; int FHsep; Graphics::TColor FBackgroundColor; Graphics::TColor FForegroundColor; Graphics::TColor FNodeColor; Graphics::TColor FHighlightedNodeColor; int FRoot; int FHighlightedNode; int FHmargin; int FVmargin; void __fastcall SetBackgroundColor(Graphics::TColor AColor); void __fastcall SetForegroundColor(Graphics::TColor AColor); void __fastcall SetNodeColor(Graphics::TColor AColor); void __fastcall SetHighlightedNodeColor(Graphics::TColor AColor); void __fastcall treeSize(__ptree tr, int x, int y, int &width, int &height, int &topPos); void __fastcall paintTree(__ptree tr, __ptree cur, int x, int y, int &width, int &height, int &topPos ); void __fastcall SetHSize(int Size); void __fastcall SetVSize(int Size); int __fastcall GetHSize(void); int __fastcall GetVSize(void); public: __fastcall virtual TShowAVLTree(Classes::TComponent* AOwner); virtual void __fastcall Paint(void); void __fastcall SizeToFit(void); __published: __property Graphics::TColor BackgroundColor = {read=FBackgroundColor, write=SetBackgroundColor, default=16777215 }; __property Graphics::TColor ForegroundColor = {read=FForegroundColor, write=SetForegroundColor, default=0 }; __property Graphics::TColor NodeColor = {read=FNodeColor, write=SetNodeColor, default=16777215}; __property Graphics::TColor HighlightedNodeColor = {read=FHighlightedNodeColor, write=SetHighlightedNodeColor , default=255}; __property int Radius = {read=FRadius, write=FRadius, default=16}; __property int VSep = {read=FVsep, write=FVsep, default=50}; __property int HSep = {read=FHsep, write=FHsep, default=50}; __property int Root = {read=FRoot, write=FRoot, nodefault}; __property int HighlightedNode = {read=FHighlightedNode, write=FHighlightedNode, nodefault}; __property int HMargin = {read=FHmargin, write=FHmargin, default=0}; __property int VMargin = {read=FVmargin, write=FVmargin, default=0}; __property int HSize = {read=GetHSize, write=SetHSize, nodefault}; __property int VSize = {read=GetVSize, write=SetVSize, nodefault}; __property Align ; public: #pragma option push -w-inl /* TGraphicControl.Destroy */ inline __fastcall virtual ~TShowAVLTree(void) { } #pragma option pop }; //-- var, const, procedure --------------------------------------------------- extern PACKAGE void __fastcall Register(void); } /* namespace Showavltree */ #if !defined(NO_IMPLICIT_NAMESPACE_USE) using namespace Showavltree; #endif #pragma option pop // -w- #pragma option pop // -Vx #pragma delphiheader end. //-- end unit ---------------------------------------------------------------- #endif // ShowAVLTree