#include <gtk/gtk.h>
Go to the source code of this file.
Functions | |
GtkWidget * | create_stylus_window (GtkWidget *parent) |
void | load_stylus_settings () |
void | save_stylus_settings () |
GtkWidget* create_stylus_window | ( | GtkWidget * | parent | ) |
Copyright (C) 2008 iRex Technologies B.V. All rights reserved.
Definition at line 91 of file stylus.c.
References create_settingsview(), create_stylus_widgets(), create_title(), init_widgets_with_settings(), on_focus_in(), on_focus_out(), on_listview_navigate_cursor(), on_listview_row_activated(), SMALL_SPACING, WINDOW_BORDER_PADDING, WINDOW_BOTTOM_PADDING, WINDOW_H_PADDING, and WINDOW_TOP_ALT_PADDING.
Referenced by create_concrete_win().
00092 { 00093 // create top window 00094 GtkWidget* top_window = parent; 00095 gtk_window_maximize(GTK_WINDOW(top_window)); 00096 gtk_window_set_resizable(GTK_WINDOW(top_window), FALSE); 00097 gtk_container_set_border_width(GTK_CONTAINER(top_window),WINDOW_BORDER_PADDING ); 00098 gtk_window_set_modal(GTK_WINDOW(top_window), TRUE); 00099 00100 // top level vbox (vboxtop) 00101 GtkWidget* vboxtop = gtk_vbox_new(FALSE, 0); 00102 gtk_container_add(GTK_CONTAINER(top_window), vboxtop); 00103 00104 // add header container the title and subtitle of this settings page 00105 create_title(GTK_VBOX(vboxtop), _("Settings"), _("Stylus Calibration")); 00106 00107 // add the back/exit bar below the title 00108 GtkWidget* view = create_settingsview(); 00109 gtk_box_pack_start(GTK_BOX(vboxtop), view, FALSE, FALSE,0 ); 00110 g_signal_connect(view, "row-activated", G_CALLBACK(on_listview_row_activated), NULL ) ; 00111 g_signal_connect(view, "navigate-cursor", G_CALLBACK(on_listview_navigate_cursor), NULL ) ; 00112 g_signal_connect(view, "focus-in-event", G_CALLBACK(on_focus_in), NULL ); 00113 g_signal_connect(view, "focus-out-event", G_CALLBACK(on_focus_out), NULL ); 00114 00115 // add an alignment below the exit bar 00116 GtkWidget* alignment = gtk_alignment_new(0, 0, 1.0, 0.0); 00117 gtk_container_add(GTK_CONTAINER(vboxtop), alignment); 00118 00119 // introdude a frame in the alignment 00120 GtkWidget* frame = gtk_frame_new(NULL); 00121 gtk_widget_set_name(frame, "irex-margins-frame"); 00122 gtk_container_add(GTK_CONTAINER(alignment), frame); 00123 gtk_container_set_border_width(GTK_CONTAINER(frame), 3); 00124 00125 // alignment in frame 00126 GtkWidget* alignment2 = gtk_alignment_new(0.0, 0.0, 1.0, 1.0); 00127 gtk_container_add(GTK_CONTAINER(frame), alignment2); 00128 gtk_alignment_set_padding(GTK_ALIGNMENT(alignment2), 00129 WINDOW_TOP_ALT_PADDING, 00130 WINDOW_BOTTOM_PADDING, 00131 WINDOW_H_PADDING, 00132 WINDOW_H_PADDING); 00133 00134 // vbox in alignment2 00135 GtkWidget* innervbox = gtk_vbox_new(FALSE, SMALL_SPACING); 00136 gtk_container_add(GTK_CONTAINER(alignment2), innervbox); 00137 00138 // The margin settings section. 00139 create_stylus_widgets(GTK_BOX(innervbox)); 00140 00141 // Update widget with current settings. 00142 init_widgets_with_settings(); 00143 00144 gtk_widget_grab_focus(view); 00145 00146 gtk_widget_show_all(top_window); 00147 return top_window; 00148 }
void load_stylus_settings | ( | ) |
Definition at line 151 of file stylus.c.
References LOGPRINTF.
Referenced by create_concrete_win().
00152 { 00153 LOGPRINTF("Loading stylus settings\n"); 00154 }