home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1997 May
/
VPR9705A.ISO
/
VPR_DATA
/
PROGRAM
/
CBTRIAL
/
SETUP
/
DATA.Z
/
OUTLINE.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-14
|
17KB
|
397 lines
//----------------------------------------------------------------------------
// Outline.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: Outline.pas
//----------------------------------------------------------------------------
#ifndef OutlineHPP
#define OutlineHPP
//----------------------------------------------------------------------------
#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Grids.hpp>
#include <StdCtrls.hpp>
#include <Menus.hpp>
#include <Graphics.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
#include <Messages.hpp>
#include <Windows.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
namespace Outline
{
//-- type declarations -------------------------------------------------------
class __declspec(delphiclass) OutlineError;
class __declspec(pascalimplementation) OutlineError : public System::TObject
{
typedef System::TObject inherited;
public:
/* TObject.Create */ __fastcall OutlineError(void) : System::TObject() { }
/* TObject.Destroy */ __fastcall virtual ~OutlineError(void) { }
};
class __declspec(delphiclass) EOutlineError;
class __declspec(pascalimplementation) EOutlineError : public Sysutils::Exception
{
typedef Sysutils::Exception inherited;
public:
/* Exception.Create */ __fastcall EOutlineError(const System::AnsiString Msg) : Sysutils::Exception(
Msg) { }
/* Exception.CreateFmt */ __fastcall EOutlineError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
/* Exception.CreateRes */ __fastcall EOutlineError(int Ident) : Sysutils::Exception(Ident) { }
/* Exception.CreateResFmt */ __fastcall EOutlineError(int Ident, const System::TVarRec * Args, const
int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
/* Exception.CreateHelp */ __fastcall EOutlineError(const System::AnsiString Msg, int AHelpContext)
: Sysutils::Exception(Msg, AHelpContext) { }
/* Exception.CreateFmtHelp */ __fastcall EOutlineError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
) { }
/* Exception.CreateResHelp */ __fastcall EOutlineError(int Ident, int AHelpContext) : Sysutils::Exception(
Ident, AHelpContext) { }
/* Exception.CreateResFmtHelp */ __fastcall EOutlineError(int Ident, const System::TVarRec * Args,
const int Args_Size, int AHelpContext) : Sysutils::Exception(Ident, Args, Args_Size, AHelpContext)
{ }
public:
/* TObject.Destroy */ __fastcall virtual ~EOutlineError(void) { }
};
enum TOutlineNodeCompare { ocLess, ocSame, ocGreater, ocInvalid };
enum TAttachMode { oaAdd, oaAddChild, oaInsert };
typedef Shortint TChangeRange;
class __declspec(delphiclass) TOutlineNode;
class __declspec(delphiclass) TCustomOutline;
enum TOutlineBitmap { obPlus, obMinus, obOpen, obClose, obLeaf };
typedef Set<TOutlineBitmap, obPlus, obLeaf> TOutlineBitmaps;
typedef Graphics::TBitmap* TBitmapArray[5];
typedef void __fastcall (__closure *EOutlineChange)(System::TObject* Sender, long Index);
enum TOutlineStyle { osText, osPlusMinusText, osPictureText, osPlusMinusPictureText, osTreeText, osTreePictureText
};
enum TOutlineType { otStandard, otOwnerDraw };
enum TOutlineOption { ooDrawTreeRoot, ooDrawFocusRect, ooStretchBitmaps };
typedef Set<TOutlineOption, ooDrawTreeRoot, ooStretchBitmaps> TOutlineOptions;
class __declspec(pascalimplementation) TCustomOutline : public Grids::TCustomGrid
{
typedef Grids::TCustomGrid inherited;
private:
bool FBlockInsert;
TOutlineNode* FRootNode;
TOutlineNode* FGoodNode;
int UpdateCount;
TOutlineNode* FCurItem;
System::AnsiString FSeparator;
int FFontSize;
Classes::TStrings* FStrings;
TOutlineBitmaps FUserBitmaps;
TOutlineBitmaps FOldBitmaps;
Graphics::TBitmap* FPictures[5];
EOutlineChange FOnExpand;
EOutlineChange FOnCollapse;
TOutlineStyle FOutlineStyle;
Graphics::TColor FMaskColor;
int FItemHeight;
TOutlineType FStyle;
TOutlineOptions FOptions;
bool FIgnoreScrollResize;
TOutlineNode* FSelectedItem;
Stdctrls::TDrawItemEvent FOnDrawItem;
bool FSettingWidth;
bool FSettingHeight;
HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
long __fastcall GetItemCount(void);
long __fastcall AttachNode(long Index, System::AnsiString Str, void * Ptr, TAttachMode AttachMode)
;
TOutlineNode* __fastcall Get(long Index);
long __fastcall GetSelectedItem(void);
void __fastcall SetSelectedItem(long Value);
TOutlineNodeCompare __fastcall CompareNodes(TOutlineNode* Value1, TOutlineNode* Value2);
void __fastcall Error(int ErrorStringID);
HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
bool __fastcall ResizeGrid(void);
void __fastcall DoExpand(TOutlineNode* Node);
void __fastcall Init(void);
void __fastcall MoveNode(long Destination, long Source, TAttachMode AttachMode);
void __fastcall ClearBitmap(Graphics::TBitmap* &Bitmap, TOutlineBitmap Kind);
void __fastcall ChangeBitmap(Graphics::TBitmap* Value, TOutlineBitmap Kind);
void __fastcall SetRowHeight(void);
void __fastcall SetCurItem(long Value);
void __fastcall CreateGlyph(void);
void __fastcall SetStrings(Classes::TStrings* Value);
Classes::TStrings* __fastcall GetStrings(void);
bool __fastcall IsCurItem(long Value);
void __fastcall SetPicture(int Index, Graphics::TBitmap* Value);
Graphics::TBitmap* __fastcall GetPicture(int Index);
void __fastcall DrawPictures(Graphics::TBitmap* const * BitMaps, const int BitMaps_Size, const Windows::TRect
&ARect);
void __fastcall DrawText(TOutlineNode* Node, const Windows::TRect &Rect);
void __fastcall SetOutlineStyle(TOutlineStyle Value);
void __fastcall DrawTree(const Windows::TRect &ARect, TOutlineNode* Node);
void __fastcall SetMaskColor(Graphics::TColor Value);
void __fastcall SetItemHeight(int Value);
void __fastcall SetStyle(TOutlineType Value);
void __fastcall SetOutlineOptions(TOutlineOptions Value);
bool __fastcall StoreBitmap(int Index);
void __fastcall ReadBinaryData(Classes::TStream* Stream);
void __fastcall WriteBinaryData(Classes::TStream* Stream);
void __fastcall SetHorzScrollBar(void);
void __fastcall ResetSelectedItem(void);
void __fastcall SetRowFromNode(TOutlineNode* Node);
protected:
virtual void __fastcall Loaded(void);
virtual void __fastcall Click(void);
virtual void __fastcall KeyDown(Word &Key, Classes::TShiftState Shift);
virtual void __fastcall KeyPress(char &Key);
TOutlineNode* __fastcall SetGoodIndex(TOutlineNode* Value);
virtual void __fastcall DrawCell(long ACol, long ARow, const Windows::TRect &ARect, Grids::TGridDrawState
AState);
virtual void __fastcall DblClick(void);
void __fastcall SetLevel(TOutlineNode* Node, Cardinal CurLevel, Cardinal NewLevel);
bool __fastcall BadIndex(TOutlineNode* Value);
void __fastcall DeleteNode(TOutlineNode* Node, long CurIndex);
virtual void __fastcall Expand(long Index);
virtual void __fastcall Collapse(long Index);
virtual void __fastcall DefineProperties(Classes::TFiler* Filer);
virtual void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, int X,
int Y);
void __fastcall Move(long Destination, long Source, TAttachMode AttachMode);
void __fastcall SetDisplayWidth(int Value);
__property Classes::TStrings* Lines = {read=GetStrings, write=SetStrings, nodefault};
__property TOutlineStyle OutlineStyle = {read=FOutlineStyle, write=SetOutlineStyle, default=5};
__property EOutlineChange OnExpand = {read=FOnExpand, write=FOnExpand};
__property EOutlineChange OnCollapse = {read=FOnCollapse, write=FOnCollapse};
__property TOutlineOptions Options = {read=FOptions, write=SetOutlineOptions, default=3};
__property TOutlineType Style = {read=FStyle, write=SetStyle, default=0};
__property int ItemHeight = {read=FItemHeight, write=SetItemHeight, nodefault};
__property Stdctrls::TDrawItemEvent OnDrawItem = {read=FOnDrawItem, write=FOnDrawItem};
__property System::AnsiString ItemSeparator = {read=FSeparator, write=FSeparator, nodefault};
__property Graphics::TBitmap* PicturePlus = {read=GetPicture, write=SetPicture, stored=StoreBitmap,
index=0, nodefault};
__property Graphics::TBitmap* PictureMinus = {read=GetPicture, write=SetPicture, stored=StoreBitmap
, index=1, nodefault};
__property Graphics::TBitmap* PictureOpen = {read=GetPicture, write=SetPicture, stored=StoreBitmap,
index=2, nodefault};
__property Graphics::TBitmap* PictureClosed = {read=GetPicture, write=SetPicture, stored=StoreBitmap
, index=3, nodefault};
__property Graphics::TBitmap* PictureLeaf = {read=GetPicture, write=SetPicture, stored=StoreBitmap,
index=4, nodefault};
public:
__fastcall virtual TCustomOutline(Classes::TComponent* AOwner);
__fastcall virtual ~TCustomOutline(void);
long __fastcall Add(long Index, const System::AnsiString Text);
long __fastcall AddChild(long Index, const System::AnsiString Text);
long __fastcall AddChildObject(long Index, const System::AnsiString Text, void * const Data);
long __fastcall AddObject(long Index, const System::AnsiString Text, void * const Data);
HIDESBASE long __fastcall Insert(long Index, const System::AnsiString Text);
long __fastcall InsertObject(long Index, const System::AnsiString Text, void * const Data);
void __fastcall Delete(long Index);
long __fastcall GetDataItem(void * Value);
long __fastcall GetItem(int X, int Y);
int __fastcall GetNodeDisplayWidth(TOutlineNode* Node);
long __fastcall GetTextItem(const System::AnsiString Value);
TOutlineNode* __fastcall GetVisibleNode(long Index);
void __fastcall FullExpand(void);
void __fastcall FullCollapse(void);
void __fastcall LoadFromFile(const System::AnsiString FileName);
void __fastcall LoadFromStream(Classes::TStream* Stream);
void __fastcall SaveToFile(const System::AnsiString FileName);
void __fastcall SaveToStream(Classes::TStream* Stream);
void __fastcall BeginUpdate(void);
void __fastcall EndUpdate(void);
void __fastcall SetUpdateState(bool Value);
void __fastcall Clear(void);
__property long ItemCount = {read=GetItemCount, nodefault};
__property TOutlineNode* Items[long Index] = {read=Get/*, default*/};
__property long SelectedItem = {read=GetSelectedItem, write=SetSelectedItem, nodefault};
__property Row ;
__property Canvas ;
public:
/* TWinControl.CreateParented */ __fastcall TCustomOutline(HWND ParentWindow) : Grids::TCustomGrid(
ParentWindow) { }
};
class __declspec(pascalimplementation) TOutlineNode : public Classes::TPersistent
{
typedef Classes::TPersistent inherited;
private:
Classes::TList* FList;
System::AnsiString FText;
void *FData;
TOutlineNode* FParent;
long FIndex;
bool FState;
TCustomOutline* FOutline;
long FExpandCount;
void __fastcall ChangeExpandedCount(long Value);
void __fastcall CloseNode(void);
void __fastcall Clear(void);
void __fastcall Error(int ErrorStringID);
long __fastcall GetExpandedNodeCount(void);
System::AnsiString __fastcall GetFullPath(void);
long __fastcall GetIndex(void);
long __fastcall GetLastIndex(void);
Cardinal __fastcall GetLevel(void);
Classes::TList* __fastcall GetList(void);
Cardinal __fastcall GetMaxDisplayWidth(Cardinal Value);
TOutlineNode* __fastcall GetNode(long Index);
long __fastcall GetTopItem(void);
TOutlineNode* __fastcall GetVisibleParent(void);
bool __fastcall HasChildren(void);
bool __fastcall HasVisibleParent(void);
bool __fastcall IsEqual(TOutlineNode* Value);
void __fastcall ReIndex(TOutlineNode* StartNode, TOutlineNode* EndNode, long NewIndex, bool IncludeStart
);
void __fastcall Repaint(void);
bool __fastcall Resync(long &NewIndex, TOutlineNode* EndNode);
void __fastcall SetExpandedState(bool Value);
void __fastcall SetGoodIndex(void);
void __fastcall SetHorzScrollBar(void);
void __fastcall SetLevel(Cardinal Level);
void __fastcall SetText(const System::AnsiString Value);
protected:
__fastcall TOutlineNode(TCustomOutline* AOwner);
__fastcall virtual ~TOutlineNode(void);
TOutlineNode* __fastcall GetVisibleNode(long TargetCount);
long __fastcall AddNode(TOutlineNode* Value);
long __fastcall InsertNode(long Index, TOutlineNode* Value);
TOutlineNode* __fastcall GetNodeAtIndex(long TargetIndex);
long __fastcall GetDataItem(void * Value);
long __fastcall GetTextItem(const System::AnsiString Value);
bool __fastcall HasAsParent(TOutlineNode* Value);
bool __fastcall GetRowOfNode(TOutlineNode* TargetNode, long &RowCount);
void __fastcall InternalRemove(TOutlineNode* Value, int Index);
void __fastcall Remove(TOutlineNode* Value);
void __fastcall WriteNode(char * Buffer, Classes::TStream* Stream);
__property TCustomOutline* Outline = {read=FOutline, nodefault};
__property Classes::TList* List = {read=GetList, nodefault};
__property long ExpandCount = {read=FExpandCount, nodefault};
__property TOutlineNode* Items[long Index] = {read=GetNode/*, default*/};
public:
void __fastcall ChangeLevelBy(TChangeRange Value);
void __fastcall Collapse(void);
void __fastcall Expand(void);
void __fastcall FullExpand(void);
int __fastcall GetDisplayWidth(void);
long __fastcall getFirstChild(void);
long __fastcall GetLastChild(void);
long __fastcall GetNextChild(long Value);
long __fastcall GetPrevChild(long Value);
void __fastcall MoveTo(long Destination, TAttachMode AttachMode);
__property TOutlineNode* Parent = {read=FParent, nodefault};
__property bool Expanded = {read=FState, write=SetExpandedState, nodefault};
__property System::AnsiString Text = {read=FText, write=SetText, nodefault};
__property void * Data = {read=FData, write=FData, nodefault};
__property long Index = {read=GetIndex, nodefault};
__property Cardinal Level = {read=GetLevel, write=SetLevel, nodefault};
__property bool HasItems = {read=HasChildren, nodefault};
__property bool IsVisible = {read=HasVisibleParent, nodefault};
__property long TopItem = {read=GetTopItem, nodefault};
__property System::AnsiString FullPath = {read=GetFullPath, nodefault};
};
typedef Shortint TBitmapArrayRange;
class __declspec(delphiclass) TOutline;
class __declspec(pascalimplementation) TOutline : public TCustomOutline
{
typedef TCustomOutline inherited;
__published:
__property Lines ;
__property OutlineStyle ;
__property OnExpand ;
__property OnCollapse ;
__property Options ;
__property Style ;
__property ItemHeight ;
__property OnDrawItem ;
__property Align ;
__property Enabled ;
__property Font ;
__property Color ;
__property ParentColor ;
__property ParentCtl3D ;
__property Ctl3D ;
__property TabOrder ;
__property TabStop ;
__property Visible ;
__property OnClick ;
__property DragMode ;
__property DragCursor ;
__property OnDragDrop ;
__property OnDragOver ;
__property OnEndDrag ;
__property OnStartDrag ;
__property OnEnter ;
__property OnExit ;
__property OnMouseDown ;
__property OnMouseMove ;
__property OnMouseUp ;
__property OnDblClick ;
__property OnKeyDown ;
__property OnKeyPress ;
__property OnKeyUp ;
__property BorderStyle ;
__property ItemSeparator ;
__property PicturePlus ;
__property PictureMinus ;
__property PictureOpen ;
__property PictureClosed ;
__property PictureLeaf ;
__property ParentFont ;
__property ParentShowHint ;
__property ShowHint ;
__property PopupMenu ;
__property ScrollBars ;
public:
/* TCustomOutline.Create */ __fastcall virtual TOutline(Classes::TComponent* AOwner) : Outline::TCustomOutline(
AOwner) { }
/* TCustomOutline.Destroy */ __fastcall virtual ~TOutline(void) { }
public:
/* TWinControl.CreateParented */ __fastcall TOutline(HWND ParentWindow) : Outline::TCustomOutline(ParentWindow
) { }
};
//-- var, const, procedure ---------------------------------------------------
//-- template instantiations -------------------------------------------------
template class TOutlineOptions ;
template class TOutlineBitmaps ;
} /* namespace Outline */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Outline;
#endif
//-- end unit ----------------------------------------------------------------
#endif // Outline