12
OkButton : PgtkButton;
13
InfoLabel : PGtkLabel;
15
PAboutForm = ^TAboutForm;
17
Function NewAboutForm : PAboutForm;
18
Procedure ShowAboutForm(Form : PAboutForm);
23
SInfo : PChar = 'File explorer demo'#10'Florian Klaempfl'#10'Michael Van Canneyt';
24
SAboutTitle : Pchar = 'About File explorer';
26
procedure DestroyAbout(Widget : PGtkWidget; About : PAboutForm);cdecl;
32
Function NewAboutForm : PAboutForm;
35
Result:=New(PAboutForm);
38
Window:=PgtkDialog(gtk_dialog_new);
39
gtk_window_set_modal(PgtkWindow(Window),True);
40
gtk_window_set_title(PgtkWindow(Window),SAboutTitle);
41
gtk_widget_set_usize(PGtkWidget(Window),250,150);
42
gtk_window_set_policy(PgtkWindow(Window),0,0,0);
43
gtk_window_set_position(PGtkWindow(Window),GTK_WIN_POS_CENTER);
44
OkButton:=PGtkButton(gtk_button_new_with_label(' Ok '));
45
gtk_box_pack_start(PgtkBox(Window^.action_area),PGtkWidget(Okbutton),False,False,5);
46
gtk_window_set_focus(PGtkWindow(Window),PGtkWidget(OkButton));
47
gtk_widget_show(PGtkWidget(OkButton));
48
InfoLabel:=PgtkLabel(gtk_label_new(SInfo));
49
gtk_box_pack_start(PGtkBox(Window^.vbox),PGtkWidget(InfoLabel),True,True,10);
50
gtk_widget_show(PGtkWidget(InfoLabel));
51
gtk_signal_connect(PGtkObject(Window),'destroy',
52
TGTKSignalFunc(@DestroyAbout),Result);
53
gtk_signal_connect_object(PgtkObject(OKButton),'clicked',
54
GTK_SIGNAL_FUNC(@gtk_widget_destroy),
59
Procedure ShowAboutForm(Form : PAboutForm);
62
gtk_window_set_modal(PgtkWindow(Form^.Window),True);
63
gtk_widget_show(PgtkWidget(Form^.Window));
b'\\ No newline at end of file'