TABLE OF CONTENTS


TkAda/Widgets [ Packages ]

[ Top ] [ TkAda ] [ Packages ]

FUNCTION

 Provides code for Tk widgets

SOURCE

package Tcl.Tk.Ada.Widgets with
   SPARK_Mode
is

Widgets/Widgets.Tk_Widget [ Types ]

[ Top ] [ Widgets ] [ Types ]

FUNCTION

 The Tk_Widget data type, parent of all objects displayed on the screen.

 It is abstract because it is just a convenience for creating a Tk_Widget
 class and for creating non-abstract derived widget types.  Since there
 is no such data type in Tk, we make it abstract so that no instance of
 type Tk_Widget may be created.

SOURCE

   type Tk_Widget is abstract tagged record
      Name: C.Strings.chars_ptr;
      Interp: Tcl_Interp;
   end record;

PARAMETERS

 Name   - Name (Tk path) of the widget
 Interp - Tcl interpreter to which the widget is added

Widgets/Widgets."&" [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Concatenates and returns the string names of Left and Right.
 Does not insert the separating dot.

SOURCE

   function "&;"
     (Left: in Tk_Widget'Class; Right: in Tk_Widget'Class) return String;
   function "&;"(Left: in Tk_Widget'Class; Right: in String) return String;
   function "&;"(Left: in String; Right: in Tk_Widget'Class) return String;

PARAMETERS

 Left  - First Tk_Widget or String to concatenate
 Right - Second Tk_Widget or String to concatenate

RESULT

 String with concantenate name

EXAMPLE

   -- Create name for a new widget from My_Widget name and .subwindow
   New_Name: constant String := My_Widget & ".subwindow";

HISTORY

 8.6.0 - Imported from TASH

Widgets/Widgets.Bell [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Rings the bell on the selected Widget display

SOURCE

   procedure Bell(Widgt: in Tk_Widget'Class; Option: in String := "") with
      Pre => Option in "" | "-nice";

PARAMETERS

 Widgt  - Tk_Widget on which display bell will be rings
 Option - Can be empty or "-nice". Default is empty. If is empty then
          also reset screen saver state.

EXAMPLE

     -- Ring the bell for the widget My_Window display
     Bell(My_Window);

COMMANDS

 bell -displayof Widgt option

HISTORY

 8.6.7 - Added

Widgets/Widgets.Bind_(function) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Get the associated Tcl script Script with the event Sequence.

SOURCE

   function Bind(Widgt: in Tk_Widget'Class; Sequence: in String) return String;

PARAMETERS

 Widgt    - Tk_Widget to which script will be binded
 Sequence - Name of Tk event which the script will be get

RESULT

 Script which is associated with the selected event or {} if no script
 is binded to that event.

EXAMPLE

   -- Get the script associated with left click in My_Window widget
   Script: constant String := Bind(My_Window, "<1>");

SEE ALSO

 Widgets.Bind_(procedure)

COMMANDS

 bind Widgt sequence

HISTORY

 8.6.8 - Added

Widgets/Widgets.Bind_(procedure) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Associates Tcl script Script with the event Sequence.

SOURCE

   procedure Bind
     (Widgt: in Tk_Widget'Class; Sequence: in String; Script: in String);

PARAMETERS

 Widgt    - Tk_Widget to which script will be binded
 Sequence - Name of Tk event which will be binded with the script
 Script   - Tcl code which will be binded to the Tk_Widget

EXAMPLE

      -- Exit from the program on press CTRL-q in My_Window widget
      Bind(My_Window, "<Control-q>", "exit");

SEE ALSO

 Widgets.Bind_(function)

COMMANDS

 bind Widgt sequence script

HISTORY

 8.6.0 - Imported from TASH

Widgets/Widgets.Bind_Tags_(function) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Get binding tags for the selected window

SOURCE

   function Bind_Tags(Widgt: in Tk_Widget'Class) return String;

PARAMETERS

 Widgt   - Tk_Widget which binding tags will be queried

RESULT

 List of binding tags associated with the selected window

EXAMPLE

      -- Get the order and tags themself for the My_Button widget
      Tags_Info: constant String := Bind_Tags(My_Button)

SEE ALSO

 Widgets.Bind_Tags_(procedure)

COMMANDS

 bindtags Widgt

HISTORY

 8.6.7 - Added

Widgets/Widgets.Bind_Tags_(procedure) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Set binding tags for the selected window

SOURCE

   procedure Bind_Tags(Widgt: in Tk_Widget'Class; TagList: in String) with
      Pre => TagList /= "";

PARAMETERS

 Widgt   - Tk_Widget which binding tags will be changed
 TagList - The new list of binding tags for the selected window

EXAMPLE

   -- Determine order of bindings for My_Button button as itself (name .button) then all
   Bind_Tags(My_Button, "{.button all}");

SEE ALSO

 Widgets.Bind_Tags_(function)

COMMANDS

 bindtags Widgt taglist

HISTORY

 8.6.7 - Added

Widgets/Widgets.cget [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Get the current value of the specified option for specified widget

SOURCE

   function cget(Widgt: in Tk_Widget'Class; option: in String) return String;

PARAMETERS

 Widgt  - Tk_Widget which option will be get
 option - Name of the option to get

RESULT

 Returns the current value of the specified configuration option.

EXAMPLE

   -- Get the text of My_Label widget
   Text: constant String := cget(My_Label, "-text");

COMMANDS

 Widgt cget option

HISTORY

 8.6.0 - Imported from TASH

Widgets/Widgets.configure_(function) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Queries the configuration options.

SOURCE

   function configure
     (Widgt: in Tk_Widget'Class; options: in String := "") return String;

PARAMETERS

 Widgt   - Tk_Widget from which options will be queried or modified
 options - Options to query. If empty, return list of available
           options. Default is empty.

RESULT

 String with Tcl information about finished action (for example, list
 of options).

EXAMPLE

   -- Get the all available options of the My_Label widget
   Options: constant String := configure(My_Label);

SEE ALSO

 Widgets.cget, Widgets.configure_(procedure)

COMMANDS

 Widgt configure ?options?

HISTORY

 8.6.0 - Imported from TASH

Widgets/Widgets.configure_(procedure) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Queries or modifies the configuration options.

SOURCE

   procedure configure(Widgt: in Tk_Widget'Class; options: in String) with
      Pre => options /= "";

PARAMETERS

 Widgt   - Tk_Widget from which options will be queried or modified
 options - Options to configure.

EXAMPLE

     -- Configure text to hello world on My_Label widget
     configure(My_Label, "-text {hello world}");

SEE ALSO

 Widgets.cget, Widgets.configure_(function)

COMMANDS

 Widgt configure options

HISTORY

 8.6.0 - Imported from TASH

Widgets/Widgets.Create_(function) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Creates a new Tk_Widget in the specified interpreter. This is abstract
 function. Its content depends on each child widget code.

SOURCE

   function Create
     (pathName: in String; options: in String := "";
      Interp: in Tcl_Interp := Null_Interp) return Tk_Widget is abstract;

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_Widget

SEE ALSO

 Widgets.Create_(procedure)

HISTORY

 8.6.0 - Imported from TASH

Widgets/Widgets.Create_(procedure) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Creates a new Tk_Widget in the specified interpreter. This is abstract
 function. Its content depends on each child widget code.

SOURCE

   procedure Create
     (Widgt: out Tk_Widget; pathName: in String; options: in String := "";
      Interp: in Tcl_Interp := Null_Interp) is abstract;

PARAMETERS

 Widgt    - Tk_Widget 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_Widget as parameter Widgt

SEE ALSO

 Widgets.Create_(function)

HISTORY

 8.6.0 - Imported from TASH

Widgets/Widgets.Destroy [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Destroys a Tk_Widget.

SOURCE

   procedure Destroy(Widgt: in out Tk_Widget'Class);

PARAMETERS

 Widgt - Tk_Widget to destroy

EXAMPLE

      -- Destroy My_Widget widget
      Destroy(My_Widget);

COMMANDS

 destroy Widgt

HISTORY

 8.6.0 - Imported from TASH

Widgets/Widgets.Execute_Widget_Command [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Execute selected Tcl command in the selected widget. Generally, you
 should not use this procedure outside library, unless here are no
 direct binding for selected Tk widget command.
 Widgt   - Tk_Widget in which command will be executed
 command - Tcl command to execute
 options - Options for the selected Tcl command

SOURCE

   procedure Execute_Widget_Command
     (Widgt: in Tk_Widget'Class; command: in String; options: in String := "");

EXAMPLE

      -- -- Change background of My_Window to black
      -- Execute_Widget_Command(My_Window, "configure", "-background=black");

HISTORY

 8.6.0 - Imported from TASH

Widgets/Widgets.Focus_(function) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Get input focus Tk widget name in the selected Tcl interpreter

SOURCE

   function Focus
     (Interp: in Tcl_Interp := Get_Context; Option: in String := "")
      return String;

PARAMETERS

 Interp - Tcl interpreter in which input focus will be queried.
          Default value is current interpreter
 Option - Additional option for command.

RESULT

 A name of a Tk widget which have input focus or empty string if
 no window in this application has focus (depending on the option)

EXAMPLE

      -- Get the name of the currently focused widget on the default Tcl interpreter
      Focused_Name: constant String := Focus;

SEE ALSO

 Widgets.Focus_(procedure)

COMMANDS

 focus

HISTORY

 8.6.3 - Added

Widgets/Widgets.Focus_(procedure) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Set input focus on the selected Tk_Widget with the selected option

SOURCE

   procedure Focus(Widgt: in Tk_Widget'Class; Option: in String := "") with
      Pre => Option in "" | "-force";

PARAMETERS

 Widgt  - Tk_Widget to set as input focus
 Option - Set to "-force" to set input focus even if application don't
        have it. Default value is empty

EXAMPLE

      -- Set the input focus on My_Entry widget
      Focus(My_Entry);

SEE ALSO

 Widgets.Focus_(function)

COMMANDS

 focus Widgt

HISTORY

 8.6.3 - Added

Widgets/Widgets.Focus_Follows_Mouse [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Set focus model to follow the mouse movement in the selected Tcl
 interpreter
 PARAMERERS
 Interp - Tcl interpreter in which the focus model will be set

SOURCE

   procedure Focus_Follows_Mouse(Interp: Tcl_Interp := Get_Context);

EXAMPLE

      -- Set the focus model to follow the mouse on the default Tcl interpreter
      Focus_Follows_Mouse;

COMMANDS

 tk_focusFollowsMouse

HISTORY

 8.6.6 - Added

Widgets/Widgets.Focus_Next [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Get the next Widget in focus order after the selected Widget

SOURCE

   function Focus_Next(Widgt: in Tk_Widget'Class) return String;

PARAMETERS

 Widgt - Tk Widget after which the next Widget will be get

RESULT

 Name of the next Tk_Widget in focus order

EXAMPLE

   -- Get the name of the next widget in focus traversal order after My_Window widget
   Widget_Name: constant String := Focus_Next(My_Window);

SEE ALSO

 Widgets.Focus_Prev

COMMANDS

 tk_focusNext Widgt

HISTORY

 8.6.6 - Added

Widgets/Widgets.Focus_Prev [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Get the previous Widget in focus order after the selected Widget

SOURCE

   function Focus_Prev(Widgt: in Tk_Widget'Class) return String;

PARAMETERS

 Widgt - Tk Widget before which the previous Widget will be get

RESULT

 Name of the previous Tk_Widget in focus order

EXAMPLE

   -- Get the name of the previous widget in focus traversal order before My_Button widget
   Widget_Name: constant String := Focus_Prev(My_Button);

SEE ALSO

 Widgets.Focus_Next

COMMANDS

 tk_focusPrev Widgt

HISTORY

 8.6.6 - Added

Widgets/Widgets.Get_Interp [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Gets the interpreter of the specified Tk_Widget.

SOURCE

   function Get_Interp(Widgt: in Tk_Widget'Class) return Tcl_Interp;

PARAMETERS

 Widgt - Tk_Widget which belongs to Tcl interpreter

RESULT

 Tcl interpreter of the specified Tk_Widget

EXAMPLE

   -- Get the interpreter of My_Widget widget
   Interp: constant Tcl_Interp := Get_Interp(My_Widget);

HISTORY

 8.6.0 - Imported from TASH

Widgets/Widgets.Get_Widget [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Get the existing Tk_Widget. This is abstract function. Its content
 depends on each child widget code.

SOURCE

   function Get_Widget
     (pathName: in String; Interp: in Tcl_Interp := Get_Context)
      return Tk_Widget is abstract;

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_Widget

HISTORY

 8.6.9 - Added

Widgets/Widgets.Grab_Current_(selected_interpreter) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Get the name of the currently set as grab window on the selected Tcl
 interpreter

SOURCE

   function Grab_Current(Interp: Tcl_Interp := Get_Context) return String;

PARAMETERS

 Interp - Tcl interpreter which will be queried for the grab window. Can
          be empty. Default value is current interpreter

RESULT

 Name of the gra window in the selected Tcl interpreter or {} if no window
 is set as grab window

EXAMPLE

   -- Get the name of currently set as grab window widget on default Tcl interpreter
   Widget_Name: constant String := Grab_Current;

SEE ALSO

 Widgets.Grab_Current_(selected_window)

COMMANDS

 grab current

HISTORY

 8.6.6 - Added

Widgets/Widgets.Grab_Current_(selected_window) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Get the name of the currently set as grab window on the display where the
 selected window is

SOURCE

   function Grab_Current(Widgt: in Tk_Widget'Class) return String;

PARAMETERS

 Widgt - Tk_Widget which display will be queried for the grab window

RESULT

 Name of the gra window in the selected display or {} if no window is set
 as grab window

EXAMPLE

   Get the name of currently set as grab window widget on display where My_Label is
   Widget_Name: constant String := Grab_Current(My_Label);

SEE ALSO

 Widgets.Grab_Current_(selected_interpreter)

COMMANDS

 grab current Widgt

HISTORY

 8.6.6 - Added

Widgets/Widgets.Grab_Release [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Release the grab on the selected Widget

SOURCE

   procedure Grab_Release(Widgt: in Tk_Widget'Class);

PARAMETERS

 Widgt - Tk_Widget on which the grab will be released

EXAMPLE

   -- Release the grab from My_Window widget
   Grab_Release(My_Window);

COMMANDS

 grab release Widgt

HISTORY

 8.6.6 - Added

Widgets/Widgets.Grab_Set [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Set the grab to the selected widget

SOURCE

   procedure Grab_Set(Widgt: in Tk_Widget'Class; Global: in String := "") with
      Pre => Global in "" | "-global";

PARAMETERS

 Widgt  - Tk_Widget on which the grab will be set
 Global - If empty, the grab is local, when "-global" then the grab is
          global. Default value is empty

EXAMPLE

   -- Set the grab to the My_Entry widget
   Grab_Set(My_Entry);

COMMANDS

 grab set global Widgt

HISTORY

 8.6.6 - Added

Widgets/Widgets.Grab_Status [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Get the status of the grab for the selected widget

SOURCE

   function Grab_Status(Widgt: in Tk_Widget'Class) return String;

PARAMETERS

 Widgt - Tk_Widget which will be queried for the grab status

RESULT

 "none" if no grab on the selected widget, "local" if the grab is
 local and "global" if the grab is global

EXAMPLE

      -- Get the status of the grab for My_Window widget
      Status: constant String := Grab_Status(My_Window);

COMMANDS

 grab status Widgt

HISTORY

 8.6.6 - Added

Widgets/Widgets.Lower [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Lowers the selected Tk_Widget below of all its siblings in the stacking
 order

SOURCE

   procedure Lower(Widgt: in Tk_Widget'Class);

PARAMETERS

 Widgt - Tk_Widget to lower

EXAMPLE

   -- Move the My_Window widget at the end of stacking order
   Lower(My_Window);

SEE ALSO

 Widgets.Lower_(below_selected_widget)

COMMANDS

 lower Widgt

HISTORY

 8.6.4 - Added

Widgets/Widgets.Lower_(below_selected_widget) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Insert the Tk_Widget below the selected widget in the stacking order

SOURCE

   procedure Lower(Widgt, BelowThis: in Tk_Widget'Class);

PARAMETERS

 Widgt     - Tk_Widget to lower
 BelowThis - Tk_Widget before which Widgt will be inserted

EXAMPLE

   -- Move My_Window widget after My_Dialog widget in the stacking order
   Lower(My_Window, My_Dialog);

SEE ALSO

 Widgets.Lower

COMMANDS

 lower Widgt BelowThis

HISTORY

 8.6.4 - Added

Widgets/Widgets.Raise [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Raisess the selected Tk_Widget below of all its siblings in the stacking
 order

SOURCE

   procedure Widget_Raise(Widgt: in Tk_Widget'Class);

PARAMETERS

 Widgt - Tk_Widget to raise

EXAMPLE

   -- Raise My_Window widget at top of the stacking order
   Widget_Raise(My_Window);

SEE ALSO

 Widgets.Raise_(above_selected_widget)

COMMANDS

 raise Widgt

HISTORY

 8.6.4 - Added

Widgets/Widgets.Raise_(above_selected_widget) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Insert the Tk_Widget above the selected widget in the stacking order

SOURCE

   procedure Widget_Raise(Widgt, AboveThis: in Tk_Widget'Class);

PARAMETERS

 Widgt     - Tk_Widget to insert
 AboveThis - Tk_Widget above which Widgt will be inserted

EXAMPLE

   -- Raise My_Window widget above My_Dialog widget in the stacking order
   Widget_Raise(My_Window, My_Dialog);

SEE ALSO

 Widgets.Raise

COMMANDS

 raise Widgt AboveThis

HISTORY

 8.6.4 - Added

Widgets/Widgets.Tk_Caret_(function) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Get the caret location in the selected window

SOURCE

   function Tk_Caret(Widgt: in Tk_Widget'Class) return String;

PARAMETERS

 Widgt  - Tk_Widget in which the caret will be get

RESULT

 String with 3 values: X coordinate of the carret, Y coordinate of the
 caret and height of the Widgt

EXAMPLE

      -- Get the coordinates of the caret in My_Window widget
      Coordinates: constant String := Tk_Caret(My_Window);

SEE ALSO

 Widgets.Tk_Caret_(procedure)

COMMANDS

 tk caret Widgt

HISTORY

 8.6.7 - Added

Widgets/Widgets.Tk_Caret_(procedure) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Set the caret location in the selected window

SOURCE

   procedure Tk_Caret(Widgt: in Tk_Widget'Class; X, Y, Height: in String) with
      Pre => X /= "" and Y /= "" and Height /= "";

PARAMETERS

 Widgt  - Tk_Widget in which the caret will be set
 X      - The new X coordinate of the caret
 Y      - The new Y coordinate of the caret
 Height - The height of current cursor location

EXAMPLE

   -- Set the caret to point (24, 56) and height 54 in My_Text widget
   Tk_Caret(My_Text, "24", "56", "54");

SEE ALSO

 Widgets.Tk_Caret_(function)

COMMANDS

 tk caret Widgt x y height

HISTORY

 8.6.7 - Added

Widgets/Widgets.Tk_Inactive_(function) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Get the number of miliseconds since last interaction of the user on the
 selected display

SOURCE

   function Tk_Inactive(Widgt: in Tk_Widget'Class) return String;

PARAMETERS

 Widgt - Tk_Widget on which display inactivity timer will be get

RESULT

 Number of miliseconds since last interaction of the user

EXAMPLE

   -- Get the inactivity time for My_Entry widget
   Inactive_For: constant String := Tk_Inactive(My_Entry);

SEE ALSO

 Widgets.Tk_Inactive_(procedure)

COMMANDS

 tk inactive -displayof Widgt

HISTORY

 8.6.7 - Added

Widgets/Widgets.Tk_Inactive_(procedure) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Reset the user inactivity timer

SOURCE

   procedure Tk_Inactive(Widgt: in Tk_Widget'Class);

PARAMETERS

 Widgt - Tk_Widget on which display inactivity timer will be reseted

EXAMPLE

   -- Reset the user inactivity timer for My_Window widget
   Tk_Inactive(My_Window);

SEE ALSO

 Widgets.Tk_Inactive_(function)

COMMANDS

 tk inactive -displayof Widgt reset

HISTORY

 8.6.7 - Added

Widgets/Widgets.Tk_Scaling_(function) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Get the scaling factor of the selected display

SOURCE

   function Tk_Scaling(Widgt: in Tk_Widget'Class) return String;

PARAMETERS

 Widgt  - Tk_Widget on which display the scaling factor will be get

RESULT

 Floating point number which specifies the number of pixels per point
 of Widgt display

EXAMPLE

      -- Get the scaling factor for the My_Window window
      Scaling: constant String := Tk_Scaling(My_Window);

SEE ALSO

 Widgets.Tk_Scaling_(procedure)

COMMANDS

 tk scaling -displayof Widgt

HISTORY

 8.6.7 - Added

Widgets/Widgets.Tk_Scaling_(procedure) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Set the scaling factor for the selected display

SOURCE

   procedure Tk_Scaling(Widgt: in Tk_Widget'Class; Number: in String) with
      Pre => Number /= "";

PARAMETERS

 Widgt  - Tk_Widget on which display the scaling factor will be set
 Number - Floating point number which specifies the number of pixels per
          point of Widgt display. 1.0 means 72 dpi.

EXAMPLE

   -- Set scaling to 1.2 (90 dpi) for My_Window widget
   Tk_Scaling(My_Window, "1.2");

SEE ALSO

 Widgets.Tk_Scaling_(function)

COMMANDS

 tk scaling -displayof Widgt number

HISTORY

 8.6.7 - Added

Widgets/Widgets.Tk_Use_Input_Methods_(function) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Get if Tk uses XIM (X Input Methods) for filtering events

SOURCE

   function Tk_Use_Input_Methods(Widgt: in Tk_Widget'Class) return String;

PARAMETERS

 Widgt   - Tk_Widget on which display the filtering will be get

RESULT

 "1" if Tk uses XIM otherwise "0"

EXAMPLE

      -- Get the state of XIM for My_Window widget
      XIM_Enabled: constant String := Tk_Use_Input_Methods(My_Window);

SEE ALSO

 Widgets.Tk_Use_Input_Methods_(procedure)

COMMANDS

 tk useinputmethods -displayof window

HISTORY

 8.6.7 - Added

Widgets/Widgets.Tk_Use_Input_Methods_(procedure) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Set Tk to use XIM (X Input Methods) for filtering events

SOURCE

   procedure Tk_Use_Input_Methods
     (Widgt: in Tk_Widget'Class; Enabled: in String) with
      Pre => Enabled in "1" | "0";

PARAMETERS

 Widgt   - Tk_Widget on which display the filtering will be set
 Enabled - If "1" then enable filtering, when "0" disable it

EXAMPLE

   -- Enable XIM for My_Window widget
   Tk_Use_Input_Methods(M_Window, "true");

SEE ALSO

 Widgets.Tk_Use_Input_Methods_(function)

COMMANDS

 tk useinputmethods -displayof window enabled

HISTORY

 8.6.7 - Added

Widgets/Widgets.Tk_Wait [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Wait until the selected thing to happen

SOURCE

   procedure Tk_Wait(WaitFor, Name: in String) with
      Pre => WaitFor in "variable" | "visibility" | "window" and Name /= "";

PARAMETERS

 WaitFor - "variable" - the selected variable was modified, "visibility"
           the selected window visibility state was changed, "window" the
           selected window was destroyed
 Name    - Name of variable or window on which Tk_Wait should waits

EXAMPLE

   -- Wait until Tcl variable myvariable will be modified
   Tk_Wait("variable", "myvariable");

COMMANDS

 tkwait waitfor name

HISTORY

 8.6.6 - Added

Widgets/Widgets.Unbind_(function) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Disassociates the binding from the event Sequence.

SOURCE

   function Unbind
     (Widgt: in Tk_Widget'Class; Sequence: in String) return String;

PARAMETERS

 Widgt    - Tk_Widget from which selected event will be removed
 Sequence - Name of Tk event which will be removed from the widget

RESULT

 String with Tcl information about finished action

EXAMPLE

   -- Remove Control-q binding from My_Frame widget and get info about finished action
   Result: constant String := Unbind(My_Frame, "<Control-q>");

SEE ALSO

 Widgets.Unbind_(procedure)

COMMANDS

 bind Widgt sequence {}

HISTORY

 8.6.0 - Imported from TASH

Widgets/Widgets.Unbind_(procedure) [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Disassociates the binding from the event Sequence.

SOURCE

   procedure Unbind(Widgt: in Tk_Widget'Class; Sequence: in String);

PARAMETERS

 Widgt    - Tk_Widget from which selected event will be removed
 Sequence - Name of Tk event which will be removed from the widget

EXAMPLE

   -- Remove left click binding for My_Window widget
   Unbind(My_Window, "<1>");

SEE ALSO

 Widgets.Unbind_(function)

COMMANDS

 bind Widgt sequence {}

HISTORY

 8.6.0 - Imported from TASH

Widgets/Widgets.Widget_Image [ Subprograms ]

[ Top ] [ Widgets ] [ Subprograms ]

FUNCTION

 Returns the string name of Win.

SOURCE

   function Widget_Image(Win: in Tk_Widget'Class) return String;

PARAMETERS

 Win - Tk_Widget which name will be returned.

RESULT

 String with name of Tk_Widget

EXAMPLE

   -- Get the name of widget My_Widget
   Name: constant String := Widget_Image(My_Widget);

HISTORY

 8.6.0 - Imported from TASH