TABLE OF CONTENTS
- 1. TkAda/Event
- 1.1. Event/Event.Add
- 1.2. Event/Event.Delete
- 1.3. Event/Event.Generate
- 1.4. Event/Event.Info
TkAda/Event [ Packages ]
[ Top ] [ TkAda ] [ Packages ]
FUNCTION
Provides code for manipulate Tk command Event
SOURCE
package Tcl.Tk.Ada.Event with SPARK_Mode is
Event/Event.Add [ Subprograms ]
[ Top ] [ Event ] [ Subprograms ]
FUNCTION
Assiociated the selected virtual event with the selected sequence on the selected interpreter.
SOURCE
procedure Add (Virtual, Sequence: in String; Interp: Tcl_Interp := Get_Context) with Pre => Virtual /= "" and Sequence /= "";
PARAMETERS
Virtual - Name of the virtual event which will be triggered when the selected Sequence occurs Sequence - Tcl commands which will trigger the selected Virtual event Interp - Tcl interpreter on which the event should be added
EXAMPLE
-- Trigger virtual event MyEvent when the user press Control+Y keys on -- default Tcl interpreter Add("<<MyEvent>>", "<Control-y>");
COMMANDS
event add virtual sequence ?sequence ...?
HISTORY
8.6.6 - Added
Event/Event.Delete [ Subprograms ]
[ Top ] [ Event ] [ Subprograms ]
FUNCTION
Delete the selected Sequence from the selected Virtual event on the selected interpreter
SOURCE
procedure Delete (Virtual: in String; Sequence: in String := ""; Interp: Tcl_Interp := Get_Context) with Pre => Virtual /= "";
PARAMETERS
Virtual - Name of the virtual even from which Sequence will be removed Sequence - Tcl commands which will be removed. If empty, remove all associated commands with the selected Virtual event. Default value is empty Interpreter - Tcl interpreter on which Sequence will be removed
EXAMPLE
-- Delete triggering MyEvent when user press Control+Y keys on -- My_Interpreter Tcl interpreter Delete("<<MyEvent>>", "<Control-y>", My_Interpreter);
COMMANDS
event delete virtual ?sequence sequence ...?
HISTORY
8.6.6 - Added
Event/Event.Generate [ Subprograms ]
[ Top ] [ Event ] [ Subprograms ]
FUNCTION
Generate the selected event at the selected window
SOURCE
procedure Generate (Window: in Tk_Widget'Class; EventName: in String; Options: in String := "") with Pre => EventName /= "";
PARAMETERS
Window - Tk_Widget on which the selected event will be generated EventName - Event to generate (like <Escape> or <<MyEvent>>) Option - Additional options for the event. Can be empty. Default value is empty
EXAMPLE
-- Generate KeyPress event on My_Main_Window widget and set the event -- x value to 10 Generate(My_Main_Window, "<KeyPress>", "-x 10");
COMMANDS
event generate window event ?option value option value ...?
HISTORY
8.6.6 - Added
Event/Event.Info [ Subprograms ]
[ Top ] [ Event ] [ Subprograms ]
FUNCTION
Get information about the virtual event(s)
SOURCE
function Info (EventName: in String := ""; Interp: Tcl_Interp := Get_Context) return String;
PARAMETERS
EventName - The name of the virtual event to query. Can be empty. Default value is empty Interp - Tcl interpreter on which the event(s) will be queried. Can be empty. Default value is current interpreter
RESULT
If EventName is specified, return information about the selected event. Otherwise return information about all available virtual events
EXAMPLE
-- Get the list of all virtual events at the current Tcl interpreter Events_List: constant String := Info; -- Get the list of physical events associated with the MyEvent -- virtual event on My_Interpreter Tcl interpreter Events_List: constant String := Info("<<MyEvent>>", My_Interpreter);
COMMANDS
event info ?virtual?
HISTORY
8.6.6 - Added