Graphical User Interfaces I The central station is the bubble gum planet with 280 pounds of clay and three head phone lines that come out and orbit the.

Slides:



Advertisements
Similar presentations
Prof. Muhammad Saeed Mathematical Modeling and Simulation UsingMATLAB Graphic User Interface (GUI)Basics.
Advertisements

WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
Chapter 8 Improving the User Interface
1 Microsoft Access 2002 Tutorial 9 – Automating Tasks With Macros.
DATA RETRIEVAL AND GUI CREATION DAVID COOPER SUMMER 2014.
A graphical user interface (GUI) is a pictorial interface to a program. A good GUI can make programs easier to use by providing them with a consistent.
CA 121 Intro to Programming Tariq Aziz and Kevin Jones GUI Programming in Visual Studio.NET Chapter 1 Tariq Aziz and Kevin Jones.
1 How to create GUI's in MatLAB Rigo Dicochea. 2 Introduction Graphical User Interface (GUI) MatLab provides Graphical User Interface Development Environment(GUIDE)
Exploring the Basics of Windows XP. Objectives Start Windows XP and tour the desktop Explore the Start menu Run software programs, switch between them,
Compunet Corporation Programming with Visual Basic.NET GUI Week # 11 Tariq Ibn Aziz.
Robert’s Rules of Matlab. Disclaimer: My usual processing flow is to use c or fortran codes linked together via tcsh scripts. I find Matlab to be really.
Matlab GUIs Making Matlab Interactive. Today’s topics What is a GUI? How does a GUI work? Where do you begin? Ways to build MATLAB GUIs.
Exploring the Basics of Windows XP
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Java Programs COMP 102 #3.
Programming a GUI Hanan sedaghat pisheh. For calling GUI, we need a function with no inputs or outputs First We create a m.file m file has the same name.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
A short intermission about function handles and cell arrays A MATLAB function may be referenced by a handle. >> sphere(100)
Introduction to the Graphical User Interface (GUI) in MATLAB
Matlab GUIs GUIDE.
Introduction to Visual Basic. Quick Links Windows Application Programming Event-Driven Application Becoming familiar with VB Control Objects Saving and.
Introduction to Matlab & Data Analysis
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
1 Integrating Microsoft Office 2003 Tutorial 2 – Integrating Word, Excel, and Access.
XP New Perspectives on Integrating Microsoft Office XP Tutorial 2 1 Integrating Microsoft Office XP Tutorial 2 – Integrating Word, Excel, and Access.
GUI development with Matlab: GUI Front Panel Components 1 GUI front panel components In this section, we will look at -GUI front panel components -Programming.
Introduction to Matlab’s Graphical User Interface (GUI) Type “guide” “Guide” creates interface on a Figure window and code in an M-file. Some hidden code.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room , Chris Hill, Room ,
Introduction to MATLAB Damon Tomlin February 22, 2008 Lecture 3: Data Visualization & User Interfaces.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Introduction to Matlab & Data Analysis 2015 In this tutorial we will: Build a practical application using GUIDE Learn more about graphical user interface.
Copyright © Curt Hill More Components Varying the input of Dev-C++ Windows Programs.
MATLAB for Engineers 4E, by Holly Moore. © 2014 Pearson Education, Inc., Upper Saddle River, NJ. All rights reserved. This material is protected by Copyright.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
GUI development with Matlab: GUI Front Panel Components GUI development with Matlab: Other GUI Components 1 Other GUI components In this section, we will.
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 13 GUI Programming.
GUI Programming Joseph Sant Sheridan College. Agenda Elements of GUI programming Component-Based Programming. Event-Based Programming. A process using.
As we upgrade from ImageNow 6.1 to ImageNow 6.3, there are some changes to the interface that the end-users will see. These slides cover changes to the.
1 Lecture 5: Interactive Tools: Prototypers (HyperCard, Director, Visual Basic), Interface Builders Brad Myers Advanced User Interface Software.
CS112 Scientific Computation Department of Computer Science Wellesley College Interactive Programs Graphical User Interfaces.
EGR 115 Introduction to Computing for Engineers
Peter Andreae Computer Science Victoria University of Wellington Copyright: Peter Andreae, Victoria University of Wellington Java Programs COMP 102 #3.
INFORMATION SYSTEM – SOFTWARE TOPIC: GRAPHICAL USER INTERFACE.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Graphic User Interface Review of Lecture 1 to Lecture 6 C.F. Lu.
Introduction to Matlab Module #10 Page 1 Introduction to Matlab Module #10 – Creating Graphical User Interfaces Topics 1.Overview of GUI Development using.
Graphical User Interfaces I The central station is the bubble gum planet with 280 pounds of clay and three head phone lines that come out and orbit the.
Lecture (7) Introduction to GUI Eng. Osama Talaat 1.
Thank you for looking into Policy Manager Two for your Head Start program Teresa K. Wickstrom Senior Associate Center for Community Futures
MATLAB and SimulinkLecture 61 To days Outline Graphical User Interface (GUI) Exercise on this days topics.
© Peter Andreae Java Programs COMP 102 # T1 Peter Andreae Computer Science Victoria University of Wellington.
PATTERN RECOGNITION LAB 8 TA : Nouf Al-Harbi::
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
More Matlab Graphics and GUI Graphics subplots some useful commands 3D graphics GUI GUI controls The callback property Other essential properties.
Chapter 3: I Need a Tour Guide (Introduction to Visual Basic 2012)
Graphical User Interfaces I
Topics Graphical User Interfaces Using the tkinter Module
Graphical User Interface in MATLAB
Chapter Topics 15.1 Graphical User Interfaces
Chapter 1: An Introduction to Visual Basic 2015
Chap 7. Building Java Graphical User Interfaces
More on Graphical User Interfaces
Graphical User Interfaces -- Introduction
Chapter 2 Visual Basic Interface
Topics Graphical User Interfaces Using the tkinter Module
Chapter 15: GUI Applications & Event-Driven Programming
Electrical and Computer Engineering Department SUNY – New Paltz
Presentation transcript:

