~ubuntu-branches/ubuntu/intrepid/libgtkada2/intrepid

« back to all changes in this revision

Viewing changes to src/gtkada-mdi.ads

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-08-11 09:46:51 UTC
  • mfrom: (6.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20080811094651-9mjd6acwa98ffw5c
Tags: 2.12.0-2ubuntu1
Add lpia to supported architectures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
-----------------------------------------------------------------------
2
2
--               GtkAda - Ada95 binding for Gtk+/Gnome               --
3
3
--                                                                   --
 
4
--                 Copyright (C) 2001-2007 AdaCore                   --
4
5
--                                                                   --
5
6
-- This library is free software; you can redistribute it and/or     --
6
7
-- modify it under the terms of the GNU General Public               --
331
331
   -----------
332
332
 
333
333
   function Create_Menu
334
 
     (MDI : access MDI_Window_Record) return Gtk.Menu.Gtk_Menu;
 
334
     (MDI               : access MDI_Window_Record;
 
335
      Accel_Path_Prefix : String := "<gtkada>") return Gtk.Menu.Gtk_Menu;
335
336
   --  Create a dynamic menu that can then be inserted into a menu bar. This
336
337
   --  menu is dynamic, ie its content will changed based on the focus
337
338
   --  child.
338
339
   --  If this function is called several times, the same menu is returned
339
 
   --  every time.
 
340
   --  every time. Accel_Path_Prefix must be the same for every call.
 
341
   --  Accel_Path_Prefix is used so that the key shortcuts associated with
 
342
   --  these menu items can be changed dynamically by the user (see
 
343
   --  gtk-accel_map.ads). The prefix must start with "<" and end with ">".
340
344
 
341
345
   ------------------------
342
346
   -- Selecting children --
359
363
   --  null is returned if no child has the focus.
360
364
 
361
365
   procedure Set_Focus_Child
362
 
     (MDI : access MDI_Window_Record;
 
366
     (MDI        : access MDI_Window_Record;
363
367
      Containing : access Gtk.Widget.Gtk_Widget_Record'Class);
364
368
   --  Give the focus to the child containing Containing. This will not
365
369
   --  Grab_Focus for the child in all cases, since you might want to give the
487
491
   --  window manager handle the windows. If All_Floating is True, children
488
492
   --  can no longer be maximized.
489
493
 
 
494
   procedure Use_Short_Titles_For_Floats
 
495
     (MDI : access MDI_Window_Record; Short_Titles : Boolean);
 
496
   --  If Short_Titles is set to true, all floating children will use their
 
497
   --  short titles.
 
498
 
490
499
   ---------------------------
491
500
   -- Reorganizing children --
492
501
   ---------------------------
495
504
     (Child : access MDI_Child_Record'Class; Give_Focus : Boolean := True);
496
505
   --  Put Child in the foreground.
497
506
   --  Note that this does not give the focus to this child, unless
498
 
   --  Give_Focus is set to True
 
507
   --  Give_Focus is set to True. If Child and the current focus child are in
 
508
   --  the same notebook, Child will always gain the focus, so that the focus
 
509
   --  is not left on an invisible window.
499
510
 
500
511
   function Is_Raised (Child : access MDI_Child_Record'Class) return Boolean;
501
512
   --  Whether the child is currently raised, ie fully visible to the user
554
565
 
555
566
      type Save_Desktop_Function is access function
556
567
        (Widget : access Gtk.Widget.Gtk_Widget_Record'Class;
557
 
         User   : User_Data)
558
 
         return Glib.Xml_Int.Node_Ptr;
 
568
         User   : User_Data) return Glib.Xml_Int.Node_Ptr;
559
569
      --  A general function that dumps the parameters of a widget into an XML
560
570
      --  tree.
561
571
      --
725
735
   --
726
736
   --  </signals>
727
737
 
 
738
   Signal_Child_Selected       : constant Signal_Name :=
 
739
                                   "child_selected";
 
740
   Signal_Float_Child          : constant Signal_Name :=
 
741
                                   "float_child";
 
742
   Signal_Child_Title_Changed  : constant Signal_Name :=
 
743
                                   "child_title_changed";
 
744
   Signal_Child_Added          : constant Signal_Name :=
 
745
                                   "child_added";
 
746
   Signal_Child_Removed        : constant Signal_Name :=
 
747
                                   "child_removed";
 
748
   Signal_Child_Icon_Changed   : constant Signal_Name :=
 
749
                                   "child_icon_changed";
 
750
   Signal_Children_Reorganized : constant Signal_Name :=
 
751
                                   "children_reorganized";
 
752
   Signal_Delete_Event         : constant Signal_Name :=
 
753
                                   "delete_event";
 
754
   Signal_Selected             : constant Signal_Name :=
 
755
                                   "selected";
 
756
   Signal_Unfloat_Child        : constant Signal_Name :=
 
757
                                   "unfloat_child";
 
758
 
728
759
private
729
760
   type String_Access is access all UTF8_String;
730
761
 
807
838
      --  The child that currently has the focus. Some default actions will
808
839
      --  apply to this child only.
809
840
 
 
841
      Accel_Path_Prefix  : String_Access;
 
842
      --  The Accel path used for the dynamic menu
 
843
 
810
844
      Menu               : Gtk.Menu.Gtk_Menu;
811
845
      Float_Menu_Item    : Gtk.Check_Menu_Item.Gtk_Check_Menu_Item;
812
846
      Float_Menu_Item_Id : Gtk.Handlers.Handler_Id;
855
889
      All_Floating_Mode : Boolean := False;
856
890
      --  Set to true if all windows should be set to floating
857
891
 
 
892
      Use_Short_Titles_For_Floats : Boolean := False;
 
893
      --  Set to true if all floating children should use their short titles
 
894
 
858
895
      --  Handling of Dnd
859
896
      Drag_Start_X, Drag_Start_Y : Gint;
860
897
      In_Drag : Drag_Status := No_Drag;
868
905
   pragma Inline (Get);
869
906
   pragma Inline (Next);
870
907
   pragma Inline (First_Child);
 
908
 
871
909
end Gtkada.MDI;