Lecture 11 Using Interface Builder to create an example Application.

Slides:



Advertisements
Similar presentations
Prof. Yitzchak Rosenthal
Advertisements

View-Based Application Development Lecture 1 1. Flows of Lecture 1 Before Lab Introduction to the Game to be developed in this workshop Comparison between.
LabVIEW is a graphical programming development environment for data acquisition and control, data analysis, and data presentation. With LabVIEW you can.
Intro to Photoshop. Learn what is Photoshop Identify different Photoshop Work Areas Understand the use of Bridge and Mini-Bridge Learn how to open and.
Using the SmartPLS Software
 Microsoft Excel is an electronic spreadsheet.  As with a paper spreadsheet, you can use Excel to organize your data into rows and columns and to perform.
Introduction to Microsoft Excel 2010 Chapter Extension 3.
Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
®® Microsoft Windows 7 for Power Users Tutorial 2 Customizing Microsoft Windows 7.
CGS 1060 Introduction to MicroComputer Usage Chapter 1 Windows 7
© The McGraw-Hill Companies, 2006 Chapter 18 Advanced graphics programming.
Sketchify Tutorial Graphics and Animation in Sketchify sketchify.sf.net Željko Obrenović
The sequence of folders to a file or folder is called a(n) ________.
CS 480/680 Computer Graphics Programming with Open GL Part 8: Working with Callbacks Dr. Frederick C Harris, Jr. Fall 2011.
Pasewark & Pasewark 1 Word Lesson 6 Working with Graphics Microsoft Office 2007: Introductory.
Microsoft Office 2007: Introductory 1 Word Lesson 6 Working with Graphics Computer Applications 1.
InDesign CS3 Lessons 1 and 2. Work Area When First Opened.
Relations The key question: How is a relation different from a function?  A relation is a set of ordered pairs (x, y) of real numbers.  The graph of.
© 2011 Delmar, Cengage Learning Chapter 2 Developing a Web Page.
Macromedia Studio 8 Step-by-Step MACROMEDIA DREAMWEAVER 8 Introduction.
Interactive Input Methods & Graphical User Input
Appleworks Draw Let’s get started…. With the drawing program, you can create… Mathematically calculated objects Mathematically calculated objects Each.
CGMB214: Introduction to Computer Graphics
EEC-693/793 Applied Computer Vision with Depth Cameras Lecture 13 Wenbing Zhao
Ranjeet Department of Physics & Astrophysics University of Delhi Working with Origin.
World Cities PowerPoint Tutorial Mrs. Bushman. Take Flight In iMovie Choose Your Path Movies in PowerPointAction Buttons.
Microsoft Word 2000 Presentation 5. Major Word Topics Columns Tables Lists.
Office 2003 Advanced Concepts and Techniques M i c r o s o f t Access Web Feature Data Access Pages.
Alice 2.0 Introductory Concepts and Techniques Project 1 Exploring Alice and Object-Oriented Programming.
Domain 3 Understanding the Adobe Dreamweaver CS5 Interface.
Teacher’s Assessment Assistant Worksheet Builder Starting the Program
1 of 7 LESSON #9 DRAWING DISPLAY OPTIONS - ZOOM, VIEW, MODEL and PAPER SPACE BLIPS, REDRAW, REGEN, DRAW ORDER What are the AUTOCAD display commands? You.
CREATING TEMPLATES CREATING CUSTOM CHARACTERS IMPORTING BATCH DATA SAVING DATA & TEMPLATES CREATING SERIES DATA PRINTING THE DATA.
Chapter 7 Creating a Newsletter with a Pull-Quote and Graphics
Art 321 Lecture 7 Dr. J. Parker. Programming In order to ‘make things happen’ on a computer, you really have to program it. Programming is not hard and.
Copyright © Curt Hill First Window Builder Program Easy GUIs in Eclipse.
Exploring Windows and Essential Computing Concepts 1 Windows Desktop u Windows Basics u Icon u Start Button u My Computer u Network Neighborhood u Recycle.
1 Chapter 12: Form Builder Objects and Flexible Code.
CSCE 121: Introduction to Program Design and Concepts, Honors Dr. J. Michael Moore Spring 2015 Set 15: GUIs 1.
Introduction to Windows. OBJECTIVE & BELL WORK – MON. DAY 1 WEEK 5  BELL WORK QUESTION: WHAT CAN YOU DO TO A COMPUTER WINDOW. NAME 3-- EXAMPLE: YOU CAN.
Chapter 13: AutoCAD DesignCenter. After completing this Chapter, you will be able to use the following: Overview of DesignCenter Container, Content Type.
Introduction to Windows Created by Mrs. Leverette.
CS130 Project 1 A simple VB application ("project" or program): user enters amount of sales then clicks the "Calculate button", the application displays.
Working in FreeHand – Lesson 21 Working in FreeHand Lesson 2.
Introduction to MATLAB for Engineers Third Edition William J. Palm III Chapter 10 Simulink PowerPoint to accompany Copyright © The McGraw-Hill Companies,
 You will be creating a cartoon in Adobe Illustrator using the paintbrush tool  You will learn about layers, different brushes, and different strokes.
