# -*- coding: utf-8 -*-

string ID_APP_NAME "HTTP Client"
string ID_APP_CLASS "com.danger.HTTPClient.HTTPClient"

bitmap ID_LARGE_ICON "{base}fayt-head-small.png"
bitmap ID_SMALL_ICON "{base}fayt-head-tiny.png"
bitmap ID_SPLASH_SCREEN "{base}fayt-splash.png"

string ID_LOCALE	"en_US"

interface "{source}com/danger/HTTPClient/Resources.java"
events "{source}com/danger/HTTPClient/Events.java"

menu ID_PRESET_MENU
	menuItem
		title = "Google"
		event = EVENT_PRESET_GOOGLE
		shortcut = '1'
		
	menuItem
		title = "The Onion"
		event = EVENT_PRESET_ONION
		shortcut = '2'
		
	menuItem
		title = "Moviefone"
		event = EVENT_PRESET_MOVIEFONE
		shortcut = '3'
endMenu

menu ID_ACTION_MENU
	menuItem
		title = "Go!"
		event = EVENT_GO
		shortcut = 'g'

	menuItem
		title = "Go! x3"
		event = EVENT_GO_3
		
	menuItem
		title = "Get Version"
		event = EVENT_GET_VERSION
		shortcut = 'v'
	
	menuItem
		title = "Presets"
		subMenu = ID_PRESET_MENU
	
	menuItem
		title = "Transcode..."
		event = EVENT_TRANSCODE_DIALOG
		shortcut = 't'
endMenu

dialog ID_TRANSCODE_DIALOG
	title = "Transcode"
	showCancel
	
	button
		id = ID_TRANSCODE_OK
		title = okButton
		shortcut = backButton
		position = buttonBottom1
		event = EVENT_TRANSCODE
	
	staticText
		id = ID_TRANSCODE_LABEL
		text = "Add transcode header:"
		alignWithParentTop = 2
		alignWithParentLeft = 5
		
	staticText
		id = ID_TRANSCODE_WIDTH_LABEL
		width = 60
		text = "Width"
		justifyRight
		positionBelow = ID_TRANSCODE_LABEL : 6
		alignWithParentLeft = 2
	
	textField
		id = ID_TRANSCODE_WIDTH_FIELD
		positionToRight = ID_TRANSCODE_WIDTH_LABEL : 4
		positionBelow = ID_TRANSCODE_LABEL : 3
		width = 25
		numericOnly
		maxLength = 3
		initialFocus
	
	staticText
		id = ID_TRANSCODE_HEIGHT_LABEL
		width = 60
		text = "Height"
		justifyRight
		positionBelow = ID_TRANSCODE_WIDTH_LABEL : 9
		alignWithParentLeft = 2
	
	textField
		id = ID_TRANSCODE_HEIGHT_FIELD
		positionToRight = ID_TRANSCODE_HEIGHT_LABEL : 4
		positionBelow = ID_TRANSCODE_WIDTH_FIELD : 2
		width = 25
		numericOnly
		maxLength = 3

	checkBox
		id = ID_TRANSCODE_PROPORTIONAL
		title = "Proportional"
		positionBelow = ID_TRANSCODE_HEIGHT_LABEL : 8
		alignWithParentLeft = 10
endDialog

menu ID_METHOD_MENU
	menuItem
		title = "(default)"
		id = ID_METHOD_DEFAULT

	menuItem
		title = "HEAD"
		id = ID_METHOD_HEAD
		
	menuItem
		title = "GET"
		id = ID_METHOD_GET

	menuItem
		title = "POST"
		id = ID_METHOD_POST
		
	menuItem
		title = "PUT"
		id = ID_METHOD_PUT
		
	menuItem
		title = "DELETE"
		id = ID_METHOD_DELETE
		
	menuItem
		title = "OPTIONS"
		id = ID_METHOD_OPTIONS
		
	menuItem
		title = "TRACE"
		id = ID_METHOD_TRACE
endMenu

screen ID_MAIN_SCREEN
	title = "HTTP Client"
	icon = ID_SMALL_ICON
	actionMenu = ID_ACTION_MENU
	className = "com.danger.HTTPClient.HTTPClientWindow"

