TABLE OF CONTENTS
- 1. Widgets/TtkScrollbar
- 1.1. TtkScrollbar/TtkScrollbar.Ttk_Scrollbar
- 1.2. TtkScrollbar/TtkScrollbar.Create_(function)
- 1.3. TtkScrollbar/TtkScrollbar.Create_(procedure)
- 1.4. TtkScrollbar/TtkScrollbar.Fraction
- 1.5. TtkScrollbar/TtkScrollbar.Get
- 1.6. TtkScrollbar/TtkScrollbar.Get_Widget
- 1.7. TtkScrollbar/TtkScrollbar.Scrollbar_Delta
- 1.8. TtkScrollbar/TtkScrollbar.Set
Widgets/TtkScrollbar [ Packages ]
[ Top ] [ Widgets ] [ Packages ]
FUNCTION
Provides code for manipulate Tk widget Ttk::Scrollbar
SOURCE
package Tcl.Tk.Ada.Widgets.TtkScrollbar with SPARK_Mode is pragma Elaborate_Body;
TtkScrollbar/TtkScrollbar.Ttk_Scrollbar [ Types ]
[ Top ] [ TtkScrollbar ] [ 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_Scrollbar is new Tk_Widget with private;
TtkScrollbar/TtkScrollbar.Create_(function) [ Subprograms ]
[ Top ] [ TtkScrollbar ] [ Subprograms ]
FUNCTION
Creates a new Ttk_Scrollbar in the specified interpreter.
SOURCE
overriding function Create (pathName: in String; options: in String := ""; Interp: in Tcl_Interp := Null_Interp) return Ttk_Scrollbar 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_Scrollbar
EXAMPLE
-- Create a new horizontal scrollbar with pathname .myscroll My_Scroll: constant Ttk_Scrollbar := Create(".myscroll", "-orient horizontal");
SEE ALSO
TtkScrollbar.Create_(procedure)
COMMANDS
ttk::scrollbar pathName ?options?
HISTORY
8.6.1 - Added
TtkScrollbar/TtkScrollbar.Create_(procedure) [ Subprograms ]
[ Top ] [ TtkScrollbar ] [ Subprograms ]
FUNCTION
Creates a new Ttk_Scrollbar in the specified interpreter.
SOURCE
overriding procedure Create (Widgt: out Ttk_Scrollbar; pathName: in String; options: in String := ""; Interp: in Tcl_Interp := Null_Interp) with Global => null;
PARAMETERS
Widgt - Ttk_Scrollbar 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_Scrollbar as parameter Widgt
EXAMPLE
-- Create vertical scrollbar My_Scroll with pathname .myscroll on the current Tcl interpreter declare My_Scroll: Ttk_Scrollbar; begin Create(My_Scroll, ".myscroll", "-orient vertical"); end;
SEE ALSO
TtkScrollbar.Create_(function)
COMMANDS
ttk::scrollbar pathName ?options?
HISTORY
8.6.1 - Added
TtkScrollbar/TtkScrollbar.Fraction [ Subprograms ]
[ Top ] [ TtkScrollbar ] [ Subprograms ]
FUNCTION
Get the fraction of the selected Ttk_Scrollbar at the selected pixel
SOURCE
function Fraction (ScrollbarWidget: in Ttk_Scrollbar; X, Y: in String) return String with Pre'Class => X /= "" and Y /= "";
PARAMETERS
ScrollbarWidget - Ttk_Scrollbar which will be queried for the fraction X - X coordinate of the pixel inside ScrollbarWidget Y - Y coordinate of the pixel inside ScrollbarWidget
RESULT
Value between 0 and 1 where 0 is top or left of the trough and 1 is bottom or right, middle is 0.5.
EXAMPLE
-- Get the fraction in My_Scroll scrollbar point (24, 56) Fraction_Value: constant String := Fraction(My_Scroll, "24", "56");
COMMANDS
ScrollbarWidget fraction x y
HISTORY
8.6.6 - Added
TtkScrollbar/TtkScrollbar.Get [ Subprograms ]
[ Top ] [ TtkScrollbar ] [ Subprograms ]
FUNCTION
Get the Ttk_Scrollbar setting for which part of associated widget is currently visible
SOURCE
function Get(ScrollbarWidget: in Ttk_Scrollbar) return String;
PARAMETERS
ScrollbarWidget - Ttk_Scrollbar which will be queried for setting
RESULT
Two values of real fraction between 0 and 1 for visible part of the associated widget.
EXAMPLE
-- Get the My_Scroll scrollbar setting Visible: constant String := Get(My_Scroll);
COMMANDS
ScrollbarWidget get
HISTORY
8.6.6 - Added
TtkScrollbar/TtkScrollbar.Get_Widget [ Subprograms ]
[ Top ] [ TtkScrollbar ] [ Subprograms ]
FUNCTION
Get the existing Ttk_Scrollbar widget
SOURCE
overriding function Get_Widget (pathName: in String; Interp: in Tcl_Interp := Get_Context) return Ttk_Scrollbar 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_Scrollbar widget
EXAMPLE
-- Get Scrollbar widget with name .myscroll on the current Tcl interpreter My_Scroll: constant Ttk_Scrollbar := Get_Widget(".myscroll");
HISTORY
8.6.9 - Added
TtkScrollbar/TtkScrollbar.Scrollbar_Delta [ Subprograms ]
[ Top ] [ TtkScrollbar ] [ Subprograms ]
FUNCTION
Get the fraction change between current Ttk_Scrollbar setting and the selected value
SOURCE
function Scrollbar_Delta (ScrollbarWidget: in Ttk_Scrollbar; DeltaX, DeltaY: in String) return String with Pre'Class => DeltaX /= "" and DeltaY /= "";
PARAMETERS
ScrollbarWidget - Ttk_Scrollbar which will be queried DeltaX - An value to check for horizontal scrollbar. Ignored when ScrollbarWidget is a vertical scrollbar. DeltaY - An value to check for vertical scrollbar. Ignored when ScrollbarWidget is a horizontal widget.
RESULT
A string with a real number indicating the fractional change in the scrollbar setting that corresponds to a given change in slider position.
EXAMPLE
-- Get the fractional change between current setting of horizontal My_Scroll scrollbar and value 1.0 Fraction: constant String := Scrollbar_Delta(My_Scroll, "1.0", "0.0");
COMMANDS
ScrollbarWidget delta deltaX deltaY
HISTORY
8.6.6 - Added
TtkScrollbar/TtkScrollbar.Set [ Subprograms ]
[ Top ] [ TtkScrollbar ] [ Subprograms ]
FUNCTION
Set the Ttk_Scrollbar setting for which part of associated widget is currently visible
SOURCE
procedure Set (ScrollbarWidget: in Ttk_Scrollbar; First, Last: in String) with Pre'Class => First /= "" and Last /= "";
PARAMETERS
ScrollbarWidget - Ttk_Scrollbar which setting will be changed First - Start fraction of visible part of the associated widget Last - End fraction of visible part of the associated widget
EXAMPLE
-- Set the visible fraction of associated widget with My_Scroll scrollbar to 0.0 and 0.5 Set(My_Scroll, "0.0", "0.5");
COMMANDS
ScrollbarWidget set first last
HISTORY
8.6.6 - Added