iup

package module
v0.0.0-...-a3b3bba Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2023 License: MIT Imports: 12 Imported by: 2

Documentation

Overview

Package iup implements Go bindings for IUP (https://www.tecgraf.puc-rio.br/iup/).

IUP is a multi-platform toolkit for building graphical user interfaces.

Currently available interface elements can be categorized as follows:

  • Primitives (effective user interaction): dialog, label, button, text, multi-line, list, toggle, canvas, frame, image.
  • Composition (ways to show the elements): hbox, vbox, zbox, fill.
  • Grouping (definition of a common functionality for a group of elements): radio.
  • Menu (related both to menu bars and to pop-up menus): menu, submenu, item, separator.
  • Dialogs (useful predefined dialogs): file selection, message, alarm, data input, list selection.

IUP has 3 concepts that any user has to understand: Elements, Attributes and Callbacks.

Elements are every kind of interface element present in the application. IUP contains several user interface elements. The library's main characteristic is the use of native elements. This means that the drawing and management of a button or text box is done by the native interface system, not by IUP. This makes the application's appearance more similar to other applications in that system. On the other hand, the application's appearance can vary from one system to another. Besides, some additional controls are drawn by IUP, and are independent from the native system. Dialogs are special elements that represent every window created by IUP. Any application that uses IUP will be composed by one or more dialogs. Every dialog can contains one or more controls inside. IUP controls are never positioned in a specific (x,y) coordinate inside the dialog. The positioning is always calculated dynamically from the abstract layout hierarchy. So get used to the Fill, Hbox and Vbox controls that allows you to position the controls in the dialog.

Attributes are used to change or consult properties of elements. Each element has a set of attributes that affects its behavior or its appearance. Each attribute may work differently for each elements, but usually attributes with the same name work the same. Attribute names are always upper case. But attribute values like "YES", "NO", "TOP", are case insensitive, so "Yes", "no", "top", and other variations will work. IUP has only a few functions because it uses string attributes to access the properties of each control. So get used to SetAttribute and GetAttribute, because you are going to use them a lot. Attribute names are always upper case, lower case names will not work. But attribute values like "YES", "NO", "TOP", are case insensitive, so "Yes", "no", "top", and other variations will work. If not defined their value can be inherited from the parent container. Boolean attributes accept the values "1", "YES" or "ON" for true, and "0", "NO" or "OFF" for false. But they will return the value described in the documentation. You can also use SetInt with 1 for true and 0 for false. GetInt will return 1 for any of the true values, and 0 for any of the false values.

Callbacks are functions which notify the application that some user interface event occurred. Usually callbacks will be called only when the user interacts with the application elements. If the application register the callback function, then the function will be called every time the event occurs.

IUP has several global tables along with some system tools that must be initialized before any dialog is created. The default system language used by predefined dialogs and messages is English. But it can be changed to Portuguese or Spanish.

Before running any of IUP’s functions, function Open must be run to initialize the toolkit. After running the last IUP function, function Close must be run so that the toolkit can free internal memory and close the interface system. Executing these functions in this order is crucial for the correct functioning of the toolkit. Between calls to the Open and Close functions, the application can create dialogs and display them.

Index

Constants

View Source
const (
	NAME           = C.IUP_NAME
	DESCRIPTION    = C.IUP_DESCRIPTION
	COPYRIGHT      = C.IUP_COPYRIGHT
	VERSION        = C.IUP_VERSION
	VERSION_NUMBER = C.IUP_VERSION_NUMBER
	VERSION_DATE   = C.IUP_VERSION_DATE
)

Constants

View Source
const (
	ERROR      = 1
	NOERROR    = 0
	OPENED     = -1
	INVALID    = -1
	INVALID_ID = -10
)

Common flags and return values

View Source
const (
	IGNORE   = -1
	DEFAULT  = -2
	CLOSE    = -3
	CONTINUE = -4
)

Callback return values

View Source
const (
	CENTER       = 0xFFFF
	LEFT         = 0xFFFE
	RIGHT        = 0xFFFD
	MOUSEPOS     = 0xFFFC
	CURRENT      = 0xFFFB
	CENTERPARENT = 0xFFFA
	LEFTPARENT   = 0xFFF9
	RIGHTPARENT  = 0xFFF8
	TOP          = LEFT
	BOTTOM       = RIGHT
	TOPPARENT    = LEFTPARENT
	BOTTOMPARENT = RIGHTPARENT
)

Popup and ShowXY parameter values

View Source
const (
	SHOW = iota
	RESTORE
	MINIMIZE
	MAXIMIZE
	HIDE
)

SHOW_CB callback values

View Source
const (
	SBUP = iota
	SBDN
	SBPGUP
	SBPGDN
	SBPOSV
	SBDRAGV
	SBLEFT
	SBRIGHT
	SBPGLEFT
	SBPGRIGHT
	SBPOSH
	SBDRAGH
)

SCROLL_CB callback values

View Source
const (
	BUTTON1 = '1'
	BUTTON2 = '2'
	BUTTON3 = '3'
	BUTTON4 = '4'
	BUTTON5 = '5'
)

Mouse button values and macros

View Source
const (
	MASK_FLOAT       = "[+/-]?(/d+/.?/d*|/./d+)"
	MASK_UFLOAT      = "(/d+/.?/d*|/./d+)"
	MASK_EFLOAT      = "[+/-]?(/d+/.?/d*|/./d+)([eE][+/-]?/d+)?"
	MASK_FLOATCOMMA  = "[+/-]?(/d+/,?/d*|/,/d+)"
	MASK_UFLOATCOMMA = "(/d+/,?/d*|/,/d+)"
	MASK_INT         = "[+/-]?/d+"
	MASK_UINT        = "/d+"
)

Pre-defined masks

View Source
const (
	PRIMARY   = -1
	SECONDARY = -2
)

Used by Colorbar

View Source
const (
	RECBINARY = iota
	RECTEXT
)

Record input modes

View Source
const (
	K_SP           = int(' ')  /* 32 (0x20) */
	K_exclam       = int('!')  /* 33 */
	K_quotedbl     = int('"')  /* 34 */
	K_numbersign   = int('#')  /* 35 */
	K_dollar       = int('$')  /* 36 */
	K_percent      = int('%')  /* 37 */
	K_ampersand    = int('&')  /* 38 */
	K_apostrophe   = int('\'') /* 39 */
	K_parentleft   = int('(')  /* 40 */
	K_parentright  = int(')')  /* 41 */
	K_asterisk     = int('*')  /* 42 */
	K_plus         = int('+')  /* 43 */
	K_comma        = int(',')  /* 44 */
	K_minus        = int('-')  /* 45 */
	K_period       = int('.')  /* 46 */
	K_slash        = int('/')  /* 47 */
	K_0            = int('0')  /* 48 (0x30) */
	K_1            = int('1')  /* 49 */
	K_2            = int('2')  /* 50 */
	K_3            = int('3')  /* 51 */
	K_4            = int('4')  /* 52 */
	K_5            = int('5')  /* 53 */
	K_6            = int('6')  /* 54 */
	K_7            = int('7')  /* 55 */
	K_8            = int('8')  /* 56 */
	K_9            = int('9')  /* 57 */
	K_colon        = int(':')  /* 58 */
	K_semicolon    = int(';')  /* 59 */
	K_less         = int('<')  /* 60 */
	K_equal        = int('=')  /* 61 */
	K_greater      = int('>')  /* 62 */
	K_question     = int('?')  /* 63 */
	K_at           = int('@')  /* 64 */
	K_A            = int('A')  /* 65 (0x41) */
	K_B            = int('B')  /* 66 */
	K_C            = int('C')  /* 67 */
	K_D            = int('D')  /* 68 */
	K_E            = int('E')  /* 69 */
	K_F            = int('F')  /* 70 */
	K_G            = int('G')  /* 71 */
	K_H            = int('H')  /* 72 */
	K_I            = int('I')  /* 73 */
	K_J            = int('J')  /* 74 */
	K_K            = int('K')  /* 75 */
	K_L            = int('L')  /* 76 */
	K_M            = int('M')  /* 77 */
	K_N            = int('N')  /* 78 */
	K_O            = int('O')  /* 79 */
	K_P            = int('P')  /* 80 */
	K_Q            = int('Q')  /* 81 */
	K_R            = int('R')  /* 82 */
	K_S            = int('S')  /* 83 */
	K_T            = int('T')  /* 84 */
	K_U            = int('U')  /* 85 */
	K_V            = int('V')  /* 86 */
	K_W            = int('W')  /* 87 */
	K_X            = int('X')  /* 88 */
	K_Y            = int('Y')  /* 89 */
	K_Z            = int('Z')  /* 90 */
	K_bracketleft  = int('[')  /* 91 */
	K_backslash    = int('\\') /* 92 */
	K_bracketright = int(']')  /* 93 */
	K_circum       = int('^')  /* 94 */
	K_underscore   = int('_')  /* 95 */
	K_grave        = int('`')  /* 96 */
	K_a            = int('a')  /* 97 (0x61) */
	K_b            = int('b')  /* 98 */
	K_c            = int('c')  /* 99 */
	K_d            = int('d')  /* 100 */
	K_e            = int('e')  /* 101 */
	K_f            = int('f')  /* 102 */
	K_g            = int('g')  /* 103 */
	K_h            = int('h')  /* 104 */
	K_i            = int('i')  /* 105 */
	K_j            = int('j')  /* 106 */
	K_k            = int('k')  /* 107 */
	K_l            = int('l')  /* 108 */
	K_m            = int('m')  /* 109 */
	K_n            = int('n')  /* 110 */
	K_o            = int('o')  /* 111 */
	K_p            = int('p')  /* 112 */
	K_q            = int('q')  /* 113 */
	K_r            = int('r')  /* 114 */
	K_s            = int('s')  /* 115 */
	K_t            = int('t')  /* 116 */
	K_u            = int('u')  /* 117 */
	K_v            = int('v')  /* 118 */
	K_w            = int('w')  /* 119 */
	K_x            = int('x')  /* 120 */
	K_y            = int('y')  /* 121 */
	K_z            = int('z')  /* 122 */
	K_braceleft    = int('{')  /* 123 */
	K_bar          = int('|')  /* 124 */
	K_braceright   = int('}')  /* 125 */
	K_tilde        = int('~')  /* 126 (0x7E) */
)

From 32 to 126, all character sets are equal, the key code is the same as the ASCII character code.

View Source
const (
	K_BS  = int('\b') /* 8 */
	K_TAB = int('\t') /* 9 */
	K_LF  = int('\n') /* 10 (0x0A) not a real key, is a combination of CR with a modifier, just to document */
	K_CR  = int('\r') /* 13 (0x0D) */
)

Also define the escape sequences that have keys associated

View Source
const (
	K_quoteleft  = K_grave
	K_quoteright = K_apostrophe
)

Backward compatible definitions

View Source
const (
	K_PAUSE  = 0xFF13
	K_ESC    = 0xFF1B
	K_HOME   = 0xFF50
	K_LEFT   = 0xFF51
	K_UP     = 0xFF52
	K_RIGHT  = 0xFF53
	K_DOWN   = 0xFF54
	K_PGUP   = 0xFF55
	K_PGDN   = 0xFF56
	K_END    = 0xFF57
	K_MIDDLE = 0xFF0B
	K_Print  = 0xFF61
	K_INS    = 0xFF63
	K_Menu   = 0xFF67
	K_DEL    = 0xFFFF
	K_F1     = 0xFFBE
	K_F2     = 0xFFBF
	K_F3     = 0xFFC0
	K_F4     = 0xFFC1
	K_F5     = 0xFFC2
	K_F6     = 0xFFC3
	K_F7     = 0xFFC4
	K_F8     = 0xFFC5
	K_F9     = 0xFFC6
	K_F10    = 0xFFC7
	K_F11    = 0xFFC8
	K_F12    = 0xFFC9
)

These use the same definition as X11 and GDK. This also means that any X11 or GDK definition can also be used.

View Source
const (
	K_LSHIFT = 0xFFE1
	K_RSHIFT = 0xFFE2
	K_LCTRL  = 0xFFE3
	K_RCTRL  = 0xFFE4
	K_LALT   = 0xFFE9
	K_RALT   = 0xFFEA

	K_NUM    = 0xFF7F
	K_SCROLL = 0xFF14
	K_CAPS   = 0xFFE5
)

No Shift/Ctrl/Alt

View Source
const (
	K_ccedilla  = 0x00E7
	K_Ccedilla  = 0x00C7
	K_acute     = 0x00B4 /* no Shift/Ctrl/Alt */
	K_diaeresis = 0x00A8
)

Also, these are the same as the Latin-1 definition

Variables

This section is empty.

Functions

func Alarm

func Alarm(title, msg, b1, b2, b3 string) int

Alarm shows a modal dialog containing a message and up to three buttons.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupalarm.html

func ClassMatch

func ClassMatch(ih Ihandle, className string) bool

ClassMatch checks if the give class name matches the class name of the given interface element.

https://www.tecgraf.puc-rio.br/iup/en/func/iupclassmatch.html

func Close

func Close()

Close ends the IUP toolkit and releases internal memory. It will also automatically destroy all dialogs and all elements that have names.

https://www.tecgraf.puc-rio.br/iup/en/func/iupclose.html

func ConfigDialogClosed

func ConfigDialogClosed(ih, dialog Ihandle, name string)

ConfigDialogClosed save the last dialog position and size when the dialog is about to be closed, usually inside the dialog CLOSE_CB callback..

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigDialogShow

func ConfigDialogShow(ih, dialog Ihandle, name string)

ConfigDialogShow show the dialog adjusting its size and position..

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigGetVariableDouble

func ConfigGetVariableDouble(ih Ihandle, group, key string) float64

ConfigGetVariableDouble .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigGetVariableDoubleDef

func ConfigGetVariableDoubleDef(ih Ihandle, group, key string, def float64) float64

ConfigGetVariableDoubleDef .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigGetVariableDoubleId

func ConfigGetVariableDoubleId(ih Ihandle, group, key string, id int) float64

ConfigGetVariableDoubleId .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigGetVariableDoubleIdDef

func ConfigGetVariableDoubleIdDef(ih Ihandle, group, key string, id int, def float64) float64

ConfigGetVariableDoubleIdDef .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigGetVariableInt

func ConfigGetVariableInt(ih Ihandle, group, key string) int

ConfigGetVariableInt .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigGetVariableIntDef

func ConfigGetVariableIntDef(ih Ihandle, group, key string, def int) int

ConfigGetVariableIntDef .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigGetVariableIntId

func ConfigGetVariableIntId(ih Ihandle, group, key string, id int) int

ConfigGetVariableIntId .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigGetVariableIntIdDef

func ConfigGetVariableIntIdDef(ih Ihandle, group, key string, id int, def int) int

ConfigGetVariableIntIdDef .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigGetVariableStr

func ConfigGetVariableStr(ih Ihandle, group, key string) string

ConfigGetVariableStr .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigGetVariableStrDef

func ConfigGetVariableStrDef(ih Ihandle, group, key string, def string) string

ConfigGetVariableStrDef .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigGetVariableStrId

func ConfigGetVariableStrId(ih Ihandle, group, key string, id int) string

ConfigGetVariableStrId .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigGetVariableStrIdDef

func ConfigGetVariableStrIdDef(ih Ihandle, group, key string, id int, def string) string

ConfigGetVariableStrIdDef .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigLoad

func ConfigLoad(ih Ihandle) int

ConfigLoad loads the configuration file.

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigSave

func ConfigSave(ih Ihandle) int

ConfigSave saves the configuration file.

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigSetListVariable

func ConfigSetListVariable(ih Ihandle, group, key, value string, add int)

ConfigSetListVariable .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigSetVariableDouble

func ConfigSetVariableDouble(ih Ihandle, group, key string, value float64)

ConfigSetVariableDouble .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigSetVariableDoubleId

func ConfigSetVariableDoubleId(ih Ihandle, group, key string, id int, value float64)

ConfigSetVariableDoubleId .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigSetVariableInt

func ConfigSetVariableInt(ih Ihandle, group, key string, value int)

ConfigSetVariableInt .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigSetVariableIntId

func ConfigSetVariableIntId(ih Ihandle, group, key string, id int, value int)

ConfigSetVariableIntId .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigSetVariableStr

func ConfigSetVariableStr(ih Ihandle, group, key string, value string)

ConfigSetVariableStr .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConfigSetVariableStrId

func ConfigSetVariableStrId(ih Ihandle, group, key string, id int, value string)

ConfigSetVariableStrId .

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func ConvertXYToPos

func ConvertXYToPos(ih Ihandle, x, y int) int

ConvertXYToPos converts a (x,y) coordinate in an item position.

It can be used for Text and Scintilla (returns a position in the string), List (returns an item), Tree (returns a node identifier) or Matrix (returns a cell position, where pos=lin*numcol + col).

https://www.tecgraf.puc-rio.br/iup/en/func/iupconvertxytopos.html

func CopyClassAttributes

func CopyClassAttributes(srcIh, dstIh Ihandle)

CopyClassAttributes copies all registered attributes from one element to another. Both elements must be of the same class.

https://www.tecgraf.puc-rio.br/iup/en/func/iupcopyclassattributes.html

func Destroy

func Destroy(ih Ihandle)

Destroy destroys an interface element and all its children. Only dialogs, timers, popup menus and images should be normally destroyed, but detached controls can also be destroyed.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdestroy.html

func Detach

func Detach(child Ihandle)

Detach detaches an interface element from its parent.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdetach.html

func DrawArc

func DrawArc(ih Ihandle, x1, y1, x2, y2 int, a1, a2 float64)

DrawArc draws an arc inside a rectangle between the two angles in degrees. When filled will draw a pie shape with the vertex at the center of the rectangle. Angles are counter-clock wise relative to the 3 o'clock position.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawBegin

func DrawBegin(ih Ihandle)

DrawBegin initialize the drawing process.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawEnd

func DrawEnd(ih Ihandle)

DrawEnd terminates the drawing process and actually draw on screen..

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawFocusRect

func DrawFocusRect(ih Ihandle, x1, y1, x2, y2 int)

DrawFocusRect draws a focus rectangle.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawGetClipRect

func DrawGetClipRect(ih Ihandle) (x1, y1, x2, y2 int)

DrawGetClipRect returns the previous rectangular clipping region set by DrawSetClipRect, if clipping was reset returns 0 in all values.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawGetImageInfo

func DrawGetImageInfo(name string) (w, h, bpp int)

DrawGetImageInfo returns the given image size and bits per pixel. bpp can be 8, 24 or 32.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawGetSize

func DrawGetSize(ih Ihandle) (w, h int)

DrawGetSize returns the drawing area size.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawGetTextSize

func DrawGetTextSize(ih Ihandle, str string) (w, h int)

DrawGetTextSize returns the given text size using the font defined by DRAWFONT, if not defined then use FONT.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawImage

func DrawImage(ih Ihandle, name string, x, y, w, h int)

DrawImage draws an image given its name. The coordinates are relative the top-left corner of the image.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawLine

func DrawLine(ih Ihandle, x1, y1, x2, y2 int)

DrawLine draws a line including start and end points.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawParentBackground

func DrawParentBackground(ih Ihandle)

DrawParentBackground fills the canvas with the native parent background color.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawPolygon

func DrawPolygon(ih Ihandle, points []int, count int)

DrawPolygon draws a polygon. Coordinates are stored in the array in the sequence: x1, y1, x2, y2, ...

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawRectangle

func DrawRectangle(ih Ihandle, x1, y1, x2, y2 int)

DrawRectangle draws a rectangle including start and end points.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawResetClip

func DrawResetClip(ih Ihandle)

DrawResetClip resets the clipping area to none.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawSelectRect

func DrawSelectRect(ih Ihandle, x1, y1, x2, y2 int)

DrawSelectRect draws a selection rectangle.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawSetClipRect

func DrawSetClipRect(ih Ihandle, x1, y1, x2, y2 int)

DrawSetClipRect defines a rectangular clipping region.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func DrawText

func DrawText(ih Ihandle, str string, x, y, w, h int)

DrawText draws a text in the given position using the font defined by DRAWFONT, if not defined then use FONT.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdraw.html

func Execute

func Execute(fileName, parameters string) int

Execute runs the executable with the given parameters. It is a non synchronous operation, i.e. the function will return just after execute the command and it will not wait for its result. In Windows, there is no need to add the ".exe" file extension.

https://www.tecgraf.puc-rio.br/iup/en/func/iupexecute.html

func ExecuteWait

func ExecuteWait(fileName, parameters string) int

ExecuteWait runs the executable with the given parameters. It is a synchronous operation, i.e. the function will wait the command to terminate before it returns. In Windows, there is no need to add the ".exe" file extension.

https://www.tecgraf.puc-rio.br/iup/en/func/iupexecutewait.html

func ExitLoop

func ExitLoop()

ExitLoop terminates the current message loop. It has the same effect of a callback returning CLOSE.

https://www.tecgraf.puc-rio.br/iup/en/func/iupexitloop.html

func Flush

func Flush()

Flush processes all pending messages in the message queue.

When you change an attribute of a certain element, the change may not take place immediately. For this update to occur faster than usual, call Flush after the attribute is changed.

https://www.tecgraf.puc-rio.br/iup/en/func/iupflush.html

func GetAllAttributes

func GetAllAttributes(ih Ihandle) (ret []string)

GetAllAttributes returns the names of all attributes of an element that are set in its internal hash table only.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetallattributes.html

func GetAllClasses

func GetAllClasses() (names []string)

GetAllClasses returns the names of all registered classes.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetallclasses.html

func GetAllDialogs

func GetAllDialogs() (names []string)

GetAllDialogs returns the names of all dialogs that have an associated name using SetHandle. Other dialogs will not be returned.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetalldialogs.html

func GetAllNames

func GetAllNames() (names []string)

GetAllNames returns the names of all interface elements that have an associated name using SetHandle.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetallnames.html

func GetAttribute

func GetAttribute(ih Ihandle, name string) string

GetAttribute returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetAttributeId

func GetAttributeId(ih Ihandle, name string, id int) string

GetAttributeId returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetAttributeId2

func GetAttributeId2(ih Ihandle, name string, lin, col int) string

GetAttributeId2 returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetAttributes

func GetAttributes(ih Ihandle) string

GetAttributes returns all attributes of a given element that are set in the internal hash table. The known attributes that are pointers (not strings) are returned as integers.

The internal attributes are not returned (attributes prefixed with "_IUP").

Before calling this function the application must ensure that there is no pointer attributes set for that element, although all known pointers attributes are handled.

This function should be avoided. Use iup.GetAllAttributes instead.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattributes.html

func GetCallback

func GetCallback(ih Ihandle, name string) uintptr

GetCallback returns the callback associated to an event.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetcallback.html

func GetChildCount

func GetChildCount(ih Ihandle) int

GetChildCount returns the number of children of the given control.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetchildcount.html

func GetChildPos

func GetChildPos(ih, child Ihandle) int

GetChildPos returns the position of a child of the given control.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetchildpos.html

func GetClassAttributes

func GetClassAttributes(className string) (names []string)

GetClassAttributes returns the names of all registered attributes of a class.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetclassattributes.html

func GetClassCallbacks

func GetClassCallbacks(className string) (names []string)

GetClassCallbacks returns the names of all registered callbacks of a class.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetclasscallbacks.html

func GetClassName

func GetClassName(ih Ihandle) string

GetClassName returns the name of the class of an interface element.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetclassname.html

func GetClassType

func GetClassType(ih Ihandle) string

GetClassType returns the name of the native type of an interface element.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetclasstype.html

func GetColor

func GetColor(x, y int) (ret int, col color.RGBA)

GetColor shows a modal dialog which allows the user to select a color. Based on ColorDlg.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupgetcolor.html

func GetDouble

func GetDouble(ih Ihandle, name string) float64

GetDouble returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetDoubleId

func GetDoubleId(ih Ihandle, name string, id int) float64

GetDoubleId returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetDoubleId2

func GetDoubleId2(ih Ihandle, name string, lin, col int) float64

GetDoubleId2 returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetFile

func GetFile(path string) (sel string, ret int)

GetFile shows a modal dialog of the native interface system to select a filename. Uses the FileDlg element.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupgetfile.html

func GetFloat

func GetFloat(ih Ihandle, name string) float32

GetFloat returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetFloatId

func GetFloatId(ih Ihandle, name string, id int) float32

GetFloatId returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetFloatId2

func GetFloatId2(ih Ihandle, name string, lin, col int) float32

GetFloatId2 returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetFunction

func GetFunction(name string) uintptr

GetFunction returns the function associated to an action only when they were set by SetFunction. It will not work if SetCallback were used.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetfunction.html

func GetGlobal

func GetGlobal(name string) string

GetGlobal returns an attribute value from the global environment. The value can be returned from the driver or from the internal storage.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetglobal.html

func GetGlobalPtr

func GetGlobalPtr(name string) uintptr

GetGlobalPtr returns an attribute value from the global environment.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetglobal.html

func GetInt

func GetInt(ih Ihandle, name string) int

GetInt returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetInt2

func GetInt2(ih Ihandle, name string) (count, i1, i2 int)

GetInt2 returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetIntId

func GetIntId(ih Ihandle, name string, id int) int

GetIntId returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetIntId2

func GetIntId2(ih Ihandle, name string, lin, col int) int

GetIntId2 returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetLanguage

func GetLanguage() string

GetLanguage returns the language used by some pre-defined dialogs. Returns the same value as the LANGUAGE global attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetlanguage.html

func GetLanguageString

func GetLanguageString(name string) string

GetLanguageString returns a language dependent string. The string must have been associated with the name using the SetLanguageString or SetLanguagePack functions.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetlanguagestring.html

func GetName

func GetName(ih Ihandle) string

GetName Returns a name of an interface element, if the element has an associated name using SetHandle. Notice that a handle can have many names. GetName will return the last name set.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetname.html

func GetPtr

func GetPtr(ih Ihandle, name string) uintptr

GetPtr .

func GetPtrId

func GetPtrId(ih Ihandle, name string, id int) uintptr

GetPtrId .

func GetPtrId2

func GetPtrId2(ih Ihandle, name string, lin, col int) uintptr

GetPtrId2 .

func GetRGB

func GetRGB(ih Ihandle, name string) (r, g, b uint8)

GetRGB returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetRGBA

func GetRGBA(ih Ihandle, name string) (r, g, b, a uint8)

GetRGBA returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetRGBId

func GetRGBId(ih Ihandle, name string, id int) (r, g, b uint8)

GetRGBId returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetRGBId2

func GetRGBId2(ih Ihandle, name string, lin, col int) (r, g, b uint8)

GetRGBId2 returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func GetText

func GetText(title, text string) string

GetText shows a modal dialog to edit a multiline text.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupgettext.html

func Help

func Help(url string) int

Help opens the given URL. In UNIX executes Netscape, Safari (MacOS) or Firefox (in Linux) passing the desired URL as a parameter. In Windows executes the shell "open" operation on the given URL. In UNIX you can change the used browser setting the environment variable IUP_HELPAPP or using the global attribute "HELPAPP". It is a non synchronous operation, i.e. the function will return just after execute the command and it will not wait for its result. Since IUP 3.17, it will use the Execute function.

https://www.tecgraf.puc-rio.br/iup/en/func/iuphelp.html

func Hide

func Hide(ih Ihandle) int

Hide hides an interface element. This function has the same effect as attributing value "NO" to the interface element’s VISIBLE attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iuphide.html

func IsAltXKey

func IsAltXKey(c int) bool

IsAltXKey informs if a given key is an extended code using the Alt modifier.

https://www.tecgraf.puc-rio.br/iup/en/attrib/key.html

func IsButton1

func IsButton1(s string) bool

IsButton1 mouse button macro.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html

func IsButton2

func IsButton2(s string) bool

IsButton2 mouse button macro.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html

func IsButton3

func IsButton3(s string) bool

IsButton3 mouse button macro.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html

func IsButton4

func IsButton4(s string) bool

IsButton4 mouse button macro.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html

func IsButton5

func IsButton5(s string) bool

IsButton5 mouse button macro.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html

func IsControl

func IsControl(s string) bool

IsControl mouse button macro.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html

func IsCtrlXKey

func IsCtrlXKey(c int) bool

IsCtrlXKey informs if a given key is an extended code using the Ctrl modifier.

https://www.tecgraf.puc-rio.br/iup/en/attrib/key.html

func IsDouble

func IsDouble(s string) bool

IsDouble mouse button macro.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html

func IsPrint

func IsPrint(c int) bool

IsPrint informs if a key can be directly used as a printable character.

https://www.tecgraf.puc-rio.br/iup/en/attrib/key.html

func IsShift

func IsShift(s string) bool

IsShift mouse button macro.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html

func IsShiftXKey

func IsShiftXKey(c int) bool

IsShiftXKey informs if a given key is an extended code using the Shift modifier.

https://www.tecgraf.puc-rio.br/iup/en/attrib/key.html

func IsSysXKey

func IsSysXKey(c int) bool

IsSysXKey informs if a given key is an extended code using the Sys modifier.

https://www.tecgraf.puc-rio.br/iup/en/attrib/key.html

func IsXKey

func IsXKey(c int) bool

IsXKey informs if a given key is an extended code.

https://www.tecgraf.puc-rio.br/iup/en/attrib/key.html

func ListDialog

func ListDialog(_type int, title string, list []string, op, maxCol, maxLin int, marks *[]bool) (ret int)

ListDialog shows a modal dialog to select items from a simple or multiple selection list.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iuplistdialog.html

func Log

func Log(_type, str string)

Log writes a message to the system log. In Windows, writes to the Application event log. In Linux, writes to the Syslog.

https://www.tecgraf.puc-rio.br/iup/en/func/iuplog.html

func LoopStep

func LoopStep() (ret int)

LoopStep runs one iteration of the message loop. It returns immediately after processing any messages or if there are no messages to process.

This function is useful for allowing a second message loop to be managed by the application itself. This means that messages can be intercepted and callbacks can be processed inside an application loop.

https://www.tecgraf.puc-rio.br/iup/en/func/iuploopstep.html

func LoopStepWait

func LoopStepWait() (ret int)

LoopStepWait runs one iteration of the message loop.

It puts the system in idle until a message is processed.

https://www.tecgraf.puc-rio.br/iup/en/func/iuploopstep.html

func MainLoop

func MainLoop() (ret int)

MainLoop executes the user interaction until a callback returns CLOSE, ExitLoop is called, or hiding the last visible dialog.

If MainLoop is called without any visible dialogs and no active timers, the application will hang and will not be possible to close the main loop. The process will have to be interrupted by the system.

https://www.tecgraf.puc-rio.br/iup/en/func/iupmainloop.html

func MainLoopLevel

func MainLoopLevel() (ret int)

MainLoopLevel returns the current cascade level of MainLoop. When no calls were done, return value is 0.

You can use this function to check if MainLoop was already called and avoid calling it again.

https://www.tecgraf.puc-rio.br/iup/en/func/iupmainlooplevel.html

func Map

func Map(ih Ihandle) int

Map creates (maps) the native interface objects corresponding to the given IUP interface elements.

It will also called recursively to create the native element of all the children in the element's tree.

The element must be already attached to a mapped container, except the dialog. A child can only be mapped if its parent is already mapped.

This function is automatically called before the dialog is shown in Show, ShowXY or Popup.

https://www.tecgraf.puc-rio.br/iup/en/func/iupmap.html

func Message

func Message(title, msg string)

Message shows a modal dialog containing a message. It simply creates and popup a MessageDlg.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupmessage.html

func MessageAlarm

func MessageAlarm(parent Ihandle, title, msg, buttons string)

MessageAlarm shows a modal dialog containing a question message, similar to Alarm. It simply creates and popup a MessageDlg with DIALOGTYPE=QUESTION.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupmessagealarm.html

func MessageError

func MessageError(parent Ihandle, msg string)

MessageError shows a modal dialog containing an error message. It simply creates and popup a MessageDlg with DIALOGTYPE=ERROR.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupmessageerror.html

func Open

func Open() int

Open initializes the IUP toolkit. Must be called before any other IUP function.

https://www.tecgraf.puc-rio.br/iup/en/func/iupopen.html

func PlayInput

func PlayInput(fileName string) int

PlayInput reproduces all mouse and keyboard input from a given file.

The file must had been saved using the RecordInput function. Record mode will be automatically detected.

https://www.tecgraf.puc-rio.br/iup/en/func/iupplayinput.html

func Popup(ih Ihandle, x, y int) int

Popup shows a dialog or menu and restricts user interaction only to the specified element. It is equivalent of creating a Modal dialog is some toolkits.

If another dialog is shown after Popup using Show, then its interaction will not be inhibited. Every Popup call creates a new popup level that inhibits all previous dialogs interactions, but does not disable new ones (even if they were disabled by the Popup, calling Show will re-enable the dialog because it will change its popup level). IMPORTANT: The popup levels must be closed in the reverse order they were created or unpredictable results will occur.

For a dialog this function will only return the control to the application after a callback returns CLOSE, ExitLoop is called, or when the popup dialog is hidden, for example using Hide. For a menu it returns automatically after a menu item is selected. IMPORTANT: If a menu item callback returns CLOSE, it will also ends the current popup level dialog.

https://www.tecgraf.puc-rio.br/iup/en/func/iuppopup.html

func PostMessage

func PostMessage(ih Ihandle, s string, i int, p any)

PostMessage sends data to an element, that will be received by a callback when the main loop regain control. It is expected to be thread safe.

https://www.tecgraf.puc-rio.br/iup/en/func/iuppostmessage.html

func RecordInput

func RecordInput(fileName string, mode int) int

RecordInput records all mouse and keyboard input in a file for later reproduction.

Any existing file will be replaced. Must stop recording before exiting the application. If fileName is nil it will stop recording.

https://www.tecgraf.puc-rio.br/iup/en/func/iuprecordinput.html

func Redraw

func Redraw(ih Ihandle, children int)

Redraw force the element and its children to be redraw immediately.

https://www.tecgraf.puc-rio.br/iup/en/func/iupredraw.html

func Refresh

func Refresh(ih Ihandle)

Refresh updates the size and layout of all controls in the same dialog. To be used after changing size attributes, or attributes that affect the size of the control. Can be used for any element inside a dialog, but the layout of the dialog and all controls will be updated. It can change the layout of all the controls inside the dialog because of the dynamic layout positioning.

https://www.tecgraf.puc-rio.br/iup/en/func/iuprefresh.html

func RefreshChildren

func RefreshChildren(ih Ihandle)

RefreshChildren updates the size and layout of controls after changing size attributes, or attributes that affect the size of the control. Can be used for any element inside a dialog, only its children will be updated. It can change the layout of all the controls inside the given element because of the dynamic layout positioning.

https://www.tecgraf.puc-rio.br/iup/en/func/iuprefreshchildren.html

func Reparent

func Reparent(ih, newParent, refChild Ihandle) int

Reparent moves an interface element from one position in the hierarchy tree to another. Both new_parent and child must be mapped or unmapped at the same time. If ref_child is NULL, then it will append the child to the new_parent. If ref_child is NOT NULL then it will insert child before ref_child inside the new_parent.

https://www.tecgraf.puc-rio.br/iup/en/func/iupreparent.html

func ResetAttribute

func ResetAttribute(ih Ihandle, name string)

ResetAttribute removes an attribute from the hash table of the element, and its children if the attribute is inheritable. It is useful to reset the state of inheritable attributes in a tree of elements.

https://www.tecgraf.puc-rio.br/iup/en/func/iupresetattribute.html

func SaveClassAttributes

func SaveClassAttributes(ih Ihandle)

SaveClassAttributes saves all registered attributes on the internal hash table.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsaveclasscallbacks.html

func SetAttribute

func SetAttribute(ih Ihandle, name string, value interface{})

SetAttribute sets an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html

func SetAttributeHandle

func SetAttributeHandle(ih Ihandle, name string, ihNamed Ihandle)

SetAttributeHandle instead of using SetHandle and SetAttribute with a new creative name, this function automatically creates a non conflict name and associates the name with the attribute.

It is very useful for associating images and menus.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattributehandle.html

func SetAttributeId

func SetAttributeId(ih Ihandle, name string, id int, value interface{})

SetAttributeId sets an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html

func SetAttributeId2

func SetAttributeId2(ih Ihandle, name string, lin, col int, value interface{})

SetAttributeId2 sets an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html

func SetCallback

func SetCallback(ih Ihandle, name string, fn interface{})

SetCallback associates a callback to an event.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetcallback.html

func SetClassDefaultAttribute

func SetClassDefaultAttribute(className, name, value string)

SetClassDefaultAttribute changes the default value of an attribute for a class. It can be any attribute, i.e. registered attributes or user custom attributes.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetclassdefaultattribute.html

func SetFunction

func SetFunction(name string, fn interface{})

SetFunction associates a function to an action as a global callback.

This function should not be used by new applications, use it only for global callbacks. For regular elements use SetCallback instead.

Notice that the application or libraries may set the same name for two different functions by mistake. SetCallback does not depends on global names.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetfunction.html

func SetGlobal

func SetGlobal(name string, value interface{})

SetGlobal sets an attribute in the global environment. If the driver process the attribute then it will not be stored internally.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetglobal.html

func SetLanguage

func SetLanguage(lng string)

SetLanguage sets the language name used by some pre-defined dialogs. Can also be changed using the global attribute LANGUAGE.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetlanguage.html

func SetLanguagePack

func SetLanguagePack(ih Ihandle)

SetLanguagePack sets a pack of associations between names and string values. It is simply a User element with several attributes set. Internally will call SetLanguageString for each name in the pack.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetlanguagepack.html

func SetLanguageString

func SetLanguageString(name, str string)

SetLanguageString associates a name with a string as an auxiliary method for Internationalization of applications.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetlanguagestring.html

func SetRGB

func SetRGB(ih Ihandle, name string, r, g, b uint8)

SetRGB sets an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html

func SetRGBA

func SetRGBA(ih Ihandle, name string, r, g, b, a uint8)

SetRGBA sets an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html

func SetRGBId

func SetRGBId(ih Ihandle, name string, id int, r, g, b uint8)

SetRGBId sets an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html

func SetRGBId2

func SetRGBId2(ih Ihandle, name string, lin, col int, r, g, b uint8)

SetRGBId2 sets an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html

func Show

func Show(ih Ihandle) int

Show displays a dialog in the current position, or changes a control VISIBLE attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupshow.html

func ShowXY

func ShowXY(ih Ihandle, x, y int) int

ShowXY displays a dialog in a given position on the screen.

https://www.tecgraf.puc-rio.br/iup/en/func/iupshowxy.html

func StringCompare

func StringCompare(str1, str2 string, caseSensitive, lexicographic bool) int

StringCompare is an utility function to compare strings lexicographically. Used internally in MatrixEx when sorting, but available in the main library.

This means that numbers and text in the string are sorted separately (for ex: A1 A2 A11 A30 B1). Also natural alphabetic order is used: 123...aAáÁ...bBcC... The comparison will work only for Latin-1 characters, even if UTF8MODE is Yes.

https://www.tecgraf.puc-rio.br/iup/en/func/iupstringcompare.html

func TextConvertLinColToPos

func TextConvertLinColToPos(ih Ihandle, lin, col int) (pos int)

TextConvertLinColToPos converts a (lin, col) character positioning into an absolute position. lin and col starts at 1, pos starts at 0. For single line controls pos is always "col-1".

https://www.tecgraf.puc-rio.br/iup/en/elem/iuptext.html

func TextConvertPosToLinCol

func TextConvertPosToLinCol(ih Ihandle, pos int) (lin, col int)

TextConvertPosToLinCol Converts an absolute position into a (lin, col) character positioning. lin and col starts at 1, pos starts at 0. For single line controls lin is always 1, and col is always "pos+1".

https://www.tecgraf.puc-rio.br/iup/en/elem/iuptext.html

func TreeSetAttributeHandle

func TreeSetAttributeHandle(ih Ihandle, name string, id int, ihNamed Ihandle)

TreeSetAttributeHandle .

https://www.tecgraf.puc-rio.br/iup/en/elem/iuptree.html

func Unmap

func Unmap(ih Ihandle)

Unmap unmap the element from the native system. It will also unmap all its children. It will NOT detach the element from its parent, and it will NOT destroy the IUP element.

https://www.tecgraf.puc-rio.br/iup/en/func/iupunmap.html

func Update

func Update(ih Ihandle)

Update mark the element or its children to be redraw when the control returns to the system.

https://www.tecgraf.puc-rio.br/iup/en/func/iupupdate.html

func UpdateChildren

func UpdateChildren(ih Ihandle)

UpdateChildren mark the element or its children to be redraw when the control returns to the system.

https://www.tecgraf.puc-rio.br/iup/en/func/iupupdate.html

func Version

func Version() string

Version returns a string with the IUP version number.

https://www.tecgraf.puc-rio.br/iup/en/func/iupversion.html

func VersionDate

func VersionDate() string

VersionDate returns a string with the IUP version date.

https://www.tecgraf.puc-rio.br/iup/en/func/iupversion.html

func VersionNumber

func VersionNumber() int

VersionNumber returns a string with the IUP version number.

https://www.tecgraf.puc-rio.br/iup/en/func/iupversion.html

func XKeyAlt

func XKeyAlt(c int) int

XKeyAlt obtains a key code for a generic combination.

https://www.tecgraf.puc-rio.br/iup/en/attrib/key.html

func XKeyBase

func XKeyBase(c int) int

XKeyBase obtains a key code for a generic combination.

https://www.tecgraf.puc-rio.br/iup/en/attrib/key.html

func XKeyCtrl

func XKeyCtrl(c int) int

XKeyCtrl obtains a key code for a generic combination.

https://www.tecgraf.puc-rio.br/iup/en/attrib/key.html

func XKeyShift

func XKeyShift(c int) int

XKeyShift obtains a key code for a generic combination.

https://www.tecgraf.puc-rio.br/iup/en/attrib/key.html

func XKeySys

func XKeySys(c int) int

XKeySys obtains a key code for a generic combination.

https://www.tecgraf.puc-rio.br/iup/en/attrib/key.html

Types

type ActionFunc

type ActionFunc func(Ihandle) int

ActionFunc for ACTION callback. Action generated when the element is activated. Affects each element differently.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_action.html

type BranchCloseFunc

type BranchCloseFunc func(ih Ihandle, id int) int

BranchCloseFunc for BRANCHCLOSE_CB callback. Action generated when a branch is collapsed.

type BranchOpenFunc

type BranchOpenFunc func(ih Ihandle, id int) int

BranchOpenFunc for BRANCHOPEN_CB callback. Action generated when a branch is expanded.

type ButtonFunc

type ButtonFunc func(Ihandle, int, int, int, int, string) int

ButtonFunc for BUTTON_CB callback. Action generated when a mouse button is pressed or released.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html

type ButtonPressFunc

type ButtonPressFunc func(ih Ihandle, angle float64) int

ButtonPressFunc for BUTTON_PRESS_CB callback. Called when the user presses the left mouse button over the dial.

type ButtonReleaseFunc

type ButtonReleaseFunc func(ih Ihandle, angle float64) int

ButtonReleaseFunc for BUTTON_RELEASE_CB callback. Called when the user releases the left mouse button after pressing it over the dial.

type CancelFunc

type CancelFunc func(Ihandle) int

CancelFunc for CANCEL_CB callback. Action generated when the user clicked on the Cancel button.

type CanvasActionFunc

type CanvasActionFunc func(ih Ihandle, posx, posy float64) int

CanvasActionFunc for Canvas ACTION callback. Action generated when the canvas needs to be redrawn.

type CaretFunc

type CaretFunc func(ih Ihandle, lin, col, pos int) int

CaretFunc for CARET_CB callback. Action generated when the caret/cursor position is changed.

type CellFunc

type CellFunc func(ih Ihandle, cell int) int

CellFunc for CELL_CB callback. Called when the user double clicks a color cell to change its value.

type ChangeFunc

type ChangeFunc func(ih Ihandle, r, g, b uint8) int

ChangeFunc for CHANGE_CB callback. Called when the user releases the left mouse button over the control, defining the selected color.

type CloseFunc

type CloseFunc func(Ihandle) int

CloseFunc for CLOSE_CB callback. Called just before a dialog is closed when the user clicks the close button of the title bar or an equivalent action.

type DblclickFunc

type DblclickFunc func(ih Ihandle, item int, text string) int

DblclickFunc for DBLCLICK_CB callback. Action generated when the user double click an item.

type DestroyFunc

type DestroyFunc func(Ihandle) int

DestroyFunc for DESTROY_CB callback. Called right before an element is destroyed.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_destroy_cb.html

type DetachedFunc

type DetachedFunc func(Ihandle, Ihandle, int, int) int

DetachedFunc for DETACHED_CB callback.

type DragDropFunc

type DragDropFunc func(ih Ihandle, dragId, dropId, isShift, isControl int) int

DragDropFunc for DRAGDROP_CB callback. Action generated when an internal drag and drop is executed.

type DragFunc

type DragFunc func(ih Ihandle, r, g, b uint8) int

DragFunc for DRAG_CB callback. Called several times while the color is being changed by dragging the mouse over the control.

type DropDownFunc func(ih Ihandle, state int) int

DropDownFunc for DROPDOWN_CB callback. Action generated right before the drop child is shown or hidden.

type DropFilesFunc

type DropFilesFunc func(Ihandle, string, int, int, int) int

DropFilesFunc for DROPFILES_CB callback. Action called when a file is "dropped" into the control.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_dropfiles_cb.html

type DropShowFunc

type DropShowFunc func(ih Ihandle, state int) int

DropShowFunc for DROPSHOW_CB callback. Action generated right after the drop child is shown or hidden.

type EditFunc

type EditFunc func(ih Ihandle, item int, text string) int

EditFunc for EDIT_CB callback. Action generated when the user double click an item.

type EnterWindowFunc

type EnterWindowFunc func(Ihandle) int

EnterWindowFunc for ENTERWINDOW_CB callback. Action generated when the mouse enters the native element.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_enterwindow_cb.html

type EntryPointFunc

type EntryPointFunc func()

EntryPointFunc for ENTRY_POINT callback. generated when there are no events or messages to be processed. Often used to perform background operations.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_entry_point.html

type ExecuteBranchFunc

type ExecuteBranchFunc func(ih Ihandle, id int) int

ExecuteBranchFunc for EXECUTEBRANCH_CB callback. Action generated when a branch is executed.

type ExecuteLeafFunc

type ExecuteLeafFunc func(ih Ihandle, id int) int

ExecuteLeafFunc for EXECUTELEAF_CB callback. Action generated when a leaf is executed.

type ExitFunc

type ExitFunc func()

ExitFunc for EXIT_CB callback. Global callback for an exit. Used when main is not possible, such as in iOS and Android systems.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_exit_cb.html

type ExtendedFunc

type ExtendedFunc func(ih Ihandle, cell int) int

ExtendedFunc for EXTENDED_CB callback. Called when the user right click a cell with the Shift key pressed.

type ExtraButtonFunc

type ExtraButtonFunc func(Ihandle, int, int) int

ExtraButtonFunc for EXTRABUTTON_CB callback. Action generated when any mouse button is pressed or released.

type FlatActionFunc

type FlatActionFunc func(ih Ihandle) int

FlatActionFunc for FLAT_ACTION callback. Action generated when the button 1 (usually left) is selected.

type FlatListActionFunc

type FlatListActionFunc func(ih Ihandle, text string, item, state int) int

FlatListActionFunc for FlatList FLAT_ACTION callback. Action generated when the state of an item in the list is interactively changed.

type FlatToggleActionFunc

type FlatToggleActionFunc func(ih Ihandle, state int) int

FlatToggleActionFunc for FlatToggle FLAT_ACTION callback. Action generated when the toggle's state (on/off) was changed.

type FocusFunc

type FocusFunc func(Ihandle, int) int

FocusFunc for FOCUS_CB callback. Called when the dialog or any of its children gets the focus, or when another dialog or any control in another dialog gets the focus.

type GetFocusFunc

type GetFocusFunc func(Ihandle) int

GetFocusFunc for GETFOCUS_CB callback. Action generated when an element is given keyboard focus.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_getfocus_cb.html

type HelpFunc

type HelpFunc func(Ihandle) int

HelpFunc for HELP_CB callback. Action generated when the user press F1 at a control.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_help_cb.html

type IdleFunc

type IdleFunc func() int

IdleFunc for IDLE_ACTION callback. generated when there are no events or messages to be processed. Often used to perform background operations.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_idle_action.html

type Ihandle

type Ihandle uintptr

Ihandle type.

func AnimatedLabel

func AnimatedLabel(animation Ihandle) Ihandle

AnimatedLabel creates an animated label interface element, which displays an image that is changed periodically.

It uses an animation that is simply an User with several Image as children.

It inherits from Label.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupanimatedlabel.html

func Append

func Append(ih, child Ihandle) Ihandle

Append inserts an interface element at the end of the container, after the last element of the container. Valid for any element that contains other elements like dialog, frame, hbox, vbox, zbox or menu.

https://www.tecgraf.puc-rio.br/iup/en/func/iupappend.html

func BackgroundBox

func BackgroundBox(child Ihandle) Ihandle

BackgroundBox creates a simple native container with no decorations. Useful for controlling children visibility for Zbox or Expander. It inherits from Canvas.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupbackgroundbox.html

func Button

func Button(title string) Ihandle

Button creates an interface element that is a button. When selected, this element activates a function in the application. Its visual presentation can contain a text and/or an image.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupbutton.html

func Calendar

func Calendar() Ihandle

Calendar creates a month calendar interface element, where the user can select a date.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupcalendar.html

func Canvas

func Canvas() Ihandle

Canvas creates an interface element that is a canvas - a working area for your application.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupcanvas.html

func Cbox

func Cbox(children ...Ihandle) Ihandle

Cbox creates a void container for position elements in absolute coordinates. It is a concrete layout container.

It does not have a native representation.

The Cbox is equivalent of a Vbox or Hbox where all the children have the FLOATING attribute set to YES, but children must use CX and CY attributes instead of the POSITION attribute.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupcbox.html

func ClassInfoDialog

func ClassInfoDialog(dialog Ihandle) Ihandle

ClassInfoDialog creates an Iup Class Information dialog. It is a predefined dialog to show all registered classes, each class attributes and callbacks. It is a standard IupDialog constructed with other IUP elements. The dialog can be shown with any of the show functions Show, ShowXY or Popup.

This is a dialog intended for developers, so they can see attributes and callbacks information of a class.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupclassinfodialog.html

func Clipboard

func Clipboard() Ihandle

Clipboard creates an element that allows access to the clipboard. Each clipboard should be destroyed using Destroy, but you can use only one for the entire application because it does not store any data inside. Or you can simply create and destroy every time you need to copy or paste.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupclipboard.html

func ColorBar

func ColorBar() Ihandle

ColorBar creates a color palette to enable a color selection from several samples. It can select one or two colors. The primary color is selected with the left mouse button, and the secondary color is selected with the right mouse button.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupcolorbar.html

func ColorBrowser

func ColorBrowser() Ihandle

ColorBrowser creates an element for selecting a color. The selection is done using a cylindrical projection of the RGB cube. The transformation defines a coordinate color system called HSI, that is still the RGB color space but using cylindrical coordinates.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupcolorbrowser.html

func ColorDlg

func ColorDlg() Ihandle

ColorDlg creates the Color Dialog element. It is a predefined dialog for selecting a color. The Windows and GTK dialogs can be shown only with the Popup function. The ColorBrowser based dialog is a Dialog that can be shown as any regular Dialog.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupcolordlg.html

func Config

func Config() Ihandle

Config creates a new configuration database. To destroy it use the Destroy function.

https://www.tecgraf.puc-rio.br/iup/en/func/iupconfig.html

func Create

func Create(className string) Ihandle

Create creates an interface element given its class name and parameters. This function is called from all constructors like Dialog(...), Label(...), and so on.

After creation the element still needs to be attached to a container and mapped to the native system so it can be visible.

https://www.tecgraf.puc-rio.br/iup/en/func/iupcreate.html

func DatePick

func DatePick() Ihandle

DatePick creates a date editing interface element, which can displays a calendar for selecting a date.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupdatepick.html

func DetachBox

func DetachBox(child Ihandle) Ihandle

DetachBox creates a detachable void container.

Dragging and dropping this element, it creates a new dialog composed by its child or elements arranged in it (for example, a child like Vbox or Hbox). During the drag, the ESC key can be pressed to cancel the action.

It does not have a native representation, but it contains also a Canvas to implement the bar handler.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupdetachbox.html

func Dial

func Dial(orientation string) Ihandle

Dial creates a dial for regulating a given angular variable.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupdial.html

func Dialog

func Dialog(child Ihandle) Ihandle

Dialog creates a dialog element. It manages user interaction with the interface elements. For any interface element to be shown, it must be encapsulated in a dialog.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupdialog.html

func DropButton

func DropButton(dropchild Ihandle) Ihandle

DropButton creates an interface element that is a button with a drop down arrow. It can function as a button and as a dropdown. Its visual presentation can contain a text and/or an image.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupdropbutton.html

func ElementPropertiesDialog

func ElementPropertiesDialog(parent, elem Ihandle) Ihandle

ElementPropertiesDialog creates an Element Properties Dialog. It is a predefined dialog to edit the properties of an element in run time. It is a standard Dialog constructed with other IUP elements. The dialog can be shown with any of the show functions Show, ShowXY or Popup.

This is a dialog intended for developers, so they can see and inspect their elements in other ways.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupelementpropdialog.html

func Expander

func Expander(child Ihandle) Ihandle

Expander creates a void container that can interactively show or hide its child.

It does not have a native representation, but it contains also several elements to implement the bar handler.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupexpander.html

func FileDlg

func FileDlg() Ihandle

FileDlg creates the File Dialog element. It is a predefined dialog for selecting files or a directory. The dialog can be shown with the Popup function only.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupfiledlg.html

func Fill

func Fill() Ihandle

Fill creates void element, which dynamically occupies empty spaces always trying to expand itself. Its parent should be an Hbox, an Vbox or a GridBox, or else this type of expansion will not work. If an EXPAND is set on at least one of the other children of the box, then the fill expansion is ignored.

It does not have a native representation.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupfill.html

func FlatButton

func FlatButton(title string) Ihandle

FlatButton creates an interface element that is a button, but it does not have native decorations. When selected, this element activates a function in the application. Its visual presentation can contain a text and/or an image.

It behaves just like an Button, but since it is not a native control it has more flexibility for additional options. It can also behave like an Toggle (without the checkmark).

https://www.tecgraf.puc-rio.br/iup/en/elem/iupflatbutton.html

func FlatFrame

func FlatFrame(child Ihandle) Ihandle

FlatFrame creates a native container, which draws a frame with a title around its child. The decorations are manually drawn. The control inherits from BackgroundBox.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupflatframe.html

func FlatLabel

func FlatLabel(title string) Ihandle

FlatLabel creates an interface element that is a label, but it does not have native decorations. Its visual presentation can contain a text and/or an image.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupflatlabel.html

func FlatList

func FlatList() Ihandle

FlatList creates an interface element that displays a list of items, but it does not have native decorations.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupflatlist.html

func FlatScrollBox

func FlatScrollBox(child Ihandle) Ihandle

FlatScrollBox Creates a native container that allows its child to be scrolled. It inherits from IupCanvas. The difference from ScrollBox is that its scrollbars are drawn.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupflatscrollbox.html

func FlatSeparator

func FlatSeparator() Ihandle

FlatSeparator creates an interface element that is a Separator, but it does not have native decorations.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupflatseparator.html

func FlatTabs

func FlatTabs(children ...Ihandle) Ihandle

FlatTabs Creates a native container for composing elements in hidden layers with only one layer visible (just like Zbox), but its visibility can be interactively controlled. The interaction is done in a line of tabs with titles and arranged according to the tab type. Also known as Notebook in native systems. Identical to the Tabs control but the decorations and buttons are manually drawn.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupflattabs.html

func FlatToggle

func FlatToggle(title string) Ihandle

FlatToggle creates an interface element that is a toggle, but it does not have native decorations. When selected, this element activates a function in the application. Its visual presentation can contain a text and/or an image.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupflattoggle.html

func FlatTree

func FlatTree() Ihandle

FlatTree creates a tree containing nodes of branches or leaves. Both branches and leaves can have an associated text and image.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupflattree.html

func FlatVal

func FlatVal(orientation string) Ihandle

FlatVal creates a Valuator control, but it does not have native decorations. Selects a value in a limited interval. Also known as Scale or Trackbar in native systems.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupflatval.html

func FontDlg

func FontDlg() Ihandle

FontDlg creates the Font Dialog element. It is a predefined dialog for selecting a font. The dialog can be shown with the Popup function only.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupfontdlg.html

func Frame

func Frame(child Ihandle) Ihandle

Frame creates a native container, which draws a frame with a title around its child.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupframe.html

func Gauge

func Gauge() Ihandle

Gauge creates a Gauge control. Shows a percent value that can be updated to simulate a progression.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupgauge.html

func GetAttributeHandle

func GetAttributeHandle(ih Ihandle, name string) Ihandle

GetAttributeHandle instead of using GetAttribute and GetHandle, this function directly returns the associated handle.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattributehandle.html

func GetBrother

func GetBrother(ih Ihandle) Ihandle

GetBrother returns the brother of an element.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetbrother.html

func GetChild

func GetChild(ih Ihandle, pos int) Ihandle

GetChild returns the a child of the control given its position.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetchild.html

func GetDialog

func GetDialog(ih Ihandle) Ihandle

GetDialog returns the handle of the dialog that contains that interface element. Works also for children of a menu that is associated with a dialog.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetdialog.html

func GetDialogChild

func GetDialogChild(ih Ihandle, name string) Ihandle

GetDialogChild returns the identifier of the child element that has the NAME attribute equals to the given value on the same dialog hierarchy. Works also for children of a menu that is associated with a dialog.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetdialogchild.html

func GetFocus

func GetFocus() Ihandle

GetFocus returns the identifier of the interface element that has the keyboard focus, i.e. the element that will receive keyboard events.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetfocus.html

func GetGlobalIh

func GetGlobalIh(name string) Ihandle

GetGlobalIh returns an attribute value from the global environment.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetglobal.html

func GetHandle

func GetHandle(name string) Ihandle

GetHandle returns the identifier of an interface element that has an associated name using SetHandle.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgethandle.html

func GetNextChild

func GetNextChild(ih, child Ihandle) Ihandle

GetNextChild returns the a child of the given control given its brother.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetnextchild.html

func GetParent

func GetParent(ih Ihandle) Ihandle

GetParent returns the parent of a control.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetparent.html

func GlobalsDialog

func GlobalsDialog() Ihandle

GlobalsDialog creates an Globals Dialog. It is a predefined dialog to check and edit global attributes, functions (read-only) and names (read-only) in run time. It is a standard Dialog constructed with other IUP elements. The dialog can be shown with any of the show functions Show, ShowXY or Popup.

This is a dialog intended for developers, so they can see and inspect their globals in other ways.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupglobalsdialog.html

func GridBox

func GridBox(children ...Ihandle) Ihandle

GridBox creates a void container for composing elements in a regular grid. It is a box that arranges the elements it contains from top to bottom and from left to right, but can distribute the elements in lines or in columns.

It does not have a native representation.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupgridbox.html

func Hbox

func Hbox(children ...Ihandle) Ihandle

Hbox creates a void container for composing elements horizontally. It is a box that arranges the elements it contains from left to right.

It does not have a native representation.

https://www.tecgraf.puc-rio.br/iup/en/elem/iuphbox.html

func Image

func Image(width, height int, pixMap []byte) Ihandle

Image creates an image to be shown on a label, button, toggle, or as a cursor.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupimage.html

func ImageFromImage

func ImageFromImage(i image.Image) Ihandle

ImageFromImage creates an image from image.Image.

func ImageRGB

func ImageRGB(width, height int, pixMap []byte) Ihandle

ImageRGB creates an image to be shown on a label, button, toggle, or as a cursor.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupimage.html

func ImageRGBA

func ImageRGBA(width, height int, pixMap []byte) Ihandle

ImageRGBA creates an image to be shown on a label, button, toggle, or as a cursor.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupimage.html

func Insert

func Insert(ih, refChild, child Ihandle) Ihandle

Insert Inserts an interface element before another child of the container. Valid for any element that contains other elements like dialog, frame, hbox, vbox, zbox, menu, etc.

https://www.tecgraf.puc-rio.br/iup/en/func/iupinsert.html

func Item

func Item(title string) Ihandle

Item creates an item of the menu interface element. When selected, it generates an action.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupitem.html

func Label

func Label(title string) Ihandle

Label creates a label interface element, which displays a separator, a text or an image.

https://www.tecgraf.puc-rio.br/iup/en/elem/iuplabel.html

func LayoutDialog

func LayoutDialog(dialog Ihandle) Ihandle

LayoutDialog creates a Layout Dialog. It is a predefined dialog to visually edit the layout of another dialog in run time. It is a standard Dialog constructed with other IUP elements. The dialog can be shown with any of the show functions Show, ShowXY or Popup.

This is a dialog intended for developers, so they can see and inspect their dialogs in other ways.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iuplayoutdialog.html

func Link(url, title string) Ihandle

Link creates a label that displays an underlined clickable text. It inherits from Label.

https://www.tecgraf.puc-rio.br/iup/en/elem/iuplink.html

func List

func List() Ihandle

List Creates an interface element that displays a list of items. The list can be visible or can be dropped down. It also can have an edit box for text input. So it is a 4 in 1 element. In native systems the dropped down case is called Combo Box.

https://www.tecgraf.puc-rio.br/iup/en/elem/iuplist.html

func Menu(children ...Ihandle) Ihandle

Menu Creates a menu element, which groups 3 types of interface elements: item, submenu and separator. Any other interface element defined inside a menu will be an error.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupmenu.html

func MessageDlg

func MessageDlg() Ihandle

MessageDlg creates the Message Dialog element. It is a predefined dialog for displaying a message. The dialog can be shown with the Popup function only.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupmessagedlg.html

func MultiBox

func MultiBox(children ...Ihandle) Ihandle

MultiBox creates a void container for composing elements in a irregular grid. It is a box that arranges the elements it contains from top to bottom and from left to right, by distributing the elements in lines or in columns. But its EXPAND attribute does not behave as a regular container, instead it behaves as a regular element expanding into the available space.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupmultibox.html

func MultiLine

func MultiLine() Ihandle

MultiLine creates an editable field with one or more lines.

Text has support for multiple lines when the MULTILINE attribute is set to YES. Now when a Multiline element is created in fact a Text element with MULTILINE=YES is created.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupmultiline.html

func NextField

func NextField(ih Ihandle) Ihandle

NextField shifts the focus to the next element that can have the focus. It is relative to the given element and does not depend on the element currently with the focus.

It will search for the next element first in the children, then in the brothers, then in the uncles and their children, and so on.

This sequence is not the same sequence used by the Tab key, which is dependent on the native system.

https://www.tecgraf.puc-rio.br/iup/en/func/iupnextfield.html

func Normalizer

func Normalizer(ihList ...Ihandle) Ihandle

Normalizer creates a void container that does not affect the dialog layout. It acts by normalizing all the controls in a list so their natural size becomes the biggest natural size amongst them.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupnormalizer.html

func PreviousField

func PreviousField(ih Ihandle) Ihandle

PreviousField shifts the focus to the previous element that can have the focus. It is relative to the given element and does not depend on the element currently with the focus.

https://www.tecgraf.puc-rio.br/iup/en/func/iuppreviousfield.html

func ProgressBar

func ProgressBar() Ihandle

ProgressBar creates a progress bar control. Shows a percent value that can be updated to simulate a progression.

It is similar of Gauge, but uses native controls internally. Also does not have support for text inside the bar.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupprogressbar.html

func ProgressDlg

func ProgressDlg() Ihandle

ProgressDlg creates a progress dialog element. It is a predefined dialog for displaying the progress of an operation. The dialog is meant to be shown with the show functions Show or ShowXY.

https://www.tecgraf.puc-rio.br/iup/en/dlg/iupprogressdlg.html

func Radio

func Radio(child Ihandle) Ihandle

Radio creates a void container for grouping mutual exclusive toggles. Only one of its descendent toggles will be active at a time. The toggles can be at any composition.

It does not have a native representation.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupradio.html

func Sbox

func Sbox(child Ihandle) Ihandle

Sbox creates a void container that allows its child to be resized. Allows expanding and contracting the child size in one direction.

It does not have a native representation but it contains also a Canvas to implement the bar handler.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupsbox.html

func ScrollBox

func ScrollBox(child Ihandle) Ihandle

ScrollBox creates a native container that allows its child to be scrolled. It inherits from Canvas.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupscrollbox.html

func Separator

func Separator() Ihandle

Separator creates the separator interface element. It shows a line between two menu items.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupseparator.html

func SetAtt

func SetAtt(ih Ihandle, handle_name string, args ...string) Ihandle

SetAtt sets several attributes of an interface element and optionally sets its name.

https://www.tecgraf.puc-rio.br/iup/en/func/iupresetatt.html

func SetAttributes

func SetAttributes(ih Ihandle, str string) Ihandle

SetAttributes sets several attributes of an interface element.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattributes.html

func SetAttrs

func SetAttrs(ih Ihandle, args ...string) Ihandle

SetAttrs method does not exist in C Iup. It has been provided as a convenience function to allow code such as:

box := iup.Hbox(button1, button2).SetAttrs("GAP", "5", "MARGIN", "8x8")

C Iup provides SetAtt for this purpose but in Go Iup SetAttrs is an easier method to accomplish this task due to no necessity of handle_name.

func SetFocus

func SetFocus(ih Ihandle) Ihandle

SetFocus sets the interface element that will receive the keyboard focus, i.e., the element that will receive keyboard events. But this will be processed only after the control actually receive the focus.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetfocus.html

func SetHandle

func SetHandle(name string, ih Ihandle) Ihandle

SetHandle associates a name with an interface element.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsethandle.html

func Space

func Space() Ihandle

Space creates void element, which occupies an empty space. It will simply occupy a space in the layout. It does not have a natural size, it is 0x0 by default. It can be expandable or not, EXPAND will work as a regular element.

It does not have a native representation.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupspace.html

func Spin

func Spin() Ihandle

Spin creates a control set with a vertical box containing two buttons, one with an up arrow and the other with a down arrow, to be used to increment and decrement values.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupspin.html

func SpinBox

func SpinBox(child Ihandle) Ihandle

SpinBox creates a horizontal container that already contains a Spin.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupspin.html

func Split

func Split(child1, child2 Ihandle) Ihandle

Split creates a void container that split its client area in two. Allows the provided controls to be enclosed in a box that allows expanding and contracting the element size in one direction, but when one is expanded the other is contracted.

It does not have a native representation, but it contains also a Canvas to implement the bar handler.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupsplit.html

func Submenu(title string, child Ihandle) Ihandle

Submenu creates a menu item that, when selected, opens another menu.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupsubmenu.html

func Tabs

func Tabs(children ...Ihandle) Ihandle

Tabs creates a native container for composing elements in hidden layers with only one layer visible (just like Zbox), but its visibility can be interactively controlled. The interaction is done in a line of tabs with titles and arranged according to the tab type. Also known as Notebook in native systems.

https://www.tecgraf.puc-rio.br/iup/en/elem/iuptabs.html

func Text

func Text() Ihandle

Text creates an editable text field.

https://www.tecgraf.puc-rio.br/iup/en/elem/iuptext.html

func Thread

func Thread() Ihandle

Thread creates a thread element in IUP, which is not associated to any interface element. It is a very simple support to create and manage threads in a multithreading environment.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupthread.html

func Timer

func Timer() Ihandle

Timer creates a timer which periodically invokes a callback when the time is up. Each timer should be destroyed using Destroy.

https://www.tecgraf.puc-rio.br/iup/en/elem/iuptimer.html

func Toggle

func Toggle(title string) Ihandle

Toggle creates the toggle interface element. It is a two-state (on/off) button that, when selected, generates an action that activates a function in the associated application. Its visual representation can contain a text or an image.

https://www.tecgraf.puc-rio.br/iup/en/elem/iuptoggle.html

func Tree

func Tree() Ihandle

Tree creates a tree containing nodes of branches or leaves. Both branches and leaves can have an associated text and image.

The branches can be expanded or collapsed. When a branch is expanded, its immediate children are visible, and when it is collapsed they are hidden.

The leaves can generate an "executed" or "renamed" actions, branches can only generate a "renamed" action.

The focus node is the node with the focus rectangle, marked nodes have their background inverted.

https://www.tecgraf.puc-rio.br/iup/en/elem/iuptree.html

func User

func User() Ihandle

User creates a user element in IUP, which is not associated to any interface element. It is used to map an external element to a IUP element. Its use is usually for additional elements, but you can use it to create an Ihandle to store private attributes.

It is also a void container. Its children can be dynamically added using Append or Insert.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupuser.html

func Val

func Val(_type string) Ihandle

Val creates a Valuator control. Selects a value in a limited interval. Also known as Scale or Trackbar in native systems.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupval.html

func Vbox

func Vbox(children ...Ihandle) Ihandle

Vbox creates a void container for composing elements vertically. It is a box that arranges the elements it contains from top to bottom.

It does not have a native representation.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupvbox.html

func Zbox

func Zbox(children ...Ihandle) Ihandle

Zbox Creates a void container for composing elements in hidden layers with only one layer visible. It is a box that piles up the children it contains, only the one child is visible.

It does not have a native representation.

https://www.tecgraf.puc-rio.br/iup/en/elem/iupzbox.html

func (Ihandle) Destroy

func (ih Ihandle) Destroy()

Destroy destroys an interface element and all its children. Only dialogs, timers, popup menus and images should be normally destroyed, but detached controls can also be destroyed.

https://www.tecgraf.puc-rio.br/iup/en/func/iupdestroy.html

func (Ihandle) GetAllAttributes

func (ih Ihandle) GetAllAttributes() []string

GetAllAttributes returns the names of all attributes of an element that are set in its internal hash table only.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetallattributes.html

func (Ihandle) GetAttribute

func (ih Ihandle) GetAttribute(name string, ids ...interface{}) string

GetAttribute returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func (Ihandle) GetCallback

func (ih Ihandle) GetCallback(name string) uintptr

GetCallback returns the callback associated to an event.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetcallback.html

func (Ihandle) GetDouble

func (ih Ihandle) GetDouble(name string, ids ...interface{}) float64

GetDouble returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func (Ihandle) GetFloat

func (ih Ihandle) GetFloat(name string, ids ...interface{}) float32

GetFloat returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func (Ihandle) GetInt

func (ih Ihandle) GetInt(name string, ids ...interface{}) int

GetInt returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func (Ihandle) GetPtr

func (ih Ihandle) GetPtr(name string, ids ...interface{}) uintptr

GetPtr .

func (Ihandle) GetRGB

func (ih Ihandle) GetRGB(name string, ids ...interface{}) (r, g, b uint8)

GetRGB returns the name of an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html

func (Ihandle) ResetAttribute

func (ih Ihandle) ResetAttribute(name string) Ihandle

ResetAttribute removes an attribute from the hash table of the element, and its children if the attribute is inheritable. It is useful to reset the state of inheritable attributes in a tree of elements.

https://www.tecgraf.puc-rio.br/iup/en/func/iupresetattribute.html

func (Ihandle) SetAttribute

func (ih Ihandle) SetAttribute(name string, value ...interface{}) Ihandle

SetAttribute sets an interface element attribute.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html

func (Ihandle) SetAttributes

func (ih Ihandle) SetAttributes(params ...interface{}) Ihandle

SetAttributes sets several attributes of an interface element.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattributes.html

func (Ihandle) SetCallback

func (ih Ihandle) SetCallback(name string, fn interface{}) Ihandle

SetCallback associates a callback to an event.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsetcallback.html

func (Ihandle) SetHandle

func (ih Ihandle) SetHandle(name string) Ihandle

SetHandle associates a name with an interface element.

https://www.tecgraf.puc-rio.br/iup/en/func/iupsethandle.html

type KAnyFunc

type KAnyFunc func(Ihandle, int) int

KAnyFunc for K_ANY callback. Action generated when a keyboard event occurs.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_k_any.html

type KeyPressFunc

type KeyPressFunc func(ih Ihandle, c, press int) int

KeyPressFunc for KEYPRESS_CB callback. Action generated when a key is pressed or released.

type KillFocusFunc

type KillFocusFunc func(Ihandle) int

KillFocusFunc for KILLFOCUS_CB callback. Action generated when an element loses keyboard focus.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_killfocus_cb.html

type LeaveWindowFunc

type LeaveWindowFunc func(Ihandle) int

LeaveWindowFunc for LEAVEWINDOW_CB callback. Action generated when the mouse leaves the native element.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_leavewindow_cb.html

type LinkActionFunc

type LinkActionFunc func(ih Ihandle, url string) int

LinkActionFunc for Link ACTION callback.

type ListActionFunc

type ListActionFunc func(ih Ihandle, text string, item, state int) int

ListActionFunc for List ACTION callback. Action generated when the state of an item in the list is changed.

type MapFunc

type MapFunc func(Ihandle) int

MapFunc for MAP_CB callback. Called right after an element is mapped and its attributes updated in Map. When the element is a dialog, it is called after the layout is updated. For all other elements is called before the layout is updated.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_map_cb.html

type MenuOpenFunc func(ih Ihandle) int

MenuOpenFunc for OPEN_CB callback. Called just before the menu is opened.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_open_cb.html

type MotionFunc

type MotionFunc func(ih Ihandle, x, y int, status string) int

MotionFunc for MOTION_CB callback. Action generated when the mouse is moved over the list.

type MouseMoveFunc

type MouseMoveFunc func(ih Ihandle, angle float64) int

MouseMoveFunc for MOUSEMOVE_CB callback.

type MoveFunc

type MoveFunc func(ih Ihandle, x, y int) int

MoveFunc for MOVE_CB callback. Called after the dialog was moved on screen.

type MultiSelectionFunc

type MultiSelectionFunc func(ih Ihandle, ids []int, n int) int

MultiSelectionFunc for MULTISELECTION_CB callback. Action generated after a continuous range of nodes is selected in one single operation.

type MultiUnselectionFunc

type MultiUnselectionFunc func(ih Ihandle, ids []int, n int) int

MultiUnselectionFunc for MULTIUNSELECTION_CB callback. Action generated before multiple nodes are unselected in one single operation.

type MultiselectFunc

type MultiselectFunc func(ih Ihandle, text string) int

MultiselectFunc for MULTISELECT_CB callback. Action generated when the state of an item in the multiple selection list is changed.

type NodeRemovedFunc

type NodeRemovedFunc func(ih Ihandle) int

NodeRemovedFunc for NODEREMOVED_CB callback.

type OpenCloseFunc

type OpenCloseFunc func(ih Ihandle, state int) int

OpenCloseFunc for OPENCLOSE_CB callback. Action generated before the expander state is interactively changed.

type PostMessageFunc

type PostMessageFunc func(Ihandle, string, int, any) int

PostMessageFunc for POSTMESSAGE_CB callback.

type RenameFunc

type RenameFunc func(ih Ihandle, id int, title string) int

RenameFunc for RENAME_CB callback. Action generated after a node was renamed in place.

type ResizeFunc

type ResizeFunc func(ih Ihandle, width, height int) int

ResizeFunc for RESIZE_CB callback. Action generated when the canvas or dialog size is changed.

type RestoredFunc

type RestoredFunc func(Ihandle, Ihandle, int, int) int

RestoredFunc for RESTORED_CB callback. Called when the box is restored if RESTOREWHENCLOSED=Yes.

type RightClickFunc

type RightClickFunc func(Ihandle, int) int

RightClickFunc for RIGHTCLICK_CB callback. Called when the user clicks on some tab using the right mouse button.

type ScrollFunc

type ScrollFunc func(ih Ihandle, op int, posx, posy float64) int

ScrollFunc for SCROLL_CB callback. Called when the scrollbar is manipulated.

type SelectFunc

type SelectFunc func(ih Ihandle, cell, _type int) int

SelectFunc for SELECT_CB callback. Called when a color is selected.

type SelectionFunc

type SelectionFunc func(ih Ihandle, id, status int) int

SelectionFunc for SELECTION_CB callback. Action generated when a node is selected or deselected.

type ShowFunc

type ShowFunc func(ih Ihandle, state int) int

ShowFunc for SHOW_CB callback. Called right after the dialog is showed, hidden, maximized, minimized or restored from minimized/maximized.

type ShowRenameFunc

type ShowRenameFunc func(ih Ihandle, id int) int

ShowRenameFunc for SHOWRENAME_CB callback. Action generated when a node is about to be renamed.

type SpinFunc

type SpinFunc func(ih Ihandle, inc int) int

SpinFunc for SPIN_CB callback.

type SwapBuffersFunc

type SwapBuffersFunc func(Ihandle) int

SwapBuffersFunc for SWAPBUFFERS_CB callback. Action generated when GLSwapBuffers is called.

type SwitchFunc

type SwitchFunc func(ih Ihandle, primCell, secCell int) int

SwitchFunc for SWITCH_CB callback. Called when the user double clicks the preview area outside the preview cells to switch the primary and secondary selections.

type TabChangeFunc

type TabChangeFunc func(ih, new_tab, old_tab Ihandle) int

TabChangeFunc for TABCHANGE_CB callback.

type TabChangePosFunc

type TabChangePosFunc func(ih Ihandle, new_pos, old_pos int) int

TabChangePosFunc for TABCHANGEPOS_CB callback.

type TabCloseFunc

type TabCloseFunc func(Ihandle, int) int

TabCloseFunc for TABCLOSE_CB callback. Called when the user clicks on the close button.

type TextActionFunc

type TextActionFunc func(ih Ihandle, ch int, newValue string) int

TextActionFunc for Text ACTION callback. Action generated when the text is edited, but before its value is actually changed.

type ThreadFunc

type ThreadFunc func(ih Ihandle) int

ThreadFunc for THREAD_CB callback. Action generated when the thread is started. If this callback returns or does not exist the thread is terminated.

type TimerActionFunc

type TimerActionFunc func(ih Ihandle) int

TimerActionFunc for ACTION_CB callback. Called every time the defined time interval is reached. To stop the callback from being called simply stop the timer with RUN=NO.

type ToggleActionFunc

type ToggleActionFunc func(ih Ihandle, state int) int

ToggleActionFunc for Toggle ACTION callback. Action generated when the toggle's state (on/off) was changed.

type ToggleValueFunc

type ToggleValueFunc func(ih Ihandle, id, state int) int

ToggleValueFunc for TOGGLEVALUE_CB callback. Action generated when the toggle's state was changed.

type TrayClickFunc

type TrayClickFunc func(Ihandle, int, int, int) int

TrayClickFunc for TRAYCLICK_CB callback. Called right after the mouse button is pressed or released over the tray icon.

type UnmapFunc

type UnmapFunc func(Ihandle) int

UnmapFunc for UNMAP_CB callback. Called right before an element is unmapped.

https://www.tecgraf.puc-rio.br/iup/en/call/iup_unmap_cb.html

type ValueChangedFunc

type ValueChangedFunc func(ih Ihandle) int

ValueChangedFunc for VALUECHANGED_CB callback. Called after the value was interactively changed by the user.

type ValueChangingFunc

type ValueChangingFunc func(ih Ihandle, start int) int

ValueChangingFunc for VALUECHANGING_CB callback. Called when the value starts or ends to be interactively changed by the user.

type WheelFunc

type WheelFunc func(ih Ihandle, delta float64, x, y int, status string) int

WheelFunc for WHEEL_CB callback. Action generated when the mouse wheel is rotated.

Source Files

Directories

Path Synopsis
Package manifest provides a basic manifest for use with iup-go.
Package manifest provides a basic manifest for use with iup-go.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL