Class: Watobo::Gui::RulesTableCtrl
- Inherits:
-
FXHorizontalFrame
- Object
- FXHorizontalFrame
- Watobo::Gui::RulesTableCtrl
- Defined in:
- lib/watobo/gui/rewrite_rules_dialog.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#target ⇒ Object
Returns the value of attribute target.
Instance Method Summary collapse
-
#initialize(owner, target = nil, opts) ⇒ RulesTableCtrl
constructor
A new instance of RulesTableCtrl.
Constructor Details
#initialize(owner, target = nil, opts) ⇒ RulesTableCtrl
Returns a new instance of RulesTableCtrl.
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/watobo/gui/rewrite_rules_dialog.rb', line 28 def initialize(owner,target = nil, opts) @target = target super owner, opts matrix = FXMatrix.new(self, 4, :opts => MATRIX_BY_COLUMNS|LAYOUT_FILL_X|LAYOUT_FILL_Y) %w( Action Location Pattern Content).each do |l| FXLabel.new(matrix, l) end @actions_combo = FXComboBox.new(matrix, 10, nil, 0, COMBOBOX_STATIC|FRAME_SUNKEN|FRAME_THICK) #@filterCombo.width =200 @actions_combo.numVisible = 0 @actions_combo.numColumns = 10 @actions_combo.editable = false @actions_combo.connect(SEL_COMMAND){} @locations_combo = FXComboBox.new(matrix, 10, nil, 0, COMBOBOX_STATIC|FRAME_SUNKEN|FRAME_THICK) #@filterCombo.width =200 @locations_combo.numVisible = 0 @locations_combo.numColumns = 10 @locations_combo.editable = false @locations_combo.connect(SEL_COMMAND){} @pattern_txt = FXTextField.new(matrix, 20, nil, 0, :opts => TEXTFIELD_NORMAL|LAYOUT_FILL_COLUMN) @content_txt = FXTextField.new(matrix, 20, nil, 0, :opts => TEXTFIELD_NORMAL|LAYOUT_FILL_COLUMN) frame = FXVerticalFrame.new(self, :opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0) top_btn_frame = FXHorizontalFrame.new(frame,:opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0) @del_btn = FXButton.new(top_btn_frame, "Del" , nil, nil) @del_btn.enable @del_btn.connect(SEL_COMMAND){ delete_rule } # @edit_btn = FXButton.new(top_btn_frame, "Edit ..." , nil, nil) # @edit_btn.enable # @edit_btn.connect(SEL_COMMAND){ delete_rule } @up_btn = FXButton.new(top_btn_frame, "Up" , nil, nil) @up_btn.enable @down_btn = FXButton.new(top_btn_frame, "Down" , nil, nil) @down_btn.enable @filter_btn = FXButton.new(top_btn_frame, "Filter" , nil, nil) @filter_btn.enable @filter_btn.connect(SEL_COMMAND){ open_filter_dialog } add_btn_frame = FXHorizontalFrame.new(frame,:opts => LAYOUT_FILL_X|LAYOUT_FILL_Y, :padding => 0) @add_btn = FXButton.new(add_btn_frame, "Add ..." , nil, nil, ) @add_btn.enable @add_btn.connect(SEL_COMMAND){ add_rule } end |
Instance Attribute Details
#target ⇒ Object
Returns the value of attribute target.
26 27 28 |
# File 'lib/watobo/gui/rewrite_rules_dialog.rb', line 26 def target @target end |