module HardwareInformation::GUI::Gtk::ShowInputDevicesModule
Constants
- FONT_TO_USE_FOR_THE_SCROLLED_WINDOWS
#¶ ↑
FONT_TO_USE_FOR_THE_SCROLLED_WINDOWS
¶ ↑#¶ ↑
- HEIGHT
#¶ ↑
HEIGHT
¶ ↑#¶ ↑
- NAMESPACE
#¶ ↑
NAMESPACE
¶ ↑#¶ ↑
- TITLE
#¶ ↑
TITLE
¶ ↑#¶ ↑
- WIDTH
#¶ ↑
WIDTH
¶ ↑#¶ ↑
Public Class Methods
new( optional_file = nil, run_already = true )
click to toggle source
run( i = ARGV )
click to toggle source
#¶ ↑
HardwareInformation::GUI::Gtk::ShowInputDevicesModule.run
¶ ↑
#¶ ↑
# File lib/hardware_information/gui/shared_code/show_input_devices/show_input_devices_module.rb, line 175 def self.run( i = ARGV ) require 'gtk_paradise/run' _ = ::HardwareInformation::GUI::Gtk::ShowInputDevices.new(i) r = ::Gtk.run r << _ r.determine_the_title_from_the_child_widget r.set_size_request(_.width?, _.height?) r.top_left_then_run end
Public Instance Methods
border_size?()
click to toggle source
connect_skeleton()
click to toggle source
#¶ ↑
connect_skeleton
(connect tag)¶ ↑
#¶ ↑
# File lib/hardware_information/gui/shared_code/show_input_devices/show_input_devices_module.rb, line 113 def connect_skeleton Thread.abort_on_exception = true result = `xinput --list --short`.to_s.strip @text_buffer = gtk_text_buffer text_view = gtk_text_view(@text_buffer) text_view.set_text(result.to_s) scrolled_window = gtk_scrolled_window(text_view) { :always } scrolled_window.set_size_request(1200, 400) scrolled_window.set_font(FONT_TO_USE_FOR_THE_SCROLLED_WINDOWS) frame = gtk_frame(scrolled_window) frame.set_text('Show input devices') frame.set_border_width(10) frame.set_font :hack_24 frame.make_bold maximal(frame, 20) add(gtk_separator) mini_hbox = gtk_hbox entry_for_listing_props = gtk_entry( 'xinput --list-props "Logitech USB Optical Mouse"' ) button_activate_the_entry_for_listing_props = gtk_button('run') button_activate_the_entry_for_listing_props.fancy_tooltips = 'This will run the content on the left side.' button_activate_the_entry_for_listing_props.set_size_request(100, 30) button_activate_the_entry_for_listing_props.css_class('bblack2') button_activate_the_entry_for_listing_props.on_clicked { do_fill_up_text_buffer2_with_this_content_from_that_entry( entry_for_listing_props ) } mini_hbox.maximal(entry_for_listing_props, 2) mini_hbox.minimal(button_activate_the_entry_for_listing_props, 2) add(mini_hbox) @text_buffer2 = gtk_text_buffer text_view2 = gtk_text_view(@text_buffer2) scrolled_window2 = gtk_scrolled_window(text_view2) { :always } scrolled_window2.set_size_request(1200, 300) scrolled_window2.set_font(FONT_TO_USE_FOR_THE_SCROLLED_WINDOWS) add(scrolled_window2) end
create_skeleton()
click to toggle source
do_fill_up_text_buffer2_with_this_content_from_that_entry( entry_to_use )
click to toggle source
#¶ ↑
do_fill_up_text_buffer2_with_this_content_from_that_entry
¶ ↑
#¶ ↑
# File lib/hardware_information/gui/shared_code/show_input_devices/show_input_devices_module.rb, line 157 def do_fill_up_text_buffer2_with_this_content_from_that_entry( entry_to_use ) _ = entry_to_use.text? result = `#{_}`.to_s.strip @text_buffer2.set_text(result) end
padding?()
click to toggle source
reset()
click to toggle source
#¶ ↑
reset (reset tag)¶ ↑
#¶ ↑
# File lib/hardware_information/gui/shared_code/show_input_devices/show_input_devices_module.rb, line 67 def reset reset_the_internal_variables # ======================================================================= # # === @configuration # ======================================================================= # @configuration = [true, __dir__, NAMESPACE] # ======================================================================= # # === @title # ======================================================================= # @title = TITLE # ======================================================================= # # === @width # ======================================================================= # @width = WIDTH # ======================================================================= # # === @height # ======================================================================= # @height = HEIGHT set_use_this_font(:dejavu_condensed_21) use_gtk_paradise_project_css_file infer_the_size_automatically end