TABLE OF CONTENTS


Toplevel/MainWindow [ Packages ]

[ Top ] [ Toplevel ] [ Packages ]

FUNCTION

 Provides code for manipulate main window widget

SOURCE

package Tcl.Tk.Ada.Widgets.Toplevel.MainWindow with
   SPARK_Mode
is

MainWindow/MainWindow.Bind_To_Main_Window_(function) [ Subprograms ]

[ Top ] [ MainWindow ] [ Subprograms ]

FUNCTION

 Get the associated Tcl script Script with the event Sequence in the main window.

SOURCE

   function Bind_To_Main_Window
     (Interp: in Tcl_Interp; Sequence: in String) return String with
      Pre => Sequence /= "";

PARAMETERS

 Interp   - Tcl interpreter to which main window scrip will be binded
 Sequence - Name of Tk event which will be binded with the script

EXAMPLE

   -- Get the script which will be run on press ALT-q on My_Interpreter Tcl interpreter
   Script: constant String := Bind_To_Main_Window(My_Interpreter, "<Alt-q>");

COMMANDS

 bind . sequence

HISTORY

 8.6.8 - Added

MainWindow/MainWindow.Bind_To_Main_Window_(procedure) [ Subprograms ]

[ Top ] [ MainWindow ] [ Subprograms ]

FUNCTION

 Associates Tcl script Script with the event Sequence in the main window.

SOURCE

   procedure Bind_To_Main_Window
     (Interp: in Tcl_Interp; Sequence: in String; Script: in String) with
      Pre => Sequence /= "" and Script /= "";

PARAMETERS

 Interp   - Tcl interpreter to which main window scrip will be binded
 Sequence - Name of Tk event which will be binded with the script
 Script   - Tcl code which will be binded to the Tk_Widget

EXAMPLE

   -- Close the program when the press ALT-q on My_Interpreter Tcl interpreter
   Bind_To_Main_Window(My_Interpreter, "<Alt-q>", "{exit}");

COMMANDS

 bind . sequence script

HISTORY

 8.6.1 - Moved from Tcl.Tk.Ada.Widgets

MainWindow/MainWindow.Get_Main_Window [ Subprograms ]

[ Top ] [ MainWindow ] [ Subprograms ]

FUNCTION

 Get main window of the specified interpreter

SOURCE

   function Get_Main_Window(Interp: in Tcl_Interp) return Tk_Toplevel;

PARAMETERS

 Interp - Tcl interpreter from which main window will be get

RESULT

 Main Tk window as Tk_Toplevel widget

EXAMPLE

   -- Get the main window at current Tcl interpreter
   Main_Window: constant Tk_Toplevel := Get_Main_Window(Get_Context);

HISTORY

 8.6.1 - Moved from Tcl.Tk.Ada.Widgets

MainWindow/MainWindow.Unbind_From_Main_Window_(function) [ Subprograms ]

[ Top ] [ MainWindow ] [ Subprograms ]

FUNCTION

 Disassociates the binding from the event Sequence in the main window.

SOURCE

   function Unbind_From_Main_Window
     (Interp: in Tcl_Interp; Sequence: in String) return String with
      Pre => Sequence /= "";

PARAMETERS

 Interp   - Tcl interpreter from which event will be unbinded from main
            window
 Sequence - Name of Tk event to remove

RESULT

 String with Tcl information about finished action

EXAMPLE

      -- Unbind left mouse click from the main window on current Tcl interpreter
      Result: constant String := Unbind_From_Main_Window(Get_Context, "<1>");

COMMANDS

 bind . sequence {}

HISTORY

 8.6.1 - Moved from Tcl.Tk.Ada.Widgets

MainWindow/MainWindow.Unbind_From_Main_Window_(procedure) [ Subprograms ]

[ Top ] [ MainWindow ] [ Subprograms ]

FUNCTION

 Disassociates the binding from the event Sequence in the main window.

SOURCE

   procedure Unbind_From_Main_Window
     (Interp: in Tcl_Interp; Sequence: in String) with
      Pre => Sequence /= "";

PARAMETERS

 Interp   - Tcl interpreter from which event will be unbinded from main
            window
 Sequence - Name of Tk event to remove

EXAMPLE

      -- Unbind left mouse click from the main window on current Tcl interpreter
      Unbind_From_Main_Window(Get_Context, "<1>");

COMMANDS

 bind . sequence {}

HISTORY

 8.6.1 - Moved from Tcl.Tk.Ada.Widgets