class Plugin::GUI::Window

Attributes

icon[R]

Public Class Methods

active() click to toggle source
# File core/plugin/gui/window.rb, line 29
def self.active
  @@active ||= instance(:default, _("デフォルト"))
end
new(*args) click to toggle source

instanceから呼ばれる。勝手に作成しないこと

Calls superclass method Plugin::GUI::Cuscadable.new
# File core/plugin/gui/window.rb, line 18
def initialize(*args)
  super
  @@active ||= self
  Plugin.call(:window_created, self)
end

Public Instance Methods

active!(just_this=true, by_toolkit=false) click to toggle source

self がアクティブになったことを報告する

# File core/plugin/gui/window.rb, line 25
def active!(just_this=true, by_toolkit=false)
  @@active = self
end
set_icon(icon) click to toggle source
# File core/plugin/gui/window.rb, line 33
def set_icon(icon)
  case icon
  when Diva::Model
    @icon = icon
  when String
    @icon = Diva::Model(:photo)[icon]
  else
    raise RuntimeError, "Unexpected class `#{icon.class}'."
  end
  Plugin.call(:gui_window_change_icon, self, icon)
end