Basic Usage of Glade Use Glade and create the interface

Slides:



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

Customizing the MOSS 2007 Search Results November 2007 Rafael Perez.
Using Macros and Visual Basic for Applications (VBA) with Excel
Access Lesson 2 Creating a Database
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Introduction to Visual Basic Chulantha Kulasekere.
© 2011 Bentley Systems, Incorporated 1 | Create Custom Geographic Coordinate System Problem : Project requires a new or updated GCS that.
Visual Basic 2008 Express Edition The IDE. Visual Basic 2008 Express The Start Page Recent Projects Open an existing project Create a New Project.
Lesson 13: Building Web Forms Introduction to Adobe Dreamweaver CS6 Adobe Certified Associate: Web Communication using Adobe Dreamweaver CS6.
Bertrand Bellenot ROOT Users Workshop Mar ROOT GUI Builder Status & Plans ROOT & External GUI World MFC, FOX, Qt, PVSS… Snapshot of the Future.
Java Programming, 3e Concepts and Techniques Chapter 3 Section 65 – Manipulating Data Using Methods – Java Applet.
CSCI 3328 Object Oriented Programming in C# Chapter 2: Introduction to Visual C# Programming 1 Xiang Lian The University of Texas Rio Grande Valley Edinburg,
Dreamweaver – Dreamweaver Extras Web Design Section 8-4 Part or all of this lesson was adapted from the University of Washington’s “Web Design & Development.
Adding User Interactivity – Lesson 51 Adding User Interactivity Lesson 5.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
Microsoft Visual Basic 2005 CHAPTER 7 Creating Web Applications.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Social Science Research Design and Statistics, 2/e Alfred P. Rovai, Jason D. Baker, and Michael K. Ponton Entering Data Manually PowerPoint Prepared by.
Creating Buttons – Lesson 51 Creating Buttons Lesson 5.
Dreamweaver MX. 2 Overview of Templates n Forms enable you to collect data from ______. n A form contains ________ such as text fields, radio buttons,
Click your mouse to continue. Creating a New Mail Merge Document When you need to create a form letter but do not have an existing main document, you can.
© 2008 The McGraw-Hill Companies, Inc. All rights reserved. WORD 2007 M I C R O S O F T ® THE PROFESSIONAL APPROACH S E R I E S Lesson 15 Advanced Tables.
Microsoft Outlook 2010 Chapter 3 Managing Contacts and Personal Contact Information with Outlook.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
Advanced samples Printing two types of labels from two different custom forms We have two different labels that contain the same data. One is suitable.
Microsoft Access 2010 Chapter 8 Advanced Form Techniques.
Unit 5, Lesson 1 Working with Databases. Objectives Identify the parts of the Access screen. Identify the parts of the Access screen. Understand the purpose.
Course ILT Forms and queries Unit objectives Create forms by using AutoForm and the Form Wizard, and add or modify form headers and footers Open and enter.
Borland Graphics Interface in the Windows KwangWoo Choi Department of Physics Kangwon National University Using the BGI(Borland Graphic Interface) in the.
Stacked Canvas A content canvas is a main from canvas while a stacked canvas is a secondary canvas that overlays or partially covers a content canvas.
Copyright © 2010 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design Second Edition by Tony Gaddis.
Page Designer Storyboard J. A. Fitzpatrick December 2004.
Microsoft ® Outlook 2000 Integrating Outlook with Office Applications.
1 After completing this lesson, you will be able to: Create a form using AutoForm. Create a form using the Form Wizard. Add controls to a form. Modify.
Chapter 3 I Need a Tour Guide (Introduction to Visual Basic 2010) Clearly Visual Basic: Programming with Visual Basic nd Edition.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 3 Building an Application in the Visual Basic.NET Environment.
1 of 6 This document is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT. © 2007 Microsoft Corporation.
Chapter 5 Introduction To Form Builder. Lesson C Objectives  Use sequences to automatically generate primary key values in a form  Create lists of values.
More Visual Basic!. Creating a Standalone Program A standalone program will allow you to make a program file that can be run like other Windows programs,
IE 411/511: Visual Programming for Industrial Applications Lecture Notes #2 Introduction to the Visual Basic Express 2010 Integrated Development Environment.
Integrating Components and Dynamic Text Boxes with the Animated Map– Lesson 101 Integrating Components and Dynamic Text Boxes with the Animated Map Lesson.
Problem: Take Two Numbers, Add Them Together And Display The Results. Now To Build The Flowchart… We Probably Need One Like This… Let’s Add The Routines…
Chapter 10 Using Macros, Controls and Visual Basic for Applications (VBA) with Excel Microsoft Excel 2013.
Submitted by: DRPU Software Team Site:
Basic Web Design UVICELL Week 4 Templates and site management Week 4 Templates and site management.
Chapter 3: I Need a Tour Guide (Introduction to Visual Basic 2012)
Excel Tutorial 8 Developing an Excel Application
Topics Graphical User Interfaces Using the tkinter Module
Lexical Reference Variables in Graphics and List Box in Forms
Fedora Project / Red Hat
Chapter Topics 15.1 Graphical User Interfaces
Address Book Example
My Final Project: Calorie Counter
MFC Dialog Application
Microsoft Access 2003 Illustrated Complete
Chapter 7 Advanced Form Techniques
Welcome with Ifs CSC 230 (Blum).
Development The Foundation Window.
The Basic Usage and The Event Handling in Glade.
I dragged over the label tool (A icon) and put it on the form.
Chapter 15: GUI Applications & Event-Driven Programming
YOUR text YOUR text YOUR text YOUR text
Control of The Text Area and The Status Bar.
Development of The Menu System
• Every signal is uniquely identified by a name,
Development of The Menu System
CHAPTER FOUR VARIABLES AND CONSTANTS
Development the Text Editor
Presentation transcript:

