gtk_paradise 0.9.120

Sign up to get free protection for your applications and to get access to all the features.
Files changed (714) hide show
  1. checksums.yaml +7 -0
  2. data/LICENCE.md +6 -0
  3. data/README.md +8966 -0
  4. data/bin/application_menu +7 -0
  5. data/bin/demo-gtk3 +39 -0
  6. data/bin/gtk_calculator +7 -0
  7. data/bin/gtk_display_this_file +23 -0
  8. data/bin/gtk_paradise +7 -0
  9. data/bin/minesweeper +7 -0
  10. data/bin/notebook_controller +7 -0
  11. data/bin/pdfwalker +7 -0
  12. data/doc/README.gen +8938 -0
  13. data/doc/todo/TODO_FOR_THE_GTK_PARADISE_PROJECT.md +246 -0
  14. data/doc/todo/recurring_todo_tasks.md +9 -0
  15. data/gtk_paradise.gemspec +83 -0
  16. data/lib/gtk_paradise/app/app.rb +208 -0
  17. data/lib/gtk_paradise/app/app_module.rb +1739 -0
  18. data/lib/gtk_paradise/autoinclude.rb +7 -0
  19. data/lib/gtk_paradise/base_module/base_module.rb +67 -0
  20. data/lib/gtk_paradise/base_module/change_directory.rb +22 -0
  21. data/lib/gtk_paradise/base_module/colours.rb +81 -0
  22. data/lib/gtk_paradise/base_module/combo_box_and_combo_box_entry.rb +113 -0
  23. data/lib/gtk_paradise/base_module/commandline_arguments.rb +36 -0
  24. data/lib/gtk_paradise/base_module/configuration.rb +50 -0
  25. data/lib/gtk_paradise/base_module/constants.rb +23 -0
  26. data/lib/gtk_paradise/base_module/css.rb +398 -0
  27. data/lib/gtk_paradise/base_module/debug.rb +127 -0
  28. data/lib/gtk_paradise/base_module/draggable.rb +95 -0
  29. data/lib/gtk_paradise/base_module/e.rb +20 -0
  30. data/lib/gtk_paradise/base_module/emoji.rb +107 -0
  31. data/lib/gtk_paradise/base_module/esystem.rb +22 -0
  32. data/lib/gtk_paradise/base_module/events.rb +111 -0
  33. data/lib/gtk_paradise/base_module/fonts.rb +119 -0
  34. data/lib/gtk_paradise/base_module/graphics_display.rb +47 -0
  35. data/lib/gtk_paradise/base_module/gtk3.rb +43 -0
  36. data/lib/gtk_paradise/base_module/gtk_buttons.rb +562 -0
  37. data/lib/gtk_paradise/base_module/gtk_entry.rb +126 -0
  38. data/lib/gtk_paradise/base_module/gtk_fixed.rb +18 -0
  39. data/lib/gtk_paradise/base_module/gtk_grid.rb +61 -0
  40. data/lib/gtk_paradise/base_module/gtk_image.rb +501 -0
  41. data/lib/gtk_paradise/base_module/gtk_label.rb +211 -0
  42. data/lib/gtk_paradise/base_module/gtk_notebook.rb +88 -0
  43. data/lib/gtk_paradise/base_module/gtk_scrolled_window.rb +155 -0
  44. data/lib/gtk_paradise/base_module/html_support.rb +230 -0
  45. data/lib/gtk_paradise/base_module/misc.rb +2949 -0
  46. data/lib/gtk_paradise/base_module/pango.rb +24 -0
  47. data/lib/gtk_paradise/base_module/popover.rb +241 -0
  48. data/lib/gtk_paradise/base_module/register_sigint.rb +20 -0
  49. data/lib/gtk_paradise/base_module/reset.rb +128 -0
  50. data/lib/gtk_paradise/base_module/return_corresponding_gtk_stock_item.rb +92 -0
  51. data/lib/gtk_paradise/base_module/roebe.rb +19 -0
  52. data/lib/gtk_paradise/base_module/table.rb +438 -0
  53. data/lib/gtk_paradise/base_module/time.rb +35 -0
  54. data/lib/gtk_paradise/base_module_and_app_module/base_module_and_app_module.rb +21 -0
  55. data/lib/gtk_paradise/colours/gtk_colour_constants.rb +192 -0
  56. data/lib/gtk_paradise/colours/parse.rb +79 -0
  57. data/lib/gtk_paradise/commandline/commandline.rb +126 -0
  58. data/lib/gtk_paradise/constants/available_cursors.rb +52 -0
  59. data/lib/gtk_paradise/constants/constants.rb +18 -0
  60. data/lib/gtk_paradise/constants/fonts.rb +38 -0
  61. data/lib/gtk_paradise/constants/misc.rb +56 -0
  62. data/lib/gtk_paradise/constants/newline.rb +14 -0
  63. data/lib/gtk_paradise/constants/xbm_icons.rb +121 -0
  64. data/lib/gtk_paradise/css_files/colours.css +362 -0
  65. data/lib/gtk_paradise/css_files/css_accordion.css +51 -0
  66. data/lib/gtk_paradise/css_files/project.css +479 -0
  67. data/lib/gtk_paradise/css_files/themes/README.md +1 -0
  68. data/lib/gtk_paradise/css_files/themes/rainbow_theme.css +23 -0
  69. data/lib/gtk_paradise/emojis/emojis.rb +756 -0
  70. data/lib/gtk_paradise/examples/README.md +11 -0
  71. data/lib/gtk_paradise/examples/advanced/001_5x5_grid_example.rb +175 -0
  72. data/lib/gtk_paradise/examples/advanced/002_advanced_drag_and_drop_example.rb +103 -0
  73. data/lib/gtk_paradise/examples/advanced/003_html_like_support.rb +206 -0
  74. data/lib/gtk_paradise/examples/advanced/004_on_hover_example_on_gtk_entry.rb +78 -0
  75. data/lib/gtk_paradise/examples/advanced/005_csv_example.rb +24 -0
  76. data/lib/gtk_paradise/examples/advanced/006_file_chooser_button_example.rb +106 -0
  77. data/lib/gtk_paradise/examples/advanced/007_label_responding_to_events_example.rb +182 -0
  78. data/lib/gtk_paradise/examples/advanced/008_options_example.rb +47 -0
  79. data/lib/gtk_paradise/examples/advanced/009_key_events.rb +81 -0
  80. data/lib/gtk_paradise/examples/advanced/010_extensive_text_view_example.rb +161 -0
  81. data/lib/gtk_paradise/examples/advanced/011_moving_blocks_example.rb +91 -0
  82. data/lib/gtk_paradise/examples/advanced/012_cell_data_sorting_example.rb +79 -0
  83. data/lib/gtk_paradise/examples/advanced/013_advanced_css_example.rb +272 -0
  84. data/lib/gtk_paradise/examples/advanced/014_popup_example.rb +123 -0
  85. data/lib/gtk_paradise/examples/advanced/015_advanced_button_example.rb +156 -0
  86. data/lib/gtk_paradise/examples/advanced/016_change_background_on_click_event.rb +38 -0
  87. data/lib/gtk_paradise/examples/advanced/017_lean_CSS_example.rb +247 -0
  88. data/lib/gtk_paradise/examples/advanced/018_coloured_text_example.rb +158 -0
  89. data/lib/gtk_paradise/examples/advanced/019_gtk_entry_showing_the_cursor_position.rb +67 -0
  90. data/lib/gtk_paradise/examples/advanced/020_scale_this_image.rb +154 -0
  91. data/lib/gtk_paradise/examples/advanced/021_scroll_events_on_gtk_entry.rb +37 -0
  92. data/lib/gtk_paradise/examples/advanced/README.md +4 -0
  93. data/lib/gtk_paradise/examples/cairo/README.md +7 -0
  94. data/lib/gtk_paradise/examples/cairo/basic_cairo_shapes.rb +131 -0
  95. data/lib/gtk_paradise/examples/cairo/cairo_testing.rb +96 -0
  96. data/lib/gtk_paradise/examples/cairo/cairo_transparent_rectangles.rb +94 -0
  97. data/lib/gtk_paradise/examples/cairo/donut_shape.rb +76 -0
  98. data/lib/gtk_paradise/examples/cairo/fancy_triangle.rb +42 -0
  99. data/lib/gtk_paradise/examples/cairo/ping_pong_game.rb +315 -0
  100. data/lib/gtk_paradise/examples/cairo/three_rectangles.rb +67 -0
  101. data/lib/gtk_paradise/examples/controller/README.md +3 -0
  102. data/lib/gtk_paradise/examples/controller/controller.rb +81 -0
  103. data/lib/gtk_paradise/examples/css/001_border_examples.rb +246 -0
  104. data/lib/gtk_paradise/examples/css/002_import_CSS_file.rb +87 -0
  105. data/lib/gtk_paradise/examples/css/README.md +5 -0
  106. data/lib/gtk_paradise/examples/gdk_pixbuf/save_image_example.rb +72 -0
  107. data/lib/gtk_paradise/examples/glib/parse_glib_settings.rb +48 -0
  108. data/lib/gtk_paradise/examples/gtk2/001_tooltips_example.rb +88 -0
  109. data/lib/gtk_paradise/examples/gtk2/002_simple_window.rb +8 -0
  110. data/lib/gtk_paradise/examples/gtk2/003_draw_rectangle.rb +41 -0
  111. data/lib/gtk_paradise/examples/gtk2/004_simple_button.rb +38 -0
  112. data/lib/gtk_paradise/examples/gtk2/005_scale_button.rb +28 -0
  113. data/lib/gtk_paradise/examples/gtk2/006_print_example.rb +259 -0
  114. data/lib/gtk_paradise/examples/gtk2/007_radio_button_window.rb +57 -0
  115. data/lib/gtk_paradise/examples/gtk2/008_list_store_example.rb +145 -0
  116. data/lib/gtk_paradise/examples/gtk2/009_spin_button_example.rb +168 -0
  117. data/lib/gtk_paradise/examples/gtk2/010_paned_widget_example.rb +171 -0
  118. data/lib/gtk_paradise/examples/gtk2/011_password_example.rb +22 -0
  119. data/lib/gtk_paradise/examples/gtk2/012_popup_example.rb +61 -0
  120. data/lib/gtk_paradise/examples/gtk2/013_show_this_cursor.rb +25 -0
  121. data/lib/gtk_paradise/examples/gtk2/014_link_button.rb +44 -0
  122. data/lib/gtk_paradise/examples/gtk2/015_gc_drawing_examples.rb +63 -0
  123. data/lib/gtk_paradise/examples/gtk2/016_combo_box_example.rb +155 -0
  124. data/lib/gtk_paradise/examples/gtk2/017_multiple_gtk_windows.rb +20 -0
  125. data/lib/gtk_paradise/examples/gtk2/018_entry_completion.rb +28 -0
  126. data/lib/gtk_paradise/examples/gtk2/019_insert_text_into_a_text_buffer_example.rb +77 -0
  127. data/lib/gtk_paradise/examples/gtk2/020_size_group_example.rb +29 -0
  128. data/lib/gtk_paradise/examples/gtk2/021_check_button.rb +22 -0
  129. data/lib/gtk_paradise/examples/gtk2/022_hello_world_in_gtk2_and_bold_font.rb +53 -0
  130. data/lib/gtk_paradise/examples/gtk2/023_pixbuf_animation_example.rb +36 -0
  131. data/lib/gtk_paradise/examples/gtk2/024_colour_around_button.rb +49 -0
  132. data/lib/gtk_paradise/examples/gtk2/025_icon_view.rb +50 -0
  133. data/lib/gtk_paradise/examples/gtk2/026_disappearing_buttons.rb +55 -0
  134. data/lib/gtk_paradise/examples/gtk2/027_colour_choose_button.rb +30 -0
  135. data/lib/gtk_paradise/examples/gtk2/028_gtk_expander.rb +23 -0
  136. data/lib/gtk_paradise/examples/gtk2/029_gtk_label_example.rb +59 -0
  137. data/lib/gtk_paradise/examples/gtk2/030_complete_menu_example.rb +76 -0
  138. data/lib/gtk_paradise/examples/gtk2/031_message_dialog.rb +38 -0
  139. data/lib/gtk_paradise/examples/gtk2/032_frame_example.rb +82 -0
  140. data/lib/gtk_paradise/examples/gtk2/033_notebook_example.rb +89 -0
  141. data/lib/gtk_paradise/examples/gtk2/034_radio_menu_item_showcase.rb +73 -0
  142. data/lib/gtk_paradise/examples/gtk2/035_status_icon_example.rb +57 -0
  143. data/lib/gtk_paradise/examples/gtk2/036_threads_example.rb +72 -0
  144. data/lib/gtk_paradise/examples/gtk2/037_extensive_markup_example.rb +49 -0
  145. data/lib/gtk_paradise/examples/gtk2/038_accesskeys_demonstration.rb +136 -0
  146. data/lib/gtk_paradise/examples/gtk2/039_accel_group_example.rb +24 -0
  147. data/lib/gtk_paradise/examples/gtk2/040_gtksourceview2_example.rb +42 -0
  148. data/lib/gtk_paradise/examples/gtk2/041_drawing_example.rb +130 -0
  149. data/lib/gtk_paradise/examples/gtk2/042_buttons_showcasing_the_relief.rb +34 -0
  150. data/lib/gtk_paradise/examples/gtk2/043_gtk_entry.rb +47 -0
  151. data/lib/gtk_paradise/examples/gtk2/044_tree_model_filter.rb +60 -0
  152. data/lib/gtk_paradise/examples/gtk2/045_sorted_tree.rb +137 -0
  153. data/lib/gtk_paradise/examples/gtk2/046_sockets.rb +17 -0
  154. data/lib/gtk_paradise/examples/gtk2/047_progress_bar_example.rb +105 -0
  155. data/lib/gtk_paradise/examples/gtk2/048_event_box_with_popup_menu.rb +64 -0
  156. data/lib/gtk_paradise/examples/gtk2/049_gtk_dialog_sample.rb +51 -0
  157. data/lib/gtk_paradise/examples/gtk2/050_about_dialog.rb +29 -0
  158. data/lib/gtk_paradise/examples/gtk2/051_tree_view_column_example.rb +83 -0
  159. data/lib/gtk_paradise/examples/gtk2/052_packing_demonstration.rb +131 -0
  160. data/lib/gtk_paradise/examples/gtk2/053_vertical_boxes.rb +34 -0
  161. data/lib/gtk_paradise/examples/gtk2/054_drag_and_drop_example.rb +97 -0
  162. data/lib/gtk_paradise/examples/gtk2/055_button_box.rb +122 -0
  163. data/lib/gtk_paradise/examples/gtk2/056_vbox_with_spacing_and_border_width.rb +20 -0
  164. data/lib/gtk_paradise/examples/gtk2/057_show_image.rb +42 -0
  165. data/lib/gtk_paradise/examples/gtk2/058_random_stock_item.rb +39 -0
  166. data/lib/gtk_paradise/examples/gtk2/059_manual_menu.rb +56 -0
  167. data/lib/gtk_paradise/examples/gtk2/060_style_property.rb +82 -0
  168. data/lib/gtk_paradise/examples/gtk2/060_style_property.rc +17 -0
  169. data/lib/gtk_paradise/examples/gtk2/061_mouse_movement.rb +174 -0
  170. data/lib/gtk_paradise/examples/gtk2/README.md +16 -0
  171. data/lib/gtk_paradise/examples/gtk2/settings/README.md +2 -0
  172. data/lib/gtk_paradise/examples/gtk2/settings/gtk_settings.rb +40 -0
  173. data/lib/gtk_paradise/examples/gtk2/uimanager/uimanager.xml +36 -0
  174. data/lib/gtk_paradise/examples/gtk2/uimanager/uimanager_example.rb +113 -0
  175. data/lib/gtk_paradise/examples/gtk3/001_font_related_information.rb +93 -0
  176. data/lib/gtk_paradise/examples/gtk3/002_simple_window.rb +48 -0
  177. data/lib/gtk_paradise/examples/gtk3/003_sorted_tree.rb +141 -0
  178. data/lib/gtk_paradise/examples/gtk3/004_small_paned_example.rb +48 -0
  179. data/lib/gtk_paradise/examples/gtk3/005_spinner_example.rb +46 -0
  180. data/lib/gtk_paradise/examples/gtk3/006_password_example.rb +45 -0
  181. data/lib/gtk_paradise/examples/gtk3/007_progress_bar_example.rb +200 -0
  182. data/lib/gtk_paradise/examples/gtk3/008_menubar_example.rb +96 -0
  183. data/lib/gtk_paradise/examples/gtk3/009_scrolled_window_example.rb +49 -0
  184. data/lib/gtk_paradise/examples/gtk3/010_paned_widget_example.rb +186 -0
  185. data/lib/gtk_paradise/examples/gtk3/011_sockets.rb +19 -0
  186. data/lib/gtk_paradise/examples/gtk3/012_notebook_example.rb +75 -0
  187. data/lib/gtk_paradise/examples/gtk3/013_icon_theme_example.rb +104 -0
  188. data/lib/gtk_paradise/examples/gtk3/014_switcher_window.rb +68 -0
  189. data/lib/gtk_paradise/examples/gtk3/015_list_box_example.rb +64 -0
  190. data/lib/gtk_paradise/examples/gtk3/016_hello_world_in_gtk3_and_bold_font.rb +54 -0
  191. data/lib/gtk_paradise/examples/gtk3/017_grid_example.rb +52 -0
  192. data/lib/gtk_paradise/examples/gtk3/018_buttons_showcasing_the_relief.rb +60 -0
  193. data/lib/gtk_paradise/examples/gtk3/019_text_buffer_example.rb +220 -0
  194. data/lib/gtk_paradise/examples/gtk3/020_radio_button_window.rb +101 -0
  195. data/lib/gtk_paradise/examples/gtk3/021_scale_button_demo.rb +51 -0
  196. data/lib/gtk_paradise/examples/gtk3/022_popup_example.rb +90 -0
  197. data/lib/gtk_paradise/examples/gtk3/023_horizontal_and_vertical_scale.rb +23 -0
  198. data/lib/gtk_paradise/examples/gtk3/024_installation_assistant.rb +365 -0
  199. data/lib/gtk_paradise/examples/gtk3/025_switch_example.rb +55 -0
  200. data/lib/gtk_paradise/examples/gtk3/026_hover_button_example_via_css.rb +75 -0
  201. data/lib/gtk_paradise/examples/gtk3/027_spin_button_example.rb +82 -0
  202. data/lib/gtk_paradise/examples/gtk3/028_radio_menu_item_example.rb +76 -0
  203. data/lib/gtk_paradise/examples/gtk3/029_gtk_dialog_sample.rb +72 -0
  204. data/lib/gtk_paradise/examples/gtk3/030_draw_rectangles.rb +34 -0
  205. data/lib/gtk_paradise/examples/gtk3/031_colour_choose_button.rb +38 -0
  206. data/lib/gtk_paradise/examples/gtk3/032_drag_and_drop_example.rb +83 -0
  207. data/lib/gtk_paradise/examples/gtk3/033_cell_renderer_pixbuf_example.rb +48 -0
  208. data/lib/gtk_paradise/examples/gtk3/034_combo_box_example.rb +49 -0
  209. data/lib/gtk_paradise/examples/gtk3/035_notebook_css_example.rb +130 -0
  210. data/lib/gtk_paradise/examples/gtk3/036_revealer_example.rb +46 -0
  211. data/lib/gtk_paradise/examples/gtk3/037_css_example_of_a_button_changing_the_background_colour_on_click_event.rb +124 -0
  212. data/lib/gtk_paradise/examples/gtk3/038_ten_labels_in_a_vertical_box_example.rb +32 -0
  213. data/lib/gtk_paradise/examples/gtk3/039_threads_example.rb +44 -0
  214. data/lib/gtk_paradise/examples/gtk3/040_font_chooser_dialog_example.rb +19 -0
  215. data/lib/gtk_paradise/examples/gtk3/041_flowbox.rb +72 -0
  216. data/lib/gtk_paradise/examples/gtk3/042_colourized_button_example.rb +82 -0
  217. data/lib/gtk_paradise/examples/gtk3/043_form_example.rb +151 -0
  218. data/lib/gtk_paradise/examples/gtk3/044_check_button.rb +27 -0
  219. data/lib/gtk_paradise/examples/gtk3/045_fixed_example.rb +78 -0
  220. data/lib/gtk_paradise/examples/gtk3/046_event_box_example.rb +32 -0
  221. data/lib/gtk_paradise/examples/gtk3/047_examples_with_css.rb +173 -0
  222. data/lib/gtk_paradise/examples/gtk3/048_accel_group_example.rb +27 -0
  223. data/lib/gtk_paradise/examples/gtk3/049_change_the_application_theme.rb +68 -0
  224. data/lib/gtk_paradise/examples/gtk3/050_header_bar_example.rb +58 -0
  225. data/lib/gtk_paradise/examples/gtk3/051_gtk_label_example.rb +86 -0
  226. data/lib/gtk_paradise/examples/gtk3/052_popover_example.rb +58 -0
  227. data/lib/gtk_paradise/examples/gtk3/053_entry_completion.rb +44 -0
  228. data/lib/gtk_paradise/examples/gtk3/054_svg_viewer.rb +43 -0
  229. data/lib/gtk_paradise/examples/gtk3/055_button_demo.rb +92 -0
  230. data/lib/gtk_paradise/examples/gtk3/056_text_iterator_example.rb +72 -0
  231. data/lib/gtk_paradise/examples/gtk3/057_image_example.rb +51 -0
  232. data/lib/gtk_paradise/examples/gtk3/058_frame_example.rb +104 -0
  233. data/lib/gtk_paradise/examples/gtk3/059_gtk_expander.rb +23 -0
  234. data/lib/gtk_paradise/examples/gtk3/060_ten_vboxes_example.rb +32 -0
  235. data/lib/gtk_paradise/examples/gtk3/061_gtk_entry.rb +91 -0
  236. data/lib/gtk_paradise/examples/gtk3/062_toggle_button_example.rb +19 -0
  237. data/lib/gtk_paradise/examples/gtk3/063_button_box_example.rb +67 -0
  238. data/lib/gtk_paradise/examples/gtk3/064_tree_view_column_example.rb +97 -0
  239. data/lib/gtk_paradise/examples/gtk3/065_tooltips_example.rb +216 -0
  240. data/lib/gtk_paradise/examples/gtk3/066_vertical_boxes.rb +32 -0
  241. data/lib/gtk_paradise/examples/gtk3/067_vbox_with_spacing_and_border_width.rb +24 -0
  242. data/lib/gtk_paradise/examples/gtk3/068_text_view_example.rb +34 -0
  243. data/lib/gtk_paradise/examples/gtk3/069_file_chooser_dialog.rb +41 -0
  244. data/lib/gtk_paradise/examples/gtk3/070_bindings.rb +126 -0
  245. data/lib/gtk_paradise/examples/gtk3/071_search_bar_example.rb +59 -0
  246. data/lib/gtk_paradise/examples/gtk3/072_recent_chooser_dialog.rb +51 -0
  247. data/lib/gtk_paradise/examples/gtk3/073_showcase_the_cursors.rb +94 -0
  248. data/lib/gtk_paradise/examples/gtk3/074_app_chooser_button_example.rb +27 -0
  249. data/lib/gtk_paradise/examples/gtk3/075_tiny_button_via_css.rb +49 -0
  250. data/lib/gtk_paradise/examples/gtk3/076_stack_example.rb +46 -0
  251. data/lib/gtk_paradise/examples/gtk3/077_status_icon_example.rb +54 -0
  252. data/lib/gtk_paradise/examples/gtk3/078_message_dialog_example.rb +179 -0
  253. data/lib/gtk_paradise/examples/gtk3/079_two_windows_example.rb +30 -0
  254. data/lib/gtk_paradise/examples/gtk3/080_extensive_markup_example.rb +49 -0
  255. data/lib/gtk_paradise/examples/gtk3/081_simple_dialog_example.rb +45 -0
  256. data/lib/gtk_paradise/examples/gtk3/082_scrolling_example.rb +56 -0
  257. data/lib/gtk_paradise/examples/gtk3/083_bottom_left_placement.rb +50 -0
  258. data/lib/gtk_paradise/examples/gtk3/084_undecorated_window_example.rb +29 -0
  259. data/lib/gtk_paradise/examples/gtk3/vte/vte3_terminal.rb +59 -0
  260. data/lib/gtk_paradise/examples/pango/pango_power.rb +72 -0
  261. data/lib/gtk_paradise/experimental/README.md +2 -0
  262. data/lib/gtk_paradise/experimental/experimental.config +6 -0
  263. data/lib/gtk_paradise/experimental/experimental.rb +249 -0
  264. data/lib/gtk_paradise/fonts/fonts.rb +679 -0
  265. data/lib/gtk_paradise/gdk/cursor.rb +30 -0
  266. data/lib/gtk_paradise/gdk/gdk.rb +29 -0
  267. data/lib/gtk_paradise/gnome/README.md +5 -0
  268. data/lib/gtk_paradise/gnome/canvas.rb +54 -0
  269. data/lib/gtk_paradise/gtk_classes/about.rb +48 -0
  270. data/lib/gtk_paradise/gtk_classes/about_dialog.rb +25 -0
  271. data/lib/gtk_paradise/gtk_classes/accel_group.rb +38 -0
  272. data/lib/gtk_paradise/gtk_classes/alignment.rb +20 -0
  273. data/lib/gtk_paradise/gtk_classes/application.rb +30 -0
  274. data/lib/gtk_paradise/gtk_classes/box.rb +318 -0
  275. data/lib/gtk_paradise/gtk_classes/button.rb +383 -0
  276. data/lib/gtk_paradise/gtk_classes/button_box.rb +38 -0
  277. data/lib/gtk_paradise/gtk_classes/cairo/context.rb +54 -0
  278. data/lib/gtk_paradise/gtk_classes/calendar.rb +29 -0
  279. data/lib/gtk_paradise/gtk_classes/cell_renderer_text.rb +57 -0
  280. data/lib/gtk_paradise/gtk_classes/check_button.rb +113 -0
  281. data/lib/gtk_paradise/gtk_classes/colours/colours.rb +158 -0
  282. data/lib/gtk_paradise/gtk_classes/combo_box.rb +117 -0
  283. data/lib/gtk_paradise/gtk_classes/combo_box_entry.rb +74 -0
  284. data/lib/gtk_paradise/gtk_classes/combo_box_text.rb +101 -0
  285. data/lib/gtk_paradise/gtk_classes/dialog.rb +20 -0
  286. data/lib/gtk_paradise/gtk_classes/entry.rb +433 -0
  287. data/lib/gtk_paradise/gtk_classes/entry_completion.rb +70 -0
  288. data/lib/gtk_paradise/gtk_classes/event_box.rb +44 -0
  289. data/lib/gtk_paradise/gtk_classes/event_button.rb +55 -0
  290. data/lib/gtk_paradise/gtk_classes/event_key.rb +39 -0
  291. data/lib/gtk_paradise/gtk_classes/expander.rb +37 -0
  292. data/lib/gtk_paradise/gtk_classes/file_chooser_dialog.rb +34 -0
  293. data/lib/gtk_paradise/gtk_classes/file_filter.rb +26 -0
  294. data/lib/gtk_paradise/gtk_classes/file_selection.rb +54 -0
  295. data/lib/gtk_paradise/gtk_classes/frame.rb +75 -0
  296. data/lib/gtk_paradise/gtk_classes/grid.rb +343 -0
  297. data/lib/gtk_paradise/gtk_classes/header_bar.rb +58 -0
  298. data/lib/gtk_paradise/gtk_classes/hscale.rb +60 -0
  299. data/lib/gtk_paradise/gtk_classes/image.rb +68 -0
  300. data/lib/gtk_paradise/gtk_classes/image_menu_item.rb +18 -0
  301. data/lib/gtk_paradise/gtk_classes/label.rb +542 -0
  302. data/lib/gtk_paradise/gtk_classes/list_store.rb +41 -0
  303. data/lib/gtk_paradise/gtk_classes/menu.rb +114 -0
  304. data/lib/gtk_paradise/gtk_classes/menu_bar.rb +23 -0
  305. data/lib/gtk_paradise/gtk_classes/menu_item.rb +57 -0
  306. data/lib/gtk_paradise/gtk_classes/notebook.rb +247 -0
  307. data/lib/gtk_paradise/gtk_classes/option_menu.rb +21 -0
  308. data/lib/gtk_paradise/gtk_classes/popover.rb +26 -0
  309. data/lib/gtk_paradise/gtk_classes/radio_button.rb +22 -0
  310. data/lib/gtk_paradise/gtk_classes/radio_menu_item.rb +44 -0
  311. data/lib/gtk_paradise/gtk_classes/scale_button.rb +33 -0
  312. data/lib/gtk_paradise/gtk_classes/scrolled_window.rb +175 -0
  313. data/lib/gtk_paradise/gtk_classes/search_bar.rb +27 -0
  314. data/lib/gtk_paradise/gtk_classes/size_group.rb +13 -0
  315. data/lib/gtk_paradise/gtk_classes/source_buffer.rb +51 -0
  316. data/lib/gtk_paradise/gtk_classes/source_view.rb +47 -0
  317. data/lib/gtk_paradise/gtk_classes/spin_button.rb +89 -0
  318. data/lib/gtk_paradise/gtk_classes/spinner.rb +37 -0
  319. data/lib/gtk_paradise/gtk_classes/status_icon.rb +105 -0
  320. data/lib/gtk_paradise/gtk_classes/statusbar.rb +44 -0
  321. data/lib/gtk_paradise/gtk_classes/text_buffer.rb +227 -0
  322. data/lib/gtk_paradise/gtk_classes/text_tag.rb +15 -0
  323. data/lib/gtk_paradise/gtk_classes/text_view.rb +251 -0
  324. data/lib/gtk_paradise/gtk_classes/toggle_button.rb +40 -0
  325. data/lib/gtk_paradise/gtk_classes/toolbar.rb +92 -0
  326. data/lib/gtk_paradise/gtk_classes/tree_iter.rb +87 -0
  327. data/lib/gtk_paradise/gtk_classes/tree_selection.rb +40 -0
  328. data/lib/gtk_paradise/gtk_classes/tree_view.rb +322 -0
  329. data/lib/gtk_paradise/gtk_classes/tree_view_column.rb +62 -0
  330. data/lib/gtk_paradise/gtk_classes/vbox.rb +51 -0
  331. data/lib/gtk_paradise/gtk_classes/vscale.rb +42 -0
  332. data/lib/gtk_paradise/gtk_classes/vte.rb +28 -0
  333. data/lib/gtk_paradise/gtk_classes/widget.rb +1422 -0
  334. data/lib/gtk_paradise/gtk_classes/window.rb +72 -0
  335. data/lib/gtk_paradise/hello_world/README.md +10 -0
  336. data/lib/gtk_paradise/hello_world/hello_world_gtk2.rb +31 -0
  337. data/lib/gtk_paradise/hello_world/hello_world_gtk3.rb +33 -0
  338. data/lib/gtk_paradise/images/icons/closed.png +0 -0
  339. data/lib/gtk_paradise/images/icons/directory.png +0 -0
  340. data/lib/gtk_paradise/images/icons/logo.png +0 -0
  341. data/lib/gtk_paradise/images/icons/opened.png +0 -0
  342. data/lib/gtk_paradise/images/internal/COLOUR_BUTTON.png +0 -0
  343. data/lib/gtk_paradise/images/internal/EXPANDER.png +0 -0
  344. data/lib/gtk_paradise/images/internal/GDK_CURSORS.png +0 -0
  345. data/lib/gtk_paradise/images/internal/PROGRESS_BAR.png +0 -0
  346. data/lib/gtk_paradise/images/internal/README.md +3 -0
  347. data/lib/gtk_paradise/images/internal/SEPARATOR.png +0 -0
  348. data/lib/gtk_paradise/images/internal/TEXT_BUFFER2.png +0 -0
  349. data/lib/gtk_paradise/images/internal/VPANED.png +0 -0
  350. data/lib/gtk_paradise/images/internal/combo_box_text.png +0 -0
  351. data/lib/gtk_paradise/images/internal/combo_box_wrap_width_example.png +0 -0
  352. data/lib/gtk_paradise/images/internal/directory_content_screenshot.png +0 -0
  353. data/lib/gtk_paradise/images/internal/fancy_gtk_label.png +0 -0
  354. data/lib/gtk_paradise/images/internal/gtk_assistant.png +0 -0
  355. data/lib/gtk_paradise/images/internal/gtk_bold_label.png +0 -0
  356. data/lib/gtk_paradise/images/internal/gtk_cell_renderer_progress.png +0 -0
  357. data/lib/gtk_paradise/images/internal/gtk_color_dialog.png +0 -0
  358. data/lib/gtk_paradise/images/internal/gtk_coloured_text_example.png +0 -0
  359. data/lib/gtk_paradise/images/internal/gtk_notebook_horizontal.png +0 -0
  360. data/lib/gtk_paradise/images/internal/gtk_notebook_tabs_are_left.png +0 -0
  361. data/lib/gtk_paradise/images/internal/gtk_options.png +0 -0
  362. data/lib/gtk_paradise/images/internal/gtk_recent_chooser_dialog.png +0 -0
  363. data/lib/gtk_paradise/images/internal/gtk_scale_button.png +0 -0
  364. data/lib/gtk_paradise/images/internal/gtk_scrolled_window.png +0 -0
  365. data/lib/gtk_paradise/images/internal/gtk_size_group.png +0 -0
  366. data/lib/gtk_paradise/images/internal/pong_game.png +0 -0
  367. data/lib/gtk_paradise/images/logo/logo.png +0 -0
  368. data/lib/gtk_paradise/images/misc/ARROW_RIGHT.png +0 -0
  369. data/lib/gtk_paradise/images/misc/RMC.jpg +0 -0
  370. data/lib/gtk_paradise/images/misc/SCROLLED_WINDOW.png +0 -0
  371. data/lib/gtk_paradise/images/misc/apple.png +0 -0
  372. data/lib/gtk_paradise/images/misc/border_examples_via_CSS.png +0 -0
  373. data/lib/gtk_paradise/images/misc/broken_image.png +0 -0
  374. data/lib/gtk_paradise/images/misc/dot.png +0 -0
  375. data/lib/gtk_paradise/images/misc/gtk_entry_with_icon_name.png +0 -0
  376. data/lib/gtk_paradise/images/misc/gtk_font_size_widget_example.png +0 -0
  377. data/lib/gtk_paradise/images/misc/head.png +0 -0
  378. data/lib/gtk_paradise/images/misc/maximize_button.png +0 -0
  379. data/lib/gtk_paradise/images/misc/sample_image.png +0 -0
  380. data/lib/gtk_paradise/images/misc/small_clock.png +0 -0
  381. data/lib/gtk_paradise/images/misc/small_shield.png +0 -0
  382. data/lib/gtk_paradise/images/misc/tabble.png +0 -0
  383. data/lib/gtk_paradise/images/misc/tomato.png +0 -0
  384. data/lib/gtk_paradise/images/misc/weather.png +0 -0
  385. data/lib/gtk_paradise/pango/pango.rb +48 -0
  386. data/lib/gtk_paradise/pango/pango_fonts.rb +52 -0
  387. data/lib/gtk_paradise/pango/pango_renderer.rb +69 -0
  388. data/lib/gtk_paradise/project/project.rb +39 -0
  389. data/lib/gtk_paradise/prototypes/README.md +6 -0
  390. data/lib/gtk_paradise/prototypes/gtk3_prototype.rb +34 -0
  391. data/lib/gtk_paradise/prototypes/gtk3_standalone.rb +143 -0
  392. data/lib/gtk_paradise/prototypes/shared_code.rb +137 -0
  393. data/lib/gtk_paradise/require_gtk2.rb +7 -0
  394. data/lib/gtk_paradise/require_gtk3.rb +7 -0
  395. data/lib/gtk_paradise/requires/base_module_and_app_module.rb +7 -0
  396. data/lib/gtk_paradise/requires/do_require_the_files_under_the_gtk_classes_subdirectory.rb +11 -0
  397. data/lib/gtk_paradise/requires/numbered_lines.rb +7 -0
  398. data/lib/gtk_paradise/requires/require_files_irrespective_of_the_gtk_version_at_hand.rb +43 -0
  399. data/lib/gtk_paradise/requires/require_gtk2.rb +11 -0
  400. data/lib/gtk_paradise/requires/require_gtk2_or_gtk3.rb +87 -0
  401. data/lib/gtk_paradise/requires/require_gtk3.rb +30 -0
  402. data/lib/gtk_paradise/requires/require_gtk_runner.rb +1 -0
  403. data/lib/gtk_paradise/requires/require_the_base_module.rb +7 -0
  404. data/lib/gtk_paradise/requires/require_the_base_module_and_gtk_run.rb +8 -0
  405. data/lib/gtk_paradise/requires/require_the_base_module_and_the_toplevel_methods.rb +8 -0
  406. data/lib/gtk_paradise/requires/require_the_classes_files_for_gtk2.rb +11 -0
  407. data/lib/gtk_paradise/requires/require_the_classes_files_for_gtk3.rb +11 -0
  408. data/lib/gtk_paradise/requires/require_the_default_gtk_version.rb +14 -0
  409. data/lib/gtk_paradise/requires/require_the_gtk_colours.rb +7 -0
  410. data/lib/gtk_paradise/requires/require_the_gtk_paradise_commandline.rb +7 -0
  411. data/lib/gtk_paradise/requires/require_the_minesweeper_files.rb +11 -0
  412. data/lib/gtk_paradise/requires/require_the_tabble_project.rb +7 -0
  413. data/lib/gtk_paradise/requires/require_the_toplevel_methods.rb +11 -0
  414. data/lib/gtk_paradise/requires/run_this_widget.rb +7 -0
  415. data/lib/gtk_paradise/run.rb +70 -0
  416. data/lib/gtk_paradise/run_this_widget/run_this_widget.rb +125 -0
  417. data/lib/gtk_paradise/threads/README.md +1 -0
  418. data/lib/gtk_paradise/threads/threads.rb +67 -0
  419. data/lib/gtk_paradise/toplevel_methods/allow_only_numbers.rb +59 -0
  420. data/lib/gtk_paradise/toplevel_methods/css.rb +172 -0
  421. data/lib/gtk_paradise/toplevel_methods/csv.rb +102 -0
  422. data/lib/gtk_paradise/toplevel_methods/cursor.rb +69 -0
  423. data/lib/gtk_paradise/toplevel_methods/determine_which_gtk_version_is_in_use.rb +33 -0
  424. data/lib/gtk_paradise/toplevel_methods/e.rb +18 -0
  425. data/lib/gtk_paradise/toplevel_methods/enable_and_disable_warnings.rb +58 -0
  426. data/lib/gtk_paradise/toplevel_methods/events.rb +72 -0
  427. data/lib/gtk_paradise/toplevel_methods/keyboard.rb +25 -0
  428. data/lib/gtk_paradise/toplevel_methods/keys.rb +96 -0
  429. data/lib/gtk_paradise/toplevel_methods/main_file.rb +31 -0
  430. data/lib/gtk_paradise/toplevel_methods/misc.rb +798 -0
  431. data/lib/gtk_paradise/toplevel_methods/register_sigint.rb +17 -0
  432. data/lib/gtk_paradise/toplevel_methods/roebe.rb +22 -0
  433. data/lib/gtk_paradise/toplevel_methods/screen_resolution.rb +47 -0
  434. data/lib/gtk_paradise/toplevel_methods/select_file.rb +168 -0
  435. data/lib/gtk_paradise/toplevel_methods/spacer.rb +55 -0
  436. data/lib/gtk_paradise/toplevel_methods/text_buffer_tags.rb +188 -0
  437. data/lib/gtk_paradise/toplevel_methods/tokenizer.rb +103 -0
  438. data/lib/gtk_paradise/toplevel_methods/tooltips.rb +71 -0
  439. data/lib/gtk_paradise/toplevel_methods/we_use_this_gtk_version.rb +65 -0
  440. data/lib/gtk_paradise/utility_scripts/README.md +1 -0
  441. data/lib/gtk_paradise/utility_scripts/generate_gtk_prototype.rb +149 -0
  442. data/lib/gtk_paradise/version/upstream_gtk_version.rb +46 -0
  443. data/lib/gtk_paradise/version/version.rb +25 -0
  444. data/lib/gtk_paradise/widgets/README.md +12 -0
  445. data/lib/gtk_paradise/widgets/gtk2/README.md +7 -0
  446. data/lib/gtk_paradise/widgets/gtk2/animation.rb +149 -0
  447. data/lib/gtk_paradise/widgets/gtk2/browser/browser.config +6 -0
  448. data/lib/gtk_paradise/widgets/gtk2/browser/browser.rb +29 -0
  449. data/lib/gtk_paradise/widgets/gtk2/cat_merge.rb +198 -0
  450. data/lib/gtk_paradise/widgets/gtk2/cdripper/cdripper.config +6 -0
  451. data/lib/gtk_paradise/widgets/gtk2/cdripper/cdripper.rb +31 -0
  452. data/lib/gtk_paradise/widgets/gtk2/cell_renderer_progress_example.rb +108 -0
  453. data/lib/gtk_paradise/widgets/gtk2/clipboard_demo.rb +200 -0
  454. data/lib/gtk_paradise/widgets/gtk2/colour_filled_widget/colour_filled_widget.config +6 -0
  455. data/lib/gtk_paradise/widgets/gtk2/colour_filled_widget/colour_filled_widget.rb +29 -0
  456. data/lib/gtk_paradise/widgets/gtk2/conky/conky.rb +30 -0
  457. data/lib/gtk_paradise/widgets/gtk2/contacts/contacts.config +6 -0
  458. data/lib/gtk_paradise/widgets/gtk2/contacts/contacts.rb +29 -0
  459. data/lib/gtk_paradise/widgets/gtk2/cursor_examples.rb +121 -0
  460. data/lib/gtk_paradise/widgets/gtk2/debug_widget/debug_widget.rb +31 -0
  461. data/lib/gtk_paradise/widgets/gtk2/demo_of_labels.rb +133 -0
  462. data/lib/gtk_paradise/widgets/gtk2/dictionary.rb +263 -0
  463. data/lib/gtk_paradise/widgets/gtk2/directory_content_widget/directory_content_widget.rb +30 -0
  464. data/lib/gtk_paradise/widgets/gtk2/editable_combo_field.rb +178 -0
  465. data/lib/gtk_paradise/widgets/gtk2/editor/README.md +3 -0
  466. data/lib/gtk_paradise/widgets/gtk2/emoji_toggle_widget/emoji_toggle_widget.rb +37 -0
  467. data/lib/gtk_paradise/widgets/gtk2/emoji_widget/emoji_widget.config +6 -0
  468. data/lib/gtk_paradise/widgets/gtk2/emoji_widget/emoji_widget.rb +30 -0
  469. data/lib/gtk_paradise/widgets/gtk2/error_widget/error_widget.rb +30 -0
  470. data/lib/gtk_paradise/widgets/gtk2/expander_example.rb +90 -0
  471. data/lib/gtk_paradise/widgets/gtk2/file_opener.rb +301 -0
  472. data/lib/gtk_paradise/widgets/gtk2/file_path_widget/file_path_widget.rb +30 -0
  473. data/lib/gtk_paradise/widgets/gtk2/file_viewer/file_viewer.config +6 -0
  474. data/lib/gtk_paradise/widgets/gtk2/file_viewer/file_viewer.rb +33 -0
  475. data/lib/gtk_paradise/widgets/gtk2/foto_lister.rb +198 -0
  476. data/lib/gtk_paradise/widgets/gtk2/gidnight_commander/gidnight_commander.config +6 -0
  477. data/lib/gtk_paradise/widgets/gtk2/gidnight_commander/gidnight_commander.rb +595 -0
  478. data/lib/gtk_paradise/widgets/gtk2/google_searcher/google_searcher.rb +30 -0
  479. data/lib/gtk_paradise/widgets/gtk2/gtksourceview2_example.rb +105 -0
  480. data/lib/gtk_paradise/widgets/gtk2/hbox_example.rb +114 -0
  481. data/lib/gtk_paradise/widgets/gtk2/information_about_the_harddisc.rb +33 -0
  482. data/lib/gtk_paradise/widgets/gtk2/keyboard_grab.rb +81 -0
  483. data/lib/gtk_paradise/widgets/gtk2/list_store_table3/list_store_table3.rb +29 -0
  484. data/lib/gtk_paradise/widgets/gtk2/lsmod/lsmod.config +6 -0
  485. data/lib/gtk_paradise/widgets/gtk2/lsmod/lsmod.rb +27 -0
  486. data/lib/gtk_paradise/widgets/gtk2/lspci/lspci.config +6 -0
  487. data/lib/gtk_paradise/widgets/gtk2/lspci/lspci.rb +29 -0
  488. data/lib/gtk_paradise/widgets/gtk2/maximize_button/maximize_button.rb +33 -0
  489. data/lib/gtk_paradise/widgets/gtk2/menu_demo.rb +130 -0
  490. data/lib/gtk_paradise/widgets/gtk2/mini_clock/mini_clock.rb +48 -0
  491. data/lib/gtk_paradise/widgets/gtk2/mswin/README.md +3 -0
  492. data/lib/gtk_paradise/widgets/gtk2/mswin/constants.rb +42 -0
  493. data/lib/gtk_paradise/widgets/gtk2/mswin/ms_sys_control.rb +562 -0
  494. data/lib/gtk_paradise/widgets/gtk2/mswin/sys_cmd_button.rb +153 -0
  495. data/lib/gtk_paradise/widgets/gtk2/multiple_select_in_a_tree_view_widget.rb +99 -0
  496. data/lib/gtk_paradise/widgets/gtk2/my_calendar/my_calendar.config +6 -0
  497. data/lib/gtk_paradise/widgets/gtk2/my_calendar/my_calendar.rb +34 -0
  498. data/lib/gtk_paradise/widgets/gtk2/notebook_tab_coloured_top_bar.rb +74 -0
  499. data/lib/gtk_paradise/widgets/gtk2/notebook_tab_with_icon/notebook_tab_with_icon.rb +30 -0
  500. data/lib/gtk_paradise/widgets/gtk2/one_column_with_text_and_image/one_column_with_text_and_image.rb +30 -0
  501. data/lib/gtk_paradise/widgets/gtk2/paned_example.rb +107 -0
  502. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/about.rb +25 -0
  503. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/config.rb +106 -0
  504. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/file.rb +304 -0
  505. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/hexview.rb +81 -0
  506. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/imgview.rb +63 -0
  507. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/menu.rb +366 -0
  508. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/properties.rb +110 -0
  509. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/signing.rb +536 -0
  510. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/textview.rb +86 -0
  511. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/treeview.rb +400 -0
  512. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/walker.rb +303 -0
  513. data/lib/gtk_paradise/widgets/gtk2/pdfwalker/xrefs.rb +71 -0
  514. data/lib/gtk_paradise/widgets/gtk2/pid_displayer/pid_displayer.config +6 -0
  515. data/lib/gtk_paradise/widgets/gtk2/pid_displayer/pid_displayer.rb +30 -0
  516. data/lib/gtk_paradise/widgets/gtk2/ping_widget/ping_widget.rb +30 -0
  517. data/lib/gtk_paradise/widgets/gtk2/psaux_viewer/psaux_viewer.rb +29 -0
  518. data/lib/gtk_paradise/widgets/gtk2/random_image/random_image.rb +39 -0
  519. data/lib/gtk_paradise/widgets/gtk2/reorderable_tabs_example.rb +148 -0
  520. data/lib/gtk_paradise/widgets/gtk2/ruler_widget.rb +127 -0
  521. data/lib/gtk_paradise/widgets/gtk2/scale_button_example.rb +116 -0
  522. data/lib/gtk_paradise/widgets/gtk2/scale_this_image.rb +164 -0
  523. data/lib/gtk_paradise/widgets/gtk2/scrolled_window_with_viewport/scrolled_window_with_viewport.rb +30 -0
  524. data/lib/gtk_paradise/widgets/gtk2/select_file/select_file.rb +32 -0
  525. data/lib/gtk_paradise/widgets/gtk2/show_icon_theme/show_icon_theme.rb +34 -0
  526. data/lib/gtk_paradise/widgets/gtk2/simple_clock/simple_clock.rb +29 -0
  527. data/lib/gtk_paradise/widgets/gtk2/slider_changing_button.rb +116 -0
  528. data/lib/gtk_paradise/widgets/gtk2/status_icon_example.rb +200 -0
  529. data/lib/gtk_paradise/widgets/gtk2/stopwatch/stopwatch.rb +30 -0
  530. data/lib/gtk_paradise/widgets/gtk2/sys_message/sys_message.config +6 -0
  531. data/lib/gtk_paradise/widgets/gtk2/sys_message/sys_message.rb +29 -0
  532. data/lib/gtk_paradise/widgets/gtk2/tabby/tabby.config +6 -0
  533. data/lib/gtk_paradise/widgets/gtk2/tabby/tabby.rb +27 -0
  534. data/lib/gtk_paradise/widgets/gtk2/tabby/view.rb +32 -0
  535. data/lib/gtk_paradise/widgets/gtk2/table2.rb +144 -0
  536. data/lib/gtk_paradise/widgets/gtk2/table_example.rb +129 -0
  537. data/lib/gtk_paradise/widgets/gtk2/timer_window/button_cancel.rb +39 -0
  538. data/lib/gtk_paradise/widgets/gtk2/timer_window/button_start.rb +83 -0
  539. data/lib/gtk_paradise/widgets/gtk2/timer_window/cycle_runner.rb +72 -0
  540. data/lib/gtk_paradise/widgets/gtk2/timer_window/input_validator.rb +38 -0
  541. data/lib/gtk_paradise/widgets/gtk2/timer_window/panel.rb +90 -0
  542. data/lib/gtk_paradise/widgets/gtk2/timer_window/progress_bar.rb +30 -0
  543. data/lib/gtk_paradise/widgets/gtk2/timer_window/text_field.rb +44 -0
  544. data/lib/gtk_paradise/widgets/gtk2/timer_window/timer.rb +95 -0
  545. data/lib/gtk_paradise/widgets/gtk2/timer_window/timer_window.config +6 -0
  546. data/lib/gtk_paradise/widgets/gtk2/timer_window/timer_window.rb +137 -0
  547. data/lib/gtk_paradise/widgets/gtk2/toolbar_example.rb +119 -0
  548. data/lib/gtk_paradise/widgets/gtk2/tree_view_demo.rb +148 -0
  549. data/lib/gtk_paradise/widgets/gtk2/unicode_clock/unicode_clock.rb +30 -0
  550. data/lib/gtk_paradise/widgets/gtk2/user/user.rb +29 -0
  551. data/lib/gtk_paradise/widgets/gtk2/wget_wrapper/wget_wrapper.rb +29 -0
  552. data/lib/gtk_paradise/widgets/gtk2/xpm_loader/xpm_loader.rb +32 -0
  553. data/lib/gtk_paradise/widgets/gtk2/youtube_dl.rb +227 -0
  554. data/lib/gtk_paradise/widgets/gtk3/browser/browser.rb +30 -0
  555. data/lib/gtk_paradise/widgets/gtk3/burn_this_iso_file/burn_this_iso_file.rb +241 -0
  556. data/lib/gtk_paradise/widgets/gtk3/burning_widget/burning_widget.rb +30 -0
  557. data/lib/gtk_paradise/widgets/gtk3/burning_widget/drawing_widget.rb +107 -0
  558. data/lib/gtk_paradise/widgets/gtk3/calculator/calculator.rb +456 -0
  559. data/lib/gtk_paradise/widgets/gtk3/cdripper/cdripper.rb +29 -0
  560. data/lib/gtk_paradise/widgets/gtk3/checkbox_image/checkbox_image.rb +169 -0
  561. data/lib/gtk_paradise/widgets/gtk3/colour_filled_widget/colour_filled_widget.rb +29 -0
  562. data/lib/gtk_paradise/widgets/gtk3/colour_palette/colour_palette.rb +30 -0
  563. data/lib/gtk_paradise/widgets/gtk3/coloured_bar/coloured_bar.rb +33 -0
  564. data/lib/gtk_paradise/widgets/gtk3/coloured_square/coloured_square.rb +186 -0
  565. data/lib/gtk_paradise/widgets/gtk3/conky/conky.rb +31 -0
  566. data/lib/gtk_paradise/widgets/gtk3/contacts/contacts.rb +29 -0
  567. data/lib/gtk_paradise/widgets/gtk3/cpu_widget/cpu_widget.rb +228 -0
  568. data/lib/gtk_paradise/widgets/gtk3/debug_widget/debug_widget.rb +30 -0
  569. data/lib/gtk_paradise/widgets/gtk3/directory_content_widget/directory_content_widget.rb +30 -0
  570. data/lib/gtk_paradise/widgets/gtk3/editor/connect_skeleton.rb +97 -0
  571. data/lib/gtk_paradise/widgets/gtk3/editor/create.rb +160 -0
  572. data/lib/gtk_paradise/widgets/gtk3/editor/editor.rb +836 -0
  573. data/lib/gtk_paradise/widgets/gtk3/editor/internal_widgets/README.md +3 -0
  574. data/lib/gtk_paradise/widgets/gtk3/editor/internal_widgets/goto_line_widget.rb +234 -0
  575. data/lib/gtk_paradise/widgets/gtk3/editor/misc.rb +568 -0
  576. data/lib/gtk_paradise/widgets/gtk3/emoji_toggle_widget/emoji_toggle_widget.rb +37 -0
  577. data/lib/gtk_paradise/widgets/gtk3/emoji_widget/emoji_widget.rb +30 -0
  578. data/lib/gtk_paradise/widgets/gtk3/error_widget/error_widget.rb +30 -0
  579. data/lib/gtk_paradise/widgets/gtk3/file_path_widget/file_path_widget.rb +30 -0
  580. data/lib/gtk_paradise/widgets/gtk3/file_viewer/file_viewer.rb +33 -0
  581. data/lib/gtk_paradise/widgets/gtk3/files_in_directory/files_in_directory.rb +318 -0
  582. data/lib/gtk_paradise/widgets/gtk3/flexible_vte/README.md +4 -0
  583. data/lib/gtk_paradise/widgets/gtk3/flexible_vte/flexible_vte.rb +241 -0
  584. data/lib/gtk_paradise/widgets/gtk3/flip_state_widget/flip_state_widget.rb +30 -0
  585. data/lib/gtk_paradise/widgets/gtk3/font_size_widget/action_button.rb +69 -0
  586. data/lib/gtk_paradise/widgets/gtk3/font_size_widget/font_size_widget.rb +540 -0
  587. data/lib/gtk_paradise/widgets/gtk3/gidnight_commander/gidnight_commander.rb +415 -0
  588. data/lib/gtk_paradise/widgets/gtk3/google_searcher/google_searcher.rb +30 -0
  589. data/lib/gtk_paradise/widgets/gtk3/image_close_on_click_action/image_close_on_click_action.rb +101 -0
  590. data/lib/gtk_paradise/widgets/gtk3/image_viewer/image_viewer.rb +214 -0
  591. data/lib/gtk_paradise/widgets/gtk3/information_about_the_harddisc/information_about_the_harddisc.rb +30 -0
  592. data/lib/gtk_paradise/widgets/gtk3/insert_character/insert_character.rb +266 -0
  593. data/lib/gtk_paradise/widgets/gtk3/linux_users/linux_users.rb +192 -0
  594. data/lib/gtk_paradise/widgets/gtk3/list_store_table3/list_store_table3.rb +29 -0
  595. data/lib/gtk_paradise/widgets/gtk3/lsmod/lsmod.rb +27 -0
  596. data/lib/gtk_paradise/widgets/gtk3/lspci/lspci.rb +29 -0
  597. data/lib/gtk_paradise/widgets/gtk3/maximize_button/maximize_button.rb +29 -0
  598. data/lib/gtk_paradise/widgets/gtk3/mini_clock/mini_clock.rb +47 -0
  599. data/lib/gtk_paradise/widgets/gtk3/my_calendar/my_calendar.rb +30 -0
  600. data/lib/gtk_paradise/widgets/gtk3/notebook_controller/notebook_controller.rb +30 -0
  601. data/lib/gtk_paradise/widgets/gtk3/notebook_tab_with_icon/notebook_tab_with_icon.rb +30 -0
  602. data/lib/gtk_paradise/widgets/gtk3/numbered_lines/numbered_lines.rb +307 -0
  603. data/lib/gtk_paradise/widgets/gtk3/one_column_with_text_and_image/one_column_with_text_and_image.rb +30 -0
  604. data/lib/gtk_paradise/widgets/gtk3/pid_displayer/pid_displayer.rb +30 -0
  605. data/lib/gtk_paradise/widgets/gtk3/ping_widget/ping_widget.rb +30 -0
  606. data/lib/gtk_paradise/widgets/gtk3/psaux_viewer/psaux_viewer.rb +29 -0
  607. data/lib/gtk_paradise/widgets/gtk3/random_image/random_image.rb +29 -0
  608. data/lib/gtk_paradise/widgets/gtk3/regex_matcher/regex_matcher.rb +156 -0
  609. data/lib/gtk_paradise/widgets/gtk3/rename_widget/rename_widget.rb +305 -0
  610. data/lib/gtk_paradise/widgets/gtk3/scrolled_window_with_viewport/scrolled_window_with_viewport.rb +30 -0
  611. data/lib/gtk_paradise/widgets/gtk3/select_file/select_file.rb +32 -0
  612. data/lib/gtk_paradise/widgets/gtk3/show_icon_theme/show_icon_theme.rb +30 -0
  613. data/lib/gtk_paradise/widgets/gtk3/simple_clock/simple_clock.rb +38 -0
  614. data/lib/gtk_paradise/widgets/gtk3/stopwatch/stopwatch.rb +30 -0
  615. data/lib/gtk_paradise/widgets/gtk3/sys_message/sys_message.rb +29 -0
  616. data/lib/gtk_paradise/widgets/gtk3/system_information/system_information.rb +188 -0
  617. data/lib/gtk_paradise/widgets/gtk3/tabble/admin_panel.rb +196 -0
  618. data/lib/gtk_paradise/widgets/gtk3/tabble/constants.rb +19 -0
  619. data/lib/gtk_paradise/widgets/gtk3/tabble/image_and_button.rb +383 -0
  620. data/lib/gtk_paradise/widgets/gtk3/tabble/tabble.rb +535 -0
  621. data/lib/gtk_paradise/widgets/gtk3/tabby/tabby.rb +29 -0
  622. data/lib/gtk_paradise/widgets/gtk3/tabby/view.rb +32 -0
  623. data/lib/gtk_paradise/widgets/gtk3/text_entry_widget/text_entry_widget.rb +30 -0
  624. data/lib/gtk_paradise/widgets/gtk3/unicode_clock/unicode_clock.rb +30 -0
  625. data/lib/gtk_paradise/widgets/gtk3/user/user.rb +29 -0
  626. data/lib/gtk_paradise/widgets/gtk3/view_webpage/view_webpage.rb +183 -0
  627. data/lib/gtk_paradise/widgets/gtk3/vote_box_widget/vote_box_widget.rb +30 -0
  628. data/lib/gtk_paradise/widgets/gtk3/wget_wrapper/wget_wrapper.rb +30 -0
  629. data/lib/gtk_paradise/widgets/gtk3/xpm_loader/xpm_loader.rb +32 -0
  630. data/lib/gtk_paradise/widgets/shared_code/admin_panel/admin_panel_module.rb +235 -0
  631. data/lib/gtk_paradise/widgets/shared_code/browser/browser_module.rb +314 -0
  632. data/lib/gtk_paradise/widgets/shared_code/burning_widget/burning_widget_module.rb +185 -0
  633. data/lib/gtk_paradise/widgets/shared_code/cdripper/cdripper_module.rb +564 -0
  634. data/lib/gtk_paradise/widgets/shared_code/colour_filled_widget/colour_filled_widget_module.rb +283 -0
  635. data/lib/gtk_paradise/widgets/shared_code/colour_palette/colour_palette_module.rb +362 -0
  636. data/lib/gtk_paradise/widgets/shared_code/coloured_bar/coloured_bar_module.rb +248 -0
  637. data/lib/gtk_paradise/widgets/shared_code/conky/conky_module.rb +378 -0
  638. data/lib/gtk_paradise/widgets/shared_code/contacts/contacts_module.rb +335 -0
  639. data/lib/gtk_paradise/widgets/shared_code/customizable_dialog/customizable_dialog.rb +95 -0
  640. data/lib/gtk_paradise/widgets/shared_code/debug_widget/debug_widget_module.rb +307 -0
  641. data/lib/gtk_paradise/widgets/shared_code/directory_content_widget/constants.rb +53 -0
  642. data/lib/gtk_paradise/widgets/shared_code/directory_content_widget/directory_content_widget_module.rb +777 -0
  643. data/lib/gtk_paradise/widgets/shared_code/directory_content_widget/handle_this_file_or_symlink.rb +83 -0
  644. data/lib/gtk_paradise/widgets/shared_code/emoji_toggle_widget/emoji_toggle_widget_module.rb +226 -0
  645. data/lib/gtk_paradise/widgets/shared_code/emoji_widget/emoji_widget_module.rb +212 -0
  646. data/lib/gtk_paradise/widgets/shared_code/error_widget/error_widget_module.rb +157 -0
  647. data/lib/gtk_paradise/widgets/shared_code/file_path_widget/file_path_widget.css +0 -0
  648. data/lib/gtk_paradise/widgets/shared_code/file_path_widget/file_path_widget_module.rb +245 -0
  649. data/lib/gtk_paradise/widgets/shared_code/file_viewer/file_viewer_module.rb +285 -0
  650. data/lib/gtk_paradise/widgets/shared_code/flip_state_widget/flip_state_widget_module.rb +203 -0
  651. data/lib/gtk_paradise/widgets/shared_code/google_searcher/google_searcher_module.rb +218 -0
  652. data/lib/gtk_paradise/widgets/shared_code/information_about_the_harddisc/harddisc_information.rb +155 -0
  653. data/lib/gtk_paradise/widgets/shared_code/information_about_the_harddisc/information_about_the_harddisc_module.rb +444 -0
  654. data/lib/gtk_paradise/widgets/shared_code/list_store_table3/list_store_table3_module.rb +144 -0
  655. data/lib/gtk_paradise/widgets/shared_code/lsmod/lsmod_module.rb +275 -0
  656. data/lib/gtk_paradise/widgets/shared_code/lspci/lspci_module.rb +329 -0
  657. data/lib/gtk_paradise/widgets/shared_code/maximize_button/maximize_button_module.rb +166 -0
  658. data/lib/gtk_paradise/widgets/shared_code/mini_clock/mini_clock_module.rb +228 -0
  659. data/lib/gtk_paradise/widgets/shared_code/my_calendar/my_calendar_module.rb +327 -0
  660. data/lib/gtk_paradise/widgets/shared_code/notebook_controller/notebook_controller_module.rb +339 -0
  661. data/lib/gtk_paradise/widgets/shared_code/notebook_tab_with_icon/notebook_tab_with_icon_module.rb +297 -0
  662. data/lib/gtk_paradise/widgets/shared_code/one_column_with_text_and_image/one_column_with_text_and_image_module.rb +223 -0
  663. data/lib/gtk_paradise/widgets/shared_code/pid_displayer/pid_displayer_module.rb +596 -0
  664. data/lib/gtk_paradise/widgets/shared_code/ping_widget/ping_widget_module.rb +326 -0
  665. data/lib/gtk_paradise/widgets/shared_code/psaux_viewer/psaux_viewer_module.rb +210 -0
  666. data/lib/gtk_paradise/widgets/shared_code/random_image/random_image_module.rb +307 -0
  667. data/lib/gtk_paradise/widgets/shared_code/scrolled_window_with_viewport/scrolled_window_with_viewport_module.rb +165 -0
  668. data/lib/gtk_paradise/widgets/shared_code/select_file/select_file_module.rb +241 -0
  669. data/lib/gtk_paradise/widgets/shared_code/shell/shell.css +5 -0
  670. data/lib/gtk_paradise/widgets/shared_code/shell/shell_module.rb +0 -0
  671. data/lib/gtk_paradise/widgets/shared_code/show_icon_theme/show_icon_theme_module.rb +364 -0
  672. data/lib/gtk_paradise/widgets/shared_code/simple_clock/simple_clock_module.rb +266 -0
  673. data/lib/gtk_paradise/widgets/shared_code/stopwatch/stopwatch_module.rb +341 -0
  674. data/lib/gtk_paradise/widgets/shared_code/sys_message/sys_message_module.rb +211 -0
  675. data/lib/gtk_paradise/widgets/shared_code/tabby/tabby_module.rb +189 -0
  676. data/lib/gtk_paradise/widgets/shared_code/tabby/view_module.rb +340 -0
  677. data/lib/gtk_paradise/widgets/shared_code/text_entry_widget/text_entry_widget_module.rb +182 -0
  678. data/lib/gtk_paradise/widgets/shared_code/unicode_clock/unicode_clock.css +0 -0
  679. data/lib/gtk_paradise/widgets/shared_code/unicode_clock/unicode_clock_module.rb +192 -0
  680. data/lib/gtk_paradise/widgets/shared_code/user/user_module.rb +307 -0
  681. data/lib/gtk_paradise/widgets/shared_code/vote_box_widget/vote_box_widget_module.rb +208 -0
  682. data/lib/gtk_paradise/widgets/shared_code/wget_wrapper/wget_wrapper_module.rb +266 -0
  683. data/lib/gtk_paradise/widgets/shared_code/xpm_loader/xpm_loader_module.rb +190 -0
  684. data/lib/gtk_paradise/widgets/version_agnostic/audio_button.rb +134 -0
  685. data/lib/gtk_paradise/widgets/version_agnostic/button_open_remote_webpage.rb +171 -0
  686. data/lib/gtk_paradise/widgets/version_agnostic/button_with_border.rb +63 -0
  687. data/lib/gtk_paradise/widgets/version_agnostic/button_xorg_buffer.rb +150 -0
  688. data/lib/gtk_paradise/widgets/version_agnostic/coloured_button.rb +248 -0
  689. data/lib/gtk_paradise/widgets/version_agnostic/coloured_unit.rb +54 -0
  690. data/lib/gtk_paradise/widgets/version_agnostic/my_image_menu_item.rb +103 -0
  691. data/lib/gtk_paradise/widgets/version_agnostic/my_menu_item_separator.rb +31 -0
  692. data/lib/gtk_paradise/widgets/version_agnostic/non_numbers_only.rb +66 -0
  693. data/lib/gtk_paradise/widgets/version_agnostic/note_window.rb +107 -0
  694. data/lib/gtk_paradise/widgets/version_agnostic/numbers_only.rb +61 -0
  695. data/lib/gtk_paradise/www/index.cgi +34 -0
  696. data/lib/gtk_paradise/yaml/browser_URLs.yml +22 -0
  697. data/lib/gtk_paradise/yaml/configuration_options_for_class_gtk_runner.yml +29 -0
  698. data/lib/gtk_paradise/yaml/menu.yml +1026 -0
  699. data/lib/gtk_paradise/yaml/notebook_controller.yml +299 -0
  700. data/lib/gtk_paradise/yaml/use_this_gtk_version_by_default.yml +1 -0
  701. data/lib/gtk_paradise.rb +5 -0
  702. data/test/gtk2/testing_combo_box.rb +24 -0
  703. data/test/gtk2/testing_gtk_image.rb +24 -0
  704. data/test/gtk2/testing_label_with_ampersand.rb +26 -0
  705. data/test/gtk2/testing_notebook.rb +23 -0
  706. data/test/gtk2/testing_the_gtk_paradise_project.rb +25 -0
  707. data/test/gtk3/test_widget.rb +114 -0
  708. data/test/gtk3/testing_app.rb +22 -0
  709. data/test/gtk3/testing_base_module.rb +63 -0
  710. data/test/gtk3/testing_colours.rb +11 -0
  711. data/test/gtk3/testing_project_base_directory.rb +9 -0
  712. data/test/gtk3/testing_the_html_pseudo_tags.rb +127 -0
  713. data/test/misc/testing_gtk_paradise_runner.rb +22 -0
  714. metadata +813 -0
