Class: Watobo::Gui::FilterTableCtrl

Inherits:
FXHorizontalFrame
  • Object
show all
Defined in:
lib/watobo/gui/rewrite_filters_dialog.rb

Direct Known Subclasses

RequestFilterCtrl, ResponseFilterCtrl

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(owner, target = nil, opts) ⇒ FilterTableCtrl

Returns a new instance of FilterTableCtrl.



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
84
85
# File 'lib/watobo/gui/rewrite_filters_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( Location Match Pattern Flags ).each do |l|
    FXLabel.new(matrix, l)
  end
  
  @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){}
 
  @match_type_combo = FXComboBox.new(matrix, 10, nil, 0, COMBOBOX_STATIC|FRAME_SUNKEN|FRAME_THICK)
  #@filterCombo.width =200

  @match_type_combo.numVisible = 0
  @match_type_combo.numColumns = 10
  @match_type_combo.editable = false
  @match_type_combo.connect(SEL_COMMAND){}
  
  @pattern_txt = FXTextField.new(matrix, 20, nil, 0, :opts => TEXTFIELD_NORMAL|LAYOUT_FILL_COLUMN)
           
  @flags_combo = FXComboBox.new(matrix, 10, nil, 0, COMBOBOX_STATIC|FRAME_SUNKEN|FRAME_THICK)
  #@filterCombo.width =200

  @flags_combo.numVisible = 0
  @flags_combo.numColumns = 10
  @flags_combo.editable = false
  @flags_combo.connect(SEL_COMMAND){}
   
   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_filter }

     #   @edit_btn = FXButton.new(top_btn_frame, "Edit ..." ,  nil, nil)
     #   @edit_btn.enable
     #   @edit_btn.connect(SEL_COMMAND){ delete_filter }

  @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
  
  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_filter }

end

Instance Attribute Details

#targetObject

Returns the value of attribute target.



26
27
28
# File 'lib/watobo/gui/rewrite_filters_dialog.rb', line 26

def target
  @target
end