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,32 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ require 'gtk3'
6
+
7
+ alias e puts
8
+
9
+ # =========================================================================== #
10
+ # === handle_on_click_action
11
+ # =========================================================================== #
12
+ def handle_on_click_action(box, event)
13
+ e "x position: #{event.x.round(0)}, "\
14
+ "y position: #{event.y.round(0)}"
15
+ end
16
+
17
+ window = Gtk::Window.new
18
+
19
+ icon_theme = Gtk::IconTheme.default
20
+ icon = icon_theme.load_icon('window-close', 32, 0) # Use the window-close example.
21
+ image = Gtk::Image.new(pixbuf: icon) # Use the icon here.
22
+ event_box = Gtk::EventBox.new
23
+ event_box.add(image)
24
+ event_box.set_size_request(800, 400)
25
+ event_box.signal_connect(:button_press_event) {|widget, event|
26
+ handle_on_click_action(widget, event)
27
+ }
28
+ window.add(event_box)
29
+ window.show_all
30
+ window.move(0, 0)
31
+
32
+ Gtk.main
@@ -0,0 +1,173 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # 'css_example.rb'
6
+ # =========================================================================== #
7
+ require 'gtk3'
8
+
9
+ # =========================================================================== #
10
+ # === USE_THIS_AS_THE_CSS_STRING
11
+ # =========================================================================== #
12
+ USE_THIS_AS_THE_CSS_STRING = <<-EOF
13
+
14
+ button {
15
+ background-image: none;
16
+ background-color: yellow;
17
+ border: 3px solid black;
18
+ }
19
+
20
+ button:hover {
21
+ color: royalblue;
22
+ background-color: cyan;
23
+ transition: 4000ms linear;
24
+ border: 3px solid lightgreen;
25
+ }
26
+
27
+ label {
28
+ font-size: 42px;
29
+ font-weight: 800;
30
+ color: steelblue;
31
+ }
32
+
33
+ button:hover label {
34
+ color: blue;
35
+ }
36
+
37
+ button:active {
38
+ background-color: green;
39
+ }
40
+
41
+ button:active label {
42
+ color: white;
43
+ }
44
+
45
+ #yellow_background {
46
+ background: yellow;
47
+ }
48
+
49
+ #lightgreen_background {
50
+ background: lightgreen;
51
+ }
52
+
53
+ #combo_box_text1 {
54
+ border: 10px solid steelblue;
55
+ }
56
+
57
+ GtkCheckButton {
58
+ -gtk-icon-source: -gtk-scaled(
59
+ url('checkbox-unchecked.jpg'),
60
+ url('checkbox-unchecked@2.jpg')
61
+ );
62
+ }
63
+
64
+ label#foo-bar {
65
+ font: 120px Sans;
66
+ }
67
+
68
+ #fancy_text_shadow {
69
+ text-shadow: 5px 5px 5px royalblue;
70
+ border-radius: 5px;
71
+ box-shadow: 0px 0px 5px black;
72
+ }
73
+
74
+ image {
75
+ border: 40px solid black;
76
+ border-radius: 50%
77
+ }
78
+
79
+ image:hover {
80
+ transition: 1s linear;
81
+ background-color: #00ff00
82
+ }
83
+
84
+ #vbox1 {
85
+ background-image: none;
86
+ padding: 10px;
87
+ border: 3px solid steelblue;
88
+ }
89
+
90
+ #vbox1:hover {
91
+ background-image: none;
92
+ border: 3px solid royalblue;
93
+ background-color: blue;
94
+ }
95
+
96
+ entry:hover {
97
+ background-color: tomato;
98
+ }
99
+
100
+ #transparent1 {
101
+ box-shadow: 0 0 0 5px rgba(0, 20, 0, 0.23), 0 0 25px 50px transparent;
102
+ }
103
+
104
+ EOF
105
+
106
+ application = Gtk::Application.new
107
+ application.signal_connect(:activate) {
108
+ # ========================================================================= #
109
+ # We have to pass the CSS into Gtk::CssProvider. We will pass the
110
+ # above-defined constant to this.
111
+ # ========================================================================= #
112
+ provider = Gtk::CssProvider.new
113
+ provider.load(data: USE_THIS_AS_THE_CSS_STRING)
114
+ Gtk::StyleContext.add_provider_for_screen(
115
+ Gdk::Screen.default,
116
+ provider,
117
+ Gtk::StyleProvider::PRIORITY_APPLICATION
118
+ )
119
+
120
+ window = Gtk::ApplicationWindow.new(application)
121
+ window.set_size_request(1000, 800)
122
+
123
+ button_example = Gtk::Button.new(label: 'Button')
124
+ button_example.set_size_request(100, -1)
125
+ button_example.signal_connect(:clicked) { puts 'Hello!' }
126
+
127
+ check_button = Gtk::CheckButton.new
128
+
129
+ entry_example1 = Gtk::Entry.new
130
+ entry_example1.set_name('lightgreen_background')
131
+ entry_example2 = Gtk::Entry.new
132
+ entry_example2.set_name('yellow_background')
133
+
134
+ fixed = Gtk::Fixed.new
135
+ fixed.put(button_example, 50, 10)
136
+ fixed.put(entry_example1, 250, 120)
137
+ fixed.put(entry_example2, 250, 180)
138
+ fixed.put(check_button, 250, 280)
139
+ label_test = Gtk::Label.new('Test!')
140
+ label_test.set_name('foo-bar')
141
+ fixed.put(label_test, 250, 320)
142
+ image = Gtk::Image.new(
143
+ file: '/home/x/DATA/PROGRAMMING_LANGUAGES/RUBY/src/'\
144
+ 'gtk_paradise/lib/gtk_paradise/images/misc/'\
145
+ 'sample_image.png'
146
+ )
147
+ fixed.put(image, 160, 230)
148
+ label1 = Gtk::Label.new('Fancy Text Shadow')
149
+ label1.set_name('fancy_text_shadow')
150
+ fixed.put(label1, 250, 480)
151
+
152
+ vbox2 = Gtk::Box.new(:vertical)
153
+ vbox2.set_name('vbox2')
154
+ combo_box_text1 = Gtk::ComboBoxText.new
155
+ ['one','two','three'].each {|entry|
156
+ combo_box_text1.append_text(entry)
157
+ }
158
+
159
+ combo_box_text1.set_name('combo_box_text1')
160
+ vbox2.add(combo_box_text1)
161
+ vbox2.set_name('transparent1')
162
+
163
+ fixed.put(vbox2, 250, 780)
164
+ vbox1 = Gtk::Box.new(:vertical)
165
+ vbox1.set_name('vbox1')
166
+ vbox1.add(Gtk::Label.new('Hey there!'))
167
+ vbox1.set_name('transparent1')
168
+ fixed.put(vbox1, 550, 780)
169
+ window << fixed
170
+ window.show_all
171
+ window.move(0, 0)
172
+ }
173
+ application.run
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # $GTK_PARADISE/examples/gtk3/accel_group_example.rb
6
+ # =========================================================================== #
7
+ require 'gtk3'
8
+
9
+ window = Gtk::Window.new
10
+ @accel_group = Gtk::AccelGroup.new
11
+ window.add_accel_group(@accel_group)
12
+ @entry = Gtk::Entry.new
13
+ # =========================================================================== #
14
+ # Enable alt+w combination next:
15
+ # =========================================================================== #
16
+ @accel_group.connect(Gdk::Keyval::KEY_W, :mod1_mask, :visible) { # CONTROL_MASK ist strg
17
+ puts 'They alt+w combination was pressed.'
18
+ @entry.set_text('The key was pressed')
19
+ }
20
+ box = Gtk::Box.new(:horizontal)
21
+ box.add(Gtk::Label.new('Press alt+w key combination '))
22
+ box.add(@entry)
23
+ window.add(box)
24
+ window.show_all
25
+ window.set_size_request(600, 50)
26
+ window.move(0, 0)
27
+ Gtk.main
@@ -0,0 +1,68 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # $GTK_PARADISE/examples/gtk3/change_the_application_theme.rb
6
+ # =========================================================================== #
7
+ require 'gtk3'
8
+
9
+ app = Gtk::Application.new('org.xfce-colour.example', :flags_none)
10
+
11
+ Gtk::Settings.default.set_gtk_theme_name(ARGV.first) if ARGV.first
12
+
13
+ # =========================================================================== #
14
+ # There are other methods, for example:
15
+ #
16
+ # Gtk::Settings.default.gtk_application_prefer_dark_theme = true
17
+ #
18
+ # =========================================================================== #
19
+ IMAGE_TO_USE = '/home/x/DATA/images/SMALL_PLANE.png'
20
+ app.signal_connect(:activate) { |a|
21
+ w = Gtk::ApplicationWindow.new(a)
22
+ w.set_title('XFCE Colour')
23
+ w.set_icon(
24
+ IMAGE_TO_USE
25
+ )
26
+ w.set_default_size(70, 70)
27
+ # Arrange the widgets into a grid next.
28
+ g = Gtk::Grid.new
29
+ w.add(g)
30
+
31
+ b1 = Gtk::Button.new(label: 'Button')
32
+ g.attach(b1, 0, 0, 1, 1)
33
+
34
+ b2 = Gtk::CheckButton.new('')
35
+ g.attach(b2, 1, 0, 1, 1)
36
+
37
+ # The Radio button does not appear to work.
38
+ b3 = Gtk::RadioButton.new(label: 'abc')
39
+ g.attach(b3, 2, 0, 1, 1)
40
+
41
+ b4 = Gtk::SearchEntry.new
42
+ g.attach(b4, 3, 0, 1, 1)
43
+
44
+ b5 = Gtk::ToggleButton.new(label: 'Button')
45
+ g.attach(b5, 0, 1, 1, 1)
46
+
47
+ b6 = Gtk::ColorButton.new
48
+ g.attach(b6, 1, 1, 1, 1)
49
+
50
+ # class Switch has a strange, small close-button to the right hand side.
51
+ b7 = Gtk::Switch.new
52
+ g.attach(b7, 2, 1, 1, 1)
53
+
54
+ b8 = Gtk::Entry.new
55
+ g.attach(b8, 3, 1, 1, 1)
56
+
57
+ [b1, b2, b3, b4, b5, b6, b7, b8].each { |b|
58
+ begin
59
+ b.margin = 6
60
+ rescue Exception
61
+ puts $!
62
+ end
63
+ }
64
+ w.show_all
65
+ w.move(0, 0)
66
+ }
67
+
68
+ app.run
@@ -0,0 +1,58 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'gtk_paradise/examples/gtk3/header_bar_example.rb'
6
+ # =========================================================================== #
7
+ require 'gtk3'
8
+
9
+ alias e puts
10
+
11
+ window = Gtk::Window.new
12
+ window.set_border_width(12)
13
+ window.set_size_request(520, 420)
14
+ window.signal_connect(:destroy) { Gtk.main_quit }
15
+
16
+ box = Gtk::Box.new(:vertical)
17
+ # =========================================================================== #
18
+ # Create the header-bar next:
19
+ # =========================================================================== #
20
+ header_bar = Gtk::HeaderBar.new
21
+ header_bar.show_close_button = true
22
+ header_bar.title = 'HeaderBar example'
23
+ header_bar.subtitle = 'And this is the subtitle to use'
24
+ header_bar.spacing = 22
25
+
26
+ button = Gtk::Button.new
27
+ icon = Gio::ThemedIcon.new('mail-send-receive-symbolic')
28
+ image = Gtk::Image.new(icon: icon, size: :button)
29
+ button.set_image(image)
30
+ header_bar.pack_end(button)
31
+
32
+ button = Gtk::Button.new
33
+ icon = Gio::ThemedIcon.new('mail-send-receive')
34
+ image = Gtk::Image.new(icon: icon, size: :button)
35
+ button.set_image(image)
36
+ header_bar.pack_end(button)
37
+
38
+ button = Gtk::Button.new
39
+ icon = Gio::ThemedIcon.new('pan-end-symbolic')
40
+ image = Gtk::Image.new(icon: icon, size: ::Gtk::IconSize::MENU)
41
+ button.set_image(image)
42
+ header_bar.pack_end(button)
43
+
44
+ button = Gtk::Button.new
45
+ button.signal_connect(:clicked) { e 'This may be used for a document-open action.' }
46
+ _ = ::Gtk::IconTheme.default.load_icon('document-open', 32, 0)
47
+ result = ::Gtk::Image.new(pixbuf: _)
48
+ button.add(result)
49
+
50
+ header_bar.add(button)
51
+
52
+ header_bar.set_size_request(820, 60)
53
+ box.add(header_bar)
54
+ box.pack_start(Gtk::TextView.new, expand: true, fill: true)
55
+ window << box
56
+ window.show_all
57
+ window.move(0, 0)
58
+ Gtk.main
@@ -0,0 +1,86 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # This is just a simple gtk-label example for ruby-gtk3.
6
+ # =========================================================================== #
7
+ require 'gtk3'
8
+
9
+ ::Gtk::Settings.default.gtk_font_name = 'Hack 18'
10
+
11
+ heredoc = <<-EOF
12
+ Hello world!
13
+
14
+ This is an example for a more complicated Gtk::Label.
15
+
16
+ You can use markup, thus colours, by making use of:
17
+
18
+ .set_text()
19
+
20
+ and
21
+
22
+ .use_markup = true
23
+
24
+ Some <a href="http://en.wikipedia.org/wiki/Text" title="plain text">text</a>
25
+ may be marked up as hyperlinks, which can be clicked
26
+ or activated via <a href="keynav">keynav</a>
27
+ and they work fine with other markup, like when
28
+ searching on <a href="http://www.google.com/">
29
+ <span color="#0266C8">G</span><span color="#F90101">o</span>
30
+ <span color="#F2B50F">o</span><span color="#0266C8">g</span>
31
+ <span color="#00933B">l</span><span color="#F90101">e</span>
32
+ </a>
33
+ EOF
34
+
35
+
36
+ w = Gtk::Window.new
37
+
38
+ hbox = Gtk::Box.new(:vertical)
39
+
40
+ label1 = Gtk::Label.new
41
+ label1.set_text(heredoc)
42
+ label1.use_markup = true
43
+ hbox.add(label1)
44
+
45
+ label2 = Gtk::Label.new(
46
+ ' This is the second label - it is shifted',
47
+ use_underline: true
48
+ )
49
+ label2.angle = 5
50
+ hbox.add(label2)
51
+
52
+ label3 = Gtk::Label.new('And this is aligned to the right hand side.')
53
+ label3.set_alignment(1, 1)
54
+ hbox.add(label3)
55
+
56
+
57
+ content = <<-EOF
58
+ This is an example of a line-wrapped label.
59
+ should not be taking up the entire
60
+
61
+ width allocated to it, but automatically
62
+ wraps the words to fit.\n
63
+
64
+ It supports multiple paragraphs correctly,
65
+ and correctly
66
+ adds
67
+ many
68
+ extra spaces.
69
+
70
+ EOF
71
+ label4 = Gtk::Label.new(content)
72
+ label4.set_line_wrap(true)
73
+ label4.set_max_width_chars(32)
74
+ hbox.add(label4)
75
+
76
+ hbox.show_all
77
+
78
+ scrolled_window = Gtk::ScrolledWindow.new
79
+ scrolled_window.add_with_viewport(hbox)
80
+ scrolled_window.set_policy(:automatic, :always)
81
+
82
+ w.add(scrolled_window)
83
+ w.show_all
84
+ w.set_size_request(720, 650)
85
+ w.move(0, 0)
86
+ Gtk.main
@@ -0,0 +1,58 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # This example will only work on ruby-gtk3.
6
+ # =========================================================================== #
7
+ # $GTK_PARADISE/examples/gtk3/popover_example.rb
8
+ # =========================================================================== #
9
+ require 'gtk3'
10
+
11
+ class PopoverWindow < Gtk::Window
12
+
13
+ Gtk::Settings.default.gtk_font_name = 'DejaVu Sans Mono 22'
14
+
15
+ # ========================================================================= #
16
+ # === initialize
17
+ # ========================================================================= #
18
+ def initialize
19
+ super()
20
+ set_title 'Popover Demo'
21
+ set_border_width(25)
22
+ set_default_size(550, 550)
23
+ outerbox = Gtk::Box.new(:vertical, spacing = 8)
24
+ add(outerbox)
25
+ button = Gtk::Button.new(label: 'Click on me')
26
+ button.signal_connect(:clicked) {
27
+ do_reveal_the_popover
28
+ }
29
+ outerbox.pack_start(button, fill: false, expand: true, padding: 0)
30
+ # Create the popover next.
31
+ @popover = Gtk::Popover.new
32
+ vbox = Gtk::Box.new(:vertical)
33
+ vbox.pack_start(
34
+ Gtk::Label.new(label = 'Example'),
35
+ fill: false, expand: true, padding: 10
36
+ )
37
+ @popover.add(vbox)
38
+ @popover.set_position(:bottom)
39
+ @popover.set_relative_to(button)
40
+ @popover.show_all
41
+ end
42
+
43
+ # ========================================================================= #
44
+ # === do_reveal_the_popover
45
+ # ========================================================================= #
46
+ def do_reveal_the_popover
47
+ @popover.popup
48
+ end
49
+
50
+ end
51
+
52
+ if __FILE__ == $PROGRAM_NAME
53
+ win = PopoverWindow.new
54
+ win.signal_connect(:destroy) { Gtk.main_quit }
55
+ win.move(0, 0)
56
+ win.show_all
57
+ Gtk.main
58
+ end
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ require 'gtk3'
6
+
7
+ alias e puts
8
+
9
+ e 'Enter "G", "t" on the entry box, a dropdown will appear.'
10
+
11
+ # =========================================================================== #
12
+ # === ARRAY_COMPLETE_TO_THESE_ENTRIES
13
+ # =========================================================================== #
14
+ ARRAY_COMPLETE_TO_THESE_ENTRIES = %w( GNOME GNAME total totally tota )
15
+
16
+ window = Gtk::Window.new
17
+ window.set_default_size(300, 00)
18
+ window.move(0, 0)
19
+ entry = Gtk::Entry.new
20
+ completion = Gtk::EntryCompletion.new
21
+ completion.signal_connect(:match_selected) {|widget, event|
22
+ e 'A match was selected. The text so far is: '+
23
+ entry.text.to_s
24
+ Thread.new {
25
+ sleep 2 # This just demonstrates that you can use a delay to get the true value.
26
+ e entry.text.to_s
27
+ }
28
+ false
29
+ }
30
+
31
+ entry.completion = completion
32
+
33
+ model = Gtk::ListStore.new(String)
34
+
35
+ ARRAY_COMPLETE_TO_THESE_ENTRIES.each { |v|
36
+ iter = model.append
37
+ iter[0] = v
38
+ }
39
+
40
+ completion.model = model
41
+ completion.text_column = 0
42
+
43
+ window.add(entry).show_all.signal_connect(:destroy) { Gtk.main_quit }
44
+ Gtk.main
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # $GTK_PARADISE/examples/gtk3/svg_viewer.rb
6
+ # =========================================================================== #
7
+ require 'gtk3'
8
+ require 'rsvg2'
9
+
10
+ alias e puts
11
+
12
+ if ARGV.empty?
13
+ e "usage: #{$0} input.svg"
14
+ exit(-1)
15
+ end
16
+
17
+ input = ARGV.shift
18
+
19
+ handle = Rsvg::Handle.new(path: input)
20
+ width, height = handle.dimensions.to_a
21
+
22
+ window = Gtk::Window.new
23
+ window.set_default_size(width, height)
24
+ window.signal_connect(:destroy) { Gtk.main_quit }
25
+
26
+ # =========================================================================== #
27
+ # The content of the .svg file will be put onto a Gtk::DrawingArea.
28
+ # =========================================================================== #
29
+ area = Gtk::DrawingArea.new
30
+ area.signal_connect(:draw) { |widget, _event|
31
+ cairon_context = widget.window.create_cairo_context
32
+ window_width, window_height = widget.window.width, widget.window.height
33
+ cairon_context.scale(
34
+ window_width.to_f / width,
35
+ window_height.to_f / height
36
+ )
37
+ cairon_context.render_rsvg_handle(handle)
38
+ }
39
+
40
+ window.add(area)
41
+ window.move(0, 0)
42
+ window.show_all
43
+ Gtk.main # svg_viewer /pig.svg
@@ -0,0 +1,92 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # $GTK_PARADISE/examples/gtk3/button_demo.rb
6
+ # =========================================================================== #
7
+ require 'gtk3'
8
+
9
+ class ButtonWindow < Gtk::Window
10
+
11
+ alias e puts
12
+
13
+ # ========================================================================= #
14
+ # === initialize
15
+ # ========================================================================= #
16
+ def initialize
17
+ super()
18
+ set_title 'Button Demo (border-width: 15)'
19
+ set_border_width(15)
20
+
21
+ @hbox = Gtk::Box.new(:horizontal, spacing = 6)
22
+
23
+ button = Gtk::Button.new(label: 'Click Me')
24
+ button.signal_connect(:clicked) { on_click_me_clicked }
25
+ @hbox.pack_start(button)
26
+
27
+ button = Gtk::Button.new(icon_name: 'gtk-open')
28
+ button.signal_connect(:clicked) { e 'Just a button with an image.' }
29
+ @hbox.pack_start(button)
30
+
31
+ button = Gtk::Button.new(mnemonic: '_Open')
32
+ button.signal_connect(:clicked) { on_open_clicked }
33
+ @hbox.pack_start(button)
34
+
35
+ button = Gtk::Button.new(mnemonic: '_Close')
36
+ button.signal_connect(:clicked) { on_close_clicked }
37
+ @hbox.pack_start(button)
38
+
39
+ new_vbox = Gtk::Box.new(:vertical)
40
+ button_dont_expand = Gtk::Button.new(mnemonic: '_No Expand')
41
+ button_dont_expand.set_hexpand(false)
42
+ # button_dont_expand.set_halign(Gtk::Alignment::CENTER)
43
+ button_dont_expand.set_xalign(0.5)
44
+ button_dont_expand.set_vexpand(false)
45
+ # button_dont_expand.set_valign(Gtk::Alignment::CENTER)
46
+ button_dont_expand.signal_connect(:clicked) {
47
+ e 'This button will not expand upon resizing.'
48
+ }
49
+ new_vbox.add(button_dont_expand)
50
+ @hbox.pack_start(new_vbox)
51
+ connect_skeleton
52
+ end
53
+
54
+ # ========================================================================= #
55
+ # === connect_skeleton
56
+ # ========================================================================= #
57
+ def connect_skeleton
58
+ add(@hbox)
59
+ end
60
+
61
+ # ========================================================================= #
62
+ # === on_click_me_clicked
63
+ # ========================================================================= #
64
+ def on_click_me_clicked
65
+ puts '"Click me" button was clicked'
66
+ end
67
+
68
+ # ========================================================================= #
69
+ # === on_open_clicked
70
+ # ========================================================================= #
71
+ def on_open_clicked
72
+ puts '"Open" button was clicked'
73
+ end
74
+
75
+ # ========================================================================= #
76
+ # === on_close_clicked
77
+ # ========================================================================= #
78
+ def on_close_clicked
79
+ puts 'Closing application'
80
+ Gtk.main_quit
81
+ end
82
+
83
+ end
84
+
85
+ if __FILE__ == $PROGRAM_NAME
86
+ win = ButtonWindow.new
87
+ win.signal_connect(:destroy) { Gtk.main_quit }
88
+ win.set_size_request(800, 300)
89
+ win.move(0, 0)
90
+ win.show_all
91
+ Gtk.main
92
+ end