+ All Categories
Home > Documents > Tools in Gui

Tools in Gui

Date post: 10-Apr-2018
Category:
Upload: merlin-raj
View: 226 times
Download: 0 times
Share this document with a friend

of 12

Transcript
  • 8/8/2019 Tools in Gui

    1/12

    TOOLS IN GUI

    Introduction:

    The underlying idea behind GUI Tools is to provide an interactive graphic user interface forGAUSS for

    Windows. GUI Tools allows the programmer to have the end user respond to a graphic based dialog,

    along with standard Windows controls, using both keyboard and mouse. GUI Tools is called from

    GAUSS with a minimum of programming - typically one specifies a title, prompt, and the name of the

    control or GUI, followed by a one line call.

    GUI Tools has three main components:

    A set of Standard Windows Controls that can be called from GAUSS, and which return the userinput to that control back to GAUSS.

    A set of Standard Windows Dialogs that can be called from GAUSS, and which return the dialog

    results back to GAUSS.

    Custom GUIs. These are graphic interfaces that are custom designed for specific projects. They

    are called from GAUSS, and each control in the GUI returns a value or string to GAUSS.

    Standard Windows Controls

    Message Box Message Box returns the name of the button that is clicked.Choice of title, prompt and button style. Returns name of

    clicked button.

  • 8/8/2019 Tools in Gui

    2/12

    Check Box Check Box. Choice of title, prompt and names. Returns an

    array with elements set to unity if checked, else zero.

    Combo Box Drop down list of items. Choice of title, prompt and names.

    Returns text of selected item.

    Logon Box Logon Box. Choice of title, username and password. OKbutton only works for correct password. Returns name of

    button clicked.

  • 8/8/2019 Tools in Gui

    3/12

    Option Button Option Button. Choice of title, prompt and names. Returnsthe index of the checked element. Only one option button in

    any given group can be checked.

    Textbox Text Box. Choice of title and prompt. Returns displayed textas string.

  • 8/8/2019 Tools in Gui

    4/12

    Standard Windows Dialogs

    Color Select:Standard Windows color dialog. Returns the color value.

  • 8/8/2019 Tools in Gui

    5/12

    File Browser:Standard Windows file dialog. Returns displayed file as a string.

  • 8/8/2019 Tools in Gui

    6/12

    Font select:Standard Windows font select dialog. Returns font characteristics as a string array.

  • 8/8/2019 Tools in Gui

    7/12

    Print:Standard Windows print dialog. Prints a string or a file.

    Custom GUI

    GUI Tools permits the programmer to create a custom interface, using the standard graphicbuilder technique - the same technique that is used to build dialogs in Visual Basic.

    A form is displayed in one window, and a control form in a second window. The programmerclicks the required control to copy that control to the form, and then, using the mouse, drags the

    control to the desired location and sizes it

    . A list of properties is provided for each control, which the programmer sets as desired.

  • 8/8/2019 Tools in Gui

    8/12

    The control form provides twelve controls. Beneath these controls, there is a property window,which displays the properties of the currently active control.

    The property window displays the properties of the 'Username' text box. Similarly,

    in theexample shown, the form is shown as it appears at run time.

    Four Categories of GUI Tools

    GUI builder tools have the same goal of helping programmer build the graphical interface, but

    they come in a large variety of forms. One important way that they can be classified is by howthe designer specifies what the interface should be.

    Some tools require the programmer to program in a special-purpose language, some provide anapplication framework to guide the programming, some automatically generate the interfacefrom a high-lvel model or specification, and others allow the interface to be designed

    interactively. Based on the above analysis, four kinds of tools can be distinguished:

    y language based toolsy applicaiton frameworky model-based generationy interactive tools

    Language based tools

    With most of the older user interface builder tools, the designer specifies the user interface in a

    speicial-purpose language. This language can take many forms, including context-freegrammars, state-transition diagrams, declarative languages, event languages, etc. The language is

    usually used to specify the syntax of the user interface. Several representive tools are belong tothis category.

    VAPS [1] is a commercial system that uses the state transition model, and it eliminated themaze-of-wires problem by providing a spreadsheet-like table in which the states, events, and

    actions are specified. Transition networks have been thoroughly researched, but have not provenparticularly successful or useful either as a research or commercial approach.

    Sassafras [2] is an event language where the user interface is programmed as a set of small event

    handlers. The elements-events and transitions language provides elaborate control over whenvarious event handlers are fired. Another event language is HyperTalk, which is part of

    HyperCard for the Apple Macintosh. Microsoft's Visual Basic also contains evnet-languagefeatures, since code is generally written as responses to events on objects.

  • 8/8/2019 Tools in Gui

    9/12

    Cousin [3] and HP/Apollo's Open-Dialogue [4] both allow the designer to specify user interfacesin declarative language. The user interfaces supported are basically forms, where fields can be

    text which is typed by the user, or options selected using menus or buttons. There are alsographic output areas that the application can use in whatever manner desired. The application

    program is connected to the user interface through "variables" which can be set and accessed by

    both.

    Application frameworks

    After the Macintosh Toolbox had been available for a little while, Apple discovered that

    programmers had a difficult time figuring out how to call the various toolkit functions, and how

    to ensure that the resulting interface met the Apple guidelines. They therefore created a softwaresystem that provides an overall application framework to guide programmers. This was called

    MacApp [5] and used the object-oriented language Object Pascal. Classes are provided for theimportant parts of an application, such as the main windows, the commands, etc., and the

    programmer specializes these classes to provide the application-specific details, such as what is

    actually drawn in the windows and which commands are provided. MacApp was very successfulat simplifying the writing of Macintosh applications. Today, there are multiple frameworks tohelp build applications for most major platforms, including the Microsoft Foundation Classes for

    Windows, and the CodeWarrior PowerPlant [6] for the Macintosh.

    Unidraw [7] is a research framework, but it is more specialized for graphical editors. This meansthat it can provide even more support. Unidraw uses the C++ object-oriented language and is

    part of the InterViews [8] system. Unidraw has been used to create various drawing and CADprograms, and a user interface editor. The Amulet framework [9] is also aimed at graphical

    applications, but due to its graphical data model, many of the built-in routines can be usedwithout change (the programmer does not usually need to write methods for subclasses). Even

    more specialized are various graph programs,

    such as Edge [10] and TGE [11]. These provide aframework in which the designer can create programs that display their data as trees or graphs.

    The programmer typically specializes the node and arc classes, and specifies some of thecommands, but the framework handles layout and the overall control.

    Model-based automatic generation

    A problem with all of the language-based tools is that the designer must specify a great deal

    about the placement, format, and design of the user interfaces. To solve this problem, some toolsuse automatic generation so that the tool makes many of these choices from a much higher-level

    specification. Many of these tools, such as Mickey [12] , Jade [13] , and DON [14] have

    concentrated on creating menus and dialog boxes. Jade allows the designer to use a graphicaleditor to edit the generated interface if it is not good enough. DON has the most sophisticatedlayout mechanisms and takes into account the desired window size, balance, columness,

    symmetry, grouping, etc. Creating dialog boxes automatically has been very thoroughlyresearched, but there still are no commercial tools that do this.

    UIDE (the User-Interface Design Environment) [15] requires that the semantics of the

    application be defined in a special-purpose language, and therefore might be included with the

  • 8/8/2019 Tools in Gui

    10/12

    language-based tools. It is placed here instead because the language is used to describe thefunctions that the application supports and not the desired interface. UIDE is classified as a

    ``model-based'' approach because the specification serves as a high-level, sophisticated model ofthe application semantics. In UIDE, the description includes pre- and post-conditions of the

    operations, and the system uses these to reason about the operations, and to automatically

    generate an interface. One interesting feature of UIDE is that the pre- and post-conditions areused to automatically generate help.

    Interactive tools

    Interface tools allow the designer to create dialog boxes, menus and windows that are to be part

    of a larger user interface. They allow the designer to select from a pre-defined library of widgets,and place them on the screen using a mouse. Other properties of the widgets can be set using

    property sheets. Usually, there is also some support for sequencing, such as bringing up sub-dialogs when a particular button is hit. The Steamer project at BBN demonstrated many of the

    ideas later incorporated into interface builders and was probably the first object-oriented graphics

    system [16]. Other examples of research interactive tools are DialogEditor [17] , vu [18] and Gilt[19]. There are literally hundreds of commercial tools. Just two examples are the NeXT InterfaceBuilder [20] and UIM/X for X [21]. Visual Basic can also be considered as an interactive tool

    coupled with an editor for an interpreted language.

    Interactive tools use the actual widgets from a toolkit, so they can be used to build parts of realapplications. Most will generate C code templates that can be compiled along with the

    application code. Others generate a description of the interface in a language that can be read atrun-time. For example, UIM/X generates a UIL description. It is usually important that the

    programmer not edit the output of the tools (such as the generated C code) or else the tool can nolonger be used for later modifications.

    Although interface builders make laying out the dialog boxes and menus easier, this is only partof the user interface design problem. These tools provide little guidance towards creating good

    user interfaces, since they give designers significant freedom. Another problem is that for anykind of program that has a graphics area (such as drawing programs, CAD, visual language

    editors, etc.), interactive tools do not help with the contents of the graphics pane. Also, theycannot handle widgets that change dynamically. For example, if the contents of a menu or the

    layout of a dialog box changes based on program state, this must be programmed by writingcode.

    Advantages of Using GUI Tools

    There are many advantages to using GUI tools. These can be classified into two main groups:

    y The quality of the interfaces might be higher.This is because:

    o Designs can be rapidly prototyped and implemented, possibly even before theapplication code is written.

    o It is easier to incorporate changes discovered through user testing.

  • 8/8/2019 Tools in Gui

    11/12

    o More effort can be expended on the tool than may be practical on any single userinterface since the tool will be used with many different applications.

    o Different applications are more likely to have consistent user interfaces if they arecreated using the same GUI builder tool.

    o It will be easier for a variety of specialists to be involved in designing the userinterface

    ,

    rather than having the user interface created entirely by programmers.Graphic artists, cognitive psychologists, and human factors specialists may all beinvolved. In particular, professional user interface designers, who may not be

    progrmmers, can be in charge of the overall design.o Undo, Help and other features are more likely to be available since they might be

    supported by the tools.

    y The user interface code might be easier and more economical to create andmaintain.

    This is because:o There will be less code to write, because much is supplied by the tools.o There will be better modularization due to the separation of the user interface

    componenet from the application. This should allow the user interface to change

    without affecting the application, and a large class of changes to the applicationshould be possible without affecting the user interface.

    o The level of programming expertise of the interface designers and implementorscan be lower, because the tools hide much of the complexities of the underlying

    system.o The reliability of the user interface will be higher, since the code for the user

    interface is created automatically by the tools.o It will be easier to port an application to different hardware and software

    environments since the device dependencies are isolated.

    Disadvantages of Using GUI Builder ToolsThere are also some disadvantages of using GUI builder tools, though some of them are due toimproper use of the tools.

    y Using GUI tools often implies that the interface and computational components of anapplication must be logically and physically separated, which obviously can be verydifficult to do.

  • 8/8/2019 Tools in Gui

    12/12

    y Some tools are difficult to use. It is ironic that the people building GUI builder toolshave, in some instances, completely overlooked the fact that their tool needs an interface

    with high usability, too.

    y Many tools have limited functionality; There is a danger of changing tools at a later stage.People often say such things as, "If only I had the right tool, all my problems

    isdeveloping the interface would be solved." The success of project is too heavilydependent on the tool.


Recommended