TABLE OF CONTENTS


Widgets/TtkScale [ Packages ]

[ Top ] [ Widgets ] [ Packages ]

FUNCTION

 Provides code for manipulate Tk widget Ttk::scale

SOURCE

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

TtkScale/TtkScale.Ttk_Scale [ Types ]

[ Top ] [ TtkScale ] [ 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 Ttk_Scale is new Tk_Widget with private;

TtkScale/TtkScale.Create_(function) [ Subprograms ]

[ Top ] [ TtkScale ] [ Subprograms ]

FUNCTION

 Creates a new Ttk_Scale in the specified interpreter.

SOURCE

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

EXAMPLE

   -- Create a new horizontal scale with pathname .myscale
   My_Scale: constant Ttk_Scale := Create(".myscale", "-orient horizontal");

SEE ALSO

 TtkScale.Create_(procedure)

COMMANDS

 ttk::scale pathName ?options?

HISTORY

 8.6.1 - Added

TtkScale/TtkScale.Create_(procedure) [ Subprograms ]

[ Top ] [ TtkScale ] [ Subprograms ]

FUNCTION

 Creates a new Ttk_Scale in the specified interpreter.

SOURCE

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

PARAMETERS

 Widgt    - Ttk_Scale 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 Ttk_Scale as parameter Widgt

EXAMPLE

     -- Create vertical scale My_Scale with pathname .myscale on the current Tcl interpreter
     declare
        My_Scale: Ttk_Scale;
     begin
        Create(My_Scale, ".myscale", "-orient vertical");
     end;

SEE ALSO

 TtkScale.Create_(function)

COMMANDS

 ttk::scale pathName ?options?

HISTORY

 8.6.1 - Added

TtkScale/TtkScale.Get_(at_pixel) [ Subprograms ]

[ Top ] [ TtkScale ] [ Subprograms ]

FUNCTION

 Get the value of the selected Ttk_Scale at the selected pixel

SOURCE

   function Get(ScaleWidget: in Ttk_Scale; X, Y: in String) return String with
      Pre'Class => X /= "" and Y /= "";

PARAMETERS

 ScaleWidget - Ttk_Scale which value will be get
 X           - X coordinate of the pixel which value will be get
 Y           - Y coordinate of the pixel which value will be get

RESULT

 Value of the ScaleWidget at the selected pixel

EXAMPLE

   -- Get the value of the My_Scale scale at pixel (24, 23)
   Value: constant String := Get(My_Scale, "24", "23");

SEE ALSO

 TtkScale.Get_(current)

COMMANDS

 ScaleWidget get x y

HISTORY

 8.6.5 - Added

TtkScale/TtkScale.Get_(current) [ Subprograms ]

[ Top ] [ TtkScale ] [ Subprograms ]

FUNCTION

 Get current value of the selected Ttk_Scale

SOURCE

   function Get(ScaleWidget: in Ttk_Scale) return String;

PARAMETERS

 ScaleWidget - Ttk_Scale which value will be get

RESULT

 Current value of the ScaleWidget

EXAMPLE

     -- Get the current value of My_Scale scale
     Value: constant String := Get(My_Scale);

SEE ALSO

 TtkScale.Get_(at_pixel)

COMMANDS

 ScaleWidget get

HISTORY

 8.6.5 - Added

TtkScale/TtkScale.Get_Widget [ Subprograms ]

[ Top ] [ TtkScale ] [ Subprograms ]

FUNCTION

 Get the existing Ttk_Scale widget

SOURCE

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

EXAMPLE

     -- Get scale widget with name .myscale on the current Tcl interpreter
     My_Scale: constant Ttk_Scale := Get_Widget(".myscale");

HISTORY

 8.6.9 - Added

TtkScale/TtkScale.Set [ Subprograms ]

[ Top ] [ TtkScale ] [ Subprograms ]

FUNCTION

 Set a new value for the selected Ttk_Scale

SOURCE

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

PARAMETERS

 ScaleWidget - Ttk_Scale which will be set
 Value       - A new value for the ScaleWidget

EXAMPLE

      -- Set value of My_Scale scale to 10.0
      Set(My_Scale, "10.0");

COMMANDS

 ScaleWidget set value

HISTORY

 8.6.5 - Added