Class: FixedFrameWrapper

Inherits:
AbstractFrameWrapper show all
Defined in:
lib/a-commons.rb

Overview

module AbstractFrameWrapper

def hinner_frame
   raise NoMethodError, "#{self} needs to respond to `:hinner_frame'"
end

end

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(_extension, _domain, _name, _title = '', _index = 0) ⇒ FixedFrameWrapper

Returns a new instance of FixedFrameWrapper.


71
72
73
74
75
76
77
78
79
# File 'lib/a-commons.rb', line 71

def initialize(_extension, _domain, _name, _title='', _index=0)
  @extension = _extension
  @extension_name = _extension.name
  @domain =_domain
  @name = _name
  @title = _title
  @index = _index
  fixed_frame_forge
end

Instance Attribute Details

#domainObject

include AbstractFrameWrapper


67
68
69
# File 'lib/a-commons.rb', line 67

def domain
  @domain
end

#extension_nameObject (readonly)

Returns the value of attribute extension_name


70
71
72
# File 'lib/a-commons.rb', line 70

def extension_name
  @extension_name
end

#nameObject (readonly)

Returns the value of attribute name


68
69
70
# File 'lib/a-commons.rb', line 68

def name
  @name
end

#titleObject (readonly)

Returns the value of attribute title


69
70
71
# File 'lib/a-commons.rb', line 69

def title
  @title
end

Instance Method Details

#freeObject


143
144
145
146
# File 'lib/a-commons.rb', line 143

def free
  Arcadia.layout.unregister_panel(self)
  @fixed_frame = nil
end

#hideObject


123
124
125
# File 'lib/a-commons.rb', line 123

def hide

end

#hinner_frameObject


86
87
88
89
# File 'lib/a-commons.rb', line 86

def hinner_frame
  fixed_frame_forge
  @fixed_frame
end

#maximizeObject


135
136
137
# File 'lib/a-commons.rb', line 135

def maximize
  Arcadia.layout.domain(@domain)['root'].maximize
end

#maximized?Boolean

Returns:

  • (Boolean)

131
132
133
# File 'lib/a-commons.rb', line 131

def maximized?
  Arcadia.layout.domain(@domain) && Arcadia.layout.domain(@domain)['root'].maximized?
end

#raised?Boolean

Returns:

  • (Boolean)

127
128
129
# File 'lib/a-commons.rb', line 127

def raised?
  Arcadia.layout.raised?(@domain, @name)
end

#resizeObject


139
140
141
# File 'lib/a-commons.rb', line 139

def resize
  Arcadia.layout.domain(@domain)['root'].resize
end

#rootObject


91
92
93
94
95
96
97
98
# File 'lib/a-commons.rb', line 91

def root
  fixed_frame_forge
  if Arcadia.layout.domain(@domain)
    Arcadia.layout.domain(@domain)['root']
  else
    Arcadia.layout.domain('nil')['root']
  end
end

#showObject

def top_text(_top_text=nil)

  fixed_frame_forge
  Arcadia.layout.domain(@domain)['root'].top_text(_top_text)
  #@arcadia.layout.domain_for_frame(@domain, @name)['root'].top_text(_title)
end

106
107
108
109
# File 'lib/a-commons.rb', line 106

def show
  fixed_frame_forge
  Arcadia.layout.raise_panel(@domain, @name)
end

#show_anywayObject


111
112
113
114
115
116
117
118
119
120
121
# File 'lib/a-commons.rb', line 111

def show_anyway
  self.show
  if !Arcadia.layout.registered_panel?(self)
    if domain.nil?
      self.domain = @extension.frame_domain_default(@index)
      @extension.frame_domain(@index, self.domain)
    end
    Arcadia.layout.register_panel(self, self.hinner_frame)
    Arcadia.layout.build_invert_menu
  end
end