public Dialog(string title = null) : base(null, Iup.Dialog(null)) { Handle.SetCallback("SHOW_CB", new CBShow((h, state) => { return(_internalOnShow(h, state)); })); Handle.SetCallback("CLOSE_CB", new CBDefault((h) => { return(OnClose(h)); })); Handle.SetCallback("COPYDATA_CB", new CBCopyData((h, cmdlin, size) => { return(OnCopyData(h, cmdlin, size)); })); Handle.SetCallback("MOVE_CB", new CBMove((h, x, y) => { return(OnMove(h, x, y)); })); Handle.SetCallback("RESIZE_CB", new CBResize((h, wi, he) => { return(OnResize(h, wi, he)); })); Handle.SetCallback("TRAYCLICK_CB", new CBTrayClick((h, butidx, pressed, dclick) => { return(OnTrayClick(h, butidx, pressed, dclick)); })); if (title != null) { this.Title = title; } }
static void Main() { Iup.Open(); IupControls.Open(); IupGL.Open(); IupHandle button, bkbox; using (IupHandle dlg = Iup.Dialog( Iup.Vbox( LabelText("Namn:"), LabelText("Adress:"), LabelText("Gata:"), button = Iup.Button("OK") ).SetAttributes("ALIGNMENT=ARIGHT,NGAP=4") ) ) { //openitem.SetCallback ("K_cO", new CallbackKeyPressCB (OnKeyPress)); byte[] img = new byte[100 * 100 * 3]; img[10] = 25; IupHandle iupimg = Iup.ImageRGB(100, 100, img); var ep = Iup.ElementPropertiesDialog(button); ep.Show(); dlg.Show(); Iup.MainLoop(); } Iup.Close(); }