# # tkextlib/iwidgets/calendar.rb # by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) # require 'tk' require 'tkextlib/iwidgets.rb' module Tk module Iwidgets class Calendar < Tk::Itk::Widget end end end class Tk::Iwidgets::Calendar TkCommandNames = ['::iwidgets::calendar'.freeze].freeze WidgetClassName = 'Calendar'.freeze WidgetClassNames[WidgetClassName] = self def __strval_optkeys super() + [ 'buttonforeground', 'outline', 'selectcolor', 'weekdaybackground', 'weekendbackground' ] end private :__strval_optkeys def __listval_optkeys super() << 'days' end private :__listval_optkeys def __font_optkeys super() + ['currentdatefont', 'datefont', 'dayfont', 'titlefont'] end private :__font_optkeys #################################### include Tk::ValidateConfigure class CalendarCommand < TkValidateCommand #class CalCmdArgs < TkUtil::CallbackSubst class ValidateArgs < TkUtil::CallbackSubst KEY_TBL = [ [?d, ?s, :date], nil ] PROC_TBL = [ [?s, TkComm.method(:string) ], nil ] _setup_subst_table(KEY_TBL, PROC_TBL); def self.ret_val(val) val end end def self._config_keys # array of config-option key (string or symbol) ['command'] end #def initialize(cmd = Proc.new, *args) # _initialize_for_cb_class(CalCmdArgs, cmd, *args) #end end def __validation_class_list super() << CalendarCommand end Tk::ValidateConfigure.__def_validcmd(binding, CalendarCommand) =begin def command(cmd = Proc.new, args = nil) if cmd.kind_of?(CalendarCommand) configure('command', cmd) elsif args configure('command', [cmd, args]) else configure('command', cmd) end end =end #################################### def get_string tk_call(@path, 'get', '-string') end alias get get_string def get_clicks number(tk_call(@path, 'get', '-clicks')) end def select(date) tk_call(@path, 'select', date) self end def show(date) tk_call(@path, 'show', date) self end def show_now tk_call(@path, 'show', 'now') self end end rm'>
path: root/.github
AgeCommit message (Expand)Author
2021-01-11Removed ENABLE_PATH_CHECK condition [ci skip]Nobuyoshi Nakada
2021-01-10Moved to ruby/actions workflow [ci skip]Nobuyoshi Nakada
2021-01-04Daily bundled_gems update [ci skip]Nobuyoshi Nakada
2020-12-27Check leaked global symbols under more various conditionsNobuyoshi Nakada
2020-12-26Add 3.0 top sepc guardsNobuyoshi Nakada
2020-12-26Reduced GitHub ActionsNobuyoshi Nakada
2020-12-19Install gdb on ActionsTakashi Kokubun
2020-12-19Check macros for headersNobuyoshi Nakada
2020-12-19Renamed check_encoding.yml as check_misc.yml [ci skip]Nobuyoshi Nakada
2020-12-17Remove --jit-save-temps from MJITTakashi Kokubun
2020-12-16Different names instead of `ulimit`Nobuyoshi Nakada
2020-12-13`ulimit` does not affect another shellKazuhiro NISHIYAMA
2020-12-12Allow dumping a core file on ActionsTakashi Kokubun
2020-12-11Add some JIT options to MJIT ActionsTakashi Kokubun
2020-12-10Reintroduce the fix againTakashi Kokubun
2020-12-10Fix the path properlyTakashi Kokubun
2020-12-10Try fixing the -I positionTakashi Kokubun
2020-12-10Actions mingw - add tool/test for WEBrick in spec tests (#3882)MSP-Greg
2020-12-10.github: reduce (#3876)卜部昌平
2020-12-07Remove BUNLDER_VERSION in Windows (#3859)MSP-Greg
2020-12-07Pass the flag as $TESTOPTSTakashi Kokubun
2020-12-08skip failing tests in test-all on mingwNARUSE, Yui
2020-11-28Increase timeout for MJIT ActionsTakashi Kokubun
2020-11-10Removed canonicalization for mathnNobuyoshi Nakada
2020-11-04.github/workflows/baseruby.yml: add卜部昌平
2020-10-27Removed unused environment variableNobuyoshi Nakada
2020-10-24Tweaks for the ruby/spec workflowBenoit Daloze
2020-10-23.github/workflows/spec_guards.yml add卜部昌平
2020-10-21Check dependencies on macOS tooNobuyoshi Nakada
2020-10-21.github: reduce copy&paste卜部昌平
2020-10-13Use %VCVARS%Nobuyoshi Nakada
2020-10-06Use $GITHUB_ENV instead of set-envKazuhiro NISHIYAMA
2020-10-06Remove unused commit_infoKazuhiro NISHIYAMA
2020-09-27Remove outdated comment [ci skip]Kazuhiro NISHIYAMA
2020-09-25Add check_dependencies workflowKazuhiro NISHIYAMA