IUP Portable User Interface
Total Page:16
File Type:pdf, Size:1020Kb
IUP Portable User Interface Version 2.2 (iup tecgraf.puc-rio.br) IUP is a portable toolkit for building graphical user interfaces. It offers a configuration API in three basic languages: C, Lua and LED. IUP's purpose is to allow a program to be executed in different systems without any modification, therefore it is highly portable. Its main advantages are: z high performance, due to the fact that the system uses native interface elements z fast learning by the user, due to the simplicity of its API. This work was developed at Tecgraf/PUC-Rio by means of the partnership with PETROBRAS/CENPES. The IUP Team: Antonio Escaño Scuri Mark Stroetzel Glasberg Tecgraf - Computer Graphics Technology Group, PUC-Rio, Brazil http://www.tecgraf.puc-rio.br/iup Overview IUP is a portable toolkit for building graphical user interfaces. It offers APIs in three basic languages: C, Lua and LED. Its library contains about 100 functions for creating and manipulating dialogs. IUP's purpose is to allow a program to run in different systems without changes - this toolkit provides the applications a high portability. Supported systems include: Motif, Microsoft Windows 98, Microsoft Windows NT, Microsoft Windows 2000 and Microsoft Windows XP. IUP uses an abstract layout model based on the boxes-and-glue paradigm from the TEX text editor. This model, combined with the dialog-specification language (LED) or with the Lua binding (IupLua) makes the dialog creation task more flexible and independent from the graphics system's resolution. 2 Currently available interface elements can be categorized as follows: z Primitives (effective user interaction): dialog, label, button, text, multi-line, list, toggle, canvas, frame, image. z Composition (ways to show the elements): hbox, vbox, zbox, fill. z Grouping (definition of a common functionality for a group of elements): radio. z Menu (related both to menu bars and to pop-up menus): menu, submenu, item, separator. z Extended (additional elements built outside the library): dial, gauge, matrix, tabs, valuator, GL canvas, color chooser, color browser, toolbar. z Dialogs (useful predefined dialogs): file selection, message, alarm, data input, list selection. Hence IUP has some advantages over commercial interface toolkits available in the industry: z Simplicity: due to the small number of functions and to its attribute mechanism, the learning curve for a new user is often faster. z Portability: the same functions are implemented in each one of the platforms, thus assuring the interface system's portability. z Customization: the dialog specification language (LED) and the Lua binding (IupLua) are two mechanisms in which it is possible to customize an application for a specific user with a simple-syntax text file. z Flexibility: its abstract layout mechanism provides flexibility to dialog creation. z Extensibility: the programmer can create new interface elements as needed. IUP is free software, can be used for public and commercial applications. Availability The library is available for several compilers: z GCC and CC, in the UNIX environment z Visual C++, Borland C++, Watcom C++ and GCC (Cygwin and MingW), in the Windows environment The library is available for several operating systems: z UNIX (SunOS, IRIX, AIX and Linux) z Microsoft Windows NT/2K/XP Support The official support mechanism is by e-mail, using iup AT tecgraf.puc-rio.br (replace " AT " by "@"). Before sending your message: z Check if the reported behavior is not described in the user guide. z Check if the reported behavior is not described in the specific format characteristics. z Check the History to see if your version is updated. z Check the To Do list to see if your problem has already been reported. 3 If all these points were checked, you can report your problem. Please specify in your message: function, attribute, callback, platform and compiler. Announcements of new versions are done by the read only list iup-l AT tecgraf.puc- rio.br (replace " AT " by @). Send a request to the support e-mail to be added or removed from the list. Credits This work was developed at Tecgraf by means of the partnership with PETROBRAS/CENPES. People who took part in IUP's development: André Carregal André Costa André Derraik Antonio Scuri Carlos Augusto Mendes Carlos Henrique Levy Carlos José Pereira de Lucena Claudio Coutinho de Biasi Danny Reinhold Diego Nehab Diogo Martinez Enio Emanuel Russo Guilherme Fonseca Alvarenga Henrique Dalcin Mendes Pinheiro Leonardo Constantino Oliveira Luiz Henrique de Figueiredo Marcelo Gattass Mark Stroetzel Glasberg Mauricio Oliveira Carneiro Milton Jonathan Neil Armstrong Renato Borges Renato Cerqueira Roberto Beauclair Vinicius Almendra We must also mention engineer Enio Emanuel Russo, from PETROBRAS, who effectively contributed to the system's specification and project. The initial version of the present document was developed by Carlos Henrique Levy, Neil Armstrong and André Carregal, being supervised and oriented by Luiz Martins, Luiz Henrique de Figueiredo, Marcelo Gattass and Carlos José Pereira de Lucena at Tecgraf, PUC-Rio for the Data Processing Sector (SEPROC) at CENPES/PETROBRAS. Documentation This toolkit is available at http://www.tecgraf.puc-rio.br/iup. The full documentation can be downloaded from the Download by choosing the "Documentation Files" option. 4 The documentation is also available in Adobe Acrobat (iup.pdf ~1.0Mb) and Windows HTML Help (iup.chm ~900Kb) formats. The HTML navigation uses the WebBook tool, available at http://www.tecgraf.puc- rio.br/webbook. Publications This product stimulated the following scientific publications: z Levy, C. H.; Figueiredo, L. H.; Gattass, M.; Lucena, C.; and Cowan, D. "IUP/LED: A Portable User Interface Development Tool". Software: Practice & Experience, 26 #7 (1996) 737-762. [spe95.pdf] z Levy, C. H. "IUP/LED: Uma Ferramenta Portátil de Interface com Usuário". M.Sc. dissertation, Computer Science Department, PUC-Rio, 1993.[levy93.pdf] z Figueiredo, L. H.;Gattass, M.; and Levy, C.H. "Uma Estratégia de Portabilidade para Aplicações Gráficas Interativas". Proceedings of VI SIBGRAPI (1993), 203- 211. [sib93.pdf] z Oliveira Prates, R.; Figueiredo, L. H.; and Gattass, M. "Especificação de Layout Abstrato por Manipulação Direta". Proceedings of VII SIBGRAPI (1994), 165-172. [sib94.pdf] z Oliveira Prates, R.; Gattass, M. ;and Figueiredo, L. H. "Visual LED: uma ferramenta interativa para geração de Interfaces gráficas". M.Sc. dissertation, Computer Science Department, PUC-Rio, 1994. [prates94.pdf] Tecgraf Library License This product is free software: it can be used for both academic and commercial purposes at absolutely no cost. There are no royalties or GNU-like "copyleft" restrictions. It is licensed under the terms of the MIT license reproduced below, and so is compatible with GPL and also qualifies as Open Source software. It is not in the public domain, Tecgraf and Petrobras keep its copyright. The legal details are below. The spirit of this license is that you are free to use the library for any purpose at no cost without having to ask us. The only requirement is that if you do use it, then you should give us credit by including the copyright notice below somewhere in your product or its documentation. A nice, but optional, way to give us further credit is to include a Tecgraf logo in a web page for your product. The library is designed and implemented by a team at Tecgraf/PUC-Rio in Brazil. The implementation is not derived from licensed software. The library was developed by request of Petrobras. Petrobras permits Tecgraf to distribute the library under the coditions here presented. Copyright © 1994-2004 Tecgraf / PUC-Rio and PETROBRAS S/A. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. History of Changes Version 2.2.2 (07/Oct/2004) General z Fixed bug in IupGetFile FILTER initialization. z Improved IMINACTIVE automatic generation algorithm. z New zip package for download with iup images in LED format. z New application IupView to load and display LED files. z Fixed some attribute storage in iupMask and IupGetParam. Fixed bug when several masks are used in the same dialog. z Replaced the internal Lua4 code for a smaller hash table module. Thanks to Danny Reinhold. z Fixed IupGetParam invalid memory access. z IupNextField and IupPreviousField now only changes the focus for the checked toggle inside a radio. z IupGetAttributes now returns the pointer address if attribute is a known internal pointer data. z Now pressing Enter over a button activates it, even if it is not the DEFAULTENTER button. z Esc and Backspace keys now will be translated even if CapsLock is active. Windows z New ENTERWINDOW_CB and LEAVEWINDOW_CB for buttons. z Fixed double click for button, toggle and list were not being considered as two clicks. z removed FLAT style from toggles with IMPRESS image. Fixed size of toggle with image. 6 z New attribute SHOWDROPDOWN to open the dropdown list programmatically.