Presentation is loading. Please wait.

Presentation is loading. Please wait.

Development The Foundation Window.

Similar presentations


Presentation on theme: "Development The Foundation Window."— Presentation transcript:

1 Development The Foundation Window.
Sung-Ju Kang Department of Physics Kangwon National University  Example Program for The User Interface Program to make the Text Editor.  Elements for The Example Menu: New, Open, Save, Font, Cut, Copy, Paste Toolbar: New, Save Dialog box: File selection, Font selection

2 Defining Signal Handlers
Item Event Work Menu Activate callbacks.c Interface.c Toolbar Click Glade GTK

3 Exit Button of Menu Signal Handlers
Example Exit Button of Menu Signal Handlers We must understand the signal of delete_event. And in Properties window entry GRADE To connect from signal and handler to inner source.

4 Linking The Handlers You have a directory with several files in it and a scr subdirectory. The following details some of the gtk calls needed to make the handlers work in callbacks.c . Now load up callbacks.c and add in the code. gboolean on_window1_delete_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) { gtk_exit( 0 ); return FALSE; } void on_exit1_activate (GtkMenuItem *menuitem, Adding the Exit Calls

5 Save the file and compile the code again.
Start up your program.

6 Glade Widgets in More Detail: Gtk+ Basic
Glade builds the code to create the windows and boxes and popups you design into interface.c. •Window • Menu Bar • Toolbar • Handle Box • Label • Text Entry • Combo Box • Text Box • Button • Toggle Button • Check Button • Radio Button • List • Tree • Columned List • Columned Tree • Option Menu • Spin Button • Progress Bar • Status Bar • Pixmap • Drawing Area • Dialog Window • Color Selection Dialog • File Selection Dialog • Font Selection Dialog • Horizontal Box • Vertical Box • Table Box •Fixed Positions • Horizontal Pane • Vertical Pane • Notebook • Frame • Scrolled Window •Viewport


Download ppt "Development The Foundation Window."

Similar presentations


Ads by Google