Graphical User Interfaces I The central station is the bubble gum planet with 280 pounds of clay and three head phone lines that come out and orbit the mass. The clay is not only on the top of the table but under it and under the chairs. It is inspired by the gum under tables rebelliously put there by those imprisoned in boring pedantics. It is a monument to the struggle of repressed phyiscality. Its form is never finalized as people freely sculpt it.

Outline Announcements –HW III due Wed. 5PM win valuable prizes! Why GUI’s? GUI components Layout with GUIDE Callbacks Example: converttemp.m

Why GUI’s? Matlab’s real power lies in its programmability, so why would you want to make a GUI? –Interactive demo of your ideas/data/algorithms –Your Grandma/advisor needs to run your code –Impress your friends –Kind of fun

GUI Components Matlab GUI’s can have all of the same UI features you see in Windows/Mac/X-Windows programs –radio buttons--choose between discrete values –text boxes--enter text –buttons--click, click, click –menus –sliders –dialog boxes –load/save windows

GUI Components There are three GUI-objects: –Uimenu -- like “file” or “edit” menus at top of figure –Uicontextmenu -- menus that appear when clicked –Uicontrol--everything else Uicontrols & Uicontextmenus are children of figures UImenus can be children of other menus

Uicontrols Uicontrols are the most important components These are created with ui=uicontrol(mom, ‘property’, ‘value’,…) –once you have the handle (ui), you can change values with set –the type of uicontrol is specified with the style field pusbutton, togglebutton, radiobutton, checkbox,edit, text,slider, frame,listbox,popupmenu

Building GUI’s A GUI is a function (or series of functions). Somewhere in the function it should create a figure and place calls to uicontrols Matlab has a special GUI called “guide” that lets you layout your GUI in WYSIWYG format –Allows you to position controls and set their properties interactively –Saves a function that will create your basic GUI

Example converttemp We want to create a simple GUI to convert between Kelvin, Celsius, and Fahrenheit temperatures –Users will specify temperatures by typing or moving sliders K temp in K C temp in C F temp in F

Example converttemp We will create the buttons and sliders with GUIDE and then save it as converttemp.m We will then clean up the function and have it return handles to the objects.

Callbacks Right now, our GUI is just a bunch of buttons & sliders. We can type and click, but our clicking is meaningless. Uicontrols have a field called callback –This field contains a call to a function (as a text string) that gets executed when the control is activated (clicked, slid, typed into) –Callbacks give the GUI life

Callback Programming Callback functions will need to manipulate the properties of the objects in the window, in order to produce graphical results we will need to get handles to these objects –gcbo -- gets handle to the callback object (the one that was clicked) –gcbf -- gets handle to the figure containing the callback object –g=findobj(h, ’property’, ’value’) returns handles to objects under (children of) object h with property==value

Callback Programming We don’t want to write a callback function for every object Usually, you have a single callback for all controls, controls of a certain type, or groups of controls The functions must then figure out the right thing to do –Matlab recommends “switchyard” programming: function cbfunc(id) switch id case 1: case 2: end

Callback Programming Calls to callback functions are ususally set when the GUI is started (they don’t have to be though,…) This means that we can’t pass data to the callbacks Data for GUI’s is “hidden” in the objects

Places to launder your data –Tag -- a name or comment can search for tags with findobj –Value--value of an object in its current state (0,1 for radiobuttons, value between MIN and MAX for sliders) –String--label of object, or the what the user typed in an edit box –UserData--anything you want! ALL OBJECTS HAVE USERDATA ! Callback Programming

Example: converttemp.m We’ve set the positions, lets set some data: –Set sliders’ min & max values –Set sliders’ values –Set edits’ strings –Set Celsius button to on (value=1) and others to off (0) –Set Kelvin and Fahrenheit sliders’ visibility to off –Set figures userdata to handle matrix Let’s figure out the callbacks!