libui_paradise 0.3.9 → 0.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +176 -155
  3. data/bin/libui_message +1 -1
  4. data/doc/README.gen +175 -85
  5. data/doc/todo/todo.md +9 -5
  6. data/lib/libui_paradise/autoinclude.rb +2 -1
  7. data/lib/libui_paradise/base/base.rb +17 -67
  8. data/lib/libui_paradise/base_module/base_module.rb +1514 -0
  9. data/lib/libui_paradise/colours/colours.rb +4 -4
  10. data/lib/libui_paradise/domain_specific_language/README.md +6 -0
  11. data/lib/libui_paradise/examples/complex/002_tabs_example.rb +1 -2
  12. data/lib/libui_paradise/examples/complex/003_open_file_button_example.rb +1 -1
  13. data/lib/libui_paradise/examples/complex/006_coloured_boxes_example.rb +2 -2
  14. data/lib/libui_paradise/examples/complex/007_slider_example.rb +10 -4
  15. data/lib/libui_paradise/examples/complex/008_radio_button_example.rb +2 -2
  16. data/lib/libui_paradise/examples/complex/009_separator_example.rb +2 -2
  17. data/lib/libui_paradise/examples/complex/010_table_example.rb +5 -9
  18. data/lib/libui_paradise/examples/complex/011_two_buttons_showing_how_to_enable_and_disable_them.rb +2 -1
  19. data/lib/libui_paradise/examples/complex/012_password_entry_example.rb +1 -1
  20. data/lib/libui_paradise/examples/complex/013_form_example.rb +1 -1
  21. data/lib/libui_paradise/examples/complex/014_text_example.rb +1 -1
  22. data/lib/libui_paradise/examples/complex/015_text_view_example.rb +4 -4
  23. data/lib/libui_paradise/examples/complex/016_grid_example.rb +20 -11
  24. data/lib/libui_paradise/examples/complex/017_unicode_text_example.rb +2 -2
  25. data/lib/libui_paradise/examples/complex/018_spinbutton_example.rb +1 -1
  26. data/lib/libui_paradise/examples/complex/019_combo_box_example.rb +1 -1
  27. data/lib/libui_paradise/examples/complex/020_checkbox_example.rb +5 -5
  28. data/lib/libui_paradise/examples/complex/021_font_example.rb +4 -3
  29. data/lib/libui_paradise/examples/complex/022_simple_notepad_example.rb +3 -3
  30. data/lib/libui_paradise/examples/complex/023_msg_box_error.rb +5 -5
  31. data/lib/libui_paradise/examples/complex/024_parse_config_file_example.rb +2 -2
  32. data/lib/libui_paradise/examples/complex/025_colour_button.rb +1 -1
  33. data/lib/libui_paradise/examples/complex/026_basic_table_image.rb +5 -8
  34. data/lib/libui_paradise/examples/complex/027_basic_button_example.rb +3 -3
  35. data/lib/libui_paradise/examples/complex/028_try_for_automatic_button_press_event_after_a_delay.rb +4 -5
  36. data/lib/libui_paradise/examples/complex/029_progressbar_example.rb +4 -5
  37. data/lib/libui_paradise/examples/complex/030_entry_responds_to_comment_as_synonymous_to_the_enter_key_pressed_example.rb +5 -6
  38. data/lib/libui_paradise/examples/complex/031_notification_functionality_example.rb +3 -2
  39. data/lib/libui_paradise/examples/complex/032_simple_window_example.rb +2 -1
  40. data/lib/libui_paradise/examples/complex/033_daemonize_and_exit_after_delay_example.rb +3 -2
  41. data/lib/libui_paradise/examples/complex/034_bold_text_example.rb +115 -0
  42. data/lib/libui_paradise/examples/complex/035_parse_into_table_example.rb +109 -0
  43. data/lib/libui_paradise/examples/simple/001_open_file_example.rb +1 -1
  44. data/lib/libui_paradise/examples/simple/002_histogram_example.rb +6 -6
  45. data/lib/libui_paradise/examples/simple/003_fancy_text_example.rb +63 -35
  46. data/lib/libui_paradise/examples/simple/005_text_drawing_example.rb +3 -3
  47. data/lib/libui_paradise/examples/simple/007_control_gallery.rb +2 -1
  48. data/lib/libui_paradise/examples/simple/009_spectrum.rb +7 -1
  49. data/lib/libui_paradise/examples/simple/012_table_example.rb +5 -5
  50. data/lib/libui_paradise/examples/simple/013_scrolling_pane_example.rb +28 -0
  51. data/lib/libui_paradise/examples/simple/014_simple_entry_example.rb +30 -0
  52. data/lib/libui_paradise/examples/simple/015_slider_example.rb +32 -0
  53. data/lib/libui_paradise/fiddle/fiddle.rb +771 -636
  54. data/lib/libui_paradise/libui_classes/button.rb +31 -0
  55. data/lib/libui_paradise/libui_classes/entry.rb +35 -0
  56. data/lib/libui_paradise/libui_classes/grid.rb +14 -26
  57. data/lib/libui_paradise/libui_classes/hbox.rb +39 -0
  58. data/lib/libui_paradise/libui_classes/libui_classes.rb +9 -1630
  59. data/lib/libui_paradise/libui_classes/msg_box.rb +121 -0
  60. data/lib/libui_paradise/libui_classes/msg_box_error.rb +41 -0
  61. data/lib/libui_paradise/libui_classes/slider.rb +28 -0
  62. data/lib/libui_paradise/libui_classes/spinbox.rb +48 -0
  63. data/lib/libui_paradise/libui_classes/vbox.rb +38 -0
  64. data/lib/libui_paradise/project/project.rb +2 -1
  65. data/lib/libui_paradise/prototype/prototype.rb +8 -8
  66. data/lib/libui_paradise/requires/require_the_libui_classes.rb +2 -2
  67. data/lib/libui_paradise/requires/require_the_libui_paradise_project.rb +4 -2
  68. data/lib/libui_paradise/toplevel_methods/add_to_the_registered_widgets.rb +70 -0
  69. data/lib/libui_paradise/toplevel_methods/hash_fiddle_pointer_widgets.rb +37 -0
  70. data/lib/libui_paradise/{extensions → toplevel_methods}/toplevel_counters.rb +26 -1
  71. data/lib/libui_paradise/toplevel_methods/toplevel_methods.rb +792 -0
  72. data/lib/libui_paradise/version/version.rb +2 -2
  73. data/test/testing_generic_window.rb +2 -0
  74. metadata +22 -8
  75. data/doc/SNIPPETS.md +0 -65
  76. data/lib/libui_paradise/extensions/extensions.rb +0 -979
  77. data/lib/libui_paradise/libui_classes/box.rb +0 -157
