Module: TkPalette

Module | TkPalette
In: | tk/lib/tk/palette.rb

### Methods

bisque darken recolorTree recolorTree set setPalette

### Included Modules

Tk

### Constants

TkCommandNames | = | [ 'tk_setPalette'.freeze, 'tk_bisque'.freeze, 'tkDarken'.freeze

### Public Class methods

bisque()

[Source]

    # File tk/lib/tk/palette.rb, line 25
      def TkPalette.bisque
        tk_call('tk_bisque')
      end

darken(color, percent)

[Source]

    # File tk/lib/tk/palette.rb, line 29
      def TkPalette.darken(color, percent)
        tk_call('tkDarken', color, percent)
      end

recolorTree(win, colors)

[Source]

    # File tk/lib/tk/palette.rb, line 33
      def TkPalette.recolorTree(win, colors)
        if not colors.kind_of?(Hash)
          fail "2nd arg need to be Hash"
        end

        tk_call('global', "tkPalette")
        colors.each{|key, value|
          begin
            if win.cget(key) == tk_call('set', "tkPalette(#{key})")
              win[key] = colors[key]
            end
          rescue
            # ignore
          end
        }

        TkWinfo.children(win).each{|w| TkPalette.recolorTree(w, colors)}
      end

set(*args)

[Source]

    # File tk/lib/tk/palette.rb, line 17
      def TkPalette.set(*args)
        args = args.to_a.flatten if args.kind_of? Hash
        tk_call('tk_setPalette', *args)
      end

setPalette(*args)

[Source]

    # File tk/lib/tk/palette.rb, line 21
      def TkPalette.setPalette(*args)
        TkPalette.set(*args)
      end

### Public Instance methods

recolorTree(colors)

[Source]

    # File tk/lib/tk/palette.rb, line 52
      def recolorTree(colors)
        TkPalette.recolorTree(self, colors)
      end

[Validate]