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

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

#ifndef RvlabelitemHPP
#define RvlabelitemHPP

#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 <Sysutils.hpp>	// Pascal unit
#include <Classes.hpp>	// Pascal unit
#include <Windows.hpp>	// Pascal unit
#include <Graphics.hpp>	// Pascal unit
#include <Rvfuncs.hpp>	// Pascal unit
#include <Controls.hpp>	// Pascal unit
#include <Rvscroll.hpp>	// Pascal unit
#include <Rvstyle.hpp>	// Pascal unit
#include <Rvitem.hpp>	// Pascal unit
#include <Rvfmisc.hpp>	// Pascal unit
#include <Dlines.hpp>	// Pascal unit
#include <Rvclasses.hpp>	// Pascal unit
#include <Rvtypes.hpp>	// Pascal unit
#include <Rvuni.hpp>	// Pascal unit

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

namespace Rvlabelitem
{
//-- type declarations -------------------------------------------------------
class DELPHICLASS TRVLabelItemInfo;
class PASCALIMPLEMENTATION TRVLabelItemInfo : public Rvitem::TRVRectItemInfo 
{
	typedef Rvitem::TRVRectItemInfo inherited;
	
private:
	int Width;
	int Height;
	int Descend;
	int YOffs;
	int FMinWidth;
	Classes::TAlignment FAlignment;
	bool FCanUseCustomPPI;
	Classes::TPersistent* FParentRVData;
	int FTextStyleNo;
	void __fastcall SetMinWidth(const int Value);
	void __fastcall SetAlignment(const Classes::TAlignment Value);
	Rvstyle::TRVStyle* __fastcall GetRVStyle(void);
	
protected:
	bool FUpdated;
	virtual void __fastcall DoPaint(const Types::TRect &r, Graphics::TCanvas* Canvas, Rvitem::TRVItemDrawStates State, Rvstyle::TRVStyle* Style, Dlines::TRVDrawLineInfo* dli, Rvstyle::TRVColorMode ColorMode, const AnsiString Text);
	virtual int __fastcall GetHeight(void);
	virtual int __fastcall GetWidth(void);
	virtual int __fastcall GetAssociatedTextStyleNo(void);
	virtual void __fastcall SetAssociatedTextStyleNo(int Value);
	virtual void __fastcall SetParentRVData(const Classes::TPersistent* Value);
	void __fastcall SavePropertiesToRVF(Classes::TStream* Stream, Classes::TPersistent* RVData);
	void __fastcall LoadPropertiesFromRVF(const AnsiString s, int Index, Classes::TPersistent* RVData, bool UTF8Strings, bool &TextStyleNameUsed);
	DYNAMIC int __fastcall GetRVFExtraPropertyCount(void);
	DYNAMIC void __fastcall SaveRVFExtraProperties(Classes::TStream* Stream);
	DYNAMIC AnsiString __fastcall GetTextForPrintMeasuring(Classes::TPersistent* RVData);
	virtual AnsiString __fastcall GetTextForPrinting(Classes::TPersistent* RVData, Dlines::TRVDrawLineInfo* DrawItem);
	virtual int __fastcall GetTextStyleNo(void);
	virtual void __fastcall SetTextStyleNo(const int Value);
	
public:
	AnsiString Text;
	bool ProtectTextStyleNo;
	bool RemoveInternalLeading;
	Controls::TCursor Cursor;
	__fastcall virtual TRVLabelItemInfo(Classes::TPersistent* RVData);
	__fastcall TRVLabelItemInfo(Classes::TPersistent* RVData, int TextStyleNo, const AnsiString Text);
	DYNAMIC void __fastcall MovingToUndoList(int ItemNo, System::TObject* RVData, System::TObject* AContainerUndoItem);
	DYNAMIC void __fastcall MovingFromUndoList(int ItemNo, System::TObject* RVData);
	DYNAMIC bool __fastcall MouseMove(Classes::TShiftState Shift, int X, int Y, int ItemNo, System::TObject* RVData);
	virtual int __fastcall GetMinWidth(Rvstyle::PRVScreenAndDevice sad, Graphics::TCanvas* Canvas, Classes::TPersistent* RVData);
	virtual bool __fastcall GetBoolValue(Rvitem::TRVItemBoolProperty Prop);
	virtual bool __fastcall GetBoolValueEx(Rvitem::TRVItemBoolPropertyEx Prop, Rvstyle::TRVStyle* RVStyle);
	virtual void __fastcall Paint(int x, int y, Graphics::TCanvas* Canvas, Rvitem::TRVItemDrawStates State, Rvstyle::TRVStyle* Style, Dlines::TRVDrawLineInfo* dli);
	virtual void __fastcall Print(Graphics::TCanvas* Canvas, int x, int y, int x2, bool Preview, bool Correction, const Rvstyle::TRVScreenAndDevice &sad, Rvscroll::TRVScroller* RichView, Dlines::TRVDrawLineInfo* dli, int Part, Rvstyle::TRVColorMode ColorMode, Classes::TPersistent* RVData);
	DYNAMIC void __fastcall AfterLoading(Rvstyle::TRVLoadFormat FileFormat);
	DYNAMIC bool __fastcall SetExtraCustomProperty(const AnsiString PropName, const AnsiString Value);
	DYNAMIC void __fastcall SaveRVF(Classes::TStream* Stream, Classes::TPersistent* RVData, int ItemNo, int ParaNo, const AnsiString Name, Rvitem::TRVMultiDrawItemPart* Part, bool ForceSameAsPrev);
	DYNAMIC bool __fastcall ReadRVFLine(const AnsiString s, Classes::TPersistent* RVData, int ReadType, int LineNo, int LineCount, AnsiString &Name, Rvitem::TRVFReadMode &ReadMode, Rvitem::TRVFReadState &ReadState, bool UTF8Strings, bool &AssStyleNameUsed);
	DYNAMIC void __fastcall Assign(Rvitem::TCustomRVItemInfo* Source);
	DYNAMIC void __fastcall MarkStylesInUse(Rvitem::TRVDeleteUnusedStylesData* Data);
	DYNAMIC void __fastcall UpdateStyles(Rvitem::TRVDeleteUnusedStylesData* Data);
	DYNAMIC void __fastcall ApplyStyleConversion(Classes::TPersistent* RVData, int ItemNo, int UserData, Rvitem::TRVEStyleConversionType ConvType);
	void __fastcall UpdateMe(void);
	virtual void __fastcall OnDocWidthChange(int DocWidth, Dlines::TRVDrawLineInfo* dli, bool Printing, Graphics::TCanvas* Canvas, Classes::TPersistent* RVData, Rvstyle::PRVScreenAndDevice sad, int &HShift, int &Desc, bool NoCaching, bool Reformatting, bool UseFormatCanvas);
	int __fastcall GetFinalPrintingWidth(Graphics::TCanvas* Canvas, Dlines::TRVDrawLineInfo* dli, Classes::TPersistent* RVData);
	DYNAMIC void __fastcall Execute(Classes::TPersistent* RVData);
	DYNAMIC void __fastcall SaveRTF(Classes::TStream* Stream, const AnsiString Path, Classes::TPersistent* RVData, int ItemNo, double TwipsPerPixel, int Level, Rvclasses::TRVColorList* ColorList, Rvclasses::TRVIntegerList* StyleToFont, Rvclasses::TRVIntegerList* ListOverrideOffsetsList1, Rvclasses::TRVIntegerList* ListOverrideOffsetsList2, Rvclasses::TRVList* FontTable);
	DYNAMIC void __fastcall SaveToHTML(Classes::TStream* Stream, Classes::TPersistent* RVData, int ItemNo, const AnsiString Text, const AnsiString Path, const AnsiString imgSavePrefix, int &imgSaveNo, Graphics::TColor CurrentFileColor, Rvstyle::TRVSaveOptions SaveOptions, bool UseCSS, Rvclasses::TRVList* Bullets);
	DYNAMIC AnsiString __fastcall AsText(int LineWidth, Classes::TPersistent* RVData, const AnsiString Text, const AnsiString Path, bool TextOnly, bool Unicode);
	virtual void __fastcall Inserted(System::TObject* RVData, int ItemNo);
	void __fastcall Changed(void);
	__property int TextStyleNo = {read=GetTextStyleNo, write=SetTextStyleNo, nodefault};
	__property int MinWidth = {read=FMinWidth, write=SetMinWidth, nodefault};
	__property Classes::TAlignment Alignment = {read=FAlignment, write=SetAlignment, nodefault};
	__property Rvstyle::TRVStyle* RVStyle = {read=GetRVStyle};
	__property Classes::TPersistent* ParentRVData = {read=FParentRVData, write=SetParentRVData};
public:
	#pragma option push -w-inl
	/* TCustomRVItemInfo.Destroy */ inline __fastcall virtual ~TRVLabelItemInfo(void) { }
	#pragma option pop
	
};


//-- var, const, procedure ---------------------------------------------------
static const short rvsLabel = -200;

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

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