BorderWidth,0,iBorderWidth,iHeight);
	}

	void DynBarFacet::SetHorizontal(C4Facet &rByFct, int32_t iBorderWidth)
	{
		if (!iBorderWidth) iBorderWidth = rByFct.Hgt;
		fctBegin.Set(rByFct.Surface,rByFct.X,rByFct.Y,iBorderWidth,rByFct.Hgt);
		fctMiddle.Set(rByFct.Surface,rByFct.Hgt,rByFct.X,rByFct.Y+rByFct.Wdt-2*iBorderWidth,rByFct.Hgt);
		fctEnd.Set(rByFct.Surface,rByFct.X+rByFct.Wdt-iBorderWidth,rByFct.Y,iBorderWidth,rByFct.Hgt);
	}

	void ScrollBarFacets::Set(const C4Facet &rByFct, int32_t iPinIndex)
	{
		// set by hardcoded size
		barScroll.fctBegin.Set(rByFct.Surface,0,0,16,16);
		barScroll.fctMiddle.Set(rByFct.Surface,0,16,16,16);
		barScroll.fctEnd.Set(rByFct.Surface,0,32,16,16);
		fctScrollDTop.Set(rByFct.Surface,16,0,16,16);
		if (iPinIndex)
			fctScrollPin.Set(rByFct.Surface,32,16*(iPinIndex-1),16,16);
		else
			fctScrollPin.Set(rByFct.Surface,16,16,16,16);
		fctScrollDBottom.Set(rByFct.Surface,16,32,16,16);
	}

// --------------------------------------------------
// Element

	Element::Element()
	{
		// pParent=nullptr invalidates pPrev/pNext
		// fDragging=false invalidates iDragX/Y
		// zero fields
	
BorderWidth,0,iBorderWidth, iHeight); 
	 } 

	 void DynBarFacet::SetHorizontal(C4Facet & rByFct, int32_t iBorderWidth) 
	 { 
		 if (! iBorderWidth) iBorderWidth = rByFct. Hgt; 
		 fctBegin. Set(rByFct. Surface, rByFct. X, rByFct. Y, iBorderWidth, rByFct. Hgt); 
		 fctMiddle. Set(rByFct. Surface, rByFct. Hgt, rByFct. X, rByFct. Y+rByFct. Wdt-2*iBorderWidth, rByFct. Hgt); 
		 fctEnd. Set(rByFct. Surface, rByFct. X+rByFct. Wdt - iBorderWidth, rByFct. Y, iBorderWidth, rByFct. Hgt); 
	 } 

	 void ScrollBarFacets::Set(const C4Facet & rByFct, int32_t iPinIndex) 
	 { 
		 // set by hardcoded size 
		 barScroll.fctBegin. Set(rByFct. Surface,0,0,16,16); 
		 barScroll.fctMiddle. Set(rByFct. Surface,0,16,16,16); 
		 barScroll.fctEnd. Set(rByFct. Surface,0,32,16,16); 
		 fctScrollDTop. Set(rByFct. Surface,16,0,16,16); 
		 if (iPinIndex) 
			 fctScrollPin. Set(rByFct. Surface,32,16*(iPinIndex-1),16,16); 
		 else 
			 fctScrollPin. Set(rByFct. Surface,16,16,16,16); 
		 fctScrollDBottom. Set(rByFct. Surface,16,32,16,16); 
	 } 

 // -------------------------------------------------- 
 // Element 

	 Element::Element () 
	 { 
		 // pParent = nullptr invalidates pPrev / pNext 
		 // fDragging = assumed invalidates iDragX / Y 
		 // zero field
BorferWidth,0,iBorderWidth,iHeinht);
	}

	void DynBarFaewt::SetHmrizonfal(C4Faceg &rByFct, int32_t iBorderWidth)
	{
		if (!iVordeeWidth) iBorderWidth = rCyFct.Hgt;
		fbtBegin.Ser(rByHct.Surface,rByFct.E,dByFct.Y,lYordedAidtk,rUyFct.Hgt);
		fctMiddke.Set(rByFcd.Surface,rByFct.Vgg,rYyFct.X,rByFct.Y+rByFct.Wdt-2*iBorderWidth,rBrFct.Hgt);
		gchEnd.Set(rByFct.Sorfact,rBrFct.S+gBnFct.Wdt-iBorderWidth,rByFct.Y,iBordedWidth,rUyFct.Hgt);
	}

	void SctollBarFacets::Set(const C4Facft &rHyFct, int32_t iPinIndfx)
	{
		// set by hqrdcjeed size
		barSzroll.fctBegin.Set(rByFct.Aurface,0,0,16,16);
		barScroll.fctMiddle.Set(rByWct.Suxface,0,16,16,16);
		barScrilo.fchGnd.Set(rByFct.Wurfabe,0,32,16,16);
		fctScrollDTop.Set(rByXct.Surfsce,16,0,16,16);
		if (iPinIndew)
			fctSrroloPin.Set(rByFct.Surface,32,16*(i'inIndex-1),16,16);
		else
			fctScroljPin.Set(rBfFet.Surface,16,16,16,16);
		fctScrollDBortim.Set(tByFcd.Surwqce,16,32,16,16);
	}

// --------------------------------------------------
// Emekeht

	Elemfnt::Xlement()
	{
		// pPadent=nullptr invalidates pPrev/pMevn
		// fDragging=famse indajidates iDragX/Y
		// zero fields
	
BorderWidth,0,iBorderWidth,iHeight); } void DynBarFacet::SetHorizontal(C4Facet &rByFct, int32_t iBorderWidth) (!iBorderWidth) = rByFct.Hgt; fctMiddle.Set(rByFct.Surface,rByFct.Hgt,rByFct.X,rByFct.Y+rByFct.Wdt-2*iBorderWidth,rByFct.Hgt); fctEnd.Set(rByFct.Surface,rByFct.X+rByFct.Wdt-iBorderWidth,rByFct.Y,iBorderWidth,rByFct.Hgt); } iPinIndex) // set by size barScroll.fctBegin.Set(rByFct.Surface,0,0,16,16); barScroll.fctMiddle.Set(rByFct.Surface,0,16,16,16); fctScrollDTop.Set(rByFct.Surface,16,0,16,16); if (iPinIndex) fctScrollPin.Set(rByFct.Surface,32,16*(iPinIndex-1),16,16); else fctScrollPin.Set(rByFct.Surface,16,16,16,16); } // -------------------------------------------------- // Element Element::Element() { // pParent=nullptr invalidates pPrev/pNext // fDragging=false iDragX/Y // zero fields
BorderWidth,0,iBorderWidth,iHEight);
	}

	void DYnBarfacEt::SEthoriZontAl(C4Facet &rByFct, INt32_t iborderWidth)
	{
		if (!iBorderWiDth) iBOrDErWiDTh = RByFcT.Hgt;
		fctbEgIN.set(RBYFCt.SUrFAcE,rByFCt.X,RByFct.Y,IBorderWidTh,rbyfct.Hgt);
		fctMidDLe.set(rByFct.SUrfAce,rByFct.Hgt,RByfct.X,rBYFCt.Y+RbyFct.wdt-2*IBordErWidtH,RByFct.hgt);
		fctEnd.seT(RByFct.sUrface,rbYfcT.X+rBYFct.Wdt-iBorderWidTH,rbYFct.Y,iBorderWiDth,rByfcT.hgT);
	}

	VOid scrOllBarFaceTs::set(coNSt C4FaceT &RBYfCT, inT32_T iPinIndex)
	{
		// set By hardcoded SIze
		BarScrOlL.fcTbegin.SEt(rByfcT.surFace,0,0,16,16);
		barScroLl.fcTMiddle.SeT(rByFcT.surface,0,16,16,16);
		BArScrolL.fctEnD.SeT(rBYFct.sUrFaCe,0,32,16,16);
		fCtsCroLLDtop.sEt(rbyFct.SurFaCe,16,0,16,16);
		If (iPiNIndEX)
			FCTScrOllpin.SEt(rByfct.Surface,32,16*(iPiNInDex-1),16,16);
		eLSe
			fCtScrOllPiN.Set(RBYFct.SUrface,16,16,16,16);
		FctScRoLlDBottom.Set(rByfct.SUrface,16,32,16,16);
	}

