WxErlang Mats-Ola Persson.

Slides:



Advertisements
Similar presentations
What Was I Thinking??. Key Terms 1. Control 1. Control 2. Design Mode 2. Design Mode 3. Event 3. Event 4. Form 4. Form 5. Interface 5. Interface 6. Properties.
Advertisements

Introduction to Macromedia Director 8.5 – Lingo
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.
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.
Event Driven Programming and GUIs Part 3 CS221 – 4/15/09.
1 Chapter 7 Graphics and Event Handling. 2 Overview The java.awt and javax.swing packages and their subpackages support graphics and event handling. Many.
Graphical User Interface (GUI) Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
Essentials of Interactive Computer Graphics: Concepts and Implementation K. Sung, P. Shirley, S. Baer Intro and Chapter 1 Goals Give student some idea.
Graphical User Interface (GUI) Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
COMP 102 Topics in support of programming Windowed applications on the eagle unix server: wxWidgets and event driven programming.
1 GUI Elements in Java Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
GUI Programming in Java Tim McKenna GUI Programming Concepts l conventional programming: sequence of operations is determined by the program.
Graphical User Interfaces in Haskell Koen Lindström Claessen.
PROGRAMMING REVIEW Lab 2 EECS 448 Dr Fengjun Li and Meenakshi Mishra.
Introduction to Java Swing “We are the sultans of swing” – Mark Knopfler.
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 
GUI Programming in Java
Hands-on Introduction to Visual Basic.NET Programming Right from the Start with Visual Basic.NET 1/e 6.
Bertrand Bellenot ROOT Users Workshop Mar ROOT GUI Builder Status & Plans ROOT & External GUI World MFC, FOX, Qt, PVSS… Snapshot of the Future.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Chapter 8: Writing 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,
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
Chapter 8: Writing Graphical User Interfaces Visual Basic.NET Programming: From Problem Analysis to Program Design.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall
G RAPHICAL U SER I NTERFACE C ONCEPTS : P ART 1 1 Outline Introduction Windows Forms Event-Handling Model - Basic Event Handling.
Enhancing the Graphical User Interface Multiple Forms, Controls, and Menus.
Graphical User Interface Components Chapter What You Will Learn Text Areas Text Areas Sliders Sliders Menus Menus –With frames –Pop up menus Look.
CHAPTER TWO INTRODUCTION TO VISUAL BASIC © Prepared By: Razif Razali 1.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall
More on Hierarchies 1. When an object of a subclass is instantiated, is memory allocated for only the data members of the subclass or also for the members.
– Advanced Programming P ROGRAMMING IN Lecture 21 Introduction to Swing.
Graphics and Event-Driven Programming in Java John C. Ramirez Department of Computer Science University of Pittsburgh.
Computer Science 112 Fundamentals of Programming II Command Buttons and Responding to Events.
Meide Introduction Author: Limodou
Python Programming Graphical User Interfaces Saad Bani Mohammad Department of Computer Science Al al-Bayt University 1 st 2011/2012.
Computing Science 1P Lecture 17: Friday 23 rd February Simon Gay Department of Computing Science University of Glasgow 2006/07.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
CNS 1410 Graphical User Interfaces. Obectives Students should understand the difference between a procedural program and an Event Driven Program. Students.
Introduction to Visual Studio & GUI Programming Prepared by: Ahmad Ramin Rahimee Assistant Professor ICTI.
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,
The Abstract Window Toolkit (AWT) supports Graphical User Interface (GUI) programming. AWT features include: a rich set of user interface components; a.
Chapter 9 Advanced Assembly Modeling Techniques. After completing this chapter, you will be able to perform the following: –Create design view representations.
Copyright © 2015 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 13 GUI Programming.
GUIs Basic Concepts. GUI GUI : Graphical User Interface Window/Frame : a window on the screen Controls/Widgets : GUI components.
+ TIC-TAC-TOE GAME CAPSTONE PROJECT SEN Team Members Sno.NameITU ID 1Keerthi Alimity Venkata Ganugapati Sujitha Sanku Bavi Bharathan87550.
1 Lecture 5: Interactive Tools: Prototypers (HyperCard, Director, Visual Basic), Interface Builders Brad Myers Advanced User Interface Software.
Chapter 14: Introduction to Swing Components. Objectives Understand Swing components Use the JFrame class Use the JLabel class Use a layout manager Extend.
Guide to Programming with Python
Bringing families together CS 147: Introduction to HCI KinX Team Members Brandon, Development Jackie, Design Tony, User Testing / Documentation Shahab,
MATLAB and SimulinkLecture 61 To days Outline Graphical User Interface (GUI) Exercise on this days topics.
Visual Basic.Net. Software to Install Visual Studio 2005 Professional Edition (Requires Windows XP Pro) MSDN Library for Visual Studio 2005 Available.
Microsoft Foundation Classes
12-Jun-16 Event loops. 2 Programming in prehistoric times Earliest programs were all “batch” processing There was no interaction with the user Input Output.
Programming Logic and Design Seventh Edition Chapter 12 Event-Driven GUI Programming, Multithreading, and Animation.
Topics Graphical User Interfaces Using the tkinter Module
Event Loops and GUI Intro2CS – weeks
1. Introduction to Visual Basic
GUI Using Python.
Fundamentals of Python: From First Programs Through Data Structures
Event Driven Programming
EE 422C Java FX.
Chapter 15 Event-Driven Programming and Animations
Object Oriented Analysis and Design
This Week: Tkinter for GUI Interfaces Some examples
Hands-on Introduction to Visual Basic .NET
The Basic Usage and The Event Handling in Glade.
Computer Science 111 Fundamentals of Programming I User Interfaces
Constructors, GUI’s(Using Swing) and ActionListner
Presentation transcript:

