TABLE OF CONTENTS


TEntry/SpinBox [ Packages ]

[ Top ] [ TEntry ] [ Packages ]

FUNCTION

 Provides code for manipulate Tk widget SpinBox

SOURCE

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

SpinBox/SpinBox.Tk_SpinBox [ Types ]

[ Top ] [ SpinBox ] [ 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_SpinBox is new Tk_Entry with private;

SpinBox/SpinBox.Create_(function) [ Subprograms ]

[ Top ] [ SpinBox ] [ Subprograms ]

FUNCTION

 Creates a new Tk_SpinBox in the specified interpreter.

SOURCE

   overriding function Create
     (pathName: in String; options: in String := "";
      Interp: in Tcl_Interp := Null_Interp) return Tk_SpinBox 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_SpinBox

EXAMPLE

   -- Create a new spinbox with pathname .myspinbox and relief solid
   My_Spinbox: constant Tk_SpinBox := Create(".myspinbox", "-relief solid");

SEE ALSO

 SpinBox.Create_(procedure)

COMMANDS

 spinbox pathName ?options?

HISTORY

 8.6.1 - Added

SpinBox/SpinBox.Create_(procedure) [ Subprograms ]

[ Top ] [ SpinBox ] [ Subprograms ]

FUNCTION

 Creates a new Tk_SpinBox in the specified interpreter.

SOURCE

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

PARAMETERS

 Widgt    - Tk_SpinBox 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_SpinBox as parameter Widgt

EXAMPLE

     -- Create spinbox My_Spinbox with pathname .myspinbox and black background on the current Tcl interpreter
     declare
        My_Spinbox: Tk_SpinBox;
     begin
        Create(My_Spinbox, ".myspinbox", "-background black");
     end;

SEE ALSO

 SpinBox.Create_(function)

COMMANDS

 spinbox pathName ?options?

HISTORY

 8.6.1 - Added

SpinBox/SpinBox.Get_Widget [ Subprograms ]

[ Top ] [ SpinBox ] [ Subprograms ]

FUNCTION

 Get the existing Tk_Spinbox widget

SOURCE

   overriding function Get_Widget
     (pathName: in String; Interp: in Tcl_Interp := Get_Context)
      return Tk_SpinBox 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_Spinbox widget

EXAMPLE

     -- Get spinbox widget with name .myspinbox on the current Tcl interpreter
     My_Spinbox: constant Tk_SpinBox := Get_Widget(".myspinbox");

HISTORY

 8.6.12 - Added

SpinBox/SpinBox.Identify [ Subprograms ]

[ Top ] [ SpinBox ] [ Subprograms ]

FUNCTION

 Get the name of the Tk_SpinBox element at the selected coordinates

SOURCE

   function Identify
     (SpinBoxWidget: in Tk_SpinBox; X, Y: in String) return String with
      Pre'Class => X /= "" and Y /= "";

PARAMETERS

 SpinBoxWidget - Tk_SpinBox which will be queried for the name of the
                 element
 X             - X coordinate of the pixel which will be check
 Y             - Y coordinate of the pixel which will be check

RESULT

 Name of the element: "buttondown", "buttonup", "entry" or "none" if
 pixel is outside SpinBoxWidget

EXAMPLE

     -- Get the name of the element of the My_Spinbox spinbox at point (43, 28)
     Element_Name: constant String := Identify(My_Spinbox, "43", "28");

COMMANDS

 SpinBoxWidget identify x y

HISTORY

 8.6.4 - Added

SpinBox/SpinBox.Invoke [ Subprograms ]

[ Top ] [ SpinBox ] [ Subprograms ]

FUNCTION

 Invoke the selected button of the selected Tk_SpinBox

SOURCE

   procedure Invoke(SpinBoxWidget: in Tk_SpinBox; Element: in String) with
      Pre'Class => Element in "buttondown" | "buttonup";

PARAMETERS

 SpinBoxWidget - Tk_SpinBox in which the selected button will be
                 invoked
 Element       - Name of the selected button. Can be "buttondown" or
                 "buttonup"

EXAMPLE

      -- Invoke button "buttonup" of My_Spinbox spinbox
      Invoke(My_Spinbox, "buttonup");

COMMANDS

 SpinBoxWidget invoke element

HISTORY

 8.6.4 - Added

SpinBox/SpinBox.Selection_Element_(function) [ Subprograms ]

[ Top ] [ SpinBox ] [ Subprograms ]

FUNCTION

 Get the currently selected element of the selected Tk_SpinBox

SOURCE

   function Selection_Element(SpinBoxWidget: in Tk_SpinBox) return String;

PARAMETERS

 SpinBoxWidget - Tk_SpinBox which will be queried for the selected
                 element

RESULT

 Name of the currently selected element in SpinBoxWidget

EXAMPLE

      -- Get the currently selected element for My_Spinbox spinbox
      Selected_Element: constant String := Selection_Element(My_Spinbox);

SEE ALSO

 SpinBox.Selection_Element_(procdure)

COMMANDS

 SpinBoxWidget selection element

HISTORY

 8.6.5 - Added

SpinBox/SpinBox.Selection_Element_(procedure) [ Subprograms ]

[ Top ] [ SpinBox ] [ Subprograms ]

FUNCTION

 Set the element of Tk_SpinBox as the selected element

SOURCE

   procedure Selection_Element
     (SpinBoxWidget: in Tk_SpinBox; Element: in String) with
      Pre'Class => Element in "buttondown" | "buttonup" | "entry" | "none";

PARAMETERS

 SpinBoxWidget - Tk_SpinBox in which element will be selected
 Element       - Name of the element to select. Possible values are
                 "buttonup", "buttondown", "entry" or "none"

EXAMPLE

      -- Set entry of the My_Spinbox spinbox as a selected element
      Selection_Element(My_Spinbox, "entry");

SEE ALSO

 SpinBox.Selection_Element_(function)

COMMANDS

 SpinBoxWidget selection element element

HISTORY

 8.6.5 - Added

SpinBox/SpinBox.Set_(function) [ Subprograms ]

[ Top ] [ SpinBox ] [ Subprograms ]

FUNCTION

 Get the value for the selected Tk_SpinBox

SOURCE

   function Set(SpinBoxWidget: in Tk_SpinBox) return String;

PARAMETERS

 SpinBoxWidget - Tk_SpinBox which value will be set

RESULT

 The current value of the SpinBoxWidget

EXAMPLE

      -- Get the current value of My_Spinbox spinbox
      Value: constant String := Set(My_Spinbox);

SEE ALSO

 SpinBox.Set_(procedure)

COMMANDS

 SpinBoxWidget set

HISTORY

 8.6.5 - Added

SpinBox/SpinBox.Set_(procedure) [ Subprograms ]

[ Top ] [ SpinBox ] [ Subprograms ]

FUNCTION

 Set the selected String as a new value for the selected Tk_SpinBox

SOURCE

   procedure Set(SpinBoxWidget: in Tk_SpinBox; Value: in String) with
      Pre'Class => Value /= "";

PARAMETERS

 SpinBoxWidget - Tk_SpinBox which value will be set
 Value         - Value to set

EXAMPLE

   -- Set the value of My_Spinbox spinbox to 100
   Set(My_Spinbox, "100");

SEE ALSO

 SpinBox.Set_(function)

COMMANDS

 SpinBoxWidget set value

HISTORY

 8.6.5 - Added