Sha256: 1f72b36426e7d7be39d1217ac389101a218b117886e8cef5d68e56eac377545d

Contents?: true

Size: 951 Bytes

Versions: 12

Compression:

Stored size: 951 Bytes

Contents


class FXSectionDialogBox < FXDialogBox

  def copy_to()
    @section.name  = @name.text
    @map.update_title
  end

  def copy_from(section)
    @name.text   = section.name.to_s
    @section = section
  end

  def initialize(map)
    decor = DECOR_TITLE|DECOR_BORDER|DECOR_CLOSE

    super( map.window, "Section Information", decor, 40, 40, 0, 0 )
    mainFrame = FXVerticalFrame.new(self,
				    FRAME_SUNKEN|FRAME_THICK|
				    LAYOUT_FILL_X|LAYOUT_FILL_Y)

    frame = FXHorizontalFrame.new(mainFrame, LAYOUT_SIDE_TOP|LAYOUT_FILL_X)

    FXLabel.new(frame, "Name: ", nil, 0, LAYOUT_FILL_X)
    @name = FXTextField.new(frame, 40, nil, 0, LAYOUT_FILL_ROW)

    frame = FXVerticalFrame.new(mainFrame, 
				LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y)


    @name.connect(SEL_CHANGED) { copy_to() }
    @map = map

    # We need to create the dialog box first, so we can use select text.
    create
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ifmapper-0.6 lib/IFMapper/FXSectionDialogBox.rb
ifmapper-0.8.1 lib/IFMapper/FXSectionDialogBox.rb
ifmapper-0.7 lib/IFMapper/FXSectionDialogBox.rb
ifmapper-0.8.5 lib/IFMapper/FXSectionDialogBox.rb
ifmapper-0.8 lib/IFMapper/FXSectionDialogBox.rb
ifmapper-0.9.5 lib/IFMapper/FXSectionDialogBox.rb
ifmapper-0.9.6 lib/IFMapper/FXSectionDialogBox.rb
ifmapper-0.9.7 lib/IFMapper/FXSectionDialogBox.rb
ifmapper-0.9 lib/IFMapper/FXSectionDialogBox.rb
ifmapper-0.9.8 lib/IFMapper/FXSectionDialogBox.rb
ifmapper-0.9.9 lib/IFMapper/FXSectionDialogBox.rb
ifmapper-1.0.0 lib/IFMapper/FXSectionDialogBox.rb