scrollView alignWithParentTop=0 alignWithParentLeft=0 width=240 height=136
	staticText
		id = ID_URL_LABEL
		width = 50
		text = "URL"
		justifyRight
		alignWithParentTop = 3
		alignWithParentLeft = 2
	
	textField
		id = ID_URL_FIELD
		width = 180
		positionToRight = ID_URL_LABEL : 2
		alignWithParentTop = 0
		initialFocus
	
	staticText
		id = ID_POSTDATA_LABEL
		width = 50
		text = "PostData"
		justifyRight
		positionBelow = ID_URL_LABEL : 8
	
	textField
		id = ID_POSTDATA_FIELD
		width = 180
		positionToRight = ID_POSTDATA_LABEL : 2
		positionBelow = ID_URL_FIELD : 2
	
	staticText
		id = ID_HEADERS_LABEL
		width = 50
		text = "Headers"
		justifyRight
		positionBelow = ID_POSTDATA_LABEL : 8
	
	editText
		id = ID_HEADERS_FIELD
		width = 180
		positionToRight = ID_HEADERS_LABEL : 2
		positionBelow = ID_POSTDATA_FIELD : 2
		autoResize
	
	staticText
		id = ID_METHOD_LABEL
		width = 50
		text = "Method"
		justifyRight
		positionBelow = ID_HEADERS_LABEL : 8
	
	popupMenu
		id = ID_METHOD_POPUP
		positionToRight = ID_METHOD_LABEL : 2
		positionBelow = ID_HEADERS_FIELD : 2
		menu = ID_METHOD_MENU
		
	groupBox
		id = ID_GROUPBOX
		title = "Flags"
		alignWithParentLeft = 2
		positionBelow = ID_METHOD_LABEL : 4
		# groupBox is brain-damaged: it doesn't resize itself according to its children's sizes
		width = 233
		height = 32
		
		checkBox
			id = ID_CHECKBOX_HEADERS
			title = "Hdr"
			alignWithParentTop = 14
			alignWithParentLeft = 2
		
		checkBox
			id = ID_CHECKBOX_HTTPS
			title = "HTTPS"
			alignWithParentTop = 14
			positionToRight = ID_CHECKBOX_HEADERS : 0
			
		checkBox
			id = ID_CHECKBOX_REDIRECT
			title = "Rdr"
			alignWithParentTop = 14
			positionToRight = ID_CHECKBOX_HTTPS : 0
			
		checkBox
			id = ID_CHECKBOX_CHUNK
			title = "Chunk"
			alignWithParentTop = 14
			positionToRight = ID_CHECKBOX_REDIRECT : 0
			
		checkBox
			id = ID_CHECKBOX_WAP
			title = "Wap"
			alignWithParentTop = 14
			positionToRight = ID_CHECKBOX_CHUNK : 0
	endGroupBox
	
	staticText
		id = ID_CHUNK_LABEL
		positionBelow = ID_GROUPBOX : 2
		alignWithParentLeft = 4
		width = 235
		invisible
	
	shape
		id = ID_CHUNK_DIVIDER
		type = line
		lineType = horizontal
		positionBelow = ID_CHUNK_LABEL : 1
		width = 238
		height = 1
		invisible
		
	editText
		id = ID_HEADERS
		doesNotHaveBorder
		positionBelow = ID_CHUNK_DIVIDER : 2
		alignWithParentLeft = 0
		width = 235
		autoResize
		readOnly
		font = "Fixed5x7"
	
	shape
		id = ID_HEADERS_DIVIDER
		type = line
		lineType = horizontal
		positionBelow = ID_HEADERS : 1
		width = 238
		height = 1
		invisible
		
	editText
		id = ID_BODY
		doesNotHaveBorder
		positionBelow = ID_HEADERS_DIVIDER : 2
		alignWithParentLeft = 0
		width = 235
		autoResize
		readOnly
		font = "Fixed5x7"
		
	image
		id = ID_IMAGE
		positionBelow = ID_BODY : 0
		alignWithParentLeft = 0
		invisible
endScrollView
endScreen


