//-------------------------------------------------------------------------------------------------
//
//  Enumerations for DotImage WebControls client scripts. 
//  Copyright 2003-2009 Atalasoft Inc. All Rights Reserved.
//  Version 8.0
//
//	This is a helper script intended only to mimic the Enumerations of the
//	server side controls in the Atalasoft.DotImage.WebControls namespace.
//-------------------------------------------------------------------------------------------------

var atalaEnumsLoaded = true;
var atalaEnumsVersion = "8.0";

var MouseToolType = new atalaMouseToolType();
var ScrollBarVisibility = new atalaScrollBarVisibility();
var AutoZoomMode = new atalaAutoZoomMode();
var AntialiasDisplayMode = new atalaAntialiasDisplayMode();
var AnnotationInteractMode = new atalaAnnotationInteractMode();
var AnnotationTool = new atalaAnnotationTool();
var MouseToolCursor = new atalaMouseToolCursor();

// Specifies the automatic zoom setting of the image displayed in the control.
function atalaAutoZoomMode(){
	// Does not change the zoom of the image based on image size.
	this.None = 0;
	// Fits the image by sizing the width or height to best fit the control.
	this.BestFit = 1;
	// Fits the image by sizing the width or height to best fit the control.
	this.BestFitShrinkOnly = 2;
	// Fits the image by sizing the width to fit the control.
	this.FitToWidth = 3;
	// Fits the image by sizing the height to fit the control.
	this.FitToHeight = 4;
	// Fits the image by sizing the control to the size of the image.
	this.FitToImage = 5;
}

// Specifies the antialis display mode that can be set to the control.
function atalaAntialiasDisplayMode(){
	// Do not antialias (fastest performance)
	this.None = 0;
	// Only antialias 1-bit document images for zoom levels less then 1.
	this.ScaleToGray = 1;
	// Antialias all pixel formats when zoom level is less then 1.
	this.ReductionOnly = 2;
	// Antialias all images for all zoom levels.
	this.Full = 3;
}

// Specifies the behavior of the mouse
function atalaMouseToolType(){
	// Specify no special mouse behavior.
	this.None = 0;
	// Clicking the mouse will center the area clicked.
	this.Center = 1;
	// Mouse will be set to crosshairs and can be used to drag and modify a selection rectangle on the image.
	this.Selection = 2;
	// Clicking will zoom in.
	this.ZoomIn = 3;
	// Clicking will zoom out.
	this.ZoomOut = 4;
	// Zoom in on a specified area defined by dragging a rectangle onto the image.
	this.ZoomArea = 5;
	// Clicking and dragging the mouse will scroll the image.
	this.Pan = 6;
	// Clicking on the image will postback the page, used for custom MouseTools.
	this.PassThrough = 7;
}

// Specifies the scrollbar visibility
function atalaScrollBarVisibility(){
	// Automatically show or hide the horizontal and vertical scrollbars as the control or image resizes.
	this.Dynamic = 0;
	// Never show scroll bars.
	this.None = 1;
	// Always show scroll bars.
	this.Always = 2;
}

// Specifies the annotation viewer interaction mode (with the mouse)
function atalaAnnotationInteractMode() {
	// Do not allow interaction with an annotation -- pass through to viewer
	this.None = 0;
	// Annotations can be selected, moved and resized using the mouse.
	this.Modify = 2;
	// Annotations can be created, selected, moved and resized using the mouse.
	this.Author = 3;
}

// Specifies the behavior of the mouse when creating annotations
function atalaAnnotationTool(){
	// No annotations are created
	this.None = 0;
	// Line annotations are created by pressing the left mouse button down, dragging, and letting go of the button
	this.Line = 1;
	// Multi-line annotations are created by left-clicking the mouse for each point, right clicking stops editing
	this.Lines = 2;
	// Freehand annotations are created by pressing the left mouse button down, dragging, and letting go of the button
	this.Freehand = 3;
	// Multi-side polygon annotations are created by left-clicking the mouse for each point, right clicking stops editing
	this.Polygon = 4;
	// Ellipse annotations are created by pressing the left mouse button down, dragging, and letting go of the button
	this.Ellipse = 5;
	// Rectangle annotations are created by pressing the left mouse button down, dragging, and letting go of the button
	this.Rectangle = 6;
	// Currently unused callout tool
	this.CallOut = 7;
}

// Specifies the cursor used with the mouse tool
function atalaMouseToolCursor(){
	// Mouse cursor is automatically set based on the MouseTool and AnnotationTool
	this.Auto = 0;
	// Mouse cursor is an arrow
	this.Arrow = 1;
	// Mouse cursor is a crosshair
	this.Crosshair = 2;
	// Mouse cursor is a grabbing hand
	this.Grab = 3;
	// Mouse cursor is a hand with the index finger pointing up
	this.Hand = 4;
	// Mouse cursor is a cross with arrows in all four directions
	this.Move = 5;
	// Mouse cursor is a magnifying glass with a plus
	this.ZoomIn = 6;
	// Mouse cursor is a magnifying glass with a minus
	this.ZoomOut = 7;
	// Mouse cursor is defined by the MouseToolCustomCursor value
	this.Custom = 8;
}

// For ASP.NET AJAX UpdatePanel Support
// We check typeof because _atalaInUpdatePanel could be undefined
if(typeof(_atalaInUpdatePanel) !== "undefined" && _atalaInUpdatePanel && Sys && Sys.Application){
	Sys.Application.notifyScriptLoaded();
}