Sha256: f61dc6360432adec954497f662ca81e8313b0da7e5f76547de3c5ed4551e866e

Contents?: true

Size: 1.37 KB

Versions: 9

Compression:

Stored size: 1.37 KB

Contents


class FXWarningBox < FXDialogBox
  def initialize(parent, text)
      super( parent, "Warning", DECOR_ALL, 0, 0, 400, 130)
      # Frame
      s = FXVerticalFrame.new(self,
			      LAYOUT_SIDE_TOP|LAYOUT_FILL_X)

      f = FXHorizontalFrame.new(s, LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y)

      font = FXFont.new(app, "Helvetica", 30)
      oops = FXLabel.new(f, "!", nil, 0, LAYOUT_SIDE_LEFT|LAYOUT_FILL_X|
			 LAYOUT_CENTER_Y)
      oops.frameStyle = FRAME_RAISED|FRAME_THICK
      oops.baseColor = 'dark grey'
      oops.textColor = 'red'
      oops.padLeft = oops.padRight = 15
      oops.shadowColor = 'black'
      oops.borderColor = 'white'
      oops.font = font

      FXLabel.new(f, text, nil, 0)

      # Separator
      FXHorizontalSeparator.new(s,
				LAYOUT_SIDE_TOP|LAYOUT_FILL_X|SEPARATOR_GROOVE)

      # Bottom buttons
      buttons = FXHorizontalFrame.new(s,
				      LAYOUT_SIDE_BOTTOM|FRAME_NONE|
				      LAYOUT_FILL_X|PACK_UNIFORM_WIDTH)
      # Accept
      yes = FXButton.new(buttons, "&Yes", nil, self, FXDialogBox::ID_ACCEPT,
			 FRAME_RAISED|FRAME_THICK|LAYOUT_FILL_X|
			 LAYOUT_RIGHT|LAYOUT_CENTER_Y)

      # Cancel
      no = FXButton.new(buttons, "&No", nil, self, FXDialogBox::ID_CANCEL,
			FRAME_RAISED|FRAME_THICK|LAYOUT_FILL_X|
			LAYOUT_RIGHT|LAYOUT_CENTER_Y)
      no.setDefault
      no.setFocus
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ifmapper-0.5 lib/IFMapper/FXWarningBox.rb
ifmapper-0.6 lib/IFMapper/FXWarningBox.rb
ifmapper-0.8 lib/IFMapper/FXWarningBox.rb
ifmapper-0.8.1 lib/IFMapper/FXWarningBox.rb
ifmapper-0.8.5 lib/IFMapper/FXWarningBox.rb
ifmapper-0.9.5 lib/IFMapper/FXWarningBox.rb
ifmapper-0.9.6 lib/IFMapper/FXWarningBox.rb
ifmapper-0.7 lib/IFMapper/FXWarningBox.rb
ifmapper-0.9 lib/IFMapper/FXWarningBox.rb