TABLE OF CONTENTS


Widgets/Button [ Packages ]

[ Top ] [ Widgets ] [ Packages ]

FUNCTION

 Provides code for manipulate Tk widget Button

SOURCE

package Tcl.Tk.Ada.Widgets.Button with
   SPARK_Mode
is
   pragma Elaborate_Body;

Button/Button.Tk_Button [ Types ]

[ Top ] [ Button ] [ Types ]

FUNCTION

 This is a non-abstract type derived directly from Tk_Widget.
 Each of the derived widgets redefines the Create subprogram
 in order to create the correct type of widget.

SOURCE

   type Tk_Button is new Tk_Widget with private;

Button/Button.Create_(function) [ Subprograms ]

[ Top ] [ Button ] [ Subprograms ]

FUNCTION

 Creates a new Tk_Button in the specified interpreter.

SOURCE

   overriding function Create
     (pathName: in String; options: in String := "";
      Interp: in Tcl_Interp := Null_Interp) return Tk_Button with
      Global => null;

PARAMETERS

 pathName - Tk path (starts with dot) for the widget
 options  - Options which will be passed to the widget. Default value is
            empty
 Interp   - Tcl interpreter to which the widget will be created. If null,
            the widget will be created in the "contextual" interpreter.
            Default value is null.

RESULT

 Newly created Tk_Button

EXAMPLE

   -- Create a new button with pathname .mybutton and label select me
   My_Button: constant Tk_Button := Create(".mybutton", "-text {select me}");

SEE ALSO

 Button.Create_(procedure)

COMMANDS

 button pathName ?options?

HISTORY

 8.6.1 - Moved from Tcl.Tk.Ada.Widgets

Button/Button.Create_(procedure) [ Subprograms ]

[ Top ] [ Button ] [ Subprograms ]

FUNCTION

 Creates a new Tk_Button in the specified interpreter.

SOURCE

   overriding procedure Create
     (Widgt: out Tk_Button; pathName: in String; options: in String := "";
      Interp: in Tcl_Interp := Null_Interp) with
      Global => null;

PARAMETERS

 Widgt    - Tk_Button which will be created
 pathName - Tk path (starts with dot) for the widget
 options  - Options which will be passed to the widget. Default value is
            empty
 Interp   - Tcl interpreter to which the widget will be created. If null,
            the widget will be created in the "contextual" interpreter.
            Default value is null.

OUTPUT

 Newly created Tk_Button as parameter Widgt

EXAMPLE

     -- Create button My_Button with pathname .mybutton and label click me on the current Tcl interpreter
     declare
        My_Button: Tk_Button;
     begin
        Create(My_Button, ".mybutton", "-text {click me}");
     end;

SEE ALSO

 Button.Create_(function)

COMMANDS

 button pathName ?options?

HISTORY

 8.6.1 - Moved from Tcl.Tk.Ada.Widgets

Button/Button.Flash [ Subprograms ]

[ Top ] [ Button ] [ Subprograms ]

FUNCTION

 Flash the button.

SOURCE

   procedure Flash(Buttn: in Tk_Button);

PARAMETERS

 Buttn - Tk_Button to flash

COMMANDS

 Buttn flash

HISTORY

 8.6.1 - Moved from Tcl.Tk.Ada.Widgets
 ExAMPLE
 -- Flash the button My_Button
 Flash(My_Button);

Button/Button.Get_Widget [ Subprograms ]

[ Top ] [ Button ] [ Subprograms ]

FUNCTION

 Get the existing Tk_Button widget

SOURCE

   overriding function Get_Widget
     (pathName: in String; Interp: in Tcl_Interp := Get_Context)
      return Tk_Button with
      Global => null;

PARAMETERS

 pathName - Tk path (starts with dot) for the widget
 Interp   - Tcl interpreter on which the widget exists. Can be empty.
            Default value is current Tcl interpreter

RESULT

 Existing Tk_Button widget

EXAMPLE

     -- Get button widget with name .mybutton on the current Tcl interpreter
     My_Button: constant Tk_Button := Get_Widget(".mybutton");

HISTORY

 8.6.9 - Added

Button/Button.Invoke [ Subprograms ]

[ Top ] [ Button ] [ Subprograms ]

FUNCTION

 Invoke the Tcl command associated with the button.

SOURCE

   function Invoke
     (Buttn: in Tk_Button; options: in String := "") return String;

PARAMETERS

 Buttn   - Tk_Button from which Tcl command will be invoked
 options - Tk options for the Tcl command invoke

RESULT

 Value returned by the Tcl command associated with the button

EXAMPLE

   -- Invoke the Tcl command associated with My_Button
   Result: constant String := Invoke(My_Button);

COMMANDS

 Buttn invoke

HISTORY

 8.6.1 - Moved from Tcl.Tk.Ada.Widgets