Class: GerminalCssEditor

Inherits:
Gtk::Grid
  • Object
show all
Defined in:
lib/css_editor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(window) ⇒ GerminalCssEditor

Returns a new instance of GerminalCssEditor.



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/css_editor.rb', line 19

def initialize(window)
  super()
  @window = window
  @provider = window.application.provider
  @default_css = @provider.to_s
  @modified_css = @default_css
  @tab_label = "Css Editor"
  
  gen_source_view

  sw = Gtk::ScrolledWindow.new(nil, nil)
  sw.vexpand = true
  sw.hexpand = true
  sw.add(@view)
  attach(sw, 0, 0, 3, 1)

  button = gen_reset_button
  attach(button, 0, 1, 1, 1)

  @style_button = gen_style_chooser_button    
  attach(@style_button, 1, 1, 1, 1)

  button = gen_save_button
  attach(button, 2, 1, 1, 1)
  manage_buffer_changes
  manage_css_errors
  show_all
end

Instance Attribute Details

#previewObject

Returns the value of attribute preview.



18
19
20
# File 'lib/css_editor.rb', line 18

def preview
  @preview
end

#tab_labelObject

Returns the value of attribute tab_label.



18
19
20
# File 'lib/css_editor.rb', line 18

def tab_label
  @tab_label
end