Building GUI applications with Python, GTK and Glade

Slides:



Advertisements
Similar presentations
Microsoft Expression Web-Illustrated Unit J: Creating Forms.
Advertisements

Introduction to Visual Basic.NET Uploaded By: M.Sheraz anjum.
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Fireworks MX. 2 Lesson 1a—Create Slices & Hotspots n Fireworks allows you to add animation (behaviors) already written in ___________. n However, users.
Advanced Microsoft Word Hosted by Jared Hoffman Topics Keyboard Shortcuts Customizing Toolbars and Menus Auto Format & Auto Correct Tabs Inserting Pictures.
Visual Basic 2010 How to Program. © by Pearson Education, Inc. All Rights Reserved.2.
CA 121 Intro to Programming Tariq Aziz and Kevin Jones GUI Programming in Visual Studio.NET Chapter 2 Tariq Aziz and Kevin Jones.
Graphical User Interface (GUI) A GUI allows user to interact with a program visually. GUIs are built from GUI components. A GUI component is an object.
Using Multiple Forms. Creating a New Form ProjectAdd Windows Form.
Office 2003 Post-Advanced Concepts and Techniques M i c r o s o f t Word Project 8 Working with Macros and Visual Basic for Applications (VBA)
Client-side Applications with PHP Andrei Zmievski & Frank M. Kromann Track: PHP Conference Date: Friday, July 27 Time: 3:45pm – 4:30pm Location: Fairbanks.
1 Windows Printing. 2 Objectives You will be able to Output text and graphics to a printer. Print multipage documents. Use the standard Windows print.
Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
Chapter 3 Working with Symbols and Interactivity.
Introduction to Graphical User Interfaces. Objectives * Students should understand what a procedural program is. * Students should understand what an.
Microsoft Office 2007 Word Chapter 1 Creating and Editing a Word Document.
Ch 11: Userforms CP212 Winter Topics Designing User Forms o Controls Setting Properties o Tab Order o Testing Writing Event Handlers o Userform_Initialize.
An Introduction to Visual Basic
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
© 2011 Delmar, Cengage Learning Chapter 3 Working with Symbols and Interactivity.
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
Working with Symbols and Interactivity
NOTE: To change the image on this slide, select the picture and delete it. Then click the Pictures icon in the placeholder to insert your own image. WEB.
Tutorial 11 Five windows included in the Visual Basic Startup Screen Main Form Toolbox Project Explorer (Project) Properties.
§Visual - A method used to create GUI applications. §BASIC - Beginner’s All - purpose Symbolic Instruction Code developed by John Kemeny. §VB- Evolved.
PC204 Lecture 9 Conrad Huang Genentech Hall, N453A x
Introduction to Windows Programming
CSCE 121: Introduction to Program Design and Concepts, Honors Dr. J. Michael Moore Spring 2015 Set 15: GUIs 1.
1 Creating Windows GUIs with Visual Studio. 2 Creating the Project New Project Visual C++ Projects Windows Forms Application Give the Project a Name and.
How the Session Works Outline Practical on arrival Talk 1 Reflect on practical Clarify concepts Practical exercises at your own pace Talk 2: Further concepts.
Vocabulary in VB So Far. Assignment: Used to change the value of an object at run time Used to change the value of an object at run time.
GUI With GTK+ Under Linux Fanfan Xiong. Introduction GTK+ (GIMP toolkit) : A library for creating graphical user interfaces(GUI) Two examples developed.
MS Visual Basic 6 Walter Milner. VB 6 0 Introduction –background to VB, A hello World program 1 Core language 1 –Projects, data types, variables, forms,
MIT 6.893; SMA 5508 Spring 2004 Larry Rudolph Lecture 4: Graphic User Interface Graphical User Interface Larry Rudolph MIT 6.893; SMA 5508 Spring 2004.
Dialog boxes in JavaScript Events in JavaScript – What are they – “Which events are there?” – “How do I register event handlers to an HTML element?” –
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 13 GUI Programming.
Overview GUI Programming with GTK+ and GLADE 장정철.
GUIs Basic Concepts. GUI GUI : Graphical User Interface Window/Frame : a window on the screen Controls/Widgets : GUI components.
This is how you invoke the Microsoft Visual Studio 2010 Software. All Programs >> Microsoft Visual Studio 2010.
Compunet Corporation Programming with Visual Basic.NET Working with Menus and Dialog Boxes Week 14 Tariq Aziz and Kevin Jones.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
Customizing Menus and Toolbars CHAPTER 12 Customizing Menus and Toolbars.
PyGTK 2.0 Quick Start Guide By Jeremy Bongio. Table of Contents “Overview” of Python Concepts of GTK Implementing pyGTK.
Writing Really Rad GTK+ & GNOME Applications in C, Python or Java
The BLISS Framework 4.
Topics Graphical User Interfaces Using the tkinter Module
Event Loops and GUI Intro2CS – weeks
Visual Basic Code & No.: CS 218
Introduction to Computer CC111
Fedora Project / Red Hat
Computer Software: Programming
Chapter Topics 15.1 Graphical User Interfaces
Chapter 8: Writing Graphical User Interfaces
Goals Give student some idea what this class is about
Computer presentation
Event Driven Programming Dick Steflik
Fundamentals of Python: From First Programs Through Data Structures
Chapter 2 Visual Basic Interface
Event Driven Programming
Predefined Dialog Boxes
Simple Windows Applications
Development The Foundation Window.
Working with Symbols and Interactivity
The Basic Usage and The Event Handling in Glade.
How to Submit Google Docs to the Homework Drop Box
Chapter 15: GUI Applications & Event-Driven Programming
Constructors, GUI’s(Using Swing) and ActionListner
The University of Texas – Pan American
• Every signal is uniquely identified by a name,
Presentation transcript:

Building GUI applications with Python, GTK and Glade Pete Savage Building GUI applications with Python, GTK and Glade Theme created by Sakari Koivunen and Henrik Omma Released under the LGPL license.

Roadmap Why use python? The Concepts The Tools Example Advanced Resources Questions - Gulp!!

Why use Python? Easy to learn Promotes clean, readable code Cross platform Linux/Windows Good RAD (Rapid Application Development) Great Documentation

The Concepts Signal “clicked” Handler Action to be performed

The Tools Python Ties everything together, handlers etc Glade Designs the GUI Sets up signals with references PyGTK Interfaces between python and GTK GTK Library for drawing and handling graphical elements

Glade Easy to create complex GUI Can handle linking of signals to handlers via a “dictionary” Can produce large-ish files

Glade Designer Toolbox Properties Project GUI Preview

Create an example An application that counts each time a button is clicked Presents a dialog box when the total button is clicked

What have we done? Created example.glade file Created main window Set up initial widgets Tied widget signals to references

Python program Import glade Create GUI class Assign signal references to handler functions Write handler functions

Extending the program Event handlers – act as an interrupt e.g. “Are you sure you want to quit?”

The “delete_event” signal User clicks the X button False Further handlers/methods allowed to run Handler returns True/False Class tries to delete widget program quits True Any further handlers/methods are ignored as event effectively deleted dialog box “Do you want to quit?” program continues “delete_event” signal is emitted Signal invokes handler on_delete_event

Advanced Topics Creating your own widgets Using Drag and Drop methods Using treestores and liststores

Resources Python website http://www.python.org PyGTK website http://www.pygtk.org Gnome website http://www.gnome.org

Topics Covered Why use python? The Concepts The Tools Example Advanced Resources Questions - Gulp!!

Questions? Questions?