annotate Gui/mplayer/gtk/mb.h @ 1906:01bab6f60ede

mer kell
author pontscho
date Mon, 17 Sep 2001 21:15:14 +0000
parents b55335dc4df8
children 83291fafe66c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
2 #ifndef __MY_MESSAGEBOX
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
3 #define __MY_MESSAGEBOX
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
4
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
5 GtkWidget * gtkMessageBoxText;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
6
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
7 void on_MessageBox_destroy( GtkObject * object,gpointer user_data )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
8 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
9 gtk_widget_hide( MessageBox );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
10 gtkVisibleMessageBox=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
11 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
12
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
13 void on_Ok_released( GtkButton * button,gpointer user_data )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
14 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
15 gtk_widget_hide( MessageBox );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
16 gtkVisibleMessageBox=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
17 gtkSendMessage( evMessageBox );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
18 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
19
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
20 GtkWidget * create_MessageBox( void )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
21 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
22 GtkWidget *MessageBox;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
23 GtkWidget *frame1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
24 GtkWidget *frame2;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
25 GtkWidget *frame3;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
26 GtkWidget *frame4;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
27 GtkWidget *vbox1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
28 GtkWidget *vbox2;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
29 GtkWidget *hseparator1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
30 GtkWidget *hbuttonbox1;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
31 GtkWidget *Ok;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
32 GtkAccelGroup *accel_group;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
33
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
34 accel_group=gtk_accel_group_new();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
35
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
36 MessageBox=gtk_window_new( GTK_WINDOW_DIALOG );
1884
d21f8afc7680 add to multi lang support
pontscho
parents: 1693
diff changeset
37 gtk_widget_set_name( MessageBox,MSGTR_MessageBox );
d21f8afc7680 add to multi lang support
pontscho
parents: 1693
diff changeset
38 gtk_object_set_data( GTK_OBJECT( MessageBox ),MSGTR_MessageBox,MessageBox );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
39 gtk_widget_set_usize( MessageBox,420,128 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
40 GTK_WIDGET_SET_FLAGS( MessageBox,GTK_CAN_FOCUS );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
41 GTK_WIDGET_SET_FLAGS( MessageBox,GTK_CAN_DEFAULT );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
42 gtk_widget_set_events( MessageBox,GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK );
1884
d21f8afc7680 add to multi lang support
pontscho
parents: 1693
diff changeset
43 gtk_window_set_title( GTK_WINDOW( MessageBox ),MSGTR_MessageBox );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
44 gtk_window_set_position( GTK_WINDOW( MessageBox ),GTK_WIN_POS_CENTER );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
45 gtk_window_set_modal( GTK_WINDOW( MessageBox ),TRUE );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
46 gtk_window_set_policy( GTK_WINDOW( MessageBox ),FALSE,FALSE,FALSE );
1884
d21f8afc7680 add to multi lang support
pontscho
parents: 1693
diff changeset
47 gtk_window_set_wmclass( GTK_WINDOW( MessageBox ),MSGTR_MessageBox,MSGTR_MessageBox );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
48
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
49 frame1=gtk_frame_new( NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
50 gtk_widget_set_name( frame1,"frame1" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
51 gtk_widget_ref( frame1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
52 gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame1",frame1,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
53 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
54 gtk_widget_show( frame1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
55 gtk_container_add( GTK_CONTAINER( MessageBox ),frame1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
56 gtk_frame_set_shadow_type( GTK_FRAME( frame1 ),GTK_SHADOW_IN );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
57
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
58 frame2=gtk_frame_new( NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
59 gtk_widget_set_name( frame2,"frame2" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
60 gtk_widget_ref( frame2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
61 gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame2",frame2,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
62 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
63 gtk_widget_show( frame2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
64 gtk_container_add( GTK_CONTAINER( frame1 ),frame2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
65 gtk_frame_set_shadow_type( GTK_FRAME( frame2 ),GTK_SHADOW_NONE );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
66
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
67 frame3=gtk_frame_new( NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
68 gtk_widget_set_name( frame3,"frame3" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
69 gtk_widget_ref( frame3 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
70 gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame3",frame3,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
71 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
72 gtk_widget_show( frame3 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
73 gtk_container_add( GTK_CONTAINER( frame2 ),frame3 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
74
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
75 frame4=gtk_frame_new( NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
76 gtk_widget_set_name( frame4,"frame4" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
77 gtk_widget_ref( frame4 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
78 gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame4",frame4,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
79 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
80 gtk_widget_show( frame4 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
81 gtk_container_add( GTK_CONTAINER( frame3 ),frame4 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
82 gtk_frame_set_shadow_type( GTK_FRAME( frame4 ),GTK_SHADOW_NONE );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
83
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
84 vbox1=gtk_vbox_new( FALSE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
85 gtk_widget_set_name( vbox1,"vbox1" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
86 gtk_widget_ref( vbox1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
87 gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"vbox1",vbox1,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
88 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
89 gtk_widget_show( vbox1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
90 gtk_container_add( GTK_CONTAINER( frame4 ),vbox1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
91
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
92 vbox2=gtk_vbox_new( FALSE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
93 gtk_widget_set_name( vbox2,"vbox2" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
94 gtk_widget_ref( vbox2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
95 gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"vbox2",vbox2,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
96 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
97 gtk_widget_show( vbox2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
98 gtk_box_pack_start( GTK_BOX( vbox1 ),vbox2,TRUE,FALSE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
99
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
100 gtkMessageBoxText=gtk_label_new( "Ez." );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
101 gtk_widget_set_name( gtkMessageBoxText,"gtkMessageBoxText" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
102 gtk_widget_ref( gtkMessageBoxText );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
103 gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"gtkMessageBoxText",gtkMessageBoxText,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
104 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
105 gtk_widget_show( gtkMessageBoxText );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
106 gtk_box_pack_start( GTK_BOX( vbox2 ),gtkMessageBoxText,FALSE,FALSE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
107 // gtk_widget_set_usize( gtkMessageBoxText,-2,77 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
108 gtk_widget_set_usize( gtkMessageBoxText,384,77 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
109 gtk_label_set_justify( GTK_LABEL( gtkMessageBoxText ),GTK_JUSTIFY_FILL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
110 gtk_label_set_line_wrap( GTK_LABEL( gtkMessageBoxText ),TRUE );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
111
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
112 hseparator1=gtk_hseparator_new();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
113 gtk_widget_set_name( hseparator1,"hseparator1" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
114 gtk_widget_ref( hseparator1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
115 gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hseparator1",hseparator1,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
116 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
117 gtk_widget_show( hseparator1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
118 gtk_box_pack_start( GTK_BOX( vbox2 ),hseparator1,TRUE,TRUE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
119
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
120 hbuttonbox1=gtk_hbutton_box_new();
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
121 gtk_widget_set_name( hbuttonbox1,"hbuttonbox1" );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
122 gtk_widget_ref( hbuttonbox1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
123 gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hbuttonbox1",hbuttonbox1,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
124 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
125 gtk_widget_show( hbuttonbox1 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
126 gtk_box_pack_start( GTK_BOX( vbox1 ),hbuttonbox1,FALSE,FALSE,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
127 GTK_WIDGET_SET_FLAGS( hbuttonbox1,GTK_CAN_FOCUS );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
128 GTK_WIDGET_SET_FLAGS( hbuttonbox1,GTK_CAN_DEFAULT );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
129 gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
130 gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox1 ),60,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
131 gtk_button_box_set_child_ipadding( GTK_BUTTON_BOX( hbuttonbox1 ),10,0 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
132
1884
d21f8afc7680 add to multi lang support
pontscho
parents: 1693
diff changeset
133 Ok=gtk_button_new_with_label( MSGTR_Ok );
d21f8afc7680 add to multi lang support
pontscho
parents: 1693
diff changeset
134 gtk_widget_set_name( Ok,MSGTR_Ok );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
135 gtk_widget_ref( Ok );
1884
d21f8afc7680 add to multi lang support
pontscho
parents: 1693
diff changeset
136 gtk_object_set_data_full( GTK_OBJECT( MessageBox ),MSGTR_Ok,Ok,
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
137 ( GtkDestroyNotify ) gtk_widget_unref );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
138 gtk_widget_show( Ok );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
139 gtk_container_add( GTK_CONTAINER( hbuttonbox1 ),Ok );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
140 gtk_widget_set_usize( Ok,100,-2 );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
141 GTK_WIDGET_SET_FLAGS( Ok,GTK_CAN_DEFAULT );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
142 gtk_widget_add_accelerator( Ok,"released",accel_group,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
143 GDK_Return,0,
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
144 GTK_ACCEL_VISIBLE );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
145
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
146 gtk_signal_connect( GTK_OBJECT( MessageBox ),"destroy",
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
147 GTK_SIGNAL_FUNC( on_MessageBox_destroy ),
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
148 NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
149 gtk_signal_connect( GTK_OBJECT( Ok ),"released",
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
150 GTK_SIGNAL_FUNC( on_Ok_released ),
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
151 NULL );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
152
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
153 gtk_window_add_accel_group( GTK_WINDOW( MessageBox ),accel_group );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
154
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
155 return MessageBox;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
156 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
157
1885
b55335dc4df8 add to multi lang support
pontscho
parents: 1884
diff changeset
158 #endif