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
- func Alarm(title, msg, b1, b2, b3 string) int
- func ClassMatch(ih Ihandle, className string) bool
- func Close()
- func ConfigDialogClosed(ih, dialog Ihandle, name string)
- func ConfigDialogShow(ih, dialog Ihandle, name string)
- func ConfigGetVariableDouble(ih Ihandle, group, key string) float64
- func ConfigGetVariableDoubleDef(ih Ihandle, group, key string, def float64) float64
- func ConfigGetVariableDoubleId(ih Ihandle, group, key string, id int) float64
- func ConfigGetVariableDoubleIdDef(ih Ihandle, group, key string, id int, def float64) float64
- func ConfigGetVariableInt(ih Ihandle, group, key string) int
- func ConfigGetVariableIntDef(ih Ihandle, group, key string, def int) int
- func ConfigGetVariableIntId(ih Ihandle, group, key string, id int) int
- func ConfigGetVariableIntIdDef(ih Ihandle, group, key string, id int, def int) int
- func ConfigGetVariableStr(ih Ihandle, group, key string) string
- func ConfigGetVariableStrDef(ih Ihandle, group, key string, def string) string
- func ConfigGetVariableStrId(ih Ihandle, group, key string, id int) string
- func ConfigGetVariableStrIdDef(ih Ihandle, group, key string, id int, def string) string
- func ConfigLoad(ih Ihandle) int
- func ConfigSave(ih Ihandle) int
- func ConfigSetListVariable(ih Ihandle, group, key, value string, add int)
- func ConfigSetVariableDouble(ih Ihandle, group, key string, value float64)
- func ConfigSetVariableDoubleId(ih Ihandle, group, key string, id int, value float64)
- func ConfigSetVariableInt(ih Ihandle, group, key string, value int)
- func ConfigSetVariableIntId(ih Ihandle, group, key string, id int, value int)
- func ConfigSetVariableStr(ih Ihandle, group, key string, value string)
- func ConfigSetVariableStrId(ih Ihandle, group, key string, id int, value string)
- func ConvertXYToPos(ih Ihandle, x, y int) int
- func CopyClassAttributes(srcIh, dstIh Ihandle)
- func Destroy(ih Ihandle)
- func Detach(child Ihandle)
- func DrawArc(ih Ihandle, x1, y1, x2, y2 int, a1, a2 float64)
- func DrawBegin(ih Ihandle)
- func DrawEnd(ih Ihandle)
- func DrawFocusRect(ih Ihandle, x1, y1, x2, y2 int)
- func DrawGetClipRect(ih Ihandle) (x1, y1, x2, y2 int)
- func DrawGetImageInfo(name string) (w, h, bpp int)
- func DrawGetSize(ih Ihandle) (w, h int)
- func DrawGetTextSize(ih Ihandle, str string) (w, h int)
- func DrawImage(ih Ihandle, name string, x, y, w, h int)
- func DrawLine(ih Ihandle, x1, y1, x2, y2 int)
- func DrawParentBackground(ih Ihandle)
- func DrawPolygon(ih Ihandle, points []int, count int)
- func DrawRectangle(ih Ihandle, x1, y1, x2, y2 int)
- func DrawResetClip(ih Ihandle)
- func DrawSelectRect(ih Ihandle, x1, y1, x2, y2 int)
- func DrawSetClipRect(ih Ihandle, x1, y1, x2, y2 int)
- func DrawText(ih Ihandle, str string, x, y, w, h int)
- func Execute(fileName, parameters string) int
- func ExecuteWait(fileName, parameters string) int
- func ExitLoop()
- func Flush()
- func GetAllAttributes(ih Ihandle) (ret []string)
- func GetAllClasses() (names []string)
- func GetAllDialogs() (names []string)
- func GetAllNames() (names []string)
- func GetAttribute(ih Ihandle, name string) string
- func GetAttributeId(ih Ihandle, name string, id int) string
- func GetAttributeId2(ih Ihandle, name string, lin, col int) string
- func GetAttributes(ih Ihandle) string
- func GetCallback(ih Ihandle, name string) uintptr
- func GetChildCount(ih Ihandle) int
- func GetChildPos(ih, child Ihandle) int
- func GetClassAttributes(className string) (names []string)
- func GetClassCallbacks(className string) (names []string)
- func GetClassName(ih Ihandle) string
- func GetClassType(ih Ihandle) string
- func GetColor(x, y int) (ret int, col color.RGBA)
- func GetDouble(ih Ihandle, name string) float64
- func GetDoubleId(ih Ihandle, name string, id int) float64
- func GetDoubleId2(ih Ihandle, name string, lin, col int) float64
- func GetFile(path string) (sel string, ret int)
- func GetFloat(ih Ihandle, name string) float32
- func GetFloatId(ih Ihandle, name string, id int) float32
- func GetFloatId2(ih Ihandle, name string, lin, col int) float32
- func GetFunction(name string) uintptr
- func GetGlobal(name string) string
- func GetGlobalPtr(name string) uintptr
- func GetInt(ih Ihandle, name string) int
- func GetInt2(ih Ihandle, name string) (count, i1, i2 int)
- func GetIntId(ih Ihandle, name string, id int) int
- func GetIntId2(ih Ihandle, name string, lin, col int) int
- func GetLanguage() string
- func GetLanguageString(name string) string
- func GetName(ih Ihandle) string
- func GetPtr(ih Ihandle, name string) uintptr
- func GetPtrId(ih Ihandle, name string, id int) uintptr
- func GetPtrId2(ih Ihandle, name string, lin, col int) uintptr
- func GetRGB(ih Ihandle, name string) (r, g, b uint8)
- func GetRGBA(ih Ihandle, name string) (r, g, b, a uint8)
- func GetRGBId(ih Ihandle, name string, id int) (r, g, b uint8)
- func GetRGBId2(ih Ihandle, name string, lin, col int) (r, g, b uint8)
- func GetText(title, text string) string
- func Help(url string) int
- func Hide(ih Ihandle) int
- func IsAlt(s string) bool
- func IsAltXKey(c int) bool
- func IsButton1(s string) bool
- func IsButton2(s string) bool
- func IsButton3(s string) bool
- func IsButton4(s string) bool
- func IsButton5(s string) bool
- func IsControl(s string) bool
- func IsCtrlXKey(c int) bool
- func IsDouble(s string) bool
- func IsPrint(c int) bool
- func IsShift(s string) bool
- func IsShiftXKey(c int) bool
- func IsSys(s string) bool
- func IsSysXKey(c int) bool
- func IsXKey(c int) bool
- func ListDialog(_type int, title string, list []string, op, maxCol, maxLin int, marks *[]bool) (ret int)
- func Log(_type, str string)
- func LoopStep() (ret int)
- func LoopStepWait() (ret int)
- func MainLoop() (ret int)
- func MainLoopLevel() (ret int)
- func Map(ih Ihandle) int
- func Message(title, msg string)
- func MessageAlarm(parent Ihandle, title, msg, buttons string)
- func MessageError(parent Ihandle, msg string)
- func Open() int
- func PlayInput(fileName string) int
- func Popup(ih Ihandle, x, y int) int
- func PostMessage(ih Ihandle, s string, i int, p any)
- func RecordInput(fileName string, mode int) int
- func Redraw(ih Ihandle, children int)
- func Refresh(ih Ihandle)
- func RefreshChildren(ih Ihandle)
- func Reparent(ih, newParent, refChild Ihandle) int
- func ResetAttribute(ih Ihandle, name string)
- func SaveClassAttributes(ih Ihandle)
- func SetAttribute(ih Ihandle, name string, value interface{})
- func SetAttributeHandle(ih Ihandle, name string, ihNamed Ihandle)
- func SetAttributeId(ih Ihandle, name string, id int, value interface{})
- func SetAttributeId2(ih Ihandle, name string, lin, col int, value interface{})
- func SetCallback(ih Ihandle, name string, fn interface{})
- func SetClassDefaultAttribute(className, name, value string)
- func SetFunction(name string, fn interface{})
- func SetGlobal(name string, value interface{})
- func SetLanguage(lng string)
- func SetLanguagePack(ih Ihandle)
- func SetLanguageString(name, str string)
- func SetRGB(ih Ihandle, name string, r, g, b uint8)
- func SetRGBA(ih Ihandle, name string, r, g, b, a uint8)
- func SetRGBId(ih Ihandle, name string, id int, r, g, b uint8)
- func SetRGBId2(ih Ihandle, name string, lin, col int, r, g, b uint8)
- func Show(ih Ihandle) int
- func ShowXY(ih Ihandle, x, y int) int
- func StringCompare(str1, str2 string, caseSensitive, lexicographic bool) int
- func TextConvertLinColToPos(ih Ihandle, lin, col int) (pos int)
- func TextConvertPosToLinCol(ih Ihandle, pos int) (lin, col int)
- func TreeSetAttributeHandle(ih Ihandle, name string, id int, ihNamed Ihandle)
- func Unmap(ih Ihandle)
- func Update(ih Ihandle)
- func UpdateChildren(ih Ihandle)
- func Version() string
- func VersionDate() string
- func VersionNumber() int
- func XKeyAlt(c int) int
- func XKeyBase(c int) int
- func XKeyCtrl(c int) int
- func XKeyShift(c int) int
- func XKeySys(c int) int
- type ActionFunc
- type BranchCloseFunc
- type BranchOpenFunc
- type ButtonFunc
- type ButtonPressFunc
- type ButtonReleaseFunc
- type CancelFunc
- type CanvasActionFunc
- type CaretFunc
- type CellFunc
- type ChangeFunc
- type CloseFunc
- type DblclickFunc
- type DestroyFunc
- type DetachedFunc
- type DragDropFunc
- type DragFunc
- type DropDownFunc
- type DropFilesFunc
- type DropShowFunc
- type EditFunc
- type EnterWindowFunc
- type EntryPointFunc
- type ExecuteBranchFunc
- type ExecuteLeafFunc
- type ExitFunc
- type ExtendedFunc
- type ExtraButtonFunc
- type FlatActionFunc
- type FlatListActionFunc
- type FlatToggleActionFunc
- type FocusFunc
- type GetFocusFunc
- type HelpFunc
- type IdleFunc
- type Ihandle
- func AnimatedLabel(animation Ihandle) Ihandle
- func Append(ih, child Ihandle) Ihandle
- func BackgroundBox(child Ihandle) Ihandle
- func Button(title string) Ihandle
- func Calendar() Ihandle
- func Canvas() Ihandle
- func Cbox(children ...Ihandle) Ihandle
- func ClassInfoDialog(dialog Ihandle) Ihandle
- func Clipboard() Ihandle
- func ColorBar() Ihandle
- func ColorBrowser() Ihandle
- func ColorDlg() Ihandle
- func Config() Ihandle
- func Create(className string) Ihandle
- func DatePick() Ihandle
- func DetachBox(child Ihandle) Ihandle
- func Dial(orientation string) Ihandle
- func Dialog(child Ihandle) Ihandle
- func DropButton(dropchild Ihandle) Ihandle
- func ElementPropertiesDialog(parent, elem Ihandle) Ihandle
- func Expander(child Ihandle) Ihandle
- func FileDlg() Ihandle
- func Fill() Ihandle
- func FlatButton(title string) Ihandle
- func FlatFrame(child Ihandle) Ihandle
- func FlatLabel(title string) Ihandle
- func FlatList() Ihandle
- func FlatScrollBox(child Ihandle) Ihandle
- func FlatSeparator() Ihandle
- func FlatTabs(children ...Ihandle) Ihandle
- func FlatToggle(title string) Ihandle
- func FlatTree() Ihandle
- func FlatVal(orientation string) Ihandle
- func FontDlg() Ihandle
- func Frame(child Ihandle) Ihandle
- func Gauge() Ihandle
- func GetAttributeHandle(ih Ihandle, name string) Ihandle
- func GetBrother(ih Ihandle) Ihandle
- func GetChild(ih Ihandle, pos int) Ihandle
- func GetDialog(ih Ihandle) Ihandle
- func GetDialogChild(ih Ihandle, name string) Ihandle
- func GetFocus() Ihandle
- func GetGlobalIh(name string) Ihandle
- func GetHandle(name string) Ihandle
- func GetNextChild(ih, child Ihandle) Ihandle
- func GetParent(ih Ihandle) Ihandle
- func GlobalsDialog() Ihandle
- func GridBox(children ...Ihandle) Ihandle
- func Hbox(children ...Ihandle) Ihandle
- func Image(width, height int, pixMap []byte) Ihandle
- func ImageFromImage(i image.Image) Ihandle
- func ImageRGB(width, height int, pixMap []byte) Ihandle
- func ImageRGBA(width, height int, pixMap []byte) Ihandle
- func Insert(ih, refChild, child Ihandle) Ihandle
- func Item(title string) Ihandle
- func Label(title string) Ihandle
- func LayoutDialog(dialog Ihandle) Ihandle
- func Link(url, title string) Ihandle
- func List() Ihandle
- func Menu(children ...Ihandle) Ihandle
- func MessageDlg() Ihandle
- func MultiBox(children ...Ihandle) Ihandle
- func MultiLine() Ihandle
- func NextField(ih Ihandle) Ihandle
- func Normalizer(ihList ...Ihandle) Ihandle
- func PreviousField(ih Ihandle) Ihandle
- func ProgressBar() Ihandle
- func ProgressDlg() Ihandle
- func Radio(child Ihandle) Ihandle
- func Sbox(child Ihandle) Ihandle
- func ScrollBox(child Ihandle) Ihandle
- func Separator() Ihandle
- func SetAtt(ih Ihandle, handle_name string, args ...string) Ihandle
- func SetAttributes(ih Ihandle, str string) Ihandle
- func SetAttrs(ih Ihandle, args ...string) Ihandle
- func SetFocus(ih Ihandle) Ihandle
- func SetHandle(name string, ih Ihandle) Ihandle
- func Space() Ihandle
- func Spin() Ihandle
- func SpinBox(child Ihandle) Ihandle
- func Split(child1, child2 Ihandle) Ihandle
- func Submenu(title string, child Ihandle) Ihandle
- func Tabs(children ...Ihandle) Ihandle
- func Text() Ihandle
- func Thread() Ihandle
- func Timer() Ihandle
- func Toggle(title string) Ihandle
- func Tree() Ihandle
- func User() Ihandle
- func Val(_type string) Ihandle
- func Vbox(children ...Ihandle) Ihandle
- func Zbox(children ...Ihandle) Ihandle
- func (ih Ihandle) Destroy()
- func (ih Ihandle) GetAllAttributes() []string
- func (ih Ihandle) GetAttribute(name string, ids ...interface{}) string
- func (ih Ihandle) GetCallback(name string) uintptr
- func (ih Ihandle) GetDouble(name string, ids ...interface{}) float64
- func (ih Ihandle) GetFloat(name string, ids ...interface{}) float32
- func (ih Ihandle) GetInt(name string, ids ...interface{}) int
- func (ih Ihandle) GetPtr(name string, ids ...interface{}) uintptr
- func (ih Ihandle) GetRGB(name string, ids ...interface{}) (r, g, b uint8)
- func (ih Ihandle) ResetAttribute(name string) Ihandle
- func (ih Ihandle) SetAttribute(name string, value ...interface{}) Ihandle
- func (ih Ihandle) SetAttributes(params ...interface{}) Ihandle
- func (ih Ihandle) SetCallback(name string, fn interface{}) Ihandle
- func (ih Ihandle) SetHandle(name string) Ihandle
- type KAnyFunc
- type KeyPressFunc
- type KillFocusFunc
- type LeaveWindowFunc
- type LinkActionFunc
- type ListActionFunc
- type MapFunc
- type MenuOpenFunc
- type MotionFunc
- type MouseMoveFunc
- type MoveFunc
- type MultiSelectionFunc
- type MultiUnselectionFunc
- type MultiselectFunc
- type NodeRemovedFunc
- type OpenCloseFunc
- type PostMessageFunc
- type RenameFunc
- type ResizeFunc
- type RestoredFunc
- type RightClickFunc
- type ScrollFunc
- type SelectFunc
- type SelectionFunc
- type ShowFunc
- type ShowRenameFunc
- type SpinFunc
- type SwapBuffersFunc
- type SwitchFunc
- type TabChangeFunc
- type TabChangePosFunc
- type TabCloseFunc
- type TextActionFunc
- type ThreadFunc
- type TimerActionFunc
- type ToggleActionFunc
- type ToggleValueFunc
- type TrayClickFunc
- type UnmapFunc
- type ValueChangedFunc
- type ValueChangingFunc
- type WheelFunc
Constants ¶
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
const ( ERROR = 1 NOERROR = 0 OPENED = -1 INVALID = -1 INVALID_ID = -10 )
Common flags and return values
const ( IGNORE = -1 DEFAULT = -2 CLOSE = -3 CONTINUE = -4 )
Callback return values
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
const ( SHOW = iota RESTORE MINIMIZE MAXIMIZE HIDE )
SHOW_CB callback values
const ( SBUP = iota SBDN SBPGUP SBPGDN SBPOSV SBDRAGV SBLEFT SBRIGHT SBPGLEFT SBPGRIGHT SBPOSH SBDRAGH )
SCROLL_CB callback values
const ( BUTTON1 = '1' BUTTON2 = '2' BUTTON3 = '3' BUTTON4 = '4' BUTTON5 = '5' )
Mouse button values and macros
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
const ( PRIMARY = -1 SECONDARY = -2 )
Used by Colorbar
const ( RECBINARY = iota RECTEXT )
Record input modes
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.
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
const ( K_quoteleft = K_grave K_quoteright = K_apostrophe )
Backward compatible definitions
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.
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
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 ClassMatch ¶
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.
func ConfigDialogClosed ¶
ConfigDialogClosed save the last dialog position and size when the dialog is about to be closed, usually inside the dialog CLOSE_CB callback..
func ConfigDialogShow ¶
ConfigDialogShow show the dialog adjusting its size and position..
func ConfigGetVariableDouble ¶
ConfigGetVariableDouble .
func ConfigGetVariableDoubleDef ¶
ConfigGetVariableDoubleDef .
func ConfigGetVariableDoubleId ¶
ConfigGetVariableDoubleId .
func ConfigGetVariableDoubleIdDef ¶
ConfigGetVariableDoubleIdDef .
func ConfigGetVariableInt ¶
ConfigGetVariableInt .
func ConfigGetVariableIntDef ¶
ConfigGetVariableIntDef .
func ConfigGetVariableIntId ¶
ConfigGetVariableIntId .
func ConfigGetVariableIntIdDef ¶
ConfigGetVariableIntIdDef .
func ConfigGetVariableStr ¶
ConfigGetVariableStr .
func ConfigGetVariableStrDef ¶
ConfigGetVariableStrDef .
func ConfigGetVariableStrId ¶
ConfigGetVariableStrId .
func ConfigGetVariableStrIdDef ¶
ConfigGetVariableStrIdDef .
func ConfigLoad ¶
ConfigLoad loads the configuration file.
func ConfigSave ¶
ConfigSave saves the configuration file.
func ConfigSetListVariable ¶
ConfigSetListVariable .
func ConfigSetVariableDouble ¶
ConfigSetVariableDouble .
func ConfigSetVariableDoubleId ¶
ConfigSetVariableDoubleId .
func ConfigSetVariableInt ¶
ConfigSetVariableInt .
func ConfigSetVariableIntId ¶
ConfigSetVariableIntId .
func ConfigSetVariableStr ¶
ConfigSetVariableStr .
func ConfigSetVariableStrId ¶
ConfigSetVariableStrId .
func ConvertXYToPos ¶
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.
func DrawArc ¶
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.
func DrawEnd ¶
func DrawEnd(ih Ihandle)
DrawEnd terminates the drawing process and actually draw on screen..
func DrawFocusRect ¶
DrawFocusRect draws a focus rectangle.
func DrawGetClipRect ¶
DrawGetClipRect returns the previous rectangular clipping region set by DrawSetClipRect, if clipping was reset returns 0 in all values.
func DrawGetImageInfo ¶
DrawGetImageInfo returns the given image size and bits per pixel. bpp can be 8, 24 or 32.
func DrawGetSize ¶
DrawGetSize returns the drawing area size.
func DrawGetTextSize ¶
DrawGetTextSize returns the given text size using the font defined by DRAWFONT, if not defined then use FONT.
func DrawImage ¶
DrawImage draws an image given its name. The coordinates are relative the top-left corner of the image.
func DrawParentBackground ¶
func DrawParentBackground(ih Ihandle)
DrawParentBackground fills the canvas with the native parent background color.
func DrawPolygon ¶
DrawPolygon draws a polygon. Coordinates are stored in the array in the sequence: x1, y1, x2, y2, ...
func DrawRectangle ¶
DrawRectangle draws a rectangle including start and end points.
func DrawSelectRect ¶
DrawSelectRect draws a selection rectangle.
func DrawSetClipRect ¶
DrawSetClipRect defines a rectangular clipping region.
func DrawText ¶
DrawText draws a text in the given position using the font defined by DRAWFONT, if not defined then use FONT.
func Execute ¶
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.
func ExecuteWait ¶
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.
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.
func GetAllAttributes ¶
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 ¶
GetAttribute returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func GetAttributeId ¶
GetAttributeId returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func GetAttributeId2 ¶
GetAttributeId2 returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func GetAttributes ¶
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 ¶
GetCallback returns the callback associated to an event.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetcallback.html
func GetChildCount ¶
GetChildCount returns the number of children of the given control.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetchildcount.html
func GetChildPos ¶
GetChildPos returns the position of a child of the given control.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetchildpos.html
func GetClassAttributes ¶
GetClassAttributes returns the names of all registered attributes of a class.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetclassattributes.html
func GetClassCallbacks ¶
GetClassCallbacks returns the names of all registered callbacks of a class.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetclasscallbacks.html
func GetClassName ¶
GetClassName returns the name of the class of an interface element.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetclassname.html
func GetClassType ¶
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 ¶
GetColor shows a modal dialog which allows the user to select a color. Based on ColorDlg.
func GetDouble ¶
GetDouble returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func GetDoubleId ¶
GetDoubleId returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func GetDoubleId2 ¶
GetDoubleId2 returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func GetFile ¶
GetFile shows a modal dialog of the native interface system to select a filename. Uses the FileDlg element.
func GetFloat ¶
GetFloat returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func GetFloatId ¶
GetFloatId returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func GetFloatId2 ¶
GetFloatId2 returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func GetFunction ¶
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 ¶
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 ¶
GetGlobalPtr returns an attribute value from the global environment.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetglobal.html
func GetInt ¶
GetInt returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func GetInt2 ¶
GetInt2 returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func GetIntId ¶
GetIntId returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func GetIntId2 ¶
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 ¶
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 ¶
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.
func GetRGB ¶
GetRGB returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func GetRGBA ¶
GetRGBA returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func GetRGBId ¶
GetRGBId returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func GetRGBId2 ¶
GetRGBId2 returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func Help ¶
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.
func Hide ¶
Hide hides an interface element. This function has the same effect as attributing value "NO" to the interface element’s VISIBLE attribute.
func IsAlt ¶
IsAlt mouse button macro.
https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html
func IsButton1 ¶
IsButton1 mouse button macro.
https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html
func IsButton2 ¶
IsButton2 mouse button macro.
https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html
func IsButton3 ¶
IsButton3 mouse button macro.
https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html
func IsButton4 ¶
IsButton4 mouse button macro.
https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html
func IsButton5 ¶
IsButton5 mouse button macro.
https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html
func IsControl ¶
IsControl mouse button macro.
https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html
func IsCtrlXKey ¶
IsCtrlXKey informs if a given key is an extended code using the Ctrl modifier.
func IsDouble ¶
IsDouble mouse button macro.
https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html
func IsShift ¶
IsShift mouse button macro.
https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.html
func IsShiftXKey ¶
IsShiftXKey informs if a given key is an extended code using the Shift modifier.
func IsSys ¶
IsSys mouse button macro.
https://www.tecgraf.puc-rio.br/iup/en/call/iup_button_cb.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.
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.
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.
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.
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 ¶
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.
func Message ¶
func Message(title, msg string)
Message shows a modal dialog containing a message. It simply creates and popup a MessageDlg.
func MessageAlarm ¶
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 ¶
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.
func PlayInput ¶
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 ¶
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.
func PostMessage ¶
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 ¶
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 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.
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 ¶
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.
func ResetAttribute ¶
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 ¶
SetAttribute sets an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html
func SetAttributeHandle ¶
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 ¶
SetAttributeId sets an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html
func SetAttributeId2 ¶
SetAttributeId2 sets an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html
func SetCallback ¶
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 ¶
SetRGB sets an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html
func SetRGBA ¶
SetRGBA sets an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html
func SetRGBId ¶
SetRGBId sets an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html
func SetRGBId2 ¶
SetRGBId2 sets an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html
func StringCompare ¶
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 ¶
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".
func TextConvertPosToLinCol ¶
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".
func TreeSetAttributeHandle ¶
TreeSetAttributeHandle .
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.
func Update ¶
func Update(ih Ihandle)
Update mark the element or its children to be redraw when the control returns to the system.
func UpdateChildren ¶
func UpdateChildren(ih Ihandle)
UpdateChildren mark the element or its children to be redraw when the control returns to the system.
func VersionDate ¶
func VersionDate() string
VersionDate returns a string with the IUP version date.
func VersionNumber ¶
func VersionNumber() int
VersionNumber returns a string with the IUP version number.
Types ¶
type ActionFunc ¶
ActionFunc for ACTION callback. Action generated when the element is activated. Affects each element differently.
type BranchCloseFunc ¶
BranchCloseFunc for BRANCHCLOSE_CB callback. Action generated when a branch is collapsed.
type BranchOpenFunc ¶
BranchOpenFunc for BRANCHOPEN_CB callback. Action generated when a branch is expanded.
type ButtonFunc ¶
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 ¶
ButtonPressFunc for BUTTON_PRESS_CB callback. Called when the user presses the left mouse button over the dial.
type ButtonReleaseFunc ¶
ButtonReleaseFunc for BUTTON_RELEASE_CB callback. Called when the user releases the left mouse button after pressing it over the dial.
type CancelFunc ¶
CancelFunc for CANCEL_CB callback. Action generated when the user clicked on the Cancel button.
type CanvasActionFunc ¶
CanvasActionFunc for Canvas ACTION callback. Action generated when the canvas needs to be redrawn.
type CaretFunc ¶
CaretFunc for CARET_CB callback. Action generated when the caret/cursor position is changed.
type CellFunc ¶
CellFunc for CELL_CB callback. Called when the user double clicks a color cell to change its value.
type ChangeFunc ¶
ChangeFunc for CHANGE_CB callback. Called when the user releases the left mouse button over the control, defining the selected color.
type CloseFunc ¶
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 ¶
DblclickFunc for DBLCLICK_CB callback. Action generated when the user double click an item.
type DestroyFunc ¶
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 ¶
DetachedFunc for DETACHED_CB callback.
type DragDropFunc ¶
DragDropFunc for DRAGDROP_CB callback. Action generated when an internal drag and drop is executed.
type DragFunc ¶
DragFunc for DRAG_CB callback. Called several times while the color is being changed by dragging the mouse over the control.
type DropDownFunc ¶
DropDownFunc for DROPDOWN_CB callback. Action generated right before the drop child is shown or hidden.
type DropFilesFunc ¶
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 ¶
DropShowFunc for DROPSHOW_CB callback. Action generated right after the drop child is shown or hidden.
type EnterWindowFunc ¶
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 ¶
ExecuteBranchFunc for EXECUTEBRANCH_CB callback. Action generated when a branch is executed.
type ExecuteLeafFunc ¶
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.
type ExtendedFunc ¶
ExtendedFunc for EXTENDED_CB callback. Called when the user right click a cell with the Shift key pressed.
type ExtraButtonFunc ¶
ExtraButtonFunc for EXTRABUTTON_CB callback. Action generated when any mouse button is pressed or released.
type FlatActionFunc ¶
FlatActionFunc for FLAT_ACTION callback. Action generated when the button 1 (usually left) is selected.
type FlatListActionFunc ¶
FlatListActionFunc for FlatList FLAT_ACTION callback. Action generated when the state of an item in the list is interactively changed.
type FlatToggleActionFunc ¶
FlatToggleActionFunc for FlatToggle FLAT_ACTION callback. Action generated when the toggle's state (on/off) was changed.
type FocusFunc ¶
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 ¶
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 ¶
HelpFunc for HELP_CB callback. Action generated when the user press F1 at a control.
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 ¶
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 ¶
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.
func BackgroundBox ¶
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 ¶
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.
func Calendar ¶
func Calendar() Ihandle
Calendar creates a month calendar interface element, where the user can select a date.
func Canvas ¶
func Canvas() Ihandle
Canvas creates an interface element that is a canvas - a working area for your application.
func Cbox ¶
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.
func ClassInfoDialog ¶
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.
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.
func Config ¶
func Config() Ihandle
Config creates a new configuration database. To destroy it use the Destroy function.
func Create ¶
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.
func DatePick ¶
func DatePick() Ihandle
DatePick creates a date editing interface element, which can displays a calendar for selecting a date.
func DetachBox ¶
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 Dialog ¶
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.
func DropButton ¶
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 ¶
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 ¶
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.
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.
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.
func FlatButton ¶
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 ¶
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 ¶
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.
func FlatScrollBox ¶
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 ¶
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.
func FlatToggle ¶
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.
func FlatVal ¶
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.
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.
func Gauge ¶
func Gauge() Ihandle
Gauge creates a Gauge control. Shows a percent value that can be updated to simulate a progression.
func GetAttributeHandle ¶
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 ¶
GetBrother returns the brother of an element.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetbrother.html
func GetDialog ¶
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 ¶
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.
func GetGlobalIh ¶
GetGlobalIh returns an attribute value from the global environment.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetglobal.html
func GetHandle ¶
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 ¶
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 ¶
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 ¶
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.
func Hbox ¶
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.
func ImageFromImage ¶
ImageFromImage creates an image from image.Image.
func Insert ¶
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.
func Item ¶
Item creates an item of the menu interface element. When selected, it generates an action.
func Label ¶
Label creates a label interface element, which displays a separator, a text or an image.
func LayoutDialog ¶
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 ¶
Link creates a label that displays an underlined clickable text. It inherits from Label.
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.
func Menu ¶
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.
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 ¶
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.
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 ¶
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 ¶
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 ¶
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 ¶
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.
func Sbox ¶
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.
func ScrollBox ¶
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 SetAttributes ¶
SetAttributes sets several attributes of an interface element.
https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattributes.html
func SetAttrs ¶
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 ¶
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.
func SetHandle ¶
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.
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.
func Split ¶
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.
func Tabs ¶
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.
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.
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.
func Toggle ¶
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.
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.
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.
func Val ¶
Val creates a Valuator control. Selects a value in a limited interval. Also known as Scale or Trackbar in native systems.
func Vbox ¶
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.
func Zbox ¶
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.
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.
func (Ihandle) GetAllAttributes ¶
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 ¶
GetAttribute returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func (Ihandle) GetCallback ¶
GetCallback returns the callback associated to an event.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetcallback.html
func (Ihandle) GetDouble ¶
GetDouble returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func (Ihandle) GetFloat ¶
GetFloat returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func (Ihandle) GetInt ¶
GetInt returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func (Ihandle) GetRGB ¶
GetRGB returns the name of an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupgetattribute.html
func (Ihandle) ResetAttribute ¶
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 ¶
SetAttribute sets an interface element attribute.
https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattribute.html
func (Ihandle) SetAttributes ¶
SetAttributes sets several attributes of an interface element.
https://www.tecgraf.puc-rio.br/iup/en/func/iupsetattributes.html
func (Ihandle) SetCallback ¶
SetCallback associates a callback to an event.
https://www.tecgraf.puc-rio.br/iup/en/func/iupsetcallback.html
type KeyPressFunc ¶
KeyPressFunc for KEYPRESS_CB callback. Action generated when a key is pressed or released.
type KillFocusFunc ¶
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 ¶
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 ¶
LinkActionFunc for Link ACTION callback.
type ListActionFunc ¶
ListActionFunc for List ACTION callback. Action generated when the state of an item in the list is changed.
type MapFunc ¶
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.
type MenuOpenFunc ¶
MenuOpenFunc for OPEN_CB callback. Called just before the menu is opened.
type MotionFunc ¶
MotionFunc for MOTION_CB callback. Action generated when the mouse is moved over the list.
type MouseMoveFunc ¶
MouseMoveFunc for MOUSEMOVE_CB callback.
type MultiSelectionFunc ¶
MultiSelectionFunc for MULTISELECTION_CB callback. Action generated after a continuous range of nodes is selected in one single operation.
type MultiUnselectionFunc ¶
MultiUnselectionFunc for MULTIUNSELECTION_CB callback. Action generated before multiple nodes are unselected in one single operation.
type MultiselectFunc ¶
MultiselectFunc for MULTISELECT_CB callback. Action generated when the state of an item in the multiple selection list is changed.
type NodeRemovedFunc ¶
NodeRemovedFunc for NODEREMOVED_CB callback.
type OpenCloseFunc ¶
OpenCloseFunc for OPENCLOSE_CB callback. Action generated before the expander state is interactively changed.
type PostMessageFunc ¶
PostMessageFunc for POSTMESSAGE_CB callback.
type RenameFunc ¶
RenameFunc for RENAME_CB callback. Action generated after a node was renamed in place.
type ResizeFunc ¶
ResizeFunc for RESIZE_CB callback. Action generated when the canvas or dialog size is changed.
type RestoredFunc ¶
RestoredFunc for RESTORED_CB callback. Called when the box is restored if RESTOREWHENCLOSED=Yes.
type RightClickFunc ¶
RightClickFunc for RIGHTCLICK_CB callback. Called when the user clicks on some tab using the right mouse button.
type ScrollFunc ¶
ScrollFunc for SCROLL_CB callback. Called when the scrollbar is manipulated.
type SelectFunc ¶
SelectFunc for SELECT_CB callback. Called when a color is selected.
type SelectionFunc ¶
SelectionFunc for SELECTION_CB callback. Action generated when a node is selected or deselected.
type ShowFunc ¶
ShowFunc for SHOW_CB callback. Called right after the dialog is showed, hidden, maximized, minimized or restored from minimized/maximized.
type ShowRenameFunc ¶
ShowRenameFunc for SHOWRENAME_CB callback. Action generated when a node is about to be renamed.
type SwapBuffersFunc ¶
SwapBuffersFunc for SWAPBUFFERS_CB callback. Action generated when GLSwapBuffers is called.
type SwitchFunc ¶
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 ¶
TabChangeFunc for TABCHANGE_CB callback.
type TabChangePosFunc ¶
TabChangePosFunc for TABCHANGEPOS_CB callback.
type TabCloseFunc ¶
TabCloseFunc for TABCLOSE_CB callback. Called when the user clicks on the close button.
type TextActionFunc ¶
TextActionFunc for Text ACTION callback. Action generated when the text is edited, but before its value is actually changed.
type ThreadFunc ¶
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 ¶
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 ¶
ToggleActionFunc for Toggle ACTION callback. Action generated when the toggle's state (on/off) was changed.
type ToggleValueFunc ¶
ToggleValueFunc for TOGGLEVALUE_CB callback. Action generated when the toggle's state was changed.
type TrayClickFunc ¶
TrayClickFunc for TRAYCLICK_CB callback. Called right after the mouse button is pressed or released over the tray icon.
type UnmapFunc ¶
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 ¶
ValueChangedFunc for VALUECHANGED_CB callback. Called after the value was interactively changed by the user.
type ValueChangingFunc ¶
ValueChangingFunc for VALUECHANGING_CB callback. Called when the value starts or ends to be interactively changed by the user.
Source Files ¶
- bind_attributes.go
- bind_callbacks.go
- bind_cgo.go
- bind_config.go
- bind_constants.go
- bind_containers.go
- bind_controls.go
- bind_dialogs.go
- bind_doc.go
- bind_draw.go
- bind_events.go
- bind_handle.go
- bind_input.go
- bind_iup.go
- bind_layout.go
- bind_management.go
- bind_resources.go
- core_iup.go
- core_iup_animatedlabel.go
- core_iup_array.go
- core_iup_assert.go
- core_iup_attrib.go
- core_iup_backgroundbox.go
- core_iup_box.go
- core_iup_button.go
- core_iup_callback.go
- core_iup_canvas.go
- core_iup_cbox.go
- core_iup_childtree.go
- core_iup_class.go
- core_iup_classattrib.go
- core_iup_classbase.go
- core_iup_classinfo.go
- core_iup_colorbar.go
- core_iup_colorbrowser.go
- core_iup_colordlg.go
- core_iup_colorhsi.go
- core_iup_config.go
- core_iup_datepick.go
- core_iup_detachbox.go
- core_iup_dial.go
- core_iup_dialog.go
- core_iup_dlglist.go
- core_iup_draw.go
- core_iup_dropbutton.go
- core_iup_elempropdlg.go
- core_iup_expander.go
- core_iup_export.go
- core_iup_filedlg.go
- core_iup_fill.go
- core_iup_flatbutton.go
- core_iup_flatframe.go
- core_iup_flatlabel.go
- core_iup_flatlist.go
- core_iup_flatscrollbar.go
- core_iup_flatscrollbox.go
- core_iup_flatseparator.go
- core_iup_flattabs.go
- core_iup_flattoggle.go
- core_iup_flattree.go
- core_iup_flatval.go
- core_iup_focus.go
- core_iup_font.go
- core_iup_fontdlg.go
- core_iup_frame.go
- core_iup_func.go
- core_iup_gauge.go
- core_iup_getparam.go
- core_iup_globalattrib.go
- core_iup_globalsdlg.go
- core_iup_gridbox.go
- core_iup_hbox.go
- core_iup_image.go
- core_iup_key.go
- core_iup_label.go
- core_iup_layout.go
- core_iup_layoutdlg.go
- core_iup_ledlex.go
- core_iup_ledparse.go
- core_iup_linefile.go
- core_iup_link.go
- core_iup_list.go
- core_iup_loop.go
- core_iup_mask.go
- core_iup_maskmatch.go
- core_iup_maskparse.go
- core_iup_menu.go
- core_iup_messagedlg.go
- core_iup_multibox.go
- core_iup_names.go
- core_iup_normalizer.go
- core_iup_object.go
- core_iup_open.go
- core_iup_predialogs.go
- core_iup_progressbar.go
- core_iup_progressdlg.go
- core_iup_radio.go
- core_iup_recplay.go
- core_iup_register.go
- core_iup_sbox.go
- core_iup_scanf.go
- core_iup_scrollbox.go
- core_iup_show.go
- core_iup_space.go
- core_iup_spin.go
- core_iup_split.go
- core_iup_str.go
- core_iup_strmessage.go
- core_iup_table.go
- core_iup_tabs.go
- core_iup_text.go
- core_iup_thread.go
- core_iup_timer.go
- core_iup_toggle.go
- core_iup_tree.go
- core_iup_user.go
- core_iup_val.go
- core_iup_vbox.go
- core_iup_zbox.go
- unix_iupgtk_button.go
- unix_iupgtk_calendar.go
- unix_iupgtk_canvas.go
- unix_iupgtk_clipboard.go
- unix_iupgtk_common.go
- unix_iupgtk_dialog.go
- unix_iupgtk_dragdrop.go
- unix_iupgtk_draw_cairo.go
- unix_iupgtk_filedlg.go
- unix_iupgtk_focus.go
- unix_iupgtk_font.go
- unix_iupgtk_fontdlg.go
- unix_iupgtk_frame.go
- unix_iupgtk_globalattrib.go
- unix_iupgtk_help.go
- unix_iupgtk_image.go
- unix_iupgtk_info.go
- unix_iupgtk_key.go
- unix_iupgtk_label.go
- unix_iupgtk_list.go
- unix_iupgtk_loop.go
- unix_iupgtk_menu.go
- unix_iupgtk_messagedlg.go
- unix_iupgtk_open.go
- unix_iupgtk_progressbar.go
- unix_iupgtk_str.go
- unix_iupgtk_tabs.go
- unix_iupgtk_text.go
- unix_iupgtk_timer.go
- unix_iupgtk_tips.go
- unix_iupgtk_toggle.go
- unix_iupgtk_tree.go
- unix_iupgtk_val.go
- unix_iupunix_info.go