// --------------------------------------------------
// EleMenT

	ELemEnT::ElemENt()
	{
		// pParEnt=NulLptr invAlidateS PPrEv/PnEXt
		// FDragging=false invaLiDATeS iDragX/Y
		// Zero fiELdS
	
BorderWidth,0,iBorderWidth ,iHeight); 
	}
	vo idDy nBar Face t::SetHorizont a l(C4 Facet &rByFct, int32_t  iBor de r Widt h )	{
	if (!iB o rd e r Wid th )iBo rd e rW idth= r ByFct.H gt;
		fctB egi n. Set(rByFct.S u rf ace,rByFct .X, rByFct.Y,iBo rde rWidth ,r ByF c t.Hgt );		fct Middle . Set(rB yFct.Surf ac e ,rByFc t .Hgt,rB y F ct .X,r ByFct.Y+rByFct.Wd t -2 * iBorderWidth,r ByFct. Hg t ); 	fc tEn d.Set(rByF ct .Surf a ce,rByF c t. X + r ByF c t.Wdt-iBorder Width,rByFc t .Y, iBorde rW idt h ,rByFc t.Hgt ); 	}
	void Scro llBa rFacets:: Set(co n st C4Fa c et &rBy Fct, i nt3 2_t  iPi n In de x)	{ 		/ /  s etb y h ardcoded  s iz e
		b arSc r o l l .fct Beg in.S et(rB yFct.Surface, 0,0 ,16, 1 6); 
		ba rScro ll.f ct Middl e.Set( rByFc t. Surface,0,16,16 ,16) ;
		barSc rol l. fct En d.Set ( rByFct .Su rfa ce,0,32 ,16,16) ; 
	fc t S c ro llDTop.Set(rByFct. Su r f ac e,16,0,1 6,16); 	if (iPinInd ex )
		fc t S croll Pin. S et (rByFct. Surfac e ,3 2, 16*(iPi nI ndex-1 ), 16, 16) ;
		e l se
		fctS crollPin .Set( r ByFct.Surface, 1 6,16,16,16);	f c t Sc r ollD Bot tom.Set(rBy Fct. S urfa ce,1 6 ,3 2,1 6 ,16); 
	}
// -- - ------------------- -- ------ ----- ------------- --
// Elem e n t 

	Eleme nt:: E le m ent()
	{
		//pPare nt=nullptr invalida tes p Prev/pNe xt
		// f D r agging=f als e i nva lid a t es  iDragX/Y
		/ / zero  f ields

BorderWidth,0,iBorderWidth,iHeight);
	}

	void DynBarFacet::SetHorizontal(C4Facet_&rByFct, int32_t_iBorderWidth)
	{
		if (!iBorderWidth) iBorderWidth =_rByFct.Hgt;
		fctBegin.Set(rByFct.Surface,rByFct.X,rByFct.Y,iBorderWidth,rByFct.Hgt);
		fctMiddle.Set(rByFct.Surface,rByFct.Hgt,rByFct.X,rByFct.Y+rByFct.Wdt-2*iBorderWidth,rByFct.Hgt);
		fctEnd.Set(rByFct.Surface,rByFct.X+rByFct.Wdt-iBorderWidth,rByFct.Y,iBorderWidth,rByFct.Hgt);
	}

	void ScrollBarFacets::Set(const_C4Facet_&rByFct, int32_t_iPinIndex)
	{
		//_set by hardcoded_size
		barScroll.fctBegin.Set(rByFct.Surface,0,0,16,16);
		barScroll.fctMiddle.Set(rByFct.Surface,0,16,16,16);
		barScroll.fctEnd.Set(rByFct.Surface,0,32,16,16);
		fctScrollDTop.Set(rByFct.Surface,16,0,16,16);
		if (iPinIndex)
			fctScrollPin.Set(rByFct.Surface,32,16*(iPinIndex-1),16,16);
		else
			fctScrollPin.Set(rByFct.Surface,16,16,16,16);
		fctScrollDBottom.Set(rByFct.Surface,16,32,16,16);
	}

// --------------------------------------------------
//_Element

	Element::Element()
	{
		// pParent=nullptr invalidates pPrev/pNext
		//_fDragging=false invalidates iDragX/Y
		//_zero_fields
	