mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
Documentation typos
[ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
98e3c058fa
commit
73a37eb325
46 changed files with 76 additions and 76 deletions
|
@ -232,7 +232,7 @@ module TclTklib
|
|||
|
||||
_merge_tklist(str, str, ... )
|
||||
: Get a Tcl's list string from arguments with a Tcl/Tk's
|
||||
: library function. Each arguemnt is converted to a valid
|
||||
: library function. Each argument is converted to a valid
|
||||
: Tcl list element.
|
||||
|
||||
_conv_listelement(str)
|
||||
|
@ -415,7 +415,7 @@ class TclTkIp
|
|||
|
||||
_merge_tklist(str, str, ... )
|
||||
: Get a Tcl's list string from arguments with a Tcl/Tk's
|
||||
: library function. Each arguemnt is converted to a valid
|
||||
: library function. Each argument is converted to a valid
|
||||
: Tcl list element.
|
||||
|
||||
_conv_listelement(str)
|
||||
|
|
|
@ -113,7 +113,7 @@ end
|
|||
|
||||
|
||||
##############################################################
|
||||
# fuctions
|
||||
# functions
|
||||
##############################################################
|
||||
def is_win32?
|
||||
/mswin|mingw|cygwin|bccwin/ =~ RUBY_PLATFORM
|
||||
|
|
|
@ -41,7 +41,7 @@ end
|
|||
|
||||
|
||||
################################################
|
||||
# exceptiopn to treat the return value from IP
|
||||
# exception to treat the return value from IP
|
||||
class MultiTkIp_OK < Exception
|
||||
def self.send(thread, ret=nil)
|
||||
thread.raise self.new(ret)
|
||||
|
|
|
@ -2645,7 +2645,7 @@ if (/^(8\.[1-9]|9\.|[1-9][0-9])/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK)
|
|||
def ENCODING_TABLE.get_name(enc)
|
||||
orig_enc = enc
|
||||
|
||||
# unles enc, use system default
|
||||
# unless enc, use system default
|
||||
# 1st: Ruby/Tk default encoding
|
||||
# 2nd: Tcl/Tk default encoding
|
||||
# 3rd: Ruby's default_external
|
||||
|
@ -2887,7 +2887,7 @@ if (/^(8\.[1-9]|9\.|[1-9][0-9])/ =~ Tk::TCL_VERSION && !Tk::JAPANIZED_TK)
|
|||
# from tkencoding.rb by ttate@jaist.ac.jp
|
||||
#attr_accessor :encoding
|
||||
def encoding=(name)
|
||||
self.force_default_encoding = true # for comaptibility
|
||||
self.force_default_encoding = true # for compatibility
|
||||
self.default_encoding = name
|
||||
end
|
||||
|
||||
|
@ -5165,7 +5165,7 @@ class TkWindow<TkObject
|
|||
# try to configure
|
||||
configure(keys)
|
||||
rescue
|
||||
# fail => includes options adaptable when creattion only?
|
||||
# fail => includes options adaptable when creation only?
|
||||
begin
|
||||
tk_call_without_enc('destroy', @path)
|
||||
rescue
|
||||
|
|
|
@ -499,7 +499,7 @@ class << Tk
|
|||
replace_topobj(sym, obj)
|
||||
|
||||
else # current_obj != topalias_defined?(sym)
|
||||
# Maybe current_obj is defined by user. --> OWNER[sym] = faise
|
||||
# Maybe current_obj is defined by user. --> OWNER[sym] = false
|
||||
# Keep Object::sym.
|
||||
@TOPLEVEL_ALIAS_OWNER[sym] = false
|
||||
@TOPLEVEL_ALIAS_TABLE[target][sym] = obj
|
||||
|
@ -542,7 +542,7 @@ class << Tk
|
|||
|
||||
else # NOT topalias_defined?(sym)
|
||||
# Nobody controls ALIAS[sym].
|
||||
# At leaset, current widget set doesn't control ALIAS[sym].
|
||||
# At least, current widget set doesn't control ALIAS[sym].
|
||||
# Keep Object::sym (even if it is not defined)
|
||||
# Keep OWNER[sym].
|
||||
@TOPLEVEL_ALIAS_TABLE[target][sym] = obj
|
||||
|
@ -610,20 +610,20 @@ class << Tk
|
|||
if cur_obj = topobj_defined?(sym)
|
||||
if ! cur_obj.kind_of?(String) && (cur_alias = topalias_defined?(sym))
|
||||
if cur_alias.kind_of?(String)
|
||||
# Mayby, user replaced Object::sym.
|
||||
# Maybe, user replaced Object::sym.
|
||||
# Make Object::sym out of control.
|
||||
@TOPLEVEL_ALIAS_OWNER[sym] = false
|
||||
elsif cur_obj == cur_alias
|
||||
# Possibley, defined normally. Backup it
|
||||
# Possibly, defined normally. Backup it
|
||||
@TOPLEVEL_ALIAS_TABLE[current][sym] = cur_alias
|
||||
else
|
||||
# Mayby, user replaced Object::sym.
|
||||
# Maybe, user replaced Object::sym.
|
||||
# Make Object::sym out of control.
|
||||
@TOPLEVEL_ALIAS_OWNER[sym] = false
|
||||
end
|
||||
end
|
||||
else
|
||||
# Mayby, user replaced Object::sym.
|
||||
# Maybe, user replaced Object::sym.
|
||||
# Make Object::sym out of control.
|
||||
@TOPLEVEL_ALIAS_OWNER[sym] = false
|
||||
end
|
||||
|
@ -631,7 +631,7 @@ class << Tk
|
|||
when nil
|
||||
# Object::sym is out of control.
|
||||
if (cur_alias = topalias_defined?(sym)) && ! cur_alias.kind_of?(String)
|
||||
# Possibley, defined normally. Backup it.
|
||||
# Possibly, defined normally. Backup it.
|
||||
@TOPLEVEL_ALIAS_TABLE[current][sym] = cur_alias
|
||||
end
|
||||
else
|
||||
|
|
|
@ -1787,7 +1787,7 @@ module TkFont::CoreMethods
|
|||
tk_call('font', 'configure', font,
|
||||
"-#{slot}", value, '-pointadjust', padjust)
|
||||
elsif JAPANIZED_TK && (slot == 'family' || slot == :family)
|
||||
# coumpund font?
|
||||
# compound font?
|
||||
begin
|
||||
compound = tk_split_simplelist(tk_call('font', 'configure',
|
||||
font, '-compound'))
|
||||
|
|
|
@ -525,7 +525,7 @@ Tk.__set_loaded_toplevel_aliases__('tk/menu.rb', :Tk, Tk::SysMenu_System,
|
|||
|
||||
|
||||
class Tk::SysMenu_Apple<Tk::Menu
|
||||
# for Machintosh
|
||||
# for Macintosh
|
||||
include Tk::SystemMenu
|
||||
SYSMENU_NAME = 'apple'
|
||||
end
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
# 'font'=>'Helvetia 12 bold')
|
||||
# menubar.pack('side'=>'top', 'fill'=>'x')
|
||||
|
||||
# See tk/menuspce.rb about the format of the menu_spec
|
||||
# See tk/menuspec.rb about the format of the menu_spec
|
||||
|
||||
# To use add_menu, configuration must be done by calling configure after
|
||||
# adding all menus by add_menu, not by the constructor arguments.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: false
|
||||
#
|
||||
# tk/menuspec.rb
|
||||
# Hidethoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||
# Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||
#
|
||||
# based on tkmenubar.rb :
|
||||
# Copyright (C) 1998 maeda shugo. All rights reserved.
|
||||
|
@ -30,7 +30,7 @@
|
|||
# [ entry_info, entry_info, ... ]
|
||||
#
|
||||
#
|
||||
# underline, accelerator, and configs are optional pearameters.
|
||||
# underline, accelerator, and configs are optional parameters.
|
||||
# Hashes are OK instead of Arrays. Then the entry type ('command',
|
||||
# 'checkbutton', 'radiobutton' or 'cascade') is given by 'type' key
|
||||
# (e.g. :type=>'cascade'). When type is 'cascade', an array of menu_info
|
||||
|
|
|
@ -59,7 +59,7 @@ module TkOptionDB
|
|||
when /\\$/ # continue
|
||||
cline.chop!
|
||||
next
|
||||
when /^\s*(!|#)/ # coment
|
||||
when /^\s*(!|#)/ # comment
|
||||
cline = ''
|
||||
next
|
||||
when /^([^:]+):(.*)$/
|
||||
|
@ -103,7 +103,7 @@ module TkOptionDB
|
|||
when /\\$/ # continue
|
||||
cline.chop!
|
||||
next
|
||||
when /^\s*!/ # coment
|
||||
when /^\s*!/ # comment
|
||||
cline = ''
|
||||
next
|
||||
when /^([^:]+):\s(.*)$/
|
||||
|
@ -341,7 +341,7 @@ module TkOptionDB
|
|||
# define new proc class :
|
||||
# If you want to modify the new class or create a new subclass,
|
||||
# you must do such operation in the block parameter.
|
||||
# Because the created class is flozen after evaluating the block.
|
||||
# Because the created class is frozen after evaluating the block.
|
||||
def new_proc_class(klass, func, safe = 4, add = false, parent = nil, &b)
|
||||
new_klass = __create_new_class(klass, func, safe, add, parent)
|
||||
new_klass.class_eval(&b) if block_given?
|
||||
|
|
|
@ -32,7 +32,7 @@ class Tk::Root<TkWindow
|
|||
}
|
||||
}
|
||||
|
||||
if keys # wm commands ( for backward comaptibility )
|
||||
if keys # wm commands ( for backward compatibility )
|
||||
keys.each{|k,v|
|
||||
if v.kind_of? Array
|
||||
root.__send__(k,*v)
|
||||
|
|
|
@ -1463,7 +1463,7 @@ class Tk::Text<TkTextWin
|
|||
val, i = _retrieve_braced_text(str, i)
|
||||
result.push val
|
||||
else
|
||||
# text which may contain backslahes
|
||||
# text which may contain backslashes
|
||||
val, i = _retrieve_backslashed_text(str, i)
|
||||
result.push val
|
||||
end
|
||||
|
|
|
@ -182,7 +182,7 @@ class TkTimer
|
|||
|
||||
@cancel_on_exception = DEFAULT_IGNORE_EXCEPTIONS
|
||||
# Unless @cancel_on_exception, Ruby/Tk shows an error dialog box when
|
||||
# an excepsion is raised on TkTimer callback procedure.
|
||||
# an exception is raised on TkTimer callback procedure.
|
||||
# If @cancel_on_exception is an array of exception classes and the raised
|
||||
# exception is included in the array, Ruby/Tk cancels executing TkTimer
|
||||
# callback procedures silently (TkTimer#cancel is called and no dialog is
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: false
|
||||
#
|
||||
# tk/txtwin_abst.rb : TkTextWin abstruct class
|
||||
# tk/txtwin_abst.rb : TkTextWin abstract class
|
||||
#
|
||||
require 'tk'
|
||||
|
||||
|
|
|
@ -311,7 +311,7 @@ module Tk
|
|||
# --------------------------------------------------------------
|
||||
# In the future release, I want to support to embed the 'win'
|
||||
# into the container which has window-id 'use-id'.
|
||||
# It may give users frexibility on controlling their GUI.
|
||||
# It may give users flexibility on controlling their GUI.
|
||||
# However, it may be difficult for current Tcl/Tk (Tcl/Tk8.5.1),
|
||||
# because it seems to require to modify Tcl/Tk's source code.
|
||||
# --------------------------------------------------------------
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: false
|
||||
#
|
||||
# tk/xim.rb : control imput_method
|
||||
# tk/xim.rb : control input_method
|
||||
#
|
||||
require 'tk'
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ class Tk::BWidget::ListBox
|
|||
class Event_for_Items < TkEvent::Event
|
||||
def self._get_extra_args_tbl
|
||||
[
|
||||
TkComm.method(:string) # item idenfier
|
||||
TkComm.method(:string) # item identifier
|
||||
]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,7 +25,7 @@ class Tk::BWidget::NoteBook
|
|||
class Event_for_Tabs < TkEvent::Event
|
||||
def self._get_extra_args_tbl
|
||||
[
|
||||
TkComm.method(:string) # page idenfier
|
||||
TkComm.method(:string) # page identifier
|
||||
]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -28,7 +28,7 @@ class Tk::BWidget::Tree
|
|||
class Event_for_Items < TkEvent::Event
|
||||
def self._get_extra_args_tbl
|
||||
[
|
||||
TkComm.method(:string) # item idenfier
|
||||
TkComm.method(:string) # item identifier
|
||||
]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -20,7 +20,7 @@ class Tk::Iwidgets::Shell
|
|||
WidgetClassNames[WidgetClassName] ||= self
|
||||
|
||||
def activate
|
||||
tk_call(@path, 'activate') # may return val of deactibate method
|
||||
tk_call(@path, 'activate') # may return val of deactivate method
|
||||
end
|
||||
|
||||
def center(win=None)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: false
|
||||
#
|
||||
# tkextlib/tcllib/tablelist_tlie.rb
|
||||
# tkextlib/tcllib/tablelist_tile.rb
|
||||
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||
#
|
||||
# * Part of tcllib extension
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: false
|
||||
#
|
||||
# Tile theme engin (tile widget set) support
|
||||
# Tile theme engine (tile widget set) support
|
||||
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||
#
|
||||
|
||||
|
@ -133,14 +133,14 @@ module Tk
|
|||
|
||||
def self.__define_LoadImages_proc_for_compatibility__!
|
||||
# Ttk 8.5 (Tile 0.8) lost 'LoadImages' utility procedure.
|
||||
# So, some old scripts doen't work, because those scripts use the
|
||||
# So, some old scripts don't work, because those scripts use the
|
||||
# procedure to define local styles.
|
||||
# Of course, rewriting such Tcl/Tk scripts isn't difficult for
|
||||
# Tcl/Tk users. However, it may be troublesome for Ruby/Tk users
|
||||
# who use such Tcl/Tk scripts as it is.
|
||||
# This method may help Ruby/Tk users who don't want to modify old
|
||||
# Tcl/Tk scripts for the latest version of Ttk (Tile) extension.
|
||||
# This method defines a comaptible 'LoadImages' procedure on the
|
||||
# This method defines a compatible 'LoadImages' procedure on the
|
||||
# Tcl/Tk interpreter working under Ruby/Tk.
|
||||
# Please give attention to use this method. It may conflict with
|
||||
# some definitions on Tcl/Tk scripts.
|
||||
|
|
|
@ -32,7 +32,7 @@ end
|
|||
|
||||
# selectAndLoadDir3 --
|
||||
# This procedure pops up a dialog to ask for a directory to load into
|
||||
# the listobx and (if the user presses OK) reloads the directory
|
||||
# the listbox and (if the user presses OK) reloads the directory
|
||||
# listbox from the directory named in the demo's entry.
|
||||
#
|
||||
# Arguments:
|
||||
|
|
|
@ -43,7 +43,7 @@ EOL
|
|||
end
|
||||
|
||||
## Set up the toolbar hull
|
||||
tbar_base = Tk::Frame.new(base_frame, # Must be a starndard Tk frame!
|
||||
tbar_base = Tk::Frame.new(base_frame, # Must be a standard Tk frame!
|
||||
:widgetname=>'toolbar') # for window title
|
||||
sep = Ttk::Separator.new(base_frame)
|
||||
to_base = Ttk::Frame.new(tbar_base, :cursor=>'fleur')
|
||||
|
|
|
@ -43,7 +43,7 @@ notebook = Ttk::Notebook.new(base_frame).pack(:fill=>:both, :expand=>true,
|
|||
:padx=>2, :pady=>3)
|
||||
notebook.enable_traversal
|
||||
|
||||
## Popuplate the first pane
|
||||
## Populate the first pane
|
||||
f_msg = Ttk::Frame.new(notebook)
|
||||
msg_m = Ttk::Label.new(f_msg, :font=>$font, :wraplength=>'4i',
|
||||
:justify=>:left, :anchor=>'n', :text=><<EOL)
|
||||
|
@ -77,7 +77,7 @@ f_msg.grid_columnconfigure([0, 1], :weight=>1, :uniform=>1)
|
|||
f_disabled = Ttk::Frame.new(notebook)
|
||||
notebook.add(f_disabled, :text=>'Disabled', :state=>:disabled)
|
||||
|
||||
## Popuplate the third pane
|
||||
## Populate the third pane
|
||||
f_editor = Ttk::Frame.new(notebook)
|
||||
notebook.add(f_editor, :text=>'Text Editor', :underline=>0)
|
||||
editor_t = Tk::Text.new(f_editor, :width=>40, :height=>10, :wrap=>:char)
|
||||
|
|
|
@ -33,7 +33,7 @@ end
|
|||
|
||||
# selectAndLoadDir3 --
|
||||
# This procedure pops up a dialog to ask for a directory to load into
|
||||
# the listobx and (if the user presses OK) reloads the directory
|
||||
# the listbox and (if the user presses OK) reloads the directory
|
||||
# listbox from the directory named in the demo's entry.
|
||||
#
|
||||
# Arguments:
|
||||
|
|
|
@ -45,7 +45,7 @@ notebook = Ttk::Notebook.new(base_frame).pack(:fill=>:both, :expand=>true,
|
|||
:padx=>2, :pady=>3)
|
||||
notebook.enable_traversal
|
||||
|
||||
## Popuplate the first pane
|
||||
## Populate the first pane
|
||||
f_msg = Ttk::Frame.new(notebook)
|
||||
msg_m = Ttk::Label.new(f_msg, :font=>$font, :wraplength=>'5i',
|
||||
:justify=>:left, :anchor=>'n', :text=><<EOL)
|
||||
|
@ -85,7 +85,7 @@ f_msg.grid_columnconfigure([0, 1], :weight=>1, :uniform=>1)
|
|||
f_disabled = Ttk::Frame.new(notebook)
|
||||
notebook.add(f_disabled, :text=>'無効化されたタブ', :state=>:disabled)
|
||||
|
||||
## Popuplate the third pane
|
||||
## Populate the third pane
|
||||
f_editor = Ttk::Frame.new(notebook)
|
||||
notebook.add(f_editor, :text=>'テキストエディタ(Text Editor)', :underline=>9)
|
||||
editor_t = Tk::Text.new(f_editor, :width=>40, :height=>10, :wrap=>:char)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# Tk::RbWidget::Editable_Listbox class
|
||||
#
|
||||
# When "DoubleClick-1" on a listbox item, the entry box is opend on the
|
||||
# When "DoubleClick-1" on a listbox item, the entry box is opened on the
|
||||
# item. And when hit "Return" key on the entry box after modifying the
|
||||
# text, the entry box is closed and the item is changed. Or when hit
|
||||
# "Escape" key, the entry box is closed without modification.
|
||||
|
|
|
@ -8,7 +8,7 @@ require 'tk'
|
|||
radio_var = TkVariable.new('y')
|
||||
|
||||
menu_spec = [
|
||||
[['&File', true], # when underline option is ture, '&' index is the position
|
||||
[['&File', true], # when underline option is true, '&' index is the position
|
||||
{:label=>'Open', :command=>proc{puts('Open clicked')}, :underline=>0},
|
||||
'---',
|
||||
['Check_A', TkVariable.new(true), 6],
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
# When it is configured, scrollregion of the container is changed.
|
||||
#
|
||||
# Scrollbars can be toggled by Tk::RbWidget::ScrollFrame#vscroll & hscroll.
|
||||
# If horizontal or virtical scrollbar is turned off, the horizontal
|
||||
# or virtical size of embedded widgets is propagated.
|
||||
# If horizontal or vertical scrollbar is turned off, the horizontal
|
||||
# or vertical size of embedded widgets is propagated.
|
||||
#
|
||||
# Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||
#
|
||||
|
@ -34,7 +34,7 @@ class Tk::RbWidget::ScrollFrame < TkFrame
|
|||
:borderwidth=>0, :selectborderwidth=>0,
|
||||
:highlightthickness=>0)
|
||||
|
||||
# allignment
|
||||
# alignment
|
||||
TkGrid.rowconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0)
|
||||
TkGrid.columnconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0)
|
||||
@canvas.grid('row'=>0, 'column'=>0, 'sticky'=>'news')
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||
#
|
||||
# Add a balloon help to a widget.
|
||||
# This widget has only poor featureas. If you need more useful features,
|
||||
# This widget has only poor features. If you need more useful features,
|
||||
# please try to use the Tix extension of Tcl/Tk under Ruby/Tk.
|
||||
#
|
||||
# The interval time to display a balloon help is defined 'interval' option
|
||||
|
@ -157,7 +157,7 @@ if __FILE__ == $0
|
|||
sb = TkScrollbox.new.pack(:fill=>:x)
|
||||
sb.insert(:end, *%w(aaa bbb ccc ddd eee fff ggg hhh iii jjj kkk lll mmm))
|
||||
=begin
|
||||
# CASE1 : command takes no arguemnt
|
||||
# CASE1 : command takes no argument
|
||||
bh = Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
|
||||
:relief=>:ridge, :background=>'white',
|
||||
:command=>proc{
|
||||
|
@ -166,7 +166,7 @@ if __FILE__ == $0
|
|||
})
|
||||
=end
|
||||
=begin
|
||||
# CASE2 : command takes 2 arguemnts
|
||||
# CASE2 : command takes 2 arguments
|
||||
bh = Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
|
||||
:relief=>:ridge, :background=>'white',
|
||||
:command=>proc{|x, y|
|
||||
|
@ -174,7 +174,7 @@ if __FILE__ == $0
|
|||
})
|
||||
=end
|
||||
=begin
|
||||
# CASE3 : command takes 3 arguemnts
|
||||
# CASE3 : command takes 3 arguments
|
||||
Tk::RbWidget::BalloonHelp.new(sb, :interval=>500,
|
||||
:relief=>:ridge, :background=>'white',
|
||||
:command=>proc{|x, y, bhelp|
|
||||
|
@ -182,7 +182,7 @@ if __FILE__ == $0
|
|||
})
|
||||
=end
|
||||
=begin
|
||||
# CASE4a : command is a Proc object and takes 4 arguemnts
|
||||
# CASE4a : command is a Proc object and takes 4 arguments
|
||||
cmd = proc{|x, y, bhelp, parent|
|
||||
bhelp.text "current index == #{parent.nearest(y)}"
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ if __FILE__ == $0
|
|||
:command=>cmd)
|
||||
=end
|
||||
#=begin
|
||||
# CASE4b : command is a Method object and takes 4 arguemnts
|
||||
# CASE4b : command is a Method object and takes 4 arguments
|
||||
def set_msg(x, y, bhelp, parent)
|
||||
bhelp.text "current index == #{parent.nearest(y)}"
|
||||
end
|
||||
|
|
|
@ -87,7 +87,7 @@ class BWidget_Demo
|
|||
:progressvar=>DemoVar.prgindic
|
||||
)
|
||||
|
||||
# toobar 1 creation
|
||||
# toolbar 1 creation
|
||||
DemoVar.prgindic.numeric += 1
|
||||
|
||||
DemoVar.mainframe.add_toolbar{|tb1|
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# frozen_string_literal: false
|
||||
#########################################################
|
||||
#
|
||||
# use Tk::UTF8_String() for a utf8 charecter
|
||||
# use Tk::UTF8_String() for a utf8 character
|
||||
#
|
||||
#########################################################
|
||||
require 'tk'
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# frozen_string_literal: false
|
||||
#########################################################
|
||||
#
|
||||
# set $KCODE to 'utf' for a utf8 charecter
|
||||
# set $KCODE to 'utf' for a utf8 character
|
||||
#
|
||||
#########################################################
|
||||
unless defined?(::Encoding.default_external)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# frozen_string_literal: false
|
||||
#########################################################
|
||||
#
|
||||
# set Tk.encoding = 'utf-8' for a utf8 charecter
|
||||
# set Tk.encoding = 'utf-8' for a utf8 character
|
||||
#
|
||||
#########################################################
|
||||
require 'tk'
|
||||
|
|
|
@ -302,7 +302,7 @@ show_tbl.trace('w', proc{
|
|||
|
||||
show_img.trace('w', refresh)
|
||||
|
||||
# If an arguent was specified, read it into the HTML widget.
|
||||
# If an argument was specified, read it into the HTML widget.
|
||||
#
|
||||
Tk.update
|
||||
if file && file != ""
|
||||
|
|
|
@ -114,7 +114,7 @@ EOD
|
|||
|
||||
@html.clipwin.focus
|
||||
|
||||
# If an arguent was specified, read it into the HTML widget.
|
||||
# If an argument was specified, read it into the HTML widget.
|
||||
#
|
||||
Tk.update
|
||||
if file && file != ""
|
||||
|
|
|
@ -62,7 +62,7 @@ table.bind('1', proc{|w, x, y|
|
|||
end}, '%W %x %y')
|
||||
|
||||
|
||||
# inititialize the array, titles, and celltags
|
||||
# initialize the array, titles, and celltags
|
||||
0.step(rows){|i|
|
||||
tab[i,-1] = i
|
||||
0.step(cols){|j|
|
||||
|
|
|
@ -31,7 +31,7 @@ m128_000.xbm
|
|||
|
||||
oscilloscope.tcl
|
||||
the heart of a Realtime Oscilloscope,where the PC´s joystick
|
||||
port gives 4 digtal inputs and 4 analog 8 bit values with an
|
||||
port gives 4 digital inputs and 4 analog 8 bit values with an
|
||||
resolution of ~1 millisecond (!!!) running Realtime Linux.
|
||||
<p> creates DEMO.ps
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ class TkMultiColumnList < TkText
|
|||
@mode = :title
|
||||
@command = nil
|
||||
|
||||
# virtical scrollbar
|
||||
# vertical scrollbar
|
||||
@v_scroll = TkYScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
|
||||
'borderwidth'=>@scrbar_border,
|
||||
'width'=>@scrbar_width)
|
||||
|
@ -197,10 +197,10 @@ class TkMultiColumnList < TkText
|
|||
@f_lbox.height lbox_height
|
||||
@f_hscr.height hscr_height
|
||||
|
||||
# set control procedure for virtical scroll
|
||||
# set control procedure for vertical scroll
|
||||
@v_scroll.assign(*@lbox_list)
|
||||
|
||||
# set control procedure for horizoncal scroll
|
||||
# set control procedure for horizontal scroll
|
||||
@h_scroll.assign(@c_title, @c_lbox, @c_hscr)
|
||||
|
||||
# binding for listboxes
|
||||
|
|
|
@ -21,7 +21,7 @@ class TkMultiListbox < TkListbox
|
|||
@width_total = 0
|
||||
title_info.each{|title, width| @width_total += width.to_f}
|
||||
|
||||
# virtical scrollbar
|
||||
# vertical scrollbar
|
||||
@v_scroll = TkScrollbar.new(@frame, 'orient'=>'vertical')
|
||||
|
||||
# init arrays
|
||||
|
@ -42,7 +42,7 @@ class TkMultiListbox < TkListbox
|
|||
'height'=>@v_scroll.cget('width') +
|
||||
2 * @v_scroll.cget('borderwidth'))
|
||||
|
||||
# dummy label to keep the hight of title space
|
||||
# dummy label to keep the height of title space
|
||||
TkLabel.new(@f_title, 'text'=>' ').pack
|
||||
|
||||
# create each listbox
|
||||
|
@ -104,7 +104,7 @@ class TkMultiListbox < TkListbox
|
|||
tab.bind('B1-Motion', proc{|x, idx| resize(x, idx.to_i)}, "%X #{idx}")
|
||||
}
|
||||
|
||||
# set control procedure for virtical scroll
|
||||
# set control procedure for vertical scroll
|
||||
@lbox_list.each{|lbox|
|
||||
lbox.yscrollcommand proc{|first, last|
|
||||
@v_scroll.set first, last
|
||||
|
|
|
@ -53,7 +53,7 @@ class TkMultiListFrame < TkListbox
|
|||
# init status
|
||||
@mode = :title
|
||||
|
||||
# virtical scrollbar
|
||||
# vertical scrollbar
|
||||
=begin
|
||||
@v_scroll = TkScrollbar.new(@frame, 'highlightthickness'=>@h_l_thick,
|
||||
'borderwidth'=>@scrbar_border,
|
||||
|
@ -185,7 +185,7 @@ class TkMultiListFrame < TkListbox
|
|||
@f_lbox.height lbox_height
|
||||
@f_hscr.height hscr_height
|
||||
|
||||
# set control procedure for virtical scroll
|
||||
# set control procedure for vertical scroll
|
||||
=begin
|
||||
@lbox_list.each{|lbox|
|
||||
lbox.yscrollcommand proc{|first, last|
|
||||
|
@ -196,7 +196,7 @@ class TkMultiListFrame < TkListbox
|
|||
=end
|
||||
@v_scroll.assign(*@lbox_list)
|
||||
|
||||
# set control procedure for horizoncal scroll
|
||||
# set control procedure for horizontal scroll
|
||||
=begin
|
||||
@c_title.xscrollcommand proc{|first, last|
|
||||
@h_scroll.set first, last
|
||||
|
|
|
@ -76,7 +76,7 @@ module Tk::ScrollbarComposite
|
|||
@component.xscrollbar(@h_scroll)
|
||||
@component.yscrollbar(@v_scroll)
|
||||
|
||||
# allignment
|
||||
# alignment
|
||||
TkGrid.rowconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0)
|
||||
TkGrid.columnconfigure(@frame, 0, 'weight'=>1, 'minsize'=>0)
|
||||
@component.grid('row'=>0, 'column'=>0, 'sticky'=>'news')
|
||||
|
@ -156,7 +156,7 @@ class TkTextFrame < TkText
|
|||
:textrelief
|
||||
)
|
||||
|
||||
# return the created componet
|
||||
# return the created component
|
||||
@text
|
||||
end
|
||||
private :create_component
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
# So, for example, TkTextIO#getc returns a character, TkTextIO#pos
|
||||
# means the character position, TkTextIO#read(size) counts by
|
||||
# characters, and so on.
|
||||
# Of course, it is available to make TkTextIO class to suuport
|
||||
# Of course, it is available to make TkTextIO class to support
|
||||
# 'byte' access. However, it may break multi-byte characters.
|
||||
# and then, displayed string on the text widget may be garbled.
|
||||
# I think that it is not good on the supposed situation of using
|
||||
|
|
|
@ -121,7 +121,7 @@ Tk::Tile.set_theme(OPTS[:theme]) if OPTS[:theme]
|
|||
|
||||
|
||||
##########################################################################
|
||||
# replace $0 and $RPAGRAM_NAME
|
||||
# replace $0 and $PROGRAM_NAME
|
||||
##########################################################################
|
||||
# When the expand_path of the target script is long, ruby sometimes
|
||||
# fails to set the path to $0 (the path string is trimmed).
|
||||
|
|
|
@ -3814,7 +3814,7 @@ ip_RubyExitCommand(clientData, interp, argc, argv)
|
|||
return TCL_RETURN;
|
||||
|
||||
default:
|
||||
/* arguemnt error */
|
||||
/* argument error */
|
||||
Tcl_AppendResult(interp,
|
||||
"wrong number of arguments: should be \"",
|
||||
cmd, " ?returnCode?\"", (char *)NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue