COMP 102 Topics in support of programming Windowed applications on the eagle unix server: wxWidgets and event driven programming.

Slides:



Advertisements
Similar presentations
CE881: Mobile and Social Application Programming Simon M. Lucas Menus and Dialogs.
Advertisements

Unit 3 Graphical User Interface (GUI) Dr. Magdi AMER.
Things to mention public static void main(String [] args) –The starting point for a free-standing Java application (i.e. one not run from the DrJava interactions.
WxErlang Mats-Ola Persson.
Slides 4/22 COP Topics Final Exam Review Final Exam The final exam is Friday, April 29 th at 10:00 AM in the usual room No notes, books, calculators,
Chapter 6 Graphical User Interface (GUI) and Object-Oriented Design (OOD)
© The McGraw-Hill Companies, 2006 Chapter 18 Advanced graphics programming.
Chapter 71 Inheritance Chapter 7. 2 Reminders Project 4 was due last night Project 5 released: due Oct 10:30 pm Project 2 regrades due by midnight.
1 Chapter 6 Inheritance, Interfaces, and Abstract Classes.
Chapter 7 GUI design. So far this semester Have programmed in a stop and wait mode Program displays dialog box and waits for user to respond This was.
Creating Object Oriented Programs Object oriented (OO) terminology Class vs. object Instantiate an object in a project Understand Class_Initialize / Terminate.
CS 112 GUI 06 May 2008 Bilkent. Java GUI API Containers: ◦ contain other GUI components. E.g, Window, Panel, Applet, Frame Dialog. Components: ◦ Buttons,
Java Swing - Lecture 1 An Introduction Milena Radenkovic slides originally by Chris Coleman.
A.k.a. GUI’s.  If you want to discuss your Lab 2 grade come see me this week. ◦ Office: 436 ERB. One hour prior to class ◦ Open to Appointments MWF 
PROG Mobile Java Application Development PROG Mobile Java Application Development Event Handling Creating Menus.
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
Not in Text CP212 Winter No VBA Required “Regular” Programming traditional programming is sequential in nature o one command executed after another.
GUI’s Part Two wxWidgets components. Resources for wxWidgets Sample code on course website wxWidgets web site.
InvEasy (Project1) Please use speaker notes for additional information!
© 2006 Lawrenceville Press Slide 1 Chapter 3 Visual Basic Interface.
1 Event Driven Programming wirh Graphical User Interfaces (GUIs) A Crash Course © Rick Mercer.
Java Software Solutions Lewis and Loftus Chapter 10 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Graphical User Interfaces --
Getting Started The structure of a simple wxWidgets program, Look at where and how a wxWidgets application starts and ends, how to show the main window,
MSc/PgDip in ITIntroductory Programming: Week 4 Lecture 21 INTRODUCTORY PROGRAMMING Week 4 Lecture 2 Fonts –Horstmann 4.6 ActionEvents –different events.
Copyright © 2014 by John Wiley & Sons. All rights reserved.1 Chapter 9 - Inheritance.
Graphical User Interface CSI 1101 N. El Kadri. Plan - agenda Graphical components Model-View-Controller Observer/Observable.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall
GUIs in Java Swing, Events CS2110, SW Development Methods Readings: MSD, Chapter 12 Lab Exercise.
FLTK. Objectives Install and Use FLTK Widgets ◦Callbacks Handling event ◦System events ◦Mouse events ◦Keyboard events.
CNS 1410 Graphical User Interfaces. Obectives Students should understand the difference between a procedural program and an Event Driven Program. Students.
1 Lesson: Applets with User Input and Output with GUI ICS4M.
1 JavaScript
Topics Introduction Scene Graphs
8. Inheritance “Is-a” Relationship. Topics Creating Subclasses Overriding Methods Class Hierarchies Abstract Class Inheritance and GUIs The Timer Class.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 – Graphical User Interfaces Java Foundations: Introduction to Programming.
Copyright © 2015 Curt Hill Java for Minecraft Those things you should know.
GUIs Graphical User Interfaces. Everything coming together Known: – Inheritance – Interfaces – Abstract classes – Polymorphism – Exceptions New: – Events.
GUIs Basic Concepts. GUI GUI : Graphical User Interface Window/Frame : a window on the screen Controls/Widgets : GUI components.
Forms and Controls Part 3 dbg --- Naming conventions, Button, Event handlers, Label.
Chapter 14: Introduction to Swing Components. Objectives Understand Swing components Use the JFrame class Use the JLabel class Use a layout manager Extend.
© 2007 Lawrenceville Press Slide 1 Chapter 9 Inheritance  One class is an extension of another.  Allows a class to define a specialized type of an existing.
JAVA: An Introduction to Problem Solving & Programming, 6 th Ed. By Walter Savitch ISBN © 2012 Pearson Education, Inc., Upper Saddle River,
Copyright © – Curt Hill Building Windows Applications in wxDev-C++
User Interface Programming in C#: Basics and Events Chris North CS 3724: HCI.
Java With NetBeans First Project. Java Are language for this semester is Java The Development Environment is Netbeans.
Lesson 28: More on the GUI button, frame and actions.
PaintPictureBoxDemo Refers to the PaintPictureBoxDemo Visual Basic Program Included With The Lecture.
CIS 270—Application Development II Chapter 11—GUI Components: Part I.
Java Programming Fifth Edition Chapter 13 Introduction to Swing Components.
ANDROID DIALOGS. Slide 2 Dialogs (Introduction) The Dialog class is the base class for all dialogs A dialog is a small window that prompts the user to.
Visual Basic Fundamental Concepts
C ++ MULTIPLE CHOICE QUESTION
Java Events. Java Events Important definitions Overridden method Class vs. abstract class vs. interface Event Handling Definition Main components Windows.
Welcome to Visual Programming using C#
Ellen Walker Hiram College
Chap 7. Building Java Graphical User Interfaces
CMPE212 – Stuff… Assn 3 due and Quiz 2 in the lab next week.
Graphical User Interfaces -- Introduction
EE 422C Java FX.
Chapter 14 JavaFX Basics Dr. Clincy - Lecture.
Chapter 15 Event-Driven Programming and Animations
Tkinter GUIs Computer Science and Software Engineering
VISUAL BASIC.
Visual Basic..
I210 review.
Java External Libraries & Case Study
Steps to Creating a GUI Interface
Tonga Institute of Higher Education
CMPE 135: Object-Oriented Analysis and Design March 19 Class Meeting
Presentation transcript:

COMP 102 Topics in support of programming Windowed applications on the eagle unix server: wxWidgets and event driven programming.

Slide 2 Admin Exams back Results mixed: The Numbers: High: 114/115 Low 79/115 Average: 92/115 Median: 86/115 Now is the time to think about the paper option for those of you struggling. Quick review of exam.

Slide 3 Lab4 Discussed at end of class Will require you to write your own program from scratch for the first time this semester Program must be a window based program that runs on Eagle We will again use the wxWindow library for this.

Slide 4 Starting a wxWindow program A wxWindow based program needs a class that represents the application wxApp is the base class Your main app class must extend/inherit from this class Must override the bool OnInit(); method bool YourApp::OnInit() replaces the main method as program entry point Thats right no main!! No c-style methods at all. IMPLEMENT_APP( )

Slide 5 wxApp important inherited method SetTopWindow(wxWindow*) Takes a pointer to any wxWindow Or object that inherits from wxWindow Makes that window the Apps main window.

Slide 6 Putting up a window wxFrame This is the parent class that encapsulates a main window one that can live on its own as a movable, independent window. Important inherited methods SetSizer(wxSizer*) Sizers covered later but are... Remember is-a relationship WxGridSizer is-a wxSizer Constructor Go over in handout. Show(bool) If param true, displays window, if false, hides window

Slide 7 Sizers Are used to position gui controls on larger windows Determine the layout Much like java Unlike VB wxGridSizer good to look at first Constructor Look at in handout. Add(wxWindow*) method Add a control to the sizer and place it according to where it was added.

Slide 8 wxButtons Button controls for GUIs SetLabel(wxString) wxString GetLabel() Sets or gets the button text. You can use a regular string constant for a wxString. Can react to events.

Slide 9 Event handling. Event handling to respond to button presses and other events. In class that will respond to events In class declaration See handout.