summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tktext.rb
AgeCommit message (Collapse)Author
2016-08-09* ext/tk: Tk is removed from stdlib. [Feature #8539]naruse
https://github.com/ruby/tk is the new upstream. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16handle ext/ as r53141naruse
g -L frozen_string_literal ext/**/*.rb|xargs ruby -Ka -e'ARGV.each{|fn|puts fn;open(fn,"r+"){|f|s=f.read.sub(/\A(#!.*\n)?(#.*coding.*\n)?/,"\\&# frozen_string_literal: false\n");f.rewind;f.write s}}' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53143 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-05-01* renewal Ruby/Tknagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-07* ext/tk/lib/tk.rb: use epath for embedded windows of TkPanedWindow.nagai
* ext/tk/lib/tktext.rb: use epath for embedded windows. * ext/tk/lib/tkcanvas.rb: use epath for window items. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-09* overrided instance methods, which are private methods on the supernagai
class, are changed to 'private' git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5152 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-03* 'format'==>'Kernel.format' (avoid override trouble)nagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5091 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-05configure.in, eval.c, signal.c: : add '--with-pthread-ext' optionnagai
to fix the pthread trouble on 'tcltklib' ext/tcltklib/README.1st: add the description of '--with-pthread-ext' ext/tk/lib/tktext.rb : add TkText#text_copy, text_cut, text_paste to support Tcl/Tk8.4's tk_textCopy, tk_textCut, tk_textPaste ext/tk/lib/tk.rb : add TkMenu#set_focus support Tcl/Tk's tk_menuSetFocus git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-07* tcltklib.c (lib_mainloop_core): fixed signal-trap bugnagai
* multi-tk.rb, tk.rb, tkafter.rb, tkcanvas.rb, tkfont.rb, tktext.rb, tkvirtevent.rb : Ruby/Tk works at $SAFE == 4 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4527 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-09-02* ext/tcltklib/tcltklib.c (ip_invoke): fixed bug on passing a exceptionnagai
* ext/tk/lib/{tk.rb, tkcanvas.rb, tkfont.rb, tktext.rb} : bug fix and improvement of font control git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-29* doc/ChangeLog-1.8.0: add changes of Ruby/Tknagai
* ext/tcltklib/tcltklib.c : some methods have no effect if on slave-IP * ext/tcltklib/tcltklib.c : can create a interpreter without Tk * ext/tcltklib/tcltklib.c : bug fix on handling exceptions * ext/tcltklib/MANUAL.euc : modify * ext/tk/lib/tk.rb : freeze some core modules * ext/tk/lib/multi-tk.rb : more secure * ext/tk/lib/tk.rb: TkVariable.new(array) --> treat the array as the Tk's list * ext/tk/lib/tk.rb: improve accessibility of TkVariable object * ext/tk/lib/tk.rb, ext/tk/lib/tkfont.rb, ext/tk/lib/tkcanvas.rb, ext/tk/lib/tktext.rb : fix bug of font handling * ext/tk/lib/tkfont.rb TkFont.new() accepts compound fonts * process.c: bug fix * process.c: add rb_secure(2) to methods of Process::{UID,GID,Sys} * process.c: deny handling IDs during evaluating the block given to the Process::{UID,GID}.switch method git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-03* (bug fix) bug on Tk object ID managementnagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4298 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-02* (bug fix) TkEntry#deletenagai
* (bug fix) some widget demos * support <TkVariable object> == <Symbol> ( "coerce TkVariable" add to the TODO list :-) ) * freeze some object for security reason git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-29* bug fix ( tested with Ruby/Tk widget demo )nagai
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-23process.c : unify indentationnagai
configure.in : add --enable-setreuid option tcltklib.c : TclTkIp.new accepts 'ip-name' and 'options' ( e.g. TclTkIp.new('FOO', '-geometry 500x200 -use 0x2200009') ) tk.rb : support arguments of TclTkIp.new ( see TkCore::IP_NAME, TkCore::IP_OPTS ) tk*.rb : preparations for multi-Tk interpreter support git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-25tkcanvas.rb :nagai
* Although requiring manual control of GC, memory eating problem of TkCanvas Items is fixed. Probably, a time when GC should run is only after removing many canvas items. GC's cost is large and the man who knows proper timing to start GC is the man who create the script. So, Ruby/Tk doesn't start GC automatically. tktext.rb : * add some methods and bug fix tk.rb : * add widget destroy hook binding to TkBindTag::ALL git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-21Ruby/Tk libraries except tk.rb :nagai
* remove direct-accesses to a TkComm::INTERP * remove direct-accesses to a TkComm::INITIALIZE_TARGETS * use TkINTERP_SETUP_SCRIPTS constant for setting up the interpreter tcltklib.c : * support to create a safe interpreter with safe-Tk ( Tk8.x ) you can test it by the following --------------------------------------------- require 'tk' safeip = Tk::INTERP._eval('::safe::interpCreate') Tk::INTERP._eval('::safe::loadTk ' + safeip) Tk::INTERP._eval(safeip + ' eval button .b -text SlaveIP -command exit') Tk::INTERP._eval(safeip + ' eval pack .b') Tk.mainloop --------------------------------------------- git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3971 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-18tk.rb :nagai
* small bug fix * rename 'no_create' option to 'without_creating' * add TkWindow#pack_in, TkWindow#grid_in, TkWindow#place_in * add TkWindow#bind_class and TkWindow#database_class If defined specific_class (@db_class), bind_class returns @db_class. In other case, bind_class returns TkWinow#class(). It is useful for binding. TkWindow#database_class is defined for querying the option database. It's same to TkWinfo.classname(self). * add TkBindTag.new_by_name and TkDatabaseClass for binding to database class * check varname whether already exsist or not. (TkVarAccess.new) * TkTextWin#bbox returns an array of four numbers * autoload TkDialog2, TkWarning2 * scan event callback arguments and convert to proper type * TkBindTag.new accepts a block ( TkBindTag.new(context){callback} ) * If given taglist, TkWindow#bindtags(taglist) returns taglist * add TkWindow#bindtags=(taglist) * Tk.focue and Tk.focus_lastfor return nil if there is no target widget. * Tk::Wm.client returns the argument string when setting name * TkGrid.columnconfiginfo and rowconfiginfo given a slot return a number. * TkWindow.grid_columnconfiginfo and grid_rowconfiginfo :: ditto * rename and define alias :: TkOption ==> TkOptionDB * define alias :: TkTimer ==> TkAfter * some instance methods change from public to private * some TkComm methods change to module functions (help to treat return values from Tk) * add support for -displayof option to some TkWinfo methods * bind, bind_append and bind_remove :: returns the target of event-binding * add Tk8.4 features * add TkPaneWindow tkdialog.rb: * classes without showing at initialize : TkDialog2, TkWarning2 * add show method to reuse TkDialog object * some instance methods change from public to private * add new features for configuration tktext.rb : * small bug fix * some methods return self * add TkTextMark#+(mod) and TkTextMark#-(mod) (e.g. mark + '3 chars') * add some methods tkcanvas.rb : * small bug fix * some methods return self tkentry.rb : * some methods return self * TkEntry#bbox returns an array of four numbers * scan validatecommand arguments and convert to proper type tkbgerror.rb : * support to define a error handler by user tcltklib.rb : * reported by Ferenc Engard <engard@all.hu> on [ruby-talk:60759] ... and so on git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3960 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-16* eval.c (proc_alloc): re-unification of Block and Proc. Blockmatz
class is no longer available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-06-03* eval.c (rb_call_super): inheritance line adjustment moved frommatz
rb_call(). [ruby-core:01113] * eval.c (rb_eval): use rb_call_super() to follow DRY principle. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3901 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-10-02* commit miss; and tcltklib fix too.matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2920 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-28* re.c (rb_reg_expr_str): need to process backslashes properly.matz
* object.c (rb_any_to_a): declare Object#to_a to be obsolete. * object.c (rb_Array): do not convert nil into [] automagically. * object.c (rb_Integer): use "to_int" instead of "to_i". [experimental] * object.c (nil_to_f): new method. * object.c (rb_Integer): Symbols and nil should cause error. * object.c (rb_Float): nil should cause error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-06-04* tkfont.rb: Fix bugs on TkFont.init_widget_font for Tk8.x.nagai
* tkafter.rb: Add self to 1st argument of interval- and loop-proc TkAfter#current_interval returns an interval (sleep) time value TkAfter#current_args returns an array of arguments TkAfter#return_value returns a return value of last loop-proc e.g. TkAfter.new( proc{|obj| 500 - obj.current_interval}, 10, [proc{|obj| p obj.current_args}, 'proc', 1], proc{|obj| p obj.current_args; ['return', 2]}, [proc{|obj| p obj.return_value p ['proc', obj.current_args[0].call(obj.return_value[1], obj.current_args[1])]}, proc{|*args| args[0] + args[1]}, 1], proc{p ['proc', 4]} ).start(100) * tk*.rb: Allow to use Symbols for parameters. Allow new notation of constructor (also allow old notation). e.g. TkFrame.new('classname'=>'User'){|base| pack f = TkFrame.new(base, :classname=>'ButtonFrame').pack TkButton.new( :parent => f, :text => 'Quit', :command => proc{exit} ).pack( :fill => :x, :pady => 2 ) } * tkcanvas.rb: (TkcItem) Add 'coords' parameter to the canvas item constructor (for new notation of constructor). e.g. c = TkCanvas.new.pack l = TkcLine.new(c, :coords=>[[0,0], [100,100]]) * tcltklib.c: New 'mainloop' and 'mainloop_watchdog'. The priority of their event-loop can be controlled. They accept an optional argument. If it false, they don't exit although the root widget is destroyed. This function is sometimes useful, if it is used with 'restart'. 'mainloop' can't treat Thread#join/value in a callback routine. (e.g. TkButton.new(:command=>proc{p Thread.new{button.invoke}.value}) ) 'mainloop_watchdog' can treat them, but watchdog thread is always running (so, a little heavier than 'mainloop'). If the purpose of using Thread#join/value is to do something under some safe-level, please use Proc object. (e.g. :command=>proc{$SAFE=1;proc{$SAFE=2;button.invoke}.call;p $SAFE}) * tk.rb: Support functions of new 'mainloop' and 'mainloop_watchdog'. * tk.rb: (Tk.restart) Add 'app-name' paramater and 'use' parameter. 'app-name' specifies the name and the resource class of the application. If 'app-name' is specified to 'xxx', the application class on the resource database is set to 'Xxx' and the application name is changed by the same rule of Tk.appname method. 'use' specifies the main window for embedding the root widget instead of generating a new window. * tk.rb: Add new parameter 'widgetname' to the widget constructor to support effective use of Resource Database. For example, the resource 'Xxx*quit.text: QUIT' can set the text of the button generated by the following code. e.g. Tk.restart('Xxx') TkButton.new(nil, 'widgetname'=>'quit', 'command'=>proc{exit}).pack Tk.mainloop * tk.rb: TkOption::get always returns a tainted string. Add TkOption::new_proc_class. It generates a class to import procedures defined on the resource database. For example, there is a following resource file. ----< resource-test >------------ *CMD.foo: {|*args| p [$SAFE, :foo, args]} *CMD.XXX.bar: {|*args| p [$SAFE, :bar, args]} *Button.command: ruby {p self; p $SAFE; TkOption::CMD::XXX.bar(1,2,3)} --------------------------------- The following code is a sample of use of the resource file. e.g. require 'tk' TkOption.readfile 'resource-test' p TkOption.new_proc_class(:CMD, [:foo], 1) p TkOption.new_proc_class(:XXX, [:bar], 2, false, TkOption::CMD) TkButton.new(:text=>'test').pack Tk.mainloop git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2515 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-03-08* eval.c (cvar_cbase): utility function to find innermost nonmatz
singleton cbase. * eval.c (is_defined): adopt new cvar behavior. * eval.c (rb_eval): ditto. * eval.c (assign): ditto. * class.c (rb_mod_clone): should not call rb_obj_clone(), since Module does not provide "allocate". * class.c (rb_singleton_class): should crate new singleton class if obj is a class or module and attached object is different, which means metaclass of singleton class is sought. * time.c (time_s_alloc): now follows allocation framework. * eval.c (rb_eval): should initialize outer class variables from methods in singleton class definitions. * eval.c (assign): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-02-28* eval.c (rb_mod_include): load modules in argument order.matz
* st.c (st_init_table_with_size): num_bins should be prime numbers (no decrement). * st.c (rehash): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2002-01-28* eval.c (is_defined): defined?(Foo::Baz) should check constantsmatz
only, no methods. * eval.c (is_defined): should not dump core on defined?(a::b) where a is not a class nor a module. * object.c (Init_Object): remove dup and clone from TrueClass, FalseClass, and NilClass. * array.c (rb_ary_fill): Array#fill takes block to get the value to fill. * string.c (rb_str_to_i): to_i(0) auto-detects base radix. * array.c (rb_ary_initialize): fill by the block evaluation value if block is given. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2021 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-09-05* re.c (Init_Regexp): to_s to be alias to inspect.matz
* parse.y (yylex): should support 'keyword='. * ruby.c (proc_options): should not adjust argc/argv if -e option is supplied. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1727 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-03-27* eval.c (rb_mod_define_method): should have clear method cache.matz
* eval.c (rb_mod_define_method): should have raised exception for type error. * ruby.h: changed "extern INLINE" to "static inline". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-11-27matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-08-02matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-08-01matzmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-05-242000-05-24matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@710 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-05-012000-05-01matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@678 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-04-102000-04-10matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-04-102000-04-10matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@661 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-03-172000-03-17matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@646 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-01-172000-01-17matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@606 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2000-01-0520000105matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-08-241.4.1 to bematz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@525 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
1999-08-13remove marshal/gtk/kconvmatz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@518 b2dd03c8-39d4-4d8f-98ff-823fe69b080e