Class: Fox::FXHeader

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/fox16/core.rb,
lib/fox16/aliases.rb,
lib/fox16/iterators.rb

Instance Method Summary collapse

Instance Method Details

#arrowDown?(index) ⇒ Boolean

Returns true if the specified header item's arrow points down. Raises IndexError if index is out of bounds.

Returns:

  • (Boolean)


205
206
207
208
209
210
211
# File 'lib/fox16/core.rb', line 205

def arrowDown?(index)
  if index < 0 || index >= numItems
    raise IndexError, "header item index out of bounds"
  else
    getArrowDir(index) == FXHeaderItem::ARROW_DOWN
  end
end

#arrowNone?(index) ⇒ Boolean

Returns true if the specified header item does not display any arrow. Raises IndexError if index is out of bounds.

Returns:

  • (Boolean)


217
218
219
220
221
222
223
# File 'lib/fox16/core.rb', line 217

def arrowNone?(index)
  if index < 0 || index >= numItems
    raise IndexError, "header item index out of bounds"
  else
    getArrowDir(index) == FXHeaderItem::ARROW_NONE
  end
end

#arrowUp?(index) ⇒ Boolean

Returns true if the specified header item's arrow points up. Raises IndexError if index is out of bounds.

Returns:

  • (Boolean)


193
194
195
196
197
198
199
# File 'lib/fox16/core.rb', line 193

def arrowUp?(index)
  if index < 0 || index >= numItems
    raise IndexError, "header item index out of bounds"
  else
    getArrowDir(index) == FXHeaderItem::ARROW_UP
  end
end

#eachObject

Calls block once for each item in the list, passing a reference to that item as a parameter.



79
80
81
82
83
84
# File 'lib/fox16/iterators.rb', line 79

def each # :yields: aHeaderItem
  0.upto(numItems - 1) do |i|
    yield getItem(i)
  end
  self
end

#firstObject

Override Enumerable#first with FXWindow#first for backwards compatibility.



71
72
73
# File 'lib/fox16/iterators.rb', line 71

def first
  getFirst
end

#font(*args) ⇒ Object

:nodoc:



2247
2248
2249
# File 'lib/fox16/aliases.rb', line 2247

def font(*args) # :nodoc:
  getFont(*args)
end

#font=(*args) ⇒ Object

:nodoc:



2250
2251
2252
# File 'lib/fox16/aliases.rb', line 2250

def font=(*args) # :nodoc:
  setFont(*args)
end

#headerStyle(*args) ⇒ Object

:nodoc:



2259
2260
2261
# File 'lib/fox16/aliases.rb', line 2259

def headerStyle(*args) # :nodoc:
  getHeaderStyle(*args)
end

#headerStyle=(*args) ⇒ Object

:nodoc:



2262
2263
2264
# File 'lib/fox16/aliases.rb', line 2262

def headerStyle=(*args) # :nodoc:
  setHeaderStyle(*args)
end

#helpText(*args) ⇒ Object

:nodoc:



2265
2266
2267
# File 'lib/fox16/aliases.rb', line 2265

def helpText(*args) # :nodoc:
  getHelpText(*args)
end

#helpText=(*args) ⇒ Object

:nodoc:



2268
2269
2270
# File 'lib/fox16/aliases.rb', line 2268

def helpText=(*args) # :nodoc:
  setHelpText(*args)
end

#numItems(*args) ⇒ Object

:nodoc:



2241
2242
2243
# File 'lib/fox16/aliases.rb', line 2241

def numItems(*args) # :nodoc:
  getNumItems(*args)
end

#textColor(*args) ⇒ Object

:nodoc:



2253
2254
2255
# File 'lib/fox16/aliases.rb', line 2253

def textColor(*args) # :nodoc:
  getTextColor(*args)
end

#textColor=(*args) ⇒ Object

:nodoc:



2256
2257
2258
# File 'lib/fox16/aliases.rb', line 2256

def textColor=(*args) # :nodoc:
  setTextColor(*args)
end

#totalSizeObject

:nodoc:



2244
2245
2246
# File 'lib/fox16/aliases.rb', line 2244

def totalSize # :nodoc:
  getTotalSize()
end