User:Draugath/VO IUP

From Vendetta Lua
Jump to: navigation, search
Common Attributes
ACTIVE = "YES" or "NO"
VISIBLE = "YES" or "NO"
X = <NUM> -- read-only
Y = <NUM> -- read-only
W = <NUM> -- read-only
H = <NUM> -- read-only
SIZE = "
	"FULL"
	"THREEQUARTER"
	"HALF"
	"THIRD"
	"TWOTHIRD"
	"QUARTER"
	"EIGHTH"
	"%<NUM>"
EXPAND = "YES", "NO", "HORIZONTAL", "VERTICAL"

iup.StoreAttribute(<ELEM>, <ATTR>, <VAL>) -- ATTR must be UCase; no apparent difference from SetAttribute
iup.SetAttribute(<ELEM>, <ATTR>, <VAL>) -- ATTR must be UCase; no apparent difference from StoreAttribute
iup.GetAttribute()

iup.Destroy(element)
iup.Hide(element)  -- dialog only?
	- Use HideDialog()
iup.Map(element)
	- Never map an iup.frame
	- Always map an iup.dialog
	- Cannot map boxes, except iup.cbox

iup.Refresh ???
iup.Show(dialog)
	- use ShowDialog()
iup.ShowXY(dialog, posx, posy)
	- use ShowDialog()
ShowDialog(dialog, posx, posy) -- posx, posy (optional)

iup.Append(element1, element2) :: element2 is appended to element1
iup.Detach(element) :: detach element from container
iup.GetNextChild(element, lastchild) -> element :: gets the next child after lastchild (optional)
iup.GetBrother(element) -> element :: get brother of element
iup.GetParent(element) -> element :: get parent of element
iup.GetDialog(element) -> element :: get dialog of element

iup.GetType(element) -> <string>

iup.fill({...})
	SIZE = <NUM>
	EXPAND = "YES" or "NO"

iup.hbox({element1..elementn, ...})
	ALIGNMENT = "ATOP", "ACENTER", "ABOTTOM"
	GAP = <NUM>
	MARGIN = "<NUM>x<NUM>"
	SIZE = <NUM>

iup.vbox({element1..elementn, ...})
	ALIGNMENT = "ALEFT", "ACENTER", "ARIGHT"
	GAP = <NUM>
	MARGIN = "<NUM>x<NUM>"
	SIZE = <NUM>

iup.zbox({element1..elementn, ...})
	ALIGNMENT = "ALEFT", "ATOP", "ARIGHT", "ABOTTOM", "NW", "NE", "SW", "SE"
	ALL = "YES" or "NO" -- display all elements
	MARGIN = "<NUM>x<NUM>"
	VALUE = <ELEMENT> -- reference to the visible IUP Element
	SIZE

iup.cbox({element1..elementn, ...})
	REFRESH = "YES"
	CX = <NUM> -- children only
	CY = <NUM> -- children only

iup.radio({element, ...})
	VALUE = reference to active toggle

iup.button({...})
	BGCOLOR = "<R> <G> <B> [<A>] [*,+,&]"
	FGCOLOR = "<R> <G> <B> [<A>] [*,+,&]"
	BORDER -- acts as margin?
	IMAGE
	IMPRESS
	IMINACTIVE
	TITLE = <STRING>
	FONT = <NUM>
	SEGMENTED -- used?
	HOTKEY
	TOUCHHOVER = "YES" or "NO"

	ACTION
	GETFOCUS_CB
	KILLFOCUS_CB
	ENTERWINDOW_CB
	LEAVEWINDOW_CB

	BEGINDRAG_CB(self)
	GIVEFEEDBACK_CB(self, effect)
	DRAGRESULT_CB(self, effect)
	QUERYCONTINUEDRAG_CB(self, escapekeystate, keystate)
	DRAGENTER_CB(self, dataobject, x, y, keystate, effect)
	DRAGLEAVE_CB(self)
	DRAGOVER_CB(self, x, y, keystate, effect)
	DROP_CB(self, dataobject, x, y, keystate, effect)


iup.canvas({...})
	BGCOLOR = "<R> <G> <B> [<A>] [*,+,&]" -- border color
	BORDER = "YES" or "NO"
	SCROLLBAR = "VERTICAL", "HORIZONTAL", "YES", "NO" (Default: "NO")
	SCROLLBARSIZE = <NUM>
	SIZE
	EXPAND
	LINEX = <NUM> -- 1?
	DX
	XMIN
	XMAX
	POSX
	DY
	YMIN
	YMAX
	POSY
	CANVASLINES
	MOUSECLICKSOUND
	XSTYLE = <NUM> -- 1?
	tabstop = "YES" or "NO"
	colorpickermode = "ON" or "OFF"

	ACTION_CB
	BUTTON_CB -- return iup.DONOTSETCAPTURE
	ENTERWINDOW_CB -- triggers twice
	LEAVEWINDOW_CB -- triggers twice
	MOTION_CB
	SCROLL_CB