Making Billboards By Deborah Nelson Duke University, Under the direction of Professor Susan Rodger, July 14, 2008.
Graphics Concepts CS 2302, Fall /17/20142 Drawing in Android.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 4 Working with Variables, Constants, Data Types, and Expressions.
Object-Oriented Application Development Using VB.NET 1 Chapter 10 VB.NET GUI Components Overview.
Set-up a Data Entry Page Section 3. Set Up Columns Switch to Variable View. At the bottom left of your screen there are two tabs (Data View and Variable.
Lecture 10 Using Interface Builder to create Mac Applications.
Introduction to Matlab Module #10 Page 1 Introduction to Matlab Module #10 – Creating Graphical User Interfaces Topics 1.Overview of GUI Development using.
Guide to Parallel Operating Systems with Windows 7 and Linux Chapter 3 Using the Graphical User Interface.
It is a digital recording of your computer screen. Screencasts are important in online teaching because it is a way of replacing traditional classroom.
Intro. to Spreadsheets Using Microsoft Excel
XP New Perspectives on Macromedia Dreamweaver MX 2004 Tutorial 5 1 Adding Shared Site Elements.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
EEC-693/793 Applied Computer Vision with Depth Cameras
Java FX: Scene Builder.
OVERVIEW Objectives Follow a design document to create a small personal Web site Follow a design document to create pages in a large commercial Web site.
EEC-693/793 Applied Computer Vision with Depth Cameras
Unit 1 Most common: Line Graph
INTRODUCTION TO ADOBE ILLUSTRATOR
Word Lesson 6 Working with Graphics
EEC-693/793 Applied Computer Vision with Depth Cameras
Interactive Input Methods & Graphical User Input
Interactive Input Methods & Graphical User Input
Prepare a DD Form 1081-Return
EEC-693/793 Applied Computer Vision with Depth Cameras
Presentation transcript:

Lecture 11 Using Interface Builder to create an example Application

We use the basic starting sequence and name the application HyperCurve It allows the user to display a variety of curves and interactivly change their parameters: Hypocycloid Hypercycloid Rosepetal curve Lissajous curve

A hypocycloid with 5 leaves The number of leaves can be changed with the buttons, the extrusion (length)of the leaves can be changed with the sliderbar.

The mathematics At the basis of drawing such functions is the drawing of a circle. The circle is drawn in Cartesian coordinates using the sin and cos functions with a common parameter: x = cos(t) y = sin(t)

Drawing a curve in Quartz Create a path (CGMutablePathRef) Set start point (CGPathMoveToPoint) Add lines to the path (CGPathAddLineToPoint) Create a GraphicsContext (CGContextRef) Add the path to the Context (CGContextAddPath) Stroke the path (CGContextStrokePath) Put all drawing code in the method drawRect

Creating the main layout in IB Create window with a View as drawing area and two buttons: one at lower left and one at lower right. No representation of these GUI items is needed in the code: all is done using Library and Inspector windows. Attach the View to all four sides of the window and make it resizable. Attach the buttons to the lower left and lower right window corners respectively. Label the buttons leaves- and leaves+.

The slider bar Add a slider bar (NSSlider) between the two buttons, size it, attach it to the lower border of the window Set the State in the Attributes window of the Inspector Set the number range of the slider bar

Writing and connecting callbacks Write all callbacks as methods of the View Write a callback for the left button (it increases the data member leaves) Write a callback for the right button (it decreases the data member leaves) Write a callback for the slider bar (it obtains the value of the slider and changes the data member petalShift) All callbacks initiate a redraw of the curve

Working with the Menu bar The menu bar is a separate window added to the screen by IB. Taking items out of it is done by dragging them into empty space. Adding items is done using the Library window and adding either an NSMenu or an NSMenuItem. Changing entries is done using the Attributes tab of the Inspector window. Add a drop down menu with the name Curve that has four drop downs: HyperCycloid, HypoCycloid, Rosepetal, Lissajous

Setting the main menu We write a callback for each of the four drop down items (methods of View) and attach them using the Connections tab. These callbacks only change a single number data member of the View, which determines the type of curve to be drawn.

The math portion No details are discussed The math portion of the curve is in drawRect() It uses the type variable to determine which curve to draw It uses the petalShift and the number of leaves as variables in computing the curve