Class: CqlsBeamer::Actor

Inherits:
Object
  • Object
show all
Defined in:
lib/dyndoc/plugins/tex/beamer.rb

Constant Summary collapse

@@actors =
{}

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(qui, quoi, quand, ou, align = "left,top", mode = :only) ⇒ Actor

align=(left-center-right,bottom-base-center-top)



140
141
142
143
144
145
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 140

def initialize(qui,quoi,quand,ou,align="left,top",mode=:only) #align=(left-center-right,bottom-base-center-top)
  quoi=quoi.join("\n") if quoi.is_a? Array
  @what,@when,@where,@align,@mode=quoi,quand,ou,align,mode
  @minipage=""
  Actor[qui]=self
end

Instance Attribute Details

#alignObject

Returns the value of attribute align.



129
130
131
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 129

def align
  @align
end

#isRObject

Returns the value of attribute isR.



129
130
131
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 129

def isR
  @isR
end

#isRawObject

Returns the value of attribute isRaw.



129
130
131
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 129

def isRaw
  @isRaw
end

#minipageObject

Returns the value of attribute minipage.



129
130
131
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 129

def minipage
  @minipage
end

#modeObject

Returns the value of attribute mode.



129
130
131
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 129

def mode
  @mode
end

#whatObject

Returns the value of attribute what.



129
130
131
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 129

def what
  @what
end

#whenObject

Returns the value of attribute when.



129
130
131
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 129

def when
  @when
end

#whereObject

Returns the value of attribute where.



129
130
131
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 129

def where
  @where
end

Class Method Details

.[](key) ⇒ Object



136
137
138
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 136

def Actor.[](key)
  @@actors[key]
end

.[]=(key, val) ⇒ Object



132
133
134
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 132

def Actor.[]=(key,val)
  @@actors[key]=val
end

Instance Method Details

#output(txt, local = {}) ⇒ Object



147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/dyndoc/plugins/tex/beamer.rb', line 147

def output(txt,local={})
  local[:where]=@where unless local[:where]
  local[:when]=@when unless local[:when]
  local[:align]=@align unless local[:align]
  local[:what]=@what unless local[:what]
  local[:mode]=@mode unless local[:mode]
  local[:minipage]=@minipage unless local[:minipage]
  #Dyndoc.warn  :outputInRuby, local[:what]
  local[:what]='\begin{minipage}{'+local[:minipage]+'}'+local[:what]+'\end{minipage}' unless local[:minipage].empty?
  #Dyndoc.warn  :outputInRuby2, local[:what]
  if @isRaw or !local[:where]
    txt << "\\#{local[:mode]}<#{local[:when]}>{\n #{local[:what]}}\n"
  else
    txt << "\\#{local[:mode]}<#{local[:when]}>{\n\\pgfputat{\\pgfxy(#{local[:where]})}{\\pgfbox[#{local[:align]}]{#{local[:what]}}}}\n"
  end
end