iup.frame({element, ...})
	BGCOLOR = "<R> <G> <B> [<A>] [*,+,&]"
	SIZE
	BORDER = "<NUM> <NUM> <NUM> <NUM>" -- left, top, right, bottom -- sets the margin on the 4 sides
	IMAGE
	SEGMENTED = "<NUM> <NUM> <NUM> <NUM>" -- left, top, right, bottom -- value between 0 and 1
	DRAWCENTER = "YES" or "NO" (Default: "YES")

iup.label({...})
	TITLE = <STRING>
	FONT = <NUM>
	BGCOLOR = "<R> <G> <B> [<A>] [*,+,&]"
	FGCOLOR = "<R> <G> <B> [<A>] [*,+,&]"
	FILTER = "POINT" -- others?
	IMAGE
	ALIGNMENT = "ALEFT", "ACENTER", "ARIGHT"
	SIZE
	POINTSIZE = "YES" or "NO"
	WORDWRAP = "YES" or "NO"
	QUANTIZE = "YES" or "NO"
	SEGMENTED = "<NUM> <NUM> <NUM> <NUM>" -- left, top, right, bottom - value between 0 and 1
	UV = "<NUM> <NUM> <NUM> <NUM>" -- left, top, right, bottom - value between 0 and 1
	CENTERUV
	ACTIVE = "YES" or "NO" -- Does???

	ENTERWINDOW_CB
	LEAVEWINDOW_CB


iup.list
	"1"
	"2"
	"n"
	SIZE
	VALUE = <NUM> | <STRING> -- simple or dropdown list index of selected item | multiple-select string of successive "+" and "-" indicating which items are selected
	FONT = <NUM>
	MULTIPLE = "YES" or "NO"
	CONTROL = "YES" or "NO"
	DROPDOWN = "YES" or "NO" (Default: "NO")
	VISIBLE_ITEMS = <NUM> -- dropdown list only
	MARGINX
	MARGINY
	IMAGE
	BORDERCOLOR
	FOCUSEDBORDERCOLOR
	SELCOLOR
	UNFOCUSEDSELCOLOR

	ACTION
	GETFOCUS_CB -- when not dropdown and not multiple, each selection
	KILLFOCUS_CB -- when not dropdown and not multiple


iup.multiline({...})
	APPEND
	INSERT
	BORDER
	NC
	CARET -- appears to only accept/return the character position, not the row,col
	READONLY
	SIZE
	WANTSLONGPRESS
	DONT_RECURSE
	MARGINX
	MARGINY
	ALIGNMENT = "ALEFT" or "ARIGHT"
	IMAGE
	BOXCOLOR -- unselected box color
	MOUSEOVERBOXCOLOR -- hover and selected box color
	SCROLL -- "PAGEUP", "PAGEDOWN", "BOTTOM", "TOP"

	ACTION(char, after)
	CARET_CB(row, col) -- on mouse click or before action; row and col values appear to always be 1,1 (ALEFT or ARIGHT) or 0,0 (ACENTER)
	GETFOCUS_CB
	KILLFOCUS_CB
	ENTERWINDOW_CB
	LEAVEWINDOW_CB
	DRAGENTER_CB
	DRAGLEAVE_CB
	DRAGOVER_CB
	DROP_CB

	clicking in the control will only set the caret to the first row.  use


iup.progressbar({...})
	visible = "NO"
	active = "NO"
	title = ""
	expand = "NO", --"HORIZONTAL",
	size
	minvalue
	maxvalue
	lowertexture
	middleabovetexture
	middletexture
	middlebelowtexture
	uppertexture
	uppercolor
	lowercolor
	value = <NUM>
	uv = "0 0.25 1 0.75"
	MIDDLEABOVECOLOR
	MIDDLEBELOWCOLOR
	altvalue = <NUM>
	type="HORIZONTAL",
	mode = "TRINARY" -- other values or merely not using it?





iup.text({...})
	APPEND -- appends text to the end of the string
	INSERT -- inserts text at the caret position
	BORDER = "YES" or "NO"
	BORDERCOLOR
	BGCOLOR
	FGCOLOR
	NC = <NUM>
	FONT = <NUM>
	CARET = <NUM>
	ACTIVE = "YES" or "NO"
	READONLY = "YES" or "NO"
	SIZE
	PASSWORD = "YES" or "NO"
	VALUE = <STRING>
	WANTTAB = "YES" or "NO"
	DONT_RECURSE -- ???
	POINTSIZE = "YES" or "NO" -- ???
	BLENDMODE = "ALPHA" -- does what?
	MOUSEOVERBOXCOLOR -- hover and selected box color
	BOXCOLOR -- unselected box color
	MARGINX
	MARGINY
	NUMERICAL = "YES" or "NO" -- ???
	IMAGE

	ACTION(self, char, after)
	GETFOCUS_CB
	KILLFOCUS_CB
	ENTERWINDOW_CB
	LEAVEWINDOW_CB

