home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // Outline.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
- // From: Outline.pas
- //----------------------------------------------------------------------------
- #ifndef OutlineHPP
- #define OutlineHPP
- //----------------------------------------------------------------------------
- #ifndef SysUtilsHPP
- #include <SysUtils.hpp>
- #endif
-
- #ifndef ControlsHPP
- #include <Controls.hpp>
- #endif
-
- #ifndef GridsHPP
- #include <Grids.hpp>
- #endif
-
- #ifndef StdCtrlsHPP
- #include <StdCtrls.hpp>
- #endif
-
- #ifndef MenusHPP
- #include <Menus.hpp>
- #endif
-
- #ifndef GraphicsHPP
- #include <Graphics.hpp>
- #endif
-
- #ifndef ClassesHPP
- #include <Classes.hpp>
- #endif
-
- #ifndef FormsHPP
- #include <Forms.hpp>
- #endif
-
- #ifndef MessagesHPP
- #include <Messages.hpp>
- #endif
-
- #ifndef WindowsHPP
- #include <Windows.hpp>
- #endif
-
- #ifndef SystemHPP
- #include <System.hpp>
- #endif
-
- namespace Outline
- {
- //-- type declarations -------------------------------------------------------
- class __declspec(delphiclass) OutlineError;
- class __declspec(pascalimplementation) OutlineError : public System::TObject
- {
- typedef OutlineError ThisClass;
- 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 EOutlineError ThisClass;
- 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 TVarRec *
- Args, const System::Integer Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* !! Exception.CreateRes */ __fastcall EOutlineError(System::Integer Ident) : Sysutils::Exception(
- Ident) { }
- /* !! Exception.CreateResFmt */ __fastcall EOutlineError(System::Integer Ident, const TVarRec *Args
- , const System::Integer Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* !! Exception.CreateHelp */ __fastcall EOutlineError(const System::AnsiString Msg, System::Integer
- AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
- /* !! Exception.CreateFmtHelp */ __fastcall EOutlineError(const System::AnsiString Msg, const TVarRec
- *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(Msg, Args
- , Args_Size, AHelpContext) { }
- /* !! Exception.CreateResHelp */ __fastcall EOutlineError(System::Integer Ident, System::Integer AHelpContext
- ) : Sysutils::Exception(Ident, AHelpContext) { }
- /* !! Exception.CreateResFmtHelp */ __fastcall EOutlineError(System::Integer Ident, const TVarRec *
- Args, const System::Integer Args_Size, System::Integer 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 System::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, System::Longint 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 TCustomOutline ThisClass;
- typedef Grids::TCustomGrid inherited;
-
- private:
- System::Boolean FBlockInsert;
- TOutlineNode *FRootNode;
- TOutlineNode *FGoodNode;
- System::Integer UpdateCount;
- TOutlineNode *FCurItem;
- System::AnsiString FSeparator;
- System::Integer FFontSize;
- Classes::TStrings *FStrings;
- TOutlineBitmaps FUserBitmaps;
- TOutlineBitmaps FOldBitmaps;
- Graphics::TBitmap *FPictures[5];
- EOutlineChange FOnExpand;
- EOutlineChange FOnCollapse;
- TOutlineStyle FOutlineStyle;
- Graphics::TColor FMaskColor;
- System::Integer FItemHeight;
- TOutlineType FStyle;
- TOutlineOptions FOptions;
- System::Boolean FIgnoreScrollResize;
- TOutlineNode *FSelectedItem;
- Stdctrls::TDrawItemEvent FOnDrawItem;
- System::Boolean FSettingWidth;
- System::Boolean FSettingHeight;
- MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);
- System::Longint __fastcall GetItemCount(void);
- System::Longint __fastcall AttachNode(System::Longint Index, System::AnsiString Str, System::Pointer
- Ptr, TAttachMode AttachMode);
- TOutlineNode *__fastcall Get(System::Longint Index);
- System::Longint __fastcall GetSelectedItem(void);
- void __fastcall SetSelectedItem(System::Longint Value);
- TOutlineNodeCompare __fastcall CompareNodes(TOutlineNode *Value1, TOutlineNode *Value2);
- void __fastcall Error(System::Integer ErrorStringID);
- MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
- System::Boolean __fastcall ResizeGrid(void);
- void __fastcall DoExpand(TOutlineNode *Node);
- void __fastcall Init(void);
- void __fastcall MoveNode(System::Longint Destination, System::Longint 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(System::Longint Value);
- void __fastcall CreateGlyph(void);
- void __fastcall SetStrings(Classes::TStrings *Value);
- Classes::TStrings *__fastcall GetStrings(void);
- System::Boolean __fastcall IsCurItem(System::Longint Value);
- void __fastcall SetPicture(System::Integer Index, Graphics::TBitmap *Value);
- Graphics::TBitmap *__fastcall GetPicture(System::Integer Index);
- void __fastcall DrawPictures(const Graphics::TBitmap *BitMaps, const System::Integer 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(System::Integer Value);
- void __fastcall SetStyle(TOutlineType Value);
- void __fastcall SetOutlineOptions( TOutlineOptions Value);
- System::Boolean __fastcall StoreBitmap(System::Integer 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(System::Word &Key, Classes::TShiftState Shift);
- virtual void __fastcall KeyPress(System::Char &Key);
- TOutlineNode *__fastcall SetGoodIndex(TOutlineNode *Value);
- virtual void __fastcall DrawCell(System::Longint ACol, System::Longint ARow, const Windows::TRect &ARect
- , Grids::TGridDrawState AState);
- virtual void __fastcall DblClick(void);
- void __fastcall SetLevel(TOutlineNode *Node, System::Cardinal CurLevel, System::Cardinal NewLevel);
-
- System::Boolean __fastcall BadIndex(TOutlineNode *Value);
- void __fastcall DeleteNode(TOutlineNode *Node, System::Longint CurIndex);
- virtual void __fastcall Expand(System::Longint Index);
- virtual void __fastcall Collapse(System::Longint Index);
- virtual void __fastcall DefineProperties(Classes::TFiler *Filer);
- virtual void __fastcall MouseDown(Controls::TMouseButton Button, Classes::TShiftState Shift, System::Integer
- X, System::Integer Y);
- void __fastcall Move(System::Longint Destination, System::Longint Source, TAttachMode AttachMode);
- void __fastcall SetDisplayWidth(System::Integer 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 System::Integer 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);
- System::Longint __fastcall Add(System::Longint Index, const System::AnsiString Text);
- System::Longint __fastcall AddChild(System::Longint Index, const System::AnsiString Text);
- System::Longint __fastcall AddChildObject(System::Longint Index, const System::AnsiString Text, const
- System::Pointer Data);
- System::Longint __fastcall AddObject(System::Longint Index, const System::AnsiString Text, const System::Pointer
- Data);
- System::Longint __fastcall Insert(System::Longint Index, const System::AnsiString Text);
- System::Longint __fastcall InsertObject(System::Longint Index, const System::AnsiString Text, const
- System::Pointer Data);
- void __fastcall Delete(System::Longint Index);
- System::Longint __fastcall GetDataItem(System::Pointer Value);
- System::Longint __fastcall GetItem(System::Integer X, System::Integer Y);
- System::Integer __fastcall GetNodeDisplayWidth(TOutlineNode *Node);
- System::Longint __fastcall GetTextItem(const System::AnsiString Value);
- TOutlineNode *__fastcall GetVisibleNode(System::Longint 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(System::Boolean Value);
- void __fastcall Clear(void);
- __property System::Longint ItemCount = {read=GetItemCount, nodefault};
- __property TOutlineNode * Items[System::Longint Index] = {read=Get/*, default*/};
- __property System::Longint SelectedItem = {read=GetSelectedItem, write=SetSelectedItem, nodefault};
-
- __property Row ;
- __property Canvas ;
- };
-
- class __declspec(pascalimplementation) TOutlineNode : public Classes::TPersistent
- {
- typedef TOutlineNode ThisClass;
- typedef Classes::TPersistent inherited;
-
- private:
- Classes::TList *FList;
- System::AnsiString FText;
- void *FData;
- TOutlineNode *FParent;
- System::Longint FIndex;
- System::Boolean FState;
- TCustomOutline *FOutline;
- System::Longint FExpandCount;
- void __fastcall ChangeExpandedCount(System::Longint Value);
- void __fastcall CloseNode(void);
- void __fastcall Clear(void);
- void __fastcall Error(System::Integer ErrorStringID);
- System::Longint __fastcall GetExpandedNodeCount(void);
- System::AnsiString __fastcall GetFullPath(void);
- System::Longint __fastcall GetIndex(void);
- System::Longint __fastcall GetLastIndex(void);
- System::Cardinal __fastcall GetLevel(void);
- Classes::TList *__fastcall GetList(void);
- System::Cardinal __fastcall GetMaxDisplayWidth(System::Cardinal Value);
- TOutlineNode *__fastcall GetNode(System::Longint Index);
- System::Longint __fastcall GetTopItem(void);
- TOutlineNode *__fastcall GetVisibleParent(void);
- System::Boolean __fastcall HasChildren(void);
- System::Boolean __fastcall HasVisibleParent(void);
- System::Boolean __fastcall IsEqual(TOutlineNode *Value);
- void __fastcall ReIndex(TOutlineNode *StartNode, TOutlineNode *EndNode, System::Longint NewIndex, System::Boolean
- IncludeStart);
- void __fastcall Repaint(void);
- System::Boolean __fastcall Resync(System::Longint &NewIndex, TOutlineNode *EndNode);
- void __fastcall SetExpandedState(System::Boolean Value);
- void __fastcall SetGoodIndex(void);
- void __fastcall SetHorzScrollBar(void);
- void __fastcall SetLevel(System::Cardinal Level);
- void __fastcall SetText(const System::AnsiString Value);
-
- protected:
- __fastcall TOutlineNode(TCustomOutline *AOwner);
- __fastcall virtual ~TOutlineNode(void);
- TOutlineNode *__fastcall GetVisibleNode(System::Longint TargetCount);
- System::Longint __fastcall AddNode(TOutlineNode *Value);
- System::Longint __fastcall InsertNode(System::Longint Index, TOutlineNode *Value);
- TOutlineNode *__fastcall GetNodeAtIndex(System::Longint TargetIndex);
- System::Longint __fastcall GetDataItem(System::Pointer Value);
- System::Longint __fastcall GetTextItem(const System::AnsiString Value);
- System::Boolean __fastcall HasAsParent(TOutlineNode *Value);
- System::Boolean __fastcall GetRowOfNode(TOutlineNode *TargetNode, System::Longint &RowCount);
- void __fastcall InternalRemove(TOutlineNode *Value, System::Integer Index);
- void __fastcall Remove(TOutlineNode *Value);
- void __fastcall WriteNode(System::PChar Buffer, Classes::TStream *Stream);
- __property TCustomOutline * Outline = {read=FOutline, nodefault};
- __property Classes::TList * List = {read=GetList, nodefault};
- __property System::Longint ExpandCount = {read=FExpandCount, nodefault};
- __property TOutlineNode * Items[System::Longint Index] = {read=GetNode/*, default*/};
-
- public:
- void __fastcall ChangeLevelBy(TChangeRange Value);
- void __fastcall Collapse(void);
- void __fastcall Expand(void);
- void __fastcall FullExpand(void);
- System::Integer __fastcall GetDisplayWidth(void);
- System::Longint __fastcall GetFirstChild(void);
- System::Longint __fastcall GetLastChild(void);
- System::Longint __fastcall GetNextChild(System::Longint Value);
- System::Longint __fastcall GetPrevChild(System::Longint Value);
- void __fastcall MoveTo(System::Longint Destination, TAttachMode AttachMode);
- __property TOutlineNode * Parent = {read=FParent, nodefault};
- __property System::Boolean Expanded = {read=FState, write=SetExpandedState, nodefault};
- __property System::AnsiString Text = {read=FText, write=SetText, nodefault};
- __property System::Pointer Data = {read=FData, write=FData, nodefault};
- __property System::Longint Index = {read=GetIndex, nodefault};
- __property System::Cardinal Level = {read=GetLevel, write=SetLevel, nodefault};
- __property System::Boolean HasItems = {read=HasChildren, nodefault};
- __property System::Boolean IsVisible = {read=HasVisibleParent, nodefault};
- __property System::Longint TopItem = {read=GetTopItem, nodefault};
- __property System::AnsiString FullPath = {read=GetFullPath, nodefault};
- };
-
- typedef System::Shortint TBitmapArrayRange;
-
- class __declspec(delphiclass) TOutline;
- class __declspec(pascalimplementation) TOutline : public TCustomOutline
- {
- typedef TOutline ThisClass;
- 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) { }
-
- };
-
- //-- var, const, procedure ---------------------------------------------------
- //-- template instantiations -------------------------------------------------
- template class TOutlineOptions ;
- template class TOutlineBitmaps ;
-
- } /* namespace Outline */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Outline;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // Outline
-