@@ -0,0 +1,596 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === Gtk::PidDisplayerModule
6
+ #
7
+ # The purpose of this widget is to display all PIDs on the given system,
8
+ # usually on a linux host system.
9
+ #
10
+ # Written in ruby-gtk, this widget also allows the user to kill off a PID
11
+ # from a given process. The user can use combinations such as "Alt+1" to
12
+ # jump to a specific PID entry.
13
+ # =========================================================================== #
14
+ # === TODOS AND TO-IMPROVES for this class (in german, as it is ancient):
15
+ #
16
+ # - Man soll rechte Maustaste klicken können und da ein
17
+ # weiteres Kontextmenu bekommen.
18
+ #
19
+ # - Farbliche Unterschiede so das man die verschiedenen User
20
+ # leichter unterscheiden kann.
21
+ #
22
+ # - Warum geht das nit das man nur die Prozesse erhält beim greppen
23
+ # die man erhalten sollte ..
24
+ #
25
+ # - Make use of "pkill" as well!
26
+ #
27
+ # Aliased to:
28
+ #
29
+ # rpid
30
+ #
31
+ # =========================================================================== #
32
+ # require 'gtk_paradise/widgets/shared_code/pid_displayer/pid_displayer_module.rb'
33
+ # include Gtk::PidDisplayerModule
34
+ # =========================================================================== #
35
+ module Gtk
36
+
37
+ module PidDisplayerModule
38
+
39
+ require 'gtk_paradise/requires/require_the_base_module.rb'
40
+ include ::Gtk::BaseModule
41
+
42
+ # ========================================================================= #
43
+ # === N
44
+ # ========================================================================= #
45
+ N = "\n"
46
+
47
+ # ========================================================================= #
48
+ # === NAMESPACE
49
+ # ========================================================================= #
50
+ NAMESPACE = inspect
51
+
52
+ # ========================================================================= #
53
+ # === TITLE
54
+ # ========================================================================= #
55
+ TITLE = 'GTK Pid Displayer'
56
+
57
+ # ========================================================================= #
58
+ # === SLEEP_FOR_HOW_MANY_SECONDS
59
+ # ========================================================================= #
60
+ SLEEP_FOR_HOW_MANY_SECONDS = 16
61
+
62
+ # ========================================================================= #
63
+ # === DEFAULT_PID_NUMBER
64
+ # ========================================================================= #
65
+ DEFAULT_PID_NUMBER = 1001
66
+
67
+ # ========================================================================= #
68
+ # === FONT_TO_USE
69
+ # ========================================================================= #
70
+ FONT_TO_USE = 'Sans 20'
71
+
72
+ # ========================================================================= #
73
+ # === WIDTH
74
+ # ========================================================================= #
75
+ WIDTH = 1400
76
+
77
+ # ========================================================================= #
78
+ # === HEIGHT
79
+ # ========================================================================= #
80
+ HEIGHT = 50
81
+
82
+ # ========================================================================= #
83
+ # === initialize
84
+ # ========================================================================= #
85
+ def initialize(
86
+ commandline_arguments = nil,
87
+ run_already = true
88
+ )
89
+ super(:vertical)
90
+ set_title(TITLE) if respond_to? :set_title
91
+ reset
92
+ set_commandline_arguments(
93
+ commandline_arguments
94
+ )
95
+ run if run_already
96
+ end
97
+
98
+ # ========================================================================= #
99
+ # === reset (reset tag)
100
+ # ========================================================================= #
101
+ def reset
102
+ reset_the_internal_variables
103
+ # ======================================================================= #
104
+ # === @configuration
105
+ # ======================================================================= #
106
+ @configuration = [true, __dir__, NAMESPACE]
107
+ # === @title
108
+ @title = TITLE
109
+ set_height(HEIGHT)
110
+ set_width(WIDTH)
111
+ # ======================================================================= #
112
+ # === @processes
113
+ # ======================================================================= #
114
+ @processes = '' # stores our processes
115
+ # ======================================================================= #
116
+ # === @array_commands
117
+ # ======================================================================= #
118
+ @array_commands = [] # this array stores our commands
119
+ # ======================================================================= #
120
+ # === @n_rows
121
+ # ======================================================================= #
122
+ @n_rows = 0 # this will tell us how many rows we have
123
+ set_font(FONT_TO_USE)
124
+ use_gtk_paradise_project_css_file
125
+ end
126
+
127
+ # ========================================================================= #
128
+ # === report_n_rows
129
+ # ========================================================================= #
130
+ def report_n_rows
131
+ e
132
+ efancy "#{@n_rows} Reihen."
133
+ e
134
+ end
135
+
136
+ # ========================================================================= #
137
+ # === create_buttons
138
+ #
139
+ # creates all buttons in use. buttons tag button tag
140
+ #
141
+ # $RSRC/GUI/GTK/PID_DISPLAYER/gtk2_pid_displayer.rb
142
+ # ========================================================================= #
143
+ def create_buttons
144
+ # ========================================================================= #
145
+ # The Quit button.
146
+ # ========================================================================= #
147
+ @button_quit = gtk_button('_Quit')
148
+ @button_quit.modify_background(:active, :coral)
149
+ @button_quit.modify_background(:normal, :chocolate)
150
+ @button_quit.modify_background(:prelight, :yellow)
151
+ @button_quit.on_clicked { ::Gtk.main_quit }
152
+
153
+ # ========================================================================= #
154
+ # The kill-PID button comes next.
155
+ # ========================================================================= #
156
+ @button_kill_pid = gtk_button('_Kill Pid')
157
+ @button_kill_pid.fancy_tooltips = 'This will kill the PID (process) '\
158
+ 'via .kill_id(), and then update the listing via .update_listing().'
159
+ @button_kill_pid.modify_background(:active, :coral)
160
+ @button_kill_pid.modify_background(:normal, :chocolate)
161
+ @button_kill_pid.modify_background(:prelight, :mediumorchid)
162
+ @button_kill_pid.on_clicked {
163
+ efancy 'Killing PID Number:'
164
+ e @entry_pid_number.text.to_i
165
+ kill_id(@entry_pid_number.text.to_i)
166
+ update_listing # after we killed a pid, we must update the listing again
167
+ }
168
+
169
+ @button_clear_list = gtk_button('_Clear Listing')
170
+ @button_clear_list.modify_background(:active, :coral)
171
+ @button_clear_list.modify_background(:normal, :chocolate)
172
+ @button_clear_list.modify_background(:prelight, :mediumorchid)
173
+ @button_clear_list.on_clicked {
174
+ efancy 'Clearing list:'
175
+ report_n_rows
176
+ clear_liststore
177
+ }
178
+
179
+ # ======================================================================= #
180
+ # === Update listing
181
+ # ======================================================================= #
182
+ @button_update_listing = gtk_button('_Update Listing')
183
+ @button_update_listing.modify_background(:active, :coral)
184
+ @button_update_listing.modify_background(:normal, :chocolate)
185
+ @button_update_listing.modify_background(:prelight, :mediumorchid)
186
+ @button_update_listing.on_clicked {
187
+ efancy 'Updating listing:'
188
+ update_listing
189
+ }
190
+
191
+ @button_grep = gtk_button('_Grep')
192
+ @button_grep.modify_background(:active, :coral)
193
+ @button_grep.modify_background(:normal, :chocolate)
194
+ @button_grep.modify_background(:prelight, :mediumorchid)
195
+ @button_grep.on_clicked {
196
+ grep_for
197
+ update_listing # after we grepped, we will update
198
+ }
199
+ end
200
+
201
+ # ========================================================================= #
202
+ # === set_geometry
203
+ #
204
+ # Set geometry hints.
205
+ # ========================================================================= #
206
+ def set_geometry
207
+ @geometry = Gdk::Geometry.new
208
+ min = 430
209
+ max = 1100
210
+ @geometry.set_min_width(min+600) if @geometry.respond_to? :set_min_width
211
+ @geometry.set_min_height(min) if @geometry.respond_to? :set_min_height
212
+ @geometry.set_max_width(max) if @geometry.respond_to? :set_max_width
213
+ @geometry.set_max_height(max) if @geometry.respond_to? :set_max_height
214
+ @geometry.set_width_inc(20) if @geometry.respond_to? :set_width_inc
215
+ @geometry.set_height_inc(20) if @geometry.respond_to? :set_height_inc
216
+ end
217
+
218
+ # ==================================================================== #
219
+ # === create_liststore
220
+ #
221
+ # 12 entries.
222
+ # ==================================================================== #
223
+ def create_liststore
224
+ @list_store = ::Gtk::ListStore.new(* ([String] * 12) )
225
+ end
226
+
227
+ # ========================================================================= #
228
+ # === create_skeleton
229
+ # ========================================================================= #
230
+ def create_skeleton
231
+ create_vbox # creates our vbox
232
+ create_buttons # create our buttons
233
+ create_liststore # create entries for use in treeview
234
+ create_treeview # stores our liststore
235
+ create_renderer # create our renderer
236
+ create_scrolled_window #
237
+ create_entries # all entries
238
+ create_and_connect_tables # we want a table and will connect it
239
+ end
240
+
241
+ # ========================================================================= #
242
+ # === connect_skeleton
243
+ #
244
+ # Connects for example buttons with main window.
245
+ #
246
+ # Does NOT cover the various Gtk::Entries.
247
+ # ========================================================================= #
248
+ def connect_skeleton
249
+ @scrolled_window.add(@tree_view)
250
+ @scrolled_window.set_size_request(1000, 500)
251
+ # Listing. Rows kommen als letzte Params.
252
+ @main_table.attach_defaults(@scrolled_window,0,2, 3,5)
253
+ @v_box.add(@main_table)
254
+ add(@v_box)
255
+ show_all
256
+ end
257
+
258
+ # ==================================================================== #
259
+ # === create_vbox
260
+ # ==================================================================== #
261
+ def create_vbox
262
+ @v_box = gtk_vbox
263
+ end
264
+
265
+ # ==================================================================== #
266
+ # === clear_liststore
267
+ #
268
+ # Used to clear our liststore entries. See for Gtk::ListStore clear.
269
+ #
270
+ # I believe thats not the same as emptying it.
271
+ # clear_liststore
272
+ # ==================================================================== #
273
+ def clear_liststore
274
+ @list_store.clear
275
+ end
276
+
277
+ # ==================================================================== #
278
+ # === create_treeview
279
+ #
280
+ # Creates our treeview, by using our @list_store
281
+ # ==================================================================== #
282
+ def create_treeview
283
+ @tree_view = gtk_tree_view(@list_store)
284
+ @tree_view.set_size_request(800, 300)
285
+ end
286
+
287
+ # ==================================================================== #
288
+ # === create_renderer
289
+ # ==================================================================== #
290
+ def create_renderer
291
+ @renderer = gtk_cell_renderer_text
292
+ @renderer.set_property('foreground', 'black')
293
+ @renderer.set_property('background', 'white')
294
+ end
295
+
296
+ # ==================================================================== #
297
+ # === create_scrolled_window
298
+ # ==================================================================== #
299
+ def create_scrolled_window
300
+ @scrolled_window = gtk_scrolled_window
301
+ end
302
+
303
+ # ========================================================================= #
304
+ # === populate_treeview
305
+ #
306
+ # Fill our treeview with entries, info retrieved by doing:
307
+ # ps ax
308
+ #
309
+ # This only needs to be done once, on startup of the program.
310
+ #
311
+ # PID TTY STAT TIME COMMAND
312
+ #
313
+ # ========================================================================= #
314
+ def populate_treeview
315
+ # @tree_view.insert_column(-1, 'PID', @renderer, :text => 0)
316
+ # @tree_view.insert_column(-1, 'TTY', @renderer, :text => 1)
317
+ # @tree_view.insert_column(-1, 'STAT', @renderer, :text => 2)
318
+ # @tree_view.insert_column(-1, 'TIME', @renderer, :text => 3)
319
+ # @tree_view.insert_column(-1, 'COMMAND', @renderer, :text => 4)
320
+
321
+ column_pid = Gtk::TreeViewColumn.new('PID', gtk_cell_renderer_text, { text: 0 })
322
+ column_tty = Gtk::TreeViewColumn.new('TTY', gtk_cell_renderer_text, { text: 1 })
323
+ column_stat = Gtk::TreeViewColumn.new('STAT', gtk_cell_renderer_text, { text: 2 })
324
+ column_time = Gtk::TreeViewColumn.new('TIME', gtk_cell_renderer_text, { text: 3 })
325
+ column_command = Gtk::TreeViewColumn.new('COMMAND', gtk_cell_renderer_text, { text: 4 })
326
+
327
+ @tree_view.append_column(column_pid)
328
+ @tree_view.append_column(column_tty)
329
+ @tree_view.append_column(column_stat)
330
+ @tree_view.append_column(column_time)
331
+ @tree_view.append_column(column_command)
332
+ end
333
+
334
+ # ========================================================================= #
335
+ # === update_listing
336
+ #
337
+ # Updates the listing. If no array is passed, we run 'ps aux', else we
338
+ # treat the passed array as our field which we want to display to
339
+ # the user.
340
+ # ========================================================================= #
341
+ def update_listing(use_this_array = [])
342
+ clear_liststore # Clear liststore first.
343
+ unless use_this_array.empty?
344
+ clear_liststore
345
+ @n_rows = use_this_array.size
346
+ use_this_array.each {|process|
347
+ iter = @list_store.append
348
+ # Go through each process detail creating a column for it.
349
+ process.each_with_index {|the_process, index|
350
+ # index is zb 10, process zb "ruby myserver_control.rb start"
351
+ iter[index] = the_process
352
+ }
353
+ }
354
+ else
355
+ # ===================================================================== #
356
+ # if you want sort by PID.
357
+ # ===================================================================== #
358
+ @processes = `ps ax`.split(N)[1..-1].map { |entry|
359
+ # entry zb:
360
+ # 201 ? S< 0:00 [khubd]
361
+ # Zerst kommt die wichtige PID
362
+ _ = entry.strip.split(/\s+/, 5)
363
+ }
364
+ @n_rows = @processes.size
365
+ @array_commands = [] # empty it again
366
+ # Go through each process creating a row for it.
367
+ @processes.each { |process|
368
+ iter = @list_store.append
369
+ # Go through each process detail creating a column for it.
370
+ process.each_with_index { |the_process, index|
371
+ iter[index] = the_process
372
+ }
373
+ }
374
+ end
375
+ end
376
+
377
+ # ========================================================================= #
378
+ # === create_entries
379
+ #
380
+ # entries tag. Handles all various entries.
381
+ # ========================================================================= #
382
+ def create_entries
383
+ @entry_pid_number = gtk_entry
384
+ @entry_pid_number.set_max_length(20) # How long can a pid be ? hmm
385
+ # @entry_url.text # zum abfragen des inhalts
386
+ @entry_pid_number.set_text(DEFAULT_PID_NUMBER.to_s)
387
+ @entry_pid_number.on_button_press_event { |widget, event|
388
+ @entry_pid_number.set_focus(true)
389
+ @entry_pid_number.select_region(0, -1)
390
+ }
391
+ @entry_pid_number.on_key_press_event { |widget, event|
392
+ ensure_that_only_numbers_are_input(event)
393
+ }
394
+ # ======================================================================= #
395
+ # Next, we add the entry which allows us to choose a PID.
396
+ # ======================================================================= #
397
+ @entry_choose_pid = gtk_entry('ruby') {{ max_length: 50 }}
398
+ #@entry_choose_pid.set_text('ruby') # #greppe nach ruby
399
+ end
400
+
401
+ # ========================================================================= #
402
+ # === ensure_that_only_numbers_are_input
403
+ #
404
+ # We may only input numbers here.
405
+ # ========================================================================= #
406
+ def ensure_that_only_numbers_are_input(event)
407
+ _ = ''
408
+ case event.class
409
+ when Gdk::EventKey
410
+ my_key = Gdk::Keyval.to_name(event.keyval)
411
+ else
412
+ my_key = event
413
+ end
414
+ old_text = @entry_pid_number.text.dup # stores old text
415
+ if my_key =~ /^\d+/
416
+ _ << my_key
417
+ end
418
+ case my_key
419
+ when 'BackSpace','Delete'
420
+ @entry_pid_number.set_text('')
421
+ else
422
+ @entry_pid_number.set_text(old_text << _)
423
+ end
424
+ end
425
+
426
+ # ========================================================================= #
427
+ # === grepping_for?
428
+ # ========================================================================= #
429
+ def grepping_for?
430
+ @entry_choose_pid.text
431
+ end
432
+
433
+ # ========================================================================= #
434
+ # === grep_for
435
+ #
436
+ # This greps for all names; note that @processes must have been set
437
+ # properly.
438
+ # ========================================================================= #
439
+ def grep_for(input = grepping_for?)
440
+ pp @processes
441
+ e "Grepping for #{grepping_for?}"
442
+ @processes.each { |entry|
443
+ if entry.last.include? input
444
+ @array_commands << entry
445
+ e "Yes, #{entry.last} does include #{::Colours.steelblue(input)}."
446
+ end
447
+ }
448
+ unless @array_commands.empty?
449
+ update_listing(@array_commands)
450
+ end
451
+ report_n_rows
452
+ end
453
+
454
+ # ========================================================================= #
455
+ # === create_and_connect_tables
456
+ #
457
+ # creates and handles all of our tables. table tag
458
+ # ========================================================================= #
459
+ def create_and_connect_tables
460
+ @main_table = gtk_table(5,2,false) # 4 reihen
461
+
462
+ h_box_left_top = gtk_hbox
463
+ h_box_left_top.minimal(@button_clear_list, 2)
464
+ h_box_left_top.maximal(@button_kill_pid, 2)
465
+ @main_table.attach_defaults(h_box_left_top, 0,1, 0, 1)
466
+
467
+ @h_box_right_top = gtk_hbox
468
+ @h_box_right_top.maximal(@button_update_listing, 2)
469
+ @h_box_right_top.maximal(@button_quit, 2)
470
+ @main_table.attach_defaults(@h_box_right_top,1,2, 0,1)
471
+
472
+ @main_table.attach_defaults(
473
+ modify_label('PID to kill: ','darkblue'),0,1, 1,2
474
+ )
475
+ # @main_table.attach_defaults(@entry_pid_number,1,2, 1,2)
476
+ @main_table.attach(@entry_pid_number, 1, 2, 1, 2, nil, nil, 0, 0)
477
+ # ======================================================================= #
478
+ # Add some tooltips to @entry_pid:number.
479
+ # ======================================================================= #
480
+ name_tip = 'This input field accept numbers only. The '\
481
+ '<b>number</b> should be the PID that you '\
482
+ 'wish to kill.'
483
+ @entry_pid_number.hint = name_tip
484
+ hbox = modify_label('Grep for this:','darkblue')
485
+ @h_box_small = gtk_hbox
486
+ @h_box_small.minimal(hbox)
487
+ @h_box_small.add(@button_grep)
488
+ @main_table.attach_defaults(@h_box_small, 0,1, 2,3)
489
+ @main_table.attach_defaults(@entry_choose_pid,1,2, 2,3)
490
+
491
+ # ======================================================================= #
492
+ # Set spacing
493
+ # ======================================================================= #
494
+ @main_table.set_column_spacings(3)
495
+ end
496
+
497
+ # ========================================================================= #
498
+ # === focus_on
499
+ #
500
+ # This method specifically allows us to jump to the correct gtk-entry.
501
+ # ========================================================================= #
502
+ def focus_on(i)
503
+ case i
504
+ when '@entry_choose_pid'
505
+ @entry_choose_pid.set_focus(true)
506
+ when '@entry_pid_number'
507
+ @entry_pid_number.set_focus(true)
508
+ end
509
+ end
510
+
511
+ # ========================================================================= #
512
+ # === kill_id
513
+ #
514
+ # Kills a specific id.
515
+ #
516
+ # Usage Example:
517
+ #
518
+ # kill_id(22)
519
+ #
520
+ # ========================================================================= #
521
+ def kill_id(which_id)
522
+ which_id = which_id.to_s
523
+ the_cmd = 'kill -9 '+which_id
524
+ esystem the_cmd
525
+ end
526
+
527
+ # ========================================================================= #
528
+ # === start_thread
529
+ #
530
+ # Starts a thread.
531
+ #
532
+ # We sleep in here as well. (If you sleep in a thread, the whole program
533
+ # isnt delayed.)
534
+ # ========================================================================= #
535
+ def start_thread
536
+ efancy('Starting thread next:')
537
+ Thread.new {
538
+ loop {
539
+ efancy "Updating listing now, then sleeping for "\
540
+ "#{SLEEP_FOR_HOW_MANY_SECONDS} seconds"
541
+ update_listing
542
+ # Refresh process list every CONSTANT seconds.
543
+ sleep SLEEP_FOR_HOW_MANY_SECONDS
544
+ }
545
+ }
546
+ end
547
+
548
+ # ========================================================================= #
549
+ # === style_all_buttons_in_a_uniform_manner
550
+ # ========================================================================= #
551
+ def style_all_buttons_in_a_uniform_manner
552
+ return_all_buttons.each {|this_button| this_button.bblack1 }
553
+ end
554
+
555
+ # ========================================================================= #
556
+ # === run (run tag)
557
+ # ========================================================================= #
558
+ def run
559
+ # ======================================================================= #
560
+ # Determine the size:
561
+ # ======================================================================= #
562
+ set_size_request(width?, height?)
563
+ set_geometry
564
+ create_skeleton
565
+ populate_treeview # fill our treeview with entries.
566
+ start_thread # Supposed to make a thread
567
+ connect_skeleton # connect the skeleton parts, except for tables
568
+ update_listing # init it for the first time
569
+ style_all_buttons_in_a_uniform_manner
570
+ end
571
+
572
+ # ========================================================================= #
573
+ # === Gtk::PidDisplayer[]
574
+ # ========================================================================= #
575
+ def self.[](i = '')
576
+ new(i)
577
+ end
578
+
579
+ # ========================================================================= #
580
+ # === Gtk::PidDisplayer.run
581
+ # ======================================================================== #
582
+ def self.run
583
+ require 'gtk_paradise/run.rb'
584
+ _ = Gtk::PidDisplayer.new
585
+ r = ::Gtk.run
586
+ r.shortcut('alt+1') { 'focus_on(@entry_pid_number)' }
587
+ r.shortcut('alt+2') { 'focus_on(@entry_choose_pid)' }
588
+ r << _
589
+ r.enable_quick_exit_then_top_left_then_run
590
+ end
591
+
592
+ end; end
593
+
594
+ if __FILE__ == $PROGRAM_NAME
595
+ Gtk::PidDisplayer.run
596
+ end