iup.toggle({...}) (requires images to display value change)
	BGCOLOR -- Toggle color
	FGCOLOR -- Text color
	FONT
	IMAGE
	IMPRESS
	IMINACTIVE
	IMMOUSEOVER
	IMMARGIN = <NUM>
	IMCHECK = <IMAGE>
	IMCHECKINACTIVE = <IMAGE>
	VALUE = "ON" or "OFF" (Default: "OFF")
	TITLE
	SEGMENTED

	ACTION(self, state) -- state: 1 ("ON") or 0 ("OFF")
	GETFOCUS_CB
	KILLFOCUS_CB
	ENTERWINDOW_CB
	LEAVEWINDOW_CB

iup.matrix


iup.modelview
	VALUE
	EXPAND
	MODE -- 1  ??
	ACTIVE
	FGCOLOR

	local meshname, meshfile, shipcolor, itemtype, overlayindex = GetShipMeshInfo(activeshipid)
	SetViewObject(portview, meshname, meshfile, shipcolor, itemtype, overlayindex)

	:ProjectPoint(portinfo and portinfo.position or gvector(0, 0, 0)) -> something??
	:SetOrientation(math3d.MakeQuatFromGVectors(gvector(0, 0, 1), gvector(0, 1, 0)))



iup.tree
	BORDER = "YES" or "NO"
	BGCOLOR
	MARGINX
	MARGINY
	SIZE
	general
		SCROLLBAR
		FONT
		ADDEXPANDED

	marks
		VALUE -- no selection: -1; assignment < last index: no effect; anything other than a number selects first index

	images -- set to "" to remove image
		IMAGELEAF
		IMAGEBRANCHCOLLAPSED
		IMAGEBRANCHEXPANDED
		IMAGE<ID>
		IMAGEEXPANDED<ID>

	nodes
		NAME
		STATE -- "EXPANDED" or "COLLAPSED"
		DEPTH
		KIND
		PARENT
		COLOR -- text color

	action
		ADDLEAAF -- DONOT USE;  USE :addleaf() instead; inserts below the specified node instead of appending to it;  either build each level of your tree in reverse order or change the depth of each node as it's made
		ADDBRANCH -- DONOT USE;  USE :addbranch() instead; inserts below the specified node instead of appending to it;  either build each level of your tree in reverse order or change the depth of each node as it's made
		DELNODEid -- "SELECTED" or "CHILDREN"; if only ever going to deleted specific nodes, then use :delnode()


	SELECTION_CB(index, state)
	BRANCHOPEN_CB(index)
	BRANCHCLOSE_CB(index)
	RENAMENODE_CB(id, name) -- double-click
	RIGHTCLICK_CB(index)


	BEGINDRAG_CB
	GIVEFEEDBACK_CB
	DRAGRESULT_CB
	QUERYCONTINUEDRAG_CB
	DRAGENTER_CB
	DRAGLEAVE_CB
	DRAGOVER_CB
	DROP_CB




	:clear()
	:setdepth()
	:setstate()
	:setname()
	:addbranch()
	:addleaf()
	:setimage()
	:setimageexpanded()
	:delnode()

	iup.TreeSetUserId(<TREE>, <INDEX>, <VALUE>) -- can assign any value as a UserId; set to nil before removing
	iup.TreeGetUserId(<TREE>, <INDEX>)
	iup.TreeGetId(<TREE>, <VALUE>)


iup.navmap({...})
	SIZE
	EXPAND
	SCROLLBAR
	CURRENTID
	CLICKEDID
	["COLOR"..<NUM>] -- Sector ID

	LOADMAP
	SETPATH

	K_ANY
	CLICK_CB
	GETFOCUS_CB
	MOUSEOVER_CB

iup.image



iup.dialog({element, ...})
	BORDER
	MAXBOX
	MINBOX
	RESIZE
	TITLE
	SIZE
	STARTFOCUS = reference
	DEFAULTENTER = reference
	DEFAULTESC = reference
	X
	Y
	SHRINK
	FULLSCREEN
	TOPMOST

	SHOW_CB
	MAP_CB
	CLOSE_CB


iup.NextField(<ELEMENT>) -> <ELEMENT> -- Returns and moves to the next element in series after the provided element
iup.PreviousField -- Appears to work like NextField
iup.GetFocus
iup.SetFocus


iup.SetHandle()
iup.GetHandle()
iup.GetName()
iup.GetAllNames()
iup.GetAllDialogs()

iup.IsValid(element) -- ???

iup.DoDragDrop({
								type = "invitem",
								text = name,
								itemid = itemid,
								image = itemicon,
								portid = portid
							}, self, iup.DROP_COPY + iup.DROP_MOVE)