Basic Usage of Glade Use Glade and create the interface Kwangwoo Choi Department of Physics Kangwon National University Use Glade and create the interface Build the source code using Glade Edit the source code manually (through emacs or gedit) Compile your project files

Creating the interface • Click on Window in the Palette • Select Fixed Position in the Palette and click in the window1 • Add two text entry widgets, two buttons, one pixmap and two radio buttons to your container in the window1. Also add a list widget • Name one button as BT_OK and as label it as OK. Name the other button BT_EXIT and label it as Exit. • Click on the window1 on the Glade window and from the Properties window, select suitable width and height for your window.

Editing the code voidon_BT_OK_clicked (GtkButton *button,gpointer user_data){ /* INITIALIZATIONS START HERE */ GtkEntry *two; // this will be used for the second entry GtkWidget * listitem; gchar str[50]; gchar * p_str = str; GtkWidget *dialog, *label, *okay_button; char *text;  /* COPYING THE TEXT ENTERED IN ENTRY1 TO THE LIST WIDGET */ GtkWidget * entry = lookup_widget(GTK_WIDGET(button), "entry1");// Getting pointers to GtkWidget * list = lookup_widget(GTK_WIDGET(button), "list1");// entry1 & list1    strncpy(p_str, gtk_entry_get_text(GTK_ENTRY(entry)),50);// Storing the text of entry1 in the variable p_str  listitem = gtk_list_item_new_with_label (p_str);// Adding p_str to the list gtk_container_add (GTK_CONTAINER (list), listitem);  gtk_widget_show(listitem);// Showing the updated list

/* COPYING THE TEXT ENTERED IN entry1 TO entry2 */ text = gtk_entry_get_text(entry); // obtain the text from the widget two = GTK_ENTRY(lookup_widget(button, "entry2")); // obtain the pointer to the second GtkEntry widgetgtk_entry_set_text(two, text); // set the text for the widget /* SHOWING A DIALOG BOX WITH THE TEXT OF entry1 IN IT */ dialog = gtk_dialog_new();  label = gtk_label_new (text);// Create the widgets of the dialog box okay_button = gtk_button_new_with_label("Okay");    gtk_signal_connect_object(GTK_OBJECT (okay_button), "clicked", gtk_widget_destroy, GTK_OBJECT(dialog)); // Ensure that the dialog box is destroyed when the user clicks ok. gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->action_area), okay_button); // Add the Okay Button to the dialof  gtk_container_add (GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), label); // Add the label gtk_widget_show_all (dialog); // Show everything the dialog. }

Summary • Glade is actually a tool that creates the interface, i.e. the for windows, the dialogs, the widgets, and creates a framework your code