// CodeGear C++Builder
// Copyright (c) 1995, 2010 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'RVLabelItem.pas' rev: 22.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 <AnsiStrings.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;
	Rvstyle::TRVStyleLength FMinWidth;
	Classes::TAlignment FAlignment;
	bool FCanUseCustomPPI;
	Classes::TPersistent* FParentRVData;
	int FTextStyleNo;
	System::UnicodeString FText;
	void __fastcall SetMinWidth(const Rvstyle::TRVStyleLength Value);
	void __fastcall SetAlignment(const Classes::TAlignment Value);
	Rvstyle::TRVStyle* __fastcall GetRVStyle(void);
	void __fastcall SetText(const System::UnicodeString Value);
	
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 System::UnicodeString Text);
	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 Rvtypes::TRVRawByteString s, int Index, Classes::TPersistent* RVData, bool UTF8Strings, bool &TextStyleNameUsed);
	DYNAMIC int __fastcall GetRVFExtraPropertyCount(void);
	DYNAMIC void __fastcall SaveRVFExtraProperties(Classes::TStream* Stream);
	DYNAMIC System::UnicodeString __fastcall GetTextForPrintMeasuring(Classes::TPersistent* RVData);
	virtual System::UnicodeString __fastcall GetTextForPrinting(Classes::TPersistent* RVData, Dlines::TRVDrawLineInfo* DrawItem);
	virtual int __fastcall GetTextStyleNo(void);
	virtual void __fastcall SetTextStyleNo(const int Value);
	void __fastcall DoUpdateMe(int &Width, int &Height, int &YOffs, int &Descend, bool CanUseCustomPPI, bool CompareMinWidth, Classes::TPersistent* RVData, const System::UnicodeString Text, Graphics::TCanvas* DefCanvas);
	
public:
	bool ProtectTextStyleNo;
	bool RemoveInternalLeading;
	Controls::TCursor Cursor;
	__fastcall virtual TRVLabelItemInfo(Classes::TPersistent* RVData);
	__fastcall TRVLabelItemInfo(Classes::TPersistent* RVData, int TextStyleNo, const System::UnicodeString Text);
	virtual int __fastcall GetHeight(Rvstyle::TRVStyle* RVStyle);
	virtual int __fastcall GetWidth(Rvstyle::TRVStyle* RVStyle);
	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 Rvtypes::TRVAnsiString PropName, const System::UnicodeString Value);
	DYNAMIC void __fastcall SaveRVF(Classes::TStream* Stream, Classes::TPersistent* RVData, int ItemNo, int ParaNo, const Rvtypes::TRVRawByteString Name, Rvitem::TRVMultiDrawItemPart* Part, bool ForceSameAsPrev);
	DYNAMIC bool __fastcall ReadRVFLine(const Rvtypes::TRVRawByteString s, Classes::TPersistent* RVData, int ReadType, int LineNo, int LineCount, Rvtypes::TRVRawByteString &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 System::UnicodeString 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, bool HiddenParent);
	DYNAMIC void __fastcall SaveToHTML(Classes::TStream* Stream, Classes::TPersistent* RVData, int ItemNo, const Rvtypes::TRVRawByteString Text, const System::UnicodeString Path, const System::UnicodeString imgSavePrefix, int &imgSaveNo, Graphics::TColor CurrentFileColor, Rvstyle::TRVSaveOptions SaveOptions, bool UseCSS, Rvclasses::TRVList* Bullets);
	DYNAMIC Rvtypes::TRVRawByteString __fastcall AsText(int LineWidth, Classes::TPersistent* RVData, const Rvtypes::TRVRawByteString Text, const System::UnicodeString Path, bool TextOnly, bool Unicode);
	virtual void __fastcall Inserted(System::TObject* RVData, int ItemNo);
	void __fastcall Changed(void);
	DYNAMIC void __fastcall ConvertToDifferentUnits(Rvstyle::TRVStyleUnits NewUnits, Rvstyle::TRVStyle* RVStyle, bool Recursive);
	__property int TextStyleNo = {read=GetTextStyleNo, write=SetTextStyleNo, nodefault};
	__property System::UnicodeString Text = {read=FText, write=SetText};
	__property Rvstyle::TRVStyleLength 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:
	/* TCustomRVItemInfo.Destroy */ inline __fastcall virtual ~TRVLabelItemInfo(void) { }
	
};


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

}	/* namespace Rvlabelitem */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE)
using namespace Rvlabelitem;
#endif
#pragma pack(pop)
#pragma option pop

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