~ubuntu-branches/ubuntu/dapper/fpc/dapper

« back to all changes in this revision

Viewing changes to docs/gtk3ex/ex1.pp

  • Committer: Bazaar Package Importer
  • Author(s): Carlos Laviola
  • Date: 2005-05-30 11:59:10 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20050530115910-x5pbzm4qqta4i94h
Tags: 2.0.0-2
debian/fp-compiler.postinst.in: forgot to reapply the patch that
correctly creates the slave link to pc(1).  (Closes: #310907)

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
procedure menu(Data : GPointer; Action : Guint; Widget : pGtkWidget); cdecl;
20
20
 
21
 
Var 
 
21
Var
22
22
  TheLabel : PgtkWidget;
23
23
  LabelText : Pchar;
24
24
  S : AnsiString;
25
 
  
 
25
 
26
26
begin
27
27
  TheLabel  := g_list_nth_data(gtk_container_children(GTK_CONTAINER(Widget)),0);
28
28
  gtk_label_get(gtk_Label(theLabel),@LabelText);
43
43
Type
44
44
  FC = TGtkItemFactoryCallback;
45
45
 
46
 
Const 
 
46
Const
47
47
  NrMenuItems = 21;
48
48
  TheMenu : Array[1..NrMenuItems] of TGtkItemFactoryEntry = (
49
49
    (path:'/_File';Accelerator:Nil;Callback:Nil;Callback_action:1;item_type:'<Branch>'),
84
84
  MenuBar:=gtk_item_factory_get_widget (Factory, '<main>');
85
85
end;
86
86
 
87
 
    
 
87
 
88
88
begin
89
89
  gtk_init (@argc, @argv);
90
90
  window := gtk_window_new (GTK_WINDOW_TOPLEVEL);
91
 
  gtk_window_set_title (GTK_WINDOW(Window),'Menu using an item factory');  
 
91
  gtk_window_set_title (GTK_WINDOW(Window),'Menu using an item factory');
92
92
  gtk_widget_set_usize (Window, 300, 200);
93
93
  gtk_signal_connect (PGTKOBJECT (window), 'destroy',
94
94
                      GTK_SIGNAL_FUNC (@destroy), NULL);