@@ -16,28 +16,16 @@ module LibuiParadise
16
16
 
17
17
  class Base # === LibuiParadise::Base
18
18
 
19
- alias e puts
19
+ require 'libui_paradise/base_module/base_module.rb'
20
+ include ::LibuiParadise::BaseModule
20
21
 
21
- require 'libui_paradise/extensions/extensions.rb'
22
- include LibuiParadise::Extensions
22
+ ::LibUI.init
23
23
 
24
24
  # ========================================================================= #
25
25
  # === TITLE
26
26
  # ========================================================================= #
27
27
  TITLE = 'Generic Title'
28
28
 
29
- # ========================================================================= #
30
- # === WIDTH
31
- #
32
- # The default width.
33
- # ========================================================================= #
34
- WIDTH = 880
35
-
36
- # ========================================================================= #
37
- # === HEIGHT
38
- # ========================================================================= #
39
- HEIGHT = 680
40
-
41
29
  # ========================================================================= #
42
30
  # === reset (reset tag)
43
31
  # ========================================================================= #
@@ -51,35 +39,6 @@ class Base # === LibuiParadise::Base
51
39
  )
52
40
  end
53
41
 
54
- # ======================================================================= #
55
- # === update_the_main_window
56
- # ======================================================================= #
57
- def update_the_main_window
58
- set_window(
59
- return_default_window
60
- )
61
- end
62
-
63
- # ======================================================================= #
64
- # === return_default_window
65
- # ======================================================================= #
66
- def return_default_window(
67
- title = title?,
68
- width = width?,
69
- height = height?
70
- )
71
- return ui_padded_main_window(title, width, height, 0)
72
- end
73
-
74
- # ========================================================================= #
75
- # === set_window
76
- #
77
- # Simply assign to @window here.
78
- # ========================================================================= #
79
- def set_window(i = return_default_window)
80
- ::LibuiParadise::Extensions.set_window(i)
81
- end
82
-
83
42
  # ========================================================================= #
84
43
  # === default_title_width_height
85
44
  # ========================================================================= #
@@ -95,12 +54,6 @@ class Base # === LibuiParadise::Base
95
54
  )
96
55
  end
97
56
 
98
- # ========================================================================= #
99
- # === create_skeleton (create tag, skeleton tag)
100
- # ========================================================================= #
101
- def create_skeleton
102
- end
103
-
104
57
  # ========================================================================= #
105
58
  # === add_these_widgets_to_the_main_window
106
59
  #
@@ -132,6 +85,9 @@ class Base # === LibuiParadise::Base
132
85
  end
133
86
  outer_vbox.minimal(this_widget)
134
87
  }
88
+ # ======================================================================= #
89
+ # Next add them to the main-window:
90
+ # ======================================================================= #
135
91
  window?.add(outer_vbox)
136
92
  if i.size > 0
137
93
  Thread.new {
@@ -144,12 +100,14 @@ class Base # === LibuiParadise::Base
144
100
  window?.intelligent_exit
145
101
  end; alias add_these_widgets add_these_widgets_to_the_main_window # === add_these_widgets
146
102
 
147
- # ========================================================================= #
148
- # === window?
149
- # ========================================================================= #
150
- def window?
151
- ::LibuiParadise::Extensions.window?
152
- end; alias main_window? window? # === main_window?
103
+ # ======================================================================= #
104
+ # === update_the_main_window
105
+ # ======================================================================= #
106
+ def update_the_main_window
107
+ set_window(
108
+ return_default_window
109
+ )
110
+ end
153
111
 
154
112
  # ========================================================================= #
155
113
  # === run_in_the_background
@@ -166,18 +124,10 @@ class Base # === LibuiParadise::Base
166
124
  end
167
125
 
168
126
  # ========================================================================= #
169
- # === create_table
127
+ # === create_the_skeleton (create tag, skeleton tag)
170
128
  # ========================================================================= #
171
- def create_table(model)
172
- LibuiParadise::Extensions.table(model)
173
- end
174
-
175
- # ========================================================================= #
176
- # === free_table_model
177
- # ========================================================================= #
178
- def free_table_model(model)
179
- ::LibUI.free_table_model(model)
180
- end
129
+ def create_the_skeleton
130
+ end; alias create_skeleton create_the_skeleton # === create_skeleton
181
131
 
182
132
  # ========================================================================= #
183
133
  # === LibuiParadise::Base[]