/********************************************************************** 

Filename	:	Civ4Theme_Edit.thm
Content		:	Civ4 - GEdit control theme
Created		:	May 1, 2005
Authors		:	Sven Dixon

Copyright	:	(c) 2005 Scaleform Corp. All Rights Reserved.

Licensees may use this file in accordance with the valid Scaleform
GFC Commercial License Agreement provided with the software.

This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING 
THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR ANY PURPOSE.

For information regarding GFC Commercial License Agreements go to:
	online - http://www.scaleform.com/licensing.html or
	email  - sales@scaleform.com 

**********************************************************************/


// *** Main Edit control namespace 

with GFC_Control_Edit
{

	GFC_Control_DefaultEdit_Style
	{
		GFC_Control_Renderer_Control		=	GFC_CtrlTheme_Bitmap_Control_Edit_Renderer_Control;

		with .Renderer
		{
			.Text					=	GFC_CtrlTheme_Bitmap_Control_Edit_Renderer_Text;
			.Select					=	GFC_CtrlTheme_Bitmap_Control_Edit_Renderer_Select;
			.Caret					=	GFC_CtrlTheme_Bitmap_Control_Edit_Renderer_Caret;
			.DragCaret				=	GFC_CtrlTheme_Bitmap_Control_Edit_Renderer_DragCaret;
		}						
									
		with .Child					
		{						
			.Border					=	GFC_CtrlTheme_Bitmap_Control_Edit_Child_Border;
			.ScrollFrame			=	GFC_CtrlTheme_Bitmap_Control_Edit_Child_ScrollFrame;
			.PopupMenu				=	GFC_CtrlTheme_Bitmap_Control_Edit_Child_PopupMenu;
			.DropMenu				=	GFC_CtrlTheme_Bitmap_Control_Edit_Child_DropMenu;
									
			// History object		
			.History				=	GFC_CtrlTheme_Bitmap_Control_Edit_Child_DefaultHistory;
		}						
									
		with .StyleId				
		{						
			.Border					=	GPropertyId(GFC_Control_InBorder_Style);
			.ScrollFrame			=	GPropertyId(GFC_Control_StandardScrollFrame_Style);
			.PopupMenu				=	GPropertyId(GFC_Control_StandardMenu_Style);
			.DropMenu				=	GPropertyId(GFC_Control_StandardMenu_Style);
		}

		with GFC_Control_Flag
		{	
			// Base control flags
			.Transparent						=	GFlags(GCtrl, GFC_CF_TRANSPARENT);
			.SolidInner							=	0;	//GFlags(GCtrl, GFC_CF_SOLIDINNER);
			.SolidBackground					=	0;	//GFlags(GCtrl, GFC_CF_SOLIDBACKGROUND);
			.RegionClip							=	0;	//GFlags(GCtrl, GFC_CF_REGIONCLIP);
			.RegionClipParent					=	0;	//GFlags(GCtrl, GFC_CF_REGIONCLIP_PARENT);
			.NoExternalWindow					=	0;	//GFlags(GCtrl, GFC_CF_NOEXTERNALWINDOW);
			.HitTest							=	0;	//GFlags(GCtrl, GFC_CF_HITTEST);
			.TopLayer							=	0;	//GFlags(GCtrl, GFC_CF_TOPLAYER);
			.TopLayerBitmap						=	0;	//GFlags(GCtrl, GFC_CF_TOPLAYERBITMAP);
			.BottomLayerBitmap					=	0;	//GFlags(GCtrl, GFC_CF_BOTTOMLAYERBITMAP);
											
			// Control flag change masks	
			.Mask_InvalidateControl				=	GFlags(GCtrl, GFC_CF_ACTIVE, GFC_CF_DISABLED, GFC_CF_TRANSPARENT, GFC_CF_TOPLAYER);
		}

		with .Flag
		{																										
			// Edit flags																				
			.NoInnerFill						=	0;	//GFlags(GEditCtrl, GFC_CF_EDIT_NOINNERFILL);
			.NoBorder							=	0;	//GFlags(GEditCtrl, GFC_CF_EDIT_NOBORDER);
			.History							=	GFlags(GEditCtrl, GFC_CF_EDIT_HISTORY);
			.Select								=	GFlags(GEditCtrl, GFC_CF_EDIT_SELECT_FOCUS );
			.TabSize							=	0;	//GFlags(GEditCtrl, GFC_CF_EDIT_TAB_SIZE);
			.TabKey								=	0;	//GFlags(GEditCtrl, GFC_CF_EDIT_TAB_KEY);
			.VAlign								=	GFlags(GEditCtrl, GFC_CF_EDIT_VCENTER);
			.HAlign								=	GFlags(GEditCtrl, GFC_CF_EDIT_LEFT);
			.Wrap								=	0;	//GFlags(GEditCtrl, GFC_CF_EDIT_WRAP_WORD);
			.CropLeft							=	0;	//GFlags(GEditCtrl, GFC_CF_EDIT_CROP_LEFT);
			.CropRight							=	0;	//GFlags(GEditCtrl, GFC_CF_EDIT_CROP_RIGHT);
			.CropTop							=	0;	//GFlags(GEditCtrl, GFC_CF_EDIT_CROP_TOP);
			.CropBottom							=	0;	//GFlags(GEditCtrl, GFC_CF_EDIT_CROP_BOTTOM);
			.Multiline							=	0;	//GFlags(GEditCtrl, GFC_CF_EDIT_MULTILINE);
			.Clamp								=	0;	//GFlags(GEditCtrl, GFC_CF_EDIT_CLAMP_TOTOP);
			.ScrollFrame						=	GFlags(GEditCtrl, GFC_CF_EDIT_SCROLLFRAME);
			
			// Edit flag change																			
			// - No assignment uses defaults
			//.EditMask_InvalidateControl		=	GFlags(GEditCtrl);
			//.EditMask_UpdateDrawText			=	GFlags(GEditCtrl);
		}	
		
		with .Size
		{
			.ViewMargin					= GRectMargin(4,1,4,1);
			.PageMargin					= GRectMargin(0,0,0,0);
			.PageWidth					= 0;
			.TextOffset					= GPoint(0,0);	
										
			.MaxCharCount				= 0;
			.MaxLineCount				= 0;
			.MaxDataSize				= 2000;
										
			.TabSize					= 8;
		//	.TabStops					= 0;
										
			.ScrollShiftUp				= 0;
			.ScrollShiftDown			= 0;
			.ScrollShiftLeft			= 10;
			.ScrollShiftRight			= 10;
		
			// Zero for either size component causes
			// the caret to be the size of the character
			.Caret_Insert				=	GSize(3,-1);
			.Caret_Overwrite			=	GSize(3,-1);
			.Caret_DragCopy				=	GSize(3,0);
			.Caret_DragMove				=	GSize(3,0);
			.Caret_DragLink				=	GSize(3,0);
			.CaretOffset_Insert			=	GPoint(-2,0);
			.CaretOffset_Overwrite		=	GPoint(-2,0);
			.CaretOffset_DragCopy		=	GPoint(-2,0);
			.CaretOffset_DragMove		=	GPoint(-2,0);
			.CaretOffset_DragLink		=	GPoint(-2,0);
			.CaretExtent_Insert			=	GRectMargin(0,0,0,0);
			.CaretExtent_Overwrite		=	GRectMargin(0,0,0,0);
			.CaretExtent_DragCopy		=	GRectMargin(0,0,0,0);
			.CaretExtent_DragMove		=	GRectMargin(0,0,0,0);
			.CaretExtent_DragLink		=	GRectMargin(0,0,0,0);
	
			.Default					=	GSize(64,26);
		}


		with .Color
		{
			.Text_Default						=	GFC_Control_Color_Text_Default;
			.Text_Select						=	GFC_Control_Color_Text_Select;
			.Text_Inactive						=	.Text_Default;
			.Text_InactiveSelect				=	GFC_Control_Color_Text_InactiveSelect;
			.Text_Disable						=	GFC_Control_Color_Text_Disable;
			.Text_DisableSelect					=	GFC_Control_Color_Text_DisableSelect;					
			
			.Inner_Default						=	GFC_Control_Color_Inner_Default;
			.Inner_Inactive						=	GFC_Control_Color_Inner_Inactive;
			.Inner_Disable						=	GFC_Control_Color_Inner_Disable;

			.Select_Default						=	SF_CtrlTheme_Civ4_Control_Color_Select;
			.Select_Inactive					=	SF_CtrlTheme_Civ4_Control_Color_DisableSelect;
			.Select_Disable						=	SF_CtrlTheme_Civ4_Control_Color_DisableSelect;
			
			.Caret_Insert_Default				=	GFC_Control_Color_3DLook_Darkest;
			.Caret_Insert_Select				=	GFC_Control_Color_3DLook_Darkest;
			.Caret_Insert_Inactive				=	GFC_Control_Color_3DLook_Darkest;
			.Caret_Insert_InactiveSelect		=	GFC_Control_Color_3DLook_Darkest;
			.Caret_Insert_Disable				=	GFC_Control_Color_3DLook_Darkest;
			.Caret_Insert_DisableSelect			=	GFC_Control_Color_3DLook_Darkest;
			.Caret_Overwrite_Default			=	GFC_Control_Color_3DLook_Darkest;
			.Caret_Overwrite_Select				=	GFC_Control_Color_3DLook_Darkest;
			.Caret_Overwrite_Inactive			=	GFC_Control_Color_3DLook_Darkest;
			.Caret_Overwrite_InactiveSelect		=	GFC_Control_Color_3DLook_Darkest;
			.Caret_Overwrite_Disable			=	GFC_Control_Color_3DLook_Darkest;
			.Caret_Overwrite_DisableSelect		=	GFC_Control_Color_3DLook_Darkest;
			.Caret_DragCopy						=	GFC_Control_Color_3DLook_Dark;
			.Caret_DragMove						=	GFC_Control_Color_3DLook_Dark;
			.Caret_DragLink						=	GFC_Control_Color_3DLook_Dark;
		}

		with .Combine
		{
			.Text_Default_Dest					=	GFC_Control_Combine_Text_Default_Dest;
			.Text_Default_Factor				=	GFC_Control_Combine_Text_Default_Factor;
			.Text_Select_Dest					=	GFC_Control_Combine_Text_Select_Dest;
			.Text_Select_Factor					=	GFC_Control_Combine_Text_Select_Factor;
			.Text_Inactive_Dest					=	.Text_Default_Dest;
			.Text_Inactive_Factor				=	.Text_Default_Factor;
			.Text_InactiveSelect_Dest			=	GFC_Control_Combine_Text_InactiveSelect_Dest;
			.Text_InactiveSelect_Factor			=	GFC_Control_Combine_Text_InactiveSelect_Factor;
			.Text_Disable_Dest					=	GFC_Control_Combine_Text_Disable_Dest;
			.Text_Disable_Factor				=	GFC_Control_Combine_Text_Disable_Factor;
			.Text_DisableSelect_Dest			=	GFC_Control_Combine_Text_DisableSelect_Dest;								
			.Text_DisableSelect_Factor			=	GFC_Control_Combine_Text_DisableSelect_Factor;
			
			.Inner_Default						=	GFC_Control_Combine_Inner_Default;
			.Inner_Inactive						=	GFC_Control_Combine_Inner_Default;
			.Inner_Disable						=	GFC_Control_Combine_Inner_Disable;
			
			.Select_Default						=	GFC_Control_Combine_Inner_Select;
			.Select_Inactive					=	GFC_Control_Combine_Inner_InactiveSelect;
			.Select_Disable						=	GFC_Control_Combine_Inner_DisableSelect;
			
			.Caret_Insert_Default				=	GColorCombine(Source, Disable);  //GColorCombine(XOr, Source);
			.Caret_Insert_Select				=	GColorCombine(Source, Disable);  //GColorCombine(XOr, Source);
			.Caret_Insert_Inactive				=	GColorCombine(Source, Disable);  //GColorCombine(XOr, Source);
			.Caret_Insert_InactiveSelect		=	GColorCombine(Source, Disable);  //GColorCombine(XOr, Source);
			.Caret_Insert_Disable				=	GColorCombine(Source, Disable);  //GColorCombine(XOr, Source);
			.Caret_Insert_DisableSelect			=	GColorCombine(Source, Disable);  //GColorCombine(XOr, Source);
			.Caret_Overwrite_Default			=	GColorCombine(Source, Disable);  //GColorCombine(XOr, Source);
			.Caret_Overwrite_Select				=	GColorCombine(Source, Disable);  //GColorCombine(XOr, Source);
			.Caret_Overwrite_Inactive			=	GColorCombine(Source, Disable);  //GColorCombine(XOr, Source);
			.Caret_Overwrite_InactiveSelect		=	GColorCombine(Source, Disable);  //GColorCombine(XOr, Source);
			.Caret_Overwrite_Disable			=	GColorCombine(Source, Disable);  //GColorCombine(XOr, Source);
			.Caret_Overwrite_DisableSelect		=	GColorCombine(Source, Disable);  //GColorCombine(XOr, Source);
			.Caret_DragCopy						=	GColorCombine(Source, Disable);  //GColorCombine(BlendSource, Disable);
			.Caret_DragMove						=	GColorCombine(Source, Disable);  //GColorCombine(BlendSource, Disable);
			.Caret_DragLink						=	GColorCombine(Source, Disable);  //GColorCombine(BlendSource, Disable);
		}

		with .Cursor
		{
			.Text								=	GFC_Control_Cursor_Text;
			.Selection							=	GFC_Control_Cursor_Arrow;
			.SelectingText						=	GFC_Control_Cursor_Text;
			.SelectingTextLeft					=	GFC_Control_Cursor_Text;
			.SelectingTextRight					=	GFC_Control_Cursor_Text;
			.DragMove							=	GFC_Control_Cursor_DragMove;
			.DragCopy							=	GFC_Control_Cursor_DragCopy;
			.DragLink							=	GFC_Control_Cursor_DragLink;
		}								
		
		.Font_Text								=	SF_CtrlTheme_Civ4_Control_Font_Size3_Normal;
												
		.Delay_BlinkRate						=	500;

		with .Text							
		{								

			with .PopupMenu					
			{							
				.Undo							=	"Undo";
				.Redo							=	"Redo";
				.Cut							=	"Cut";
				.Copy							=	"Copy";
				.Paste							=	"Paste";
				.Delete							=	"Delete";
				.SelectAll						=	"Select All";
			}							
			with .DragDropMenu				
			{							
				.Copy							=	"Copy Here";
				.Move							=	"Move Here";
				.Link							=	"Link Here";
				.Cancel							=	"Cancel";
			}
		}


		// ******* Initialize all the Bitmap theme Edit properties to avoid inheritance problems

		with GFC_CtrlTheme_Bitmap_Control_Edit
		{
			// Forces the selection to be done with a solid color fill
			// - avoids using skins and is generally much faster
			.Flag_Select_SolidFill = 1;	


			// *** Skins																					
			with .Skin																												
			{
				// Caret skins																					
				// Normal insert and overwrite style carets
				.Caret_Insert_Default					=	0;
				.Caret_Insert_Inactive					=	0;
				.Caret_Insert_Disable					=	0;
				.Caret_Overwrite_Default				=	0;
				.Caret_Overwrite_Inactive				=	0;
				.Caret_Overwrite_Disable				=	0;	
				// Drag
				.Caret_DragCopy							=	0;
				.Caret_DragMove							=	0;
				.Caret_DragLink							=	0;
				// Inner skin																				
				.Inner_Default							=	0;
				.Inner_Inactive							=	0;
				.Inner_Disable							=	0;

				// *** Selected skins

				// ** Single line selection
				// - special case skin only used if Edit control is in single line mode
				// - if not available then the control falls back onto the multiline skins
				.Select_SingleLine_Default				=	0;
				.Select_SingleLine_Disable				=	0;
				.Select_SingleLine_Inactive				=	0;

				// ** Multiline selection (coming soon!)
				// Select Edge: Left in |->  Right in <-| and so on Top down / Bottom up
				// Select CornerIn: Corners with the selection inside the border area
				// Select CornerOut: Corners with the selection outside the border area
			}
		}

		map GFC_Control			=	GFC_Control_DefaultControl_Style;
	}	// end GFC_Control_DefaultEdit_Style


	// Normal Edit border
	style SF_CtrlTheme_Civ4_Control_Edit_Standard_Border_Style
	{
		GFC_Control_Border_Size_Margin				= GRectMargin(6,2,6,3);
		GFC_Control_Flag_Mask_InvalidateControl		=	GFlags(GCtrl, GFC_CF_ACTIVE, GFC_CF_DISABLED, GFC_CF_TRANSPARENT, GFC_CF_TOPLAYER);
			
		with GFC_CtrlTheme_Bitmap_Control_Border_Skin
		{
			.Full_Default
			{	
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_EMPTY, GFC_BITMAPSKIN_SIDES_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/edit.tga", HVGrid, 1, 3, 0, 0);
					Margin			=	GRectMargin(4,4,4,4);
					Indent			=	GRectMargin(3,3,3,3);
				}
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_EMPTY, GFC_BITMAPSKIN_SIDES_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/edit.tga", HVGrid, 1, 3, 0, 1);
					Margin			=	GRectMargin(4,4,4,4);
					Indent			=	GRectMargin(3,3,3,3);
				}					
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_EMPTY, GFC_BITMAPSKIN_SIDES_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					FactorCombine	= 	GColorCombine(Modulate,Modulate);
					FactorColor		= 	SF_CtrlTheme_Civ4_Control_Color_Focus;
					Image			=	GBitmap("Civ4/focus.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(6,6,6,6);
					Indent			=	GRectMargin(1,1,1,1);
				}
			}						
			.Full_Disable				
			{						
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_EMPTY, GFC_BITMAPSKIN_SIDES_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/edit.tga", HVGrid, 1, 3, 0, 2);
					Margin			=	GRectMargin(4,4,4,4);
					Indent			=	GRectMargin(3,3,3,3);
				}
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_EMPTY, GFC_BITMAPSKIN_SIDES_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					FactorCombine	= 	GColorCombine(Modulate,Modulate);
					FactorColor		= 	SF_CtrlTheme_Civ4_Control_Color_Focus;
					Image			=	GBitmap("Civ4/focus.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(6,6,6,6);
					Indent			=	GRectMargin(1,1,1,1);
				}
			}	
			.Full_Inactive
			{	
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_EMPTY, GFC_BITMAPSKIN_SIDES_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/edit.tga", HVGrid, 1, 3, 0, 0);
					Margin			=	GRectMargin(4,4,4,4);
					Indent			=	GRectMargin(3,3,3,3);
				}
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_EMPTY, GFC_BITMAPSKIN_SIDES_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/edit.tga", HVGrid, 1, 3, 0, 1);
					Margin			=	GRectMargin(4,4,4,4);
					Indent			=	GRectMargin(3,3,3,3);
				}						
			}	
			.Full_InactiveDisable
			{						
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_EMPTY, GFC_BITMAPSKIN_SIDES_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/edit.tga", HVGrid, 1, 3, 0, 2);
					Margin			=	GRectMargin(4,4,4,4);
					Indent			=	GRectMargin(3,3,3,3);
				}	
			}
			.Full_Winoff				=	.Full_Inactive;
			.Full_WinoffDisable			=	.Full_InactiveDisable;
		}

		map GFC_CtrlTheme_Bitmap_Control_Border		=	GFC_Control_DefaultBorder_Style;	
		map GFC_Control								=	GFC_Control_DefaultBorder_Style;		
	}


	// Flat Edit border
	style SF_CtrlTheme_Civ4_Control_Edit_Flat_Border_Style
	{
		GFC_Control_Border_Size_Margin		= GRectMargin(0,0,2,2);
			
		with GFC_CtrlTheme_Bitmap_Control_Border_Skin
		{
			.Full_Default
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_EMPTY, GFC_BITMAPSKIN_SIDES_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/edit.tga", HVGrid, 1, 3, 0, 1);
					Margin			=	GRectMargin(4,4,4,4);
					Indent			=	GRectMargin(3,3,3,3);
				}					
			}						
			.Full_Disable				
			{						
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_EMPTY, GFC_BITMAPSKIN_SIDES_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/edit.tga", HVGrid, 1, 3, 0, 2);
					Margin			=	GRectMargin(4,4,4,4);
					Indent			=	GRectMargin(3,3,3,3);
				}
			}
			.Full_Inactive				=	.Full_Default;
			.Full_InactiveDisable		=	.Full_Disable;
			.Full_Winoff				=	.Full_Default;
			.Full_WinoffDisable			=	.Full_Disable;
		}
	
		map GFC_CtrlTheme_Bitmap_Control_Border		=	GFC_Control_DefaultBorder_Style;
		map GFC_Control								=	GFC_Control_DefaultBorder_Style;		
	}


	// ** Normal edit box style
	
	GFC_Control_StandardEdit_Style
	{
		.StyleId_Border				= GPropertyId(SF_CtrlTheme_Civ4_Control_Edit_Standard_Border_Style);
			
		with GFC_CtrlTheme_Bitmap_Control_Edit_Skin_Inner
		{
			.Default
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
					Indent			=	GRectMargin(1,5,1,4);					
				}	
			}
			.Inactive				=	.Default;
			.Disable
			{
				layer {	}
			}
		}
	
		with GFC_CtrlTheme_Bitmap_Control_Edit_Skin_Caret
		{
			.Insert_Default
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_TILE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/Caret_Insert.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,2,0,2);
				}					
			}
			.Insert_Inactive		=	.Insert_Default;
			.Insert_Disable			=	.Insert_Default;
			
			.Overwrite_Default
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_TILE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/Caret_Overwrite.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
			}
			.Overwrite_Inactive		=	.Overwrite_Default;
			.Overwrite_Disable		=	.Overwrite_Default;	

			.DragCopy
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_TILE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/Caret_Drag.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
			}
			.DragMove				=	.DragCopy;
			.DragLink				=	.DragCopy;
		}
		
		map GFC_CtrlTheme_Bitmap_Control_Edit		=	GFC_Control_DefaultEdit_Style;
		map GFC_Control								=	GFC_Control_DefaultEdit_Style;
	}	

	GFC_Control_FlatEdit_Style
	{
		.StyleId_Border								=	GPropertyId(SF_CtrlTheme_Civ4_Control_Edit_Flat_Border_Style);

		map GFC_CtrlTheme_Bitmap_Control_Edit		=	GFC_Control_StandardEdit_Style;
		map GFC_Control								=	GFC_Control_StandardEdit_Style;
	}

	GFC_Control_SolidEdit_Style
	{
		.Flag_NoBorder								=	GFlags(GEditCtrl, GFC_CF_EDIT_NOBORDER);

		.StyleId_Border								=	GPropertyId(GFC_Control_EmptyBorder_Style);

		.Size_ViewMargin							=	GRectMargin(0,0,0,0);

		map GFC_CtrlTheme_Bitmap_Control_Edit		=	GFC_Control_StandardEdit_Style;
		map GFC_Control								=	GFC_Control_StandardEdit_Style;
	}

	GFC_Control_ClearEdit_Style
	{
		GFC_Control_Flag_Transparent				=	GFlags(GCtrl, GFC_CF_TRANSPARENT);

		.Flag_NoBorder								=	GFlags(GEditCtrl, GFC_CF_EDIT_NOBORDER);
		.Flag_NoInnerFill							=	GFlags(GEditCtrl, GFC_CF_EDIT_NOINNERFILL);
		.StyleId_Border								=	GPropertyId(GFC_Control_EmptyBorder_Style);

		.Size_ViewMargin							=	GRectMargin(0,0,0,0);

		map GFC_CtrlTheme_Bitmap_Control_Edit		=	GFC_Control_StandardEdit_Style;
		map GFC_Control								=	GFC_Control_StandardEdit_Style;
	}




	//*** Multiline Edit *** ------------------------------------------------------------------------------------------------------------------

	// Up - button style
	style SF_CtrlTheme_Civ4_Control_Edit_Scroll_UpButton_Style
	{
		GFC_Control_Renderer_Control			=	GFC_CtrlTheme_Bitmap_Control_Button_Renderer_ControlStandard;		

		GFC_Control_Button_Size_Default			=	GSize(16,19);

		with GFC_CtrlTheme_Bitmap_Control_Button_Skin
		{
			.Default
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_v.tga", HVGrid, 4, 2, 0, 0);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 0, 0);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(0,0,0,4);
				}
			}
			.Rollover
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_v.tga", HVGrid, 4, 2, 0, 0);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 0, 1);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(0,0,0,4);
				}			
			}
			.Press
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_v.tga", HVGrid, 4, 2, 0, 0);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 0, 1);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(0,0,0,6);
				}	
			}
			.Disable
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_v.tga", HVGrid, 4, 2, 0, 1);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 0, 2);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(0,0,0,4);
				}	
			}			
		}

		// Images to use for the scroll buttons
		/*with GFC_Control_Button_Image
		{
			.Default					=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 0, 0);
			.Rollover					=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 0, 0);
			.Press						=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 0, 0);
			.Disable					=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 1, 0);
			}*/

		map GFC_CtrlTheme_Bitmap_Control_Button		= GFC_Control_DefaultButton_Style;
		map GFC_Control								= GFC_Control_DefaultButton_Style;
	}

	// Down - button style
	style SF_CtrlTheme_Civ4_Control_Edit_Scroll_DownButton_Style
	{
		GFC_Control_Renderer_Control			=	GFC_CtrlTheme_Bitmap_Control_Button_Renderer_ControlStandard;		

		GFC_Control_Button_Size_Default			=	GSize(16,19);

		with GFC_CtrlTheme_Bitmap_Control_Button_Skin
		{
			.Default
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_v.tga", HVGrid, 4, 2, 1, 0);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 1, 0);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(0,6,0,0);
				}
			}
			.Rollover
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_v.tga", HVGrid, 4, 2, 1, 0);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 1, 1);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(0,6,0,0);
				}			
			}
			.Press
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_v.tga", HVGrid, 4, 2, 1, 0);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 1, 1);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(0,8,0,0);
				}	
			}
			.Disable
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_v.tga", HVGrid, 4, 2, 1, 1);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 1, 2);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(0,6,0,0);
				}	
			}
		}

		// Images to use for the scroll buttons
		/*with GFC_Control_Button_Image
		{
			.Default					=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 0, 1);
			.Rollover					=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 0, 1);
			.Press						=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 0, 1);
			.Disable					=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 1, 1);
			}*/				

		map GFC_CtrlTheme_Bitmap_Control_Button		= GFC_Control_DefaultButton_Style;
		map GFC_Control								= GFC_Control_DefaultButton_Style;
	}

	// Left - button style
	style SF_CtrlTheme_Civ4_Control_Edit_Scroll_LeftButton_Style
	{
		GFC_Control_Renderer_Control			=	GFC_CtrlTheme_Bitmap_Control_Button_Renderer_ControlStandard;		

		GFC_Control_Button_Size_Default			=	GSize(19,16);

		with GFC_CtrlTheme_Bitmap_Control_Button_Skin
		{
			.Default
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_h.tga", HVGrid, 4, 2, 0, 0);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 2, 0);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(0,0,4,0);
				}
			}
			.Rollover
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_h.tga", HVGrid, 4, 2, 0, 0);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 2, 1);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(0,0,4,0);
				}			
			}
			.Press
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_h.tga", HVGrid, 4, 2, 0, 0);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 2, 1);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(0,0,6,0);
				}	
			}
			.Disable
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_h.tga", HVGrid, 4, 2, 0, 1);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 2, 2);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(0,0,4,0);
				}	
			}	
		}

		// Images to use for the scroll buttons
		/*with GFC_Control_Button_Image
		{	
			.Default					=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 0, 2);
			.Rollover					=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 0, 2);
			.Press						=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 0, 2);
			.Disable					=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 1, 2);
			}*/

		map GFC_CtrlTheme_Bitmap_Control_Button		= GFC_Control_DefaultButton_Style;
		map GFC_Control								= GFC_Control_DefaultButton_Style;
	}

	// Right - button style
	style SF_CtrlTheme_Civ4_Control_Edit_Scroll_RightButton_Style
	{
		GFC_Control_Renderer_Control			=	GFC_CtrlTheme_Bitmap_Control_Button_Renderer_ControlStandard;		

		GFC_Control_Button_Size_Default			= GSize(19,16);

		with GFC_CtrlTheme_Bitmap_Control_Button_Skin
		{
			.Default
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_h.tga", HVGrid, 4, 2, 1, 0);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 3, 0);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(6,0,0,0);
				}
			}
			.Rollover
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_h.tga", HVGrid, 4, 2, 1, 0);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 3, 1);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(6,0,0,0);
				}			
			}
			.Press
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_h.tga", HVGrid, 4, 2, 1, 0);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 3, 1);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(8,0,0,0);
				}	
			}
			.Disable
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Disable);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			= GBitmap("Civ4/scroll_btn_h.tga", HVGrid, 4, 2, 1, 1);
					Margin			= GRectMargin(6,6,6,6);
				}
				layer {
					DestCombine		= GColorCombine(BlendSource,Source);
					LayerFlags		= GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_FIXED);
					Image			= GBitmap("Civ4/scroll_arrows.tga", HVGrid, 4, 3, 3, 2);
					Margin			= GRectMargin(0,0,0,0);
					Indent			= GRectMargin(6,0,0,0);
				}	
			}	
		}

		// Images to use for the scroll buttons
		/*with GFC_Control_Button_Image
		{
			.Default					=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 0, 3);
			.Rollover					=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 0, 3);
			.Press						=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 0, 3);
			.Disable					=	GBitmap("Civ4/Scrollarrows.tga", HVGrid, 2, 4, 1, 3);
			}*/

		map GFC_CtrlTheme_Bitmap_Control_Button		= GFC_Control_DefaultButton_Style;
		map GFC_Control								= GFC_Control_DefaultButton_Style;
	}


	// ** Normal Scroll bar style

	style SF_CtrlTheme_Civ4_Control_Edit_MultiLine_Scroll_Style
	{
		with GFC_Control_Scroll_StyleId
		{
			.UpButton				=	GPropertyId(SF_CtrlTheme_Civ4_Control_Edit_Scroll_UpButton_Style);
			.DownButton				=	GPropertyId(SF_CtrlTheme_Civ4_Control_Edit_Scroll_DownButton_Style);
			.LeftButton				=	GPropertyId(SF_CtrlTheme_Civ4_Control_Edit_Scroll_LeftButton_Style);
			.RightButton			=	GPropertyId(SF_CtrlTheme_Civ4_Control_Edit_Scroll_RightButton_Style);
		}

		// Scroll shaft skins
		
		with GFC_CtrlTheme_Bitmap_Control_Scroll_Skin_HShaft
		{
			.Default
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {					
					DestCombine		=	GColorCombine(BlendSource,Disable);
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			=	GBitmap("Civ4/scroll_track.tga", HVGrid, 2, 3, 1, 0);
					Margin			=	GRectMargin(1,6,1,6);
				}
			}
			.Rollover				=	.Default;
			.Press
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {					
					DestCombine		=	GColorCombine(BlendSource,Disable);
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			=	GBitmap("Civ4/scroll_track.tga", HVGrid, 2, 3, 1, 1);
					Margin			=	GRectMargin(1,6,1,6);
				}			
			}						
			.Disable					
			{						
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {					
					DestCombine		=	GColorCombine(BlendSource,Disable);
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE, GFC_BITMAPSKIN_SIDES_SCALE);
					Image			=	GBitmap("Civ4/scroll_track.tga", HVGrid, 2, 3, 1, 2);
					Margin			=	GRectMargin(1,6,1,6);
				}				
			}						
			.Winoff					= .Default;
			.WinoffPress			= .Press;
			.WinoffRollover			= .Rollover;
			.WinoffDisable			= .Disable;	
		}

		with GFC_CtrlTheme_Bitmap_Control_Scroll_Skin_VShaft
		{
			.Default
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {					
					DestCombine		=	GColorCombine(BlendSource,Disable);
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			=	GBitmap("Civ4/scroll_track.tga", HVGrid, 2, 3, 0, 0);
					Margin			=	GRectMargin(6,1,6,1);
				}
			}						
			.Rollover				=	.Default;
			.Press
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {					
					DestCombine		=	GColorCombine(BlendSource,Disable);
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_BILINEAR, GFC_BITMAPSKIN_SIDES_BILINEAR);
					Image			=	GBitmap("Civ4/scroll_track.tga", HVGrid, 2, 3, 0, 1);
					Margin			=	GRectMargin(6,1,6,1);
				}				
			}						
			.Disable					
			{						
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
				layer {					
					DestCombine		=	GColorCombine(BlendSource,Disable);
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE, GFC_BITMAPSKIN_SIDES_SCALE);
					Image			=	GBitmap("Civ4/scroll_track.tga", HVGrid, 2, 3, 0, 2);
					Margin			=	GRectMargin(6,1,6,1);
				}				
			}						
			.Winoff					= .Default;
			.WinoffPress			= .Press;
			.WinoffRollover			= .Rollover;
			.WinoffDisable			= .Disable;	
		}
	
		map GFC_CtrlTheme_Bitmap_Control_Scroll			= GFC_Control_StandardScroll_Style;
		map GFC_Control									= GFC_Control_StandardScroll_Style;
	}


	style SF_CtrlTheme_Civ4_Control_Edit_MultiLine_Border_Style
	{
		GFC_Control_Border_Size_Margin				= GRectMargin(7,7,7,7);

		map GFC_CtrlTheme_Bitmap_Control_Border		=	SF_CtrlTheme_Civ4_Control_Edit_Standard_Border_Style;	
		map GFC_Control								=	SF_CtrlTheme_Civ4_Control_Edit_Standard_Border_Style;		
	}

	style SF_CtrlTheme_Civ4_Control_ScrollFrame_Standard_CornerPanel_Style
	{
		GFC_Control_Flag_Transparent			=	0;

		GFC_Control_Panel_Flag_NoInnerFill		=	0;
		GFC_Control_Panel_Flag_NoBorder			=	GFlags(GPanelCtrl, GFC_CF_PANEL_NOBORDER);

		// Image skins
		with GFC_CtrlTheme_Bitmap_Control_Panel_Skin_Inner
		{
			.Default
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}				
			}
			.Disable
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}
			}
			.Winoff				=	.Default;
			.WinoffDisable		=	.Disable;
		}

		map GFC_CtrlTheme_Bitmap_Control_Panel	=	GFC_Control_StandardPanel_Style;	
		map GFC_Control							=	GFC_Control_StandardPanel_Style;
	}

	style SF_CtrlTheme_Civ4_Control_Edit_MultiLine_Table_Style
	{											
	GFC_Control_Table_StyleId_OuterBorder		=	GPropertyId(GFC_Control_EmptyBorder_Style);
	GFC_Control_Table_StyleId_InnerBorder		=	GPropertyId(GFC_Control_EmptyBorder_Style);
	GFC_Control_Table_StyleId_HScroll			=	GPropertyId(SF_CtrlTheme_Civ4_Control_Edit_MultiLine_Scroll_Style);
	GFC_Control_Table_StyleId_VScroll			=	GPropertyId(SF_CtrlTheme_Civ4_Control_Edit_MultiLine_Scroll_Style);
	GFC_Control_Table_StyleId_LTCorner			=	GPropertyId(SF_CtrlTheme_Civ4_Control_ScrollFrame_Standard_CornerPanel_Style);
	GFC_Control_Table_StyleId_RTCorner			=	GPropertyId(SF_CtrlTheme_Civ4_Control_ScrollFrame_Standard_CornerPanel_Style);
	GFC_Control_Table_StyleId_LBCorner			=	GPropertyId(SF_CtrlTheme_Civ4_Control_ScrollFrame_Standard_CornerPanel_Style);
	GFC_Control_Table_StyleId_RBCorner			=	GPropertyId(SF_CtrlTheme_Civ4_Control_ScrollFrame_Standard_CornerPanel_Style);

	GFC_Control_Table_Flag_NoInnerBorder		=	GFlags(GTableCtrl, GFC_CF_TABLE_NOINNERBORDER);

		map SF_CtrlTheme_Civ4_Control				=	GFC_Control_StandardTable_Style;
		map GFC_CtrlTheme_Bitmap_Control_Table		=	GFC_Control_StandardTable_Style;
		map GFC_Control								=	GFC_Control_StandardTable_Style;
	}


	// ** Normal ScrollPanel bar style

	style SF_CtrlTheme_Civ4_Control_Edit_MultiLine_ScrollFrame_Style
	{
		GFC_Control_ScrollFrame_StyleId_Table				=	GPropertyId(SF_CtrlTheme_Civ4_Control_Edit_MultiLine_Table_Style);
	
		map GFC_CtrlTheme_Bitmap_Control_ScrollFrame		=	GFC_Control_StandardScrollFrame_Style;
		map GFC_Control										=	GFC_Control_StandardScrollFrame_Style;
	}

	GFC_Control_MultilineEdit_Style
	{
		.StyleId_Border				= GPropertyId(SF_CtrlTheme_Civ4_Control_Edit_MultiLine_Border_Style);
		.StyleId_ScrollFrame		= GPropertyId(SF_CtrlTheme_Civ4_Control_Edit_MultiLine_ScrollFrame_Style);
		
		.Flag_Multiline								=	GFlags(GEditCtrl, GFC_CF_EDIT_MULTILINE);
		.Flag_Select								=	GFlags(GEditCtrl, GFC_CF_EDIT_SELECT_NORMAL);
		.Flag_CropLeft								=	0;
		.Flag_Wrap									=	GFlags(GEditCtrl, GFC_CF_EDIT_WRAP_WORD);
		.Flag_VAlign								=	GFlags(GEditCtrl, GFC_CF_EDIT_TOP);
		.Flag_TabKey								=	GFlags(GEditCtrl, GFC_CF_EDIT_TAB_KEY);

		.Size_MaxDataSize							=	32000;

		with GFC_CtrlTheme_Bitmap_Control_Edit_Skin_Inner
		{
			.Default
			{
				layer {
					LayerFlags		=	GFlags(GCtrlBitmapSkin, GFC_BITMAPSKIN_CENTER_SCALE);
					DestCombine		=	GColorCombine(BlendSource,Disable);
					Image			=	GBitmap("Civ4/black_25.tga", HVGrid, 1, 1, 0, 0);
					Margin			=	GRectMargin(0,0,0,0);
				}	
			}
			.Inactive				=	.Default;
			.Disable
			{
				layer {	}
			}
		}

		map GFC_CtrlTheme_Bitmap_Control_Edit		=	GFC_Control_StandardEdit_Style;
		map GFC_Control								=	GFC_Control_StandardEdit_Style;
	}

}
