PHP-GTK2 Newsletter

PHP-GTK2 Tips & Techniques
FREE Newsletter
by kksou




PHP-GTK2 Demystified - Master the three Key Concepts of PHP-GTK2
Written by kksou   
Tuesday, 11 March 2008

PHP-GTK v2.0 has just been released!

To encourage more people to learn about this exciting and powerful tool, I've decided to make my ebook "PHP-GTK2 Demystified" freely available online.

However, I'm maintaining this site as a hobby at night after work. I'm also working on one new sample code a day. So please give me a bit of patience as I convert the ebook into html pages one by one.

Of course, if...

  • you do not have the patience, or
  • you prefer having a coffee in Starbucks and read the entire book in one to two hours, or
  • you're going to the beach this weekend and want to read the book under the sun, or
  • you just want to give some support to this site

you're most welcomed to grab a copy of the ebook! It's in pdf format. So you could easily print a copy and read it anywhere. Saves you lots of time and paper printing the pages off the browser. Along with this ebook, you will also get a zip file containing all the sample codes in this book. I've reduced the price from $37 to just $10! If you're serious about using PHP-GTK, you will find this the best investment you have in programming books.

Background

This is the first ebook I wrote on PHP-GTK2. It was first released February 2007.

I wrote this book in the hope that it will save you some time picking up PHP-GTK2. I've been developing applications using PHP for years. When I first encountered PHP-GTK2, I was thrilled at the thought of being able to develop cross-platform desktop applications using my knowledge of PHP.

Getting "hello world" to run is easy enough. However, the moment I started to develop serious applications using PHP-GTK2, I was stuck! I find that I couldn't even get simple stuff working - such as positioning and setting the size of the widgets. Due to the lack of documentation on PHP-GTK, I had to spend countless hours of research on the net, asking friends, and going through numerous trials and errors.

This is why I've written this book, so that you do not need to "grope in the dark" like what I've been through in picking up PHP-GTK2.

What does this book cover?

This book focuses on the three most important concepts in PHP-GTK2:

  • size and positioning of widgets
  • signal handling, and
  • object-oriented framework

The more you program PHP-GTK (even if you're using Glade), the more you're feel that everything boils down to a good understanding of these three key concepts. In this book, I'll show you not only the "how's", but explains the "why's". With the knowledge you pick up from this book, you will be able to understand the rest of the 400+ recipes available from this web site.

Table of Contents

Note: When a chapter is finished, you'll see the corresponding heading below converted to a link.

Chapter 1 Getting Started

    1.1 Hello World!
    1.2 Display a button
    1.3 Responding to button click
    1.4 Adding two or more widgets
    1.5 Resize application window

Chapter 2 Size & Positioning

    2.1 Understand the Expand parameter
    2.2 Understand the Fill parameter
    2.3 Display the button in default size
    2.4 Right align the button
    2.5 Center the button horizontally
    2.6 Center the button horizontally and vertically
    2.7 Set the size of button
    2.8 Have 3 buttons of size 60x36 at top left-hand corner
    2.9 Precise positioning of buttons
    2.10 Introducing the spacer
    2.11 Introducing the expandable spacer
    2.12 Add a Quit button that always stay at top right-hand
    2.13 A simple form with only one entry field
    2.14 A form with three fields - Part 1
    2.15 A form with three fields - Part 2
    2.16 A form with three fields - Part 3
    2.17 Summary

Chapter 3 Signal Handling

    3.1 Signal basics
    3.2 Handling three buttons with one signal handler
    3.3 Handling multiple signals with one signal handler - one more example
    3.4 Passing additional data to callback function - Part 1
    3.5 Passing additional data to callback function - Part 2
    3.6 Passing additional data to callback function - Part 3
    3.7 Object-oriented connections
    3.8 Callback methods in another class
    3.9 Manually generating a signal
    3.10 Clickable label
    3.11 Useful event properties from button-press-event
    3.12 Signal propagation
    3.13 Handling keypress with key-press-event
    3.14 Signal propagation for key-press-event
    3.15 Summary

Chapter 4 Object-oriented Framework

    4.1 The object-oriented widgets
    4.2 Objected-oriented programming - Variation 1
    4.3 Objected-oriented programming - Variation 2
    4.4 Objected-oriented programming - Variation 3
    4.5 Objected-oriented programming - Variation 4
    4.6 Creating your own widgets
    4.7 Summary

Chapter 5 Putting It Altogether

    5.1 Layout the widgets
    5.2 Set up signal handlers
    5.3 Add in core business logic
    5.4 Add validation checks
    5.5 Resize of window
    5.6 Summary

 

Add comment


Security code
Refresh

Next >

Blog - Forum - Privacy Policy - Contact Us
Links - Classes - Social Business - BPM - Web - General
Copyright © 2006-2013. kksou.com. All Rights Reserved