wxErlang Mats-Ola Persson

wxErlang GUI library for Erlang write GUI applications cross platform cross platform look and feel

Example A “stupid” tic-tac-toe application No intelligent behavior is implemented Just the (good) looks

Creating a window create_window() -> wx:start(), % initialize wxErlang % create a frame (window) with no parent Frame = wx:frame(?NULL, ?wxID_ANY, “Hello World!”), wx:show(Frame). % make the frame visible

Creating a window Not very exciting: an empty window

Event-driven programming Things “react” to mouse clicks, mouse movements, etc. Event-handlers, callback functions

Events create_window() -> wx:start(), Frame = wx:frame(?NULL, ?wxID_ANY, “Hello World!”), % event-handler that reacts to close clicks wx:connect(Frame, ?wxEVT_CLOSE_WINDOW, fun(_,_) -> wx:quit() end), wx:show(Frame).

Layouts Platform independent layouts Sizers No fixed sized widgets, etc. Arbitrary complex layouts Let’s add the buttons!

Sizers create_grid(Frame) -> Grid = wx:grid_sizer(3), % a grid sizer with 3 cols create_buttons(Grid, Frame, 9), % create 9 buttons Grid. create_buttons(_, _, 0) -> ok;create_buttons(Grid, Frame, N) -> Button = wx:button(Frame, N), %a button without label wx:add(Grid, Button), % add button to the sizer create_buttons(Grid, Frame, N - 1).

The result A “shell” of a tic-tac-toe application

wxEtop Port of the old “etop” New features context menues view running code ...

From the programmers point of view wxErlang is verbose - like most GUI libraries Trial-and-error - like most GUI libraries Interface designers XRCed, DialogBlocks, etc.

Design decisions Binding to the C++ GUI library wxWidgets Get a lot for free “free” features from wxWidgets reduced maintenance work wxErlang interface resembles wxWidgets C++ interface free documentation(!) Varför wxWidgets?

Translation scheme Easy Functions Multiple return values => tuples ... Constants

Translation scheme Not as easy Classes Overloading and overriding functions Type system

Safety Checks arguments Types Primitive values Objects Sanity

Implementational details Most of the code is generated from wxWidgets headers Implemented as a “port program” Has a lot of bugs

Wrap up Current status - a prototyp wxEtop Perhaps 10% implemented Future

Questions?