Class: Watobo::Gui::TestGui::TreeDlg

Inherits:
FXDialogBox
  • Object
show all
Defined in:
lib/watobo/gui/checkboxtree.rb

Instance Method Summary collapse

Constructor Details

#initialize(parent, project = nil, prefs = {}) ⇒ TreeDlg

include Responder



336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
# File 'lib/watobo/gui/checkboxtree.rb', line 336

def initialize(parent, project=nil, prefs={} )
  super(parent, "CheckBox Dialog", DECOR_ALL, :width => 300, :height => 400)
 # FXMAPFUNC(SEL_COMMAND, ID_ACCEPT, :onAccept)
  frame = FXVerticalFrame.new(self, LAYOUT_FILL_X|LAYOUT_FILL_Y|FRAME_GROOVE)
  elements = []
  num_root_nodes = 4
  max_child_nodes = 4
  num_root_nodes.times do |ri|
    max_child_nodes.times do |si|
      name = "root#{ri}|sub#{si}"
      data = name + "-data"
      e = { :name => name, :enabled => false, :data => data }
      elements << e
    end
  end
  @cbtree = CheckBoxTreeList.new(frame)
  @cbtree.elements = elements

end