IUP: Difference between revisions

From Vendetta Lua
Jump to navigationJump to search
No edit summary
No edit summary
Line 316: Line 316:
'''Returns:'''<br>
'''Returns:'''<br>
''type'' type of element
''type'' type of element
<br>
=== Hbox ===
'''Definition:'''
Hbox() -> userdata hbox
<br>
'''Description:''' <br>
Create a hbox.<br>
Note: [[API_iup_hbox|iup.hbox]] is normally used to create this element.
<br>
'''Returns:'''<br>
''hbox'' [[API_iup_hbox|hbox]]
<br>
=== Help ===
'''Definition:'''
Help(string url) -> nil
<br>
'''Description:''' <br>
http://www.tecgraf.puc-rio.br/iup/en/func//iuphelp.html
This doesn't seem to work.
<br>
=== Hide ===
'''Definition:'''
<br>
'''Description:''' <br>
http://www.tecgraf.puc-rio.br/iup/en/func//iuphide.html
<br>
=== Image ===
'''Definition:'''
<br>
'''Description:''' <br>
Create iup image. It doesn't seem to be possible to use the returned image in other elements.
<br>
=== Item ===
'''Definition:'''
<br>
'''Description:''' <br>
Create iup item for iup menus, which don't seem to work.
<br>
=== Joystick ===
'''Definition:'''
Joystick() -> userdata js
<br>
'''Description:''' <br>
Create a joystick calibration control.<br>
Note: [[API_iup_joystick|iup.joystick]] is normally used to create this element.
<br>
'''Returns:'''<br>
''js'' [[API_iup_joystick|joystick]]
<br>
=== Label ===
'''Definition:'''
Label(string title) -> userdata label
<br>
'''Description:''' <br>
Create a label.<br>
Note: [[API_iup_label|iup.label]] is normally used to create this element.
<br>
'''Arguments:'''<br>
''title'' label title
<br>
'''Returns:'''<br>
''label'' [[API_iup_label|label]]
<br>
=== List ===
'''Definition:'''
List() -> userdata list
<br>
'''Description:''' <br>
Create a list.<br>
Note: [[API_iup_list|iup.list]] is normally used to create this element.
<br>
'''Returns:'''<br>
''list'' [[API_iup_list|list]]
<br>
=== ListDialog ===
'''Definition:'''
<br>
'''Description:'''<br>
http://www.tecgraf.puc-rio.br/iup/en/dlg/iuplistdialog.html
Crashes the game.
<br>
=== LoadImage ===
'''Definition:'''
<br>
'''Description:''' <br>
Create iup image. It doesn't seem to be possible to use the returned image in other elements.
<br>
=== LoadNavmap ===
'''Definition:'''
LoadNavmap(userdata map, int type, string name, int arg3) -> nil
<br>
'''Description:''' <br>
Set the map that is displayed in a navmap element
<br>
'''Arguments:'''<br>
''map'' [[API_iup_navmap|navmap]]<br>
''type'' map type. system (1), sector (2)<br>
''name'' map to load<br>
''arg3'' no idea. always 0
<br>
=== LoopStep ===
'''Definition:'''
<br>
'''Description:'''<br>
[http://www.tecgraf.puc-rio.br/iup/en/func/iuploopstep.html]
<br>
=== MainLoop ===
'''Definition:'''
<br>
'''Description:'''<br>
[http://www.tecgraf.puc-rio.br/iup/en/func/iupmainloop.html]
<br>
=== Map ===
'''Definition:'''
<br>
'''Description:'''<br>
[http://www.tecgraf.puc-rio.br/iup/en/func/iupmap.html]
<br>
=== MapFont ===
'''Definition:'''
<br>
'''Description:'''<br>
[http://www.tecgraf.puc-rio.br/iup/en/func/iupmap.html]
Doesn't seem to work.
<br>
=== Matrix ===
'''Definition:'''
Matrix() -> userdata matrix
<br>
'''Description:''' <br>
Create a matrix.<br>
Note: [[API_iup_matrix|iup.matrix]] is normally used to create this element.
<br>
'''Returns:'''<br>
''matrix'' [[API_iup_matrix|matrix]]
<br>
=== MatrixGetAttribute ===
'''Definition:'''
<br>
'''Description:'''<br>
[http://www.tecgraf.puc-rio.br/iup/en/ctrl/iupmatrix.html]
<br>
=== MatrixGetCell ===
'''Definition:'''
<br>
'''Description:'''<br>
[http://www.tecgraf.puc-rio.br/iup/en/ctrl/iupmatrix.html]
<br>
=== MatrixSetAttribute ===
'''Definition:'''
<br>
'''Description:'''<br>
[http://www.tecgraf.puc-rio.br/iup/en/ctrl/iupmatrix.html]
<br>
=== MatrixSetCell ===
'''Definition:'''
<br>
'''Description:'''<br>
[http://www.tecgraf.puc-rio.br/iup/en/ctrl/iupmatrix.html]
<br>
=== Menu ===
'''Definition:'''
<br>
'''Description:''' <br>
Create iup menu. Doesn't seem to work.
<br>
=== Message ===
'''Definition:'''
<br>
'''Description:'''<br>
[http://www.tecgraf.puc-rio.br/iup/en/dlg/iupmessage.html]
<br>
=== Modelview ===
'''Definition:'''
Modelview() -> userdata mv
<br>
'''Description:''' <br>
Create a modelview.<br>
Note: [[API_iup_modelview|iup.modelview]] is normally used to create this element.
<br>
'''Returns:'''<br>
''mv'' [[API_iup_modelview|modelview]]
<br>
=== Navmap ===
'''Definition:'''
Mavmap() -> userdata element
<br>
'''Description:''' <br>
Create a navmap.<br>
Note: [[API_iup_navmap|iup.navmap]] is normally used to create this element.
<br>
'''Returns:'''<br>
''element'' [[API_iup_navmap|navmap]]
<br>
=== NextField ===
'''Definition:'''
<br>
'''Description:'''<br>
[http://www.tecgraf.puc-rio.br/iup/en/func/iupnextfield.html]
<br>
=== Popup ===
'''Definition:'''
<br>
'''Description:'''<br>
[http://www.tecgraf.puc-rio.br/iup/en/func/iuppopup.html]
<br>
=== PreviousField ===
'''Definition:'''
<br>
'''Description:'''<br>
[http://www.tecgraf.puc-rio.br/iup/en/func/iuppreviousfield.html]
<br>
=== Progressbar ===
'''Definition:'''
Progressbar() -> userdata pbar
<br>
'''Description:''' <br>
Create a progressbar.<br>
Note: [[API_iup_progressbar|iup.progressbar]] is normally used to create this element.
<br>
'''Returns:'''<br>
''matrix'' [[API_iup_progressbar|progressbar]]
<br>
=== ProjectPoint ===
'''Definition:'''
ProjectPoint(userdata modelview, gvector meshpos) -> gvection projectpos
<br>
'''Description:''' <br>
Get projection coordinates of a mesh position in a modelview. (check this)<br>
<br>
'''Arguments:'''<br>
''modelview'' [[API_iup_button|button]]<br>
''pos'' [[gvector]] mesh position
<br>
'''Returns:'''<br>
''projectpos'' [[gvector]] or projected position
<br>
=== RGB ===
'''Definition:'''
RGB(fload r, g, b) -> string iupcolor
<br>
'''Description:''' <br>
Convert float rgb colors into an iup color string<br>
<br>
'''Arguments:'''<br>
''r'' red component (0 - 1)<br>
''g'' green component (0 - 1)<br>
''g'' bluw component (0 - 1)
<br>
'''Returns:'''<br>
''iupcolor'' [[iupcolor]]
<br>
<br>

Revision as of 02:03, 21 May 2010

Alarm

Definition:
Description:
[1] The ICON and PARENTDIALOG globals seem to be ignored

Animate

Definition:
Animate(userdate element, float xstart, ystart, wstart, hstart, xend, yend, wend, hend, length, int type) -> userdata dialog
Description:
Move and resize a control or dialog according to given parameters.
Arguments:
element control or dialog to animate. The animation of controls is clipped to their parent dialog
xstart initial horizontal position. value is relative to the screen. if nil the current position is used (0 - screenwidth)
ystart initial vertical position
wstart initial width
hstart initial height
xend final horizontal position
yend final vertical position
wend final width
hend final height
length animation time in milliseconds
type animation type. if 1 bounce between initial and final state otherwise transform lineary from initial to final state
Example
<source lang="lua">

-- make a dialog and resize it to a size of 200x200 do

  local d = iup.dialog{iup.label{title="bla"}} 
  d:show() 
  iup.Animate(d, nil, nil, nil, nil, nil, nil, 200, 200, 1000, 0) 

end

-- make a dialog and bounce between the positions 10,10 and 200,10 do

  local d = iup.dialog{iup.label{title="bla"}} 
  d:show() 
  iup.Animate(d, 10, 10, nil, nil, 200, 10, nil, nil, 1000, 1) 

end </source>


Appand

Definition:
Description:
[2]


Button

Definition: Button(string title) -> userdata button
Description:
Create a button.
Note: iup.button is normally used to create this element.
Arguments:
title button title
Returns:
button button


CancelDragDrop

Definition: CancelDragDrop() -> nil
Description:
DragDrop


Canvas

Definition: Canvas() -> userdata canvas
Description:
Create a canvas.
Note: iup.canvas is normally used to create this element.
Returns:
canvas canvas

Cboxv

Definition:
Cboxv(table elements) -> userdata cbox
Description:
Create a cbox.
Note: iup.cbox is normally used to create this element.
Arguments:
elements table with children of the box (optional)
Returns:
cbox cbox

Destroy

Definition:
Description:
[3]

Detach

Definition:
Description:
[4]

Dialog

Definition: Dialog(userdata element) -> userdata dialog
Description:
Create a dialog.
Note: iup.dialog is normally used to create this element.
Arguments:
element child of the dialog
Returns:
dialog dialog

DoDragDrop

Definition: DoDragDrop(dataobject, datasource, effectsallowed) -> nil
Description:
DragDrop

FileDlg

Definition: FileDlg() -> nil
Description:
does nothing

Fill

Definition: Fill() -> userdata fill
Description:
Create a fill.
Note: iup.fill is normally used to create this element.
Returns:
fill fill


Flush

Definition:
Description:
[5]


Frame

Definition: Frame(userdata element) -> userdata frame
Description:
Create a frame.
Note: iup.frame is normally used to create this element.
Arguments:
element child of the frame
Returns:
frame frame

GetAttribute

Definition:
Description:
[6] Accessing globals doesn't work as described.

GetAttributeData

Definition:
Description:
[7]

GetAttributes

Definition:
Description:
[8] The docs suggest iup.GetAllAttributes, which doesn't exist in the game.

GetBrother

Definition:
Description:
[9]

GetBrother

Definition:
Description:
[10]

GetCapture

Definition:
Description:
no clue

GetDialog

Definition:
Description:
[11]

GetFocus

Definition:
Description:
[12]

GetFromC

Definition:
Description:
no idea

GetGlobal

Definition:
Description:
[13]

GetHandle

Definition:
Description:
[14]

GetLanguage

Definition:
Description:
[15] It seems to return garbage in the game.

GetName

Definition:
Description:
[16]

GetNextChild

Definition:
Description:
[17]

GetParent

Definition:
Description:
[18]

GetText

Definition: GetBrother(string title, deftext) -> string text
Description:
Shows a modal dialog to edit a multiline text. See iup2 docs. It doesn't seem to work properly.

GetType

Definition: GetType(userdata element) -> string type
Description:
Returns the type of an interface element.
Arguments:
element an interface element
Returns:
type type of element

Hbox

Definition: Hbox() -> userdata hbox
Description:
Create a hbox.
Note: iup.hbox is normally used to create this element.
Returns:
hbox hbox

Help

Definition: Help(string url) -> nil
Description:
http://www.tecgraf.puc-rio.br/iup/en/func//iuphelp.html This doesn't seem to work.

Hide

Definition:
Description:
http://www.tecgraf.puc-rio.br/iup/en/func//iuphide.html


Image

Definition:
Description:
Create iup image. It doesn't seem to be possible to use the returned image in other elements.

Item

Definition:
Description:
Create iup item for iup menus, which don't seem to work.

Joystick

Definition: Joystick() -> userdata js
Description:
Create a joystick calibration control.
Note: iup.joystick is normally used to create this element.
Returns:
js joystick

Label

Definition: Label(string title) -> userdata label
Description:
Create a label.
Note: iup.label is normally used to create this element.
Arguments:
title label title
Returns:
label label

List

Definition: List() -> userdata list
Description:
Create a list.
Note: iup.list is normally used to create this element.
Returns:
list list


ListDialog

Definition:
Description:
http://www.tecgraf.puc-rio.br/iup/en/dlg/iuplistdialog.html Crashes the game.

LoadImage

Definition:
Description:
Create iup image. It doesn't seem to be possible to use the returned image in other elements.

LoadNavmap

Definition: LoadNavmap(userdata map, int type, string name, int arg3) -> nil
Description:
Set the map that is displayed in a navmap element
Arguments:
map navmap
type map type. system (1), sector (2)
name map to load
arg3 no idea. always 0

LoopStep

Definition:
Description:
[19]

MainLoop

Definition:
Description:
[20]

Map

Definition:
Description:
[21]

MapFont

Definition:
Description:
[22] Doesn't seem to work.

Matrix

Definition: Matrix() -> userdata matrix
Description:
Create a matrix.
Note: iup.matrix is normally used to create this element.
Returns:
matrix matrix

MatrixGetAttribute

Definition:
Description:
[23]

MatrixGetCell

Definition:
Description:
[24]

MatrixSetAttribute

Definition:
Description:
[25]

MatrixSetCell

Definition:
Description:
[26]

Menu

Definition:
Description:
Create iup menu. Doesn't seem to work.

Message

Definition:
Description:
[27]

Modelview

Definition: Modelview() -> userdata mv
Description:
Create a modelview.
Note: iup.modelview is normally used to create this element.
Returns:
mv modelview


Navmap

Definition: Mavmap() -> userdata element
Description:
Create a navmap.
Note: iup.navmap is normally used to create this element.
Returns:
element navmap

NextField

Definition:
Description:
[28]

Popup

Definition:
Description:
[29]

PreviousField

Definition:
Description:
[30]

Progressbar

Definition: Progressbar() -> userdata pbar
Description:
Create a progressbar.
Note: iup.progressbar is normally used to create this element.
Returns:
matrix progressbar

ProjectPoint

Definition: ProjectPoint(userdata modelview, gvector meshpos) -> gvection projectpos
Description:
Get projection coordinates of a mesh position in a modelview. (check this)

Arguments:
modelview button
pos gvector mesh position
Returns:
projectpos gvector or projected position

RGB

Definition: RGB(fload r, g, b) -> string iupcolor
Description:
Convert float rgb colors into an iup color string

Arguments:
r red component (0 - 1)
g green component (0 - 1)
g bluw component (0 - 1)
Returns:
iupcolor iupcolor