libui_paradise 0.2.49 → 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.
- checksums.yaml +4 -4
- data/README.md +405 -259
- data/bin/libui_message +7 -0
- data/doc/README.gen +356 -131
- data/doc/todo/todo.md +14 -5
- data/lib/libui_paradise/autoinclude.rb +2 -1
- data/lib/libui_paradise/base/base.rb +51 -62
- data/lib/libui_paradise/base_module/base_module.rb +1514 -0
- data/lib/libui_paradise/colours/colours.rb +14 -2
- data/lib/libui_paradise/domain_specific_language/README.md +6 -0
- data/lib/libui_paradise/examples/complex/002_tabs_example.rb +1 -2
- data/lib/libui_paradise/examples/complex/003_open_file_button_example.rb +3 -5
- data/lib/libui_paradise/examples/complex/006_coloured_boxes_example.rb +2 -2
- data/lib/libui_paradise/examples/complex/007_slider_example.rb +10 -4
- data/lib/libui_paradise/examples/complex/008_radio_button_example.rb +2 -2
- data/lib/libui_paradise/examples/complex/009_separator_example.rb +2 -2
- data/lib/libui_paradise/examples/complex/010_table_example.rb +139 -49
- data/lib/libui_paradise/examples/complex/011_two_buttons_showing_how_to_enable_and_disable_them.rb +2 -1
- data/lib/libui_paradise/examples/complex/012_password_entry_example.rb +1 -1
- data/lib/libui_paradise/examples/complex/013_form_example.rb +1 -1
- data/lib/libui_paradise/examples/complex/014_text_example.rb +1 -1
- data/lib/libui_paradise/examples/complex/015_text_view_example.rb +4 -4
- data/lib/libui_paradise/examples/complex/016_grid_example.rb +20 -11
- data/lib/libui_paradise/examples/complex/017_unicode_text_example.rb +2 -2
- data/lib/libui_paradise/examples/complex/018_spinbutton_example.rb +1 -1
- data/lib/libui_paradise/examples/complex/019_combo_box_example.rb +1 -1
- data/lib/libui_paradise/examples/complex/020_checkbox_example.rb +5 -5
- data/lib/libui_paradise/examples/complex/021_font_example.rb +4 -3
- data/lib/libui_paradise/examples/complex/022_simple_notepad_example.rb +3 -3
- data/lib/libui_paradise/examples/complex/023_msg_box_error.rb +5 -5
- data/lib/libui_paradise/examples/complex/024_parse_config_file_example.rb +2 -2
- data/lib/libui_paradise/examples/complex/025_colour_button.rb +1 -1
- data/lib/libui_paradise/examples/complex/026_basic_table_image.rb +5 -8
- data/lib/libui_paradise/examples/complex/027_basic_button_example.rb +3 -3
- data/lib/libui_paradise/examples/complex/028_try_for_automatic_button_press_event_after_a_delay.rb +4 -5
- data/lib/libui_paradise/examples/complex/029_progressbar_example.rb +4 -5
- data/lib/libui_paradise/examples/complex/030_entry_responds_to_comment_as_synonymous_to_the_enter_key_pressed_example.rb +5 -6
- data/lib/libui_paradise/examples/complex/031_notification_functionality_example.rb +3 -2
- data/lib/libui_paradise/examples/complex/032_simple_window_example.rb +2 -1
- data/lib/libui_paradise/examples/complex/033_daemonize_and_exit_after_delay_example.rb +3 -2
- data/lib/libui_paradise/examples/complex/034_bold_text_example.rb +115 -0
- data/lib/libui_paradise/examples/complex/035_parse_into_table_example.rb +109 -0
- data/lib/libui_paradise/examples/simple/001_open_file_example.rb +1 -1
- data/lib/libui_paradise/examples/simple/002_histogram_example.rb +6 -6
- data/lib/libui_paradise/examples/simple/003_fancy_text_example.rb +80 -43
- data/lib/libui_paradise/examples/simple/005_text_drawing_example.rb +11 -11
- data/lib/libui_paradise/examples/simple/007_control_gallery.rb +21 -14
- data/lib/libui_paradise/examples/simple/009_spectrum.rb +7 -1
- data/lib/libui_paradise/examples/simple/010_font_button.rb +31 -0
- data/lib/libui_paradise/examples/simple/011_simple_notepad.rb +24 -0
- data/lib/libui_paradise/examples/simple/012_table_example.rb +71 -0
- data/lib/libui_paradise/examples/simple/013_scrolling_pane_example.rb +28 -0
- data/lib/libui_paradise/examples/simple/014_simple_entry_example.rb +30 -0
- data/lib/libui_paradise/examples/simple/015_slider_example.rb +32 -0
- data/lib/libui_paradise/fiddle/{pointer.rb → fiddle.rb} +768 -615
- data/lib/libui_paradise/generic_window/generic_window.rb +1 -1
- data/lib/libui_paradise/images/README.md +5 -2
- data/lib/libui_paradise/libui_classes/button.rb +31 -0
- data/lib/libui_paradise/libui_classes/entry.rb +35 -0
- data/lib/libui_paradise/libui_classes/grid.rb +14 -23
- data/lib/libui_paradise/libui_classes/hbox.rb +39 -0
- data/lib/libui_paradise/libui_classes/libui_classes.rb +9 -1595
- data/lib/libui_paradise/libui_classes/msg_box.rb +121 -0
- data/lib/libui_paradise/libui_classes/msg_box_error.rb +41 -0
- data/lib/libui_paradise/libui_classes/slider.rb +28 -0
- data/lib/libui_paradise/libui_classes/spinbox.rb +48 -0
- data/lib/libui_paradise/libui_classes/vbox.rb +38 -0
- data/lib/libui_paradise/project/project.rb +6 -1
- data/lib/libui_paradise/prototype/prototype.rb +8 -10
- data/lib/libui_paradise/requires/require_the_libui_classes.rb +2 -2
- data/lib/libui_paradise/requires/require_the_libui_paradise_project.rb +5 -3
- data/lib/libui_paradise/toplevel_methods/add_to_the_registered_widgets.rb +70 -0
- data/lib/libui_paradise/toplevel_methods/hash_fiddle_pointer_widgets.rb +37 -0
- data/lib/libui_paradise/toplevel_methods/toplevel_counters.rb +83 -0
- data/lib/libui_paradise/toplevel_methods/toplevel_methods.rb +792 -0
- data/lib/libui_paradise/version/version.rb +2 -2
- data/lib/libui_paradise.rb +0 -0
- data/libui_paradise.gemspec +5 -4
- data/test/testing_generic_window.rb +2 -0
- metadata +35 -30
- data/doc/SNIPPETS.md +0 -94
- data/lib/libui_paradise/extensions/counters.rb +0 -58
- data/lib/libui_paradise/extensions/extensions.rb +0 -29
- data/lib/libui_paradise/extensions/hash_fiddle_pointer_widgets.rb +0 -150
- data/lib/libui_paradise/extensions/misc.rb +0 -754
- data/lib/libui_paradise/libui_classes/box.rb +0 -156
- data/lib/libui_paradise/toplevel_methods/misc.rb +0 -13
data/doc/todo/todo.md
CHANGED
|
@@ -1,16 +1,25 @@
|
|
|
1
|
+
------------------------------------------------------------------------------------
|
|
1
2
|
- Make sure that each component has a screenshot. It's ok to
|
|
2
3
|
re-use existing screenshots from other projects.
|
|
4
|
+
Perhaps also look at the examples again to show how this
|
|
5
|
+
can be used.
|
|
3
6
|
|
|
4
|
-
|
|
5
|
-
|
|
7
|
+
What is missing still?
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
------------------------------------------------------------------------------------
|
|
6
11
|
- Rewrite the project from the get-go. Also integrate
|
|
7
12
|
@main_window into the main hash, rather than have it
|
|
8
13
|
standalone. ^^^ this should be fixed ASAP - it is not
|
|
9
14
|
elegant to have a separate @main_window ... but for
|
|
10
15
|
now we'll keep it as-is.
|
|
11
|
-
|
|
16
|
+
As we rewrite it, improve the documentation.
|
|
17
|
+
------------------------------------------------------------------------------------
|
|
18
|
+
- Make sure the project is API compatible to glimmer-libui.
|
|
19
|
+
------------------------------------------------------------------------------------
|
|
12
20
|
- Re-organize the examples, perhaps starting with another
|
|
13
21
|
one.
|
|
14
|
-
|
|
22
|
+
------------------------------------------------------------------------------------
|
|
15
23
|
- Check for image and font support again. Something isn't
|
|
16
|
-
working!
|
|
24
|
+
working there!
|
|
25
|
+
------------------------------------------------------------------------------------
|
|
@@ -3,6 +3,11 @@
|
|
|
3
3
|
# frozen_string_literal: true
|
|
4
4
|
# =========================================================================== #
|
|
5
5
|
# === LibuiParadise::Base
|
|
6
|
+
#
|
|
7
|
+
# Usage example:
|
|
8
|
+
#
|
|
9
|
+
# LibuiParadise::Base.new(ARGV)
|
|
10
|
+
#
|
|
6
11
|
# =========================================================================== #
|
|
7
12
|
# require 'libui_paradise/base/base.rb'
|
|
8
13
|
# < LibuiParadise::Base
|
|
@@ -11,10 +16,10 @@ module LibuiParadise
|
|
|
11
16
|
|
|
12
17
|
class Base # === LibuiParadise::Base
|
|
13
18
|
|
|
14
|
-
|
|
19
|
+
require 'libui_paradise/base_module/base_module.rb'
|
|
20
|
+
include ::LibuiParadise::BaseModule
|
|
15
21
|
|
|
16
|
-
|
|
17
|
-
include LibuiParadise::Extensions
|
|
22
|
+
::LibUI.init
|
|
18
23
|
|
|
19
24
|
# ========================================================================= #
|
|
20
25
|
# === TITLE
|
|
@@ -22,14 +27,17 @@ class Base # === LibuiParadise::Base
|
|
|
22
27
|
TITLE = 'Generic Title'
|
|
23
28
|
|
|
24
29
|
# ========================================================================= #
|
|
25
|
-
# ===
|
|
26
|
-
# ========================================================================= #
|
|
27
|
-
WIDTH = 800
|
|
28
|
-
|
|
29
|
-
# ========================================================================= #
|
|
30
|
-
# === HEIGHT
|
|
30
|
+
# === reset (reset tag)
|
|
31
31
|
# ========================================================================= #
|
|
32
|
-
|
|
32
|
+
def reset
|
|
33
|
+
title_width_height(TITLE, WIDTH, HEIGHT)
|
|
34
|
+
# ======================================================================= #
|
|
35
|
+
# === @window
|
|
36
|
+
# ======================================================================= #
|
|
37
|
+
set_window(
|
|
38
|
+
return_default_window
|
|
39
|
+
)
|
|
40
|
+
end
|
|
33
41
|
|
|
34
42
|
# ========================================================================= #
|
|
35
43
|
# === default_title_width_height
|
|
@@ -46,54 +54,6 @@ class Base # === LibuiParadise::Base
|
|
|
46
54
|
)
|
|
47
55
|
end
|
|
48
56
|
|
|
49
|
-
# ========================================================================= #
|
|
50
|
-
# === reset (reset tag)
|
|
51
|
-
# ========================================================================= #
|
|
52
|
-
def reset
|
|
53
|
-
title_width_height(TITLE, WIDTH, HEIGHT)
|
|
54
|
-
# ======================================================================= #
|
|
55
|
-
# === @window
|
|
56
|
-
# ======================================================================= #
|
|
57
|
-
set_window(
|
|
58
|
-
return_default_window
|
|
59
|
-
)
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
# ======================================================================= #
|
|
63
|
-
# === update_the_main_window
|
|
64
|
-
# ======================================================================= #
|
|
65
|
-
def update_the_main_window
|
|
66
|
-
set_window(
|
|
67
|
-
return_default_window
|
|
68
|
-
)
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# ======================================================================= #
|
|
72
|
-
# === return_default_window
|
|
73
|
-
# ======================================================================= #
|
|
74
|
-
def return_default_window(
|
|
75
|
-
title = title?,
|
|
76
|
-
width = width?,
|
|
77
|
-
height = height?
|
|
78
|
-
)
|
|
79
|
-
return ui_padded_main_window(title, width, height, 0)
|
|
80
|
-
end
|
|
81
|
-
|
|
82
|
-
# ======================================================================= #
|
|
83
|
-
# === set_window
|
|
84
|
-
#
|
|
85
|
-
# Simply assign to @window here.
|
|
86
|
-
# ======================================================================= #
|
|
87
|
-
def set_window(i = return_default_window)
|
|
88
|
-
@window = i
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
# ========================================================================= #
|
|
92
|
-
# === create_skeleton (create tag, skeleton tag)
|
|
93
|
-
# ========================================================================= #
|
|
94
|
-
def create_skeleton
|
|
95
|
-
end
|
|
96
|
-
|
|
97
57
|
# ========================================================================= #
|
|
98
58
|
# === add_these_widgets_to_the_main_window
|
|
99
59
|
#
|
|
@@ -125,7 +85,10 @@ class Base # === LibuiParadise::Base
|
|
|
125
85
|
end
|
|
126
86
|
outer_vbox.minimal(this_widget)
|
|
127
87
|
}
|
|
128
|
-
|
|
88
|
+
# ======================================================================= #
|
|
89
|
+
# Next add them to the main-window:
|
|
90
|
+
# ======================================================================= #
|
|
91
|
+
window?.add(outer_vbox)
|
|
129
92
|
if i.size > 0
|
|
130
93
|
Thread.new {
|
|
131
94
|
sleep 5
|
|
@@ -134,9 +97,18 @@ class Base # === LibuiParadise::Base
|
|
|
134
97
|
exit
|
|
135
98
|
}
|
|
136
99
|
end
|
|
137
|
-
|
|
100
|
+
window?.intelligent_exit
|
|
138
101
|
end; alias add_these_widgets add_these_widgets_to_the_main_window # === add_these_widgets
|
|
139
102
|
|
|
103
|
+
# ======================================================================= #
|
|
104
|
+
# === update_the_main_window
|
|
105
|
+
# ======================================================================= #
|
|
106
|
+
def update_the_main_window
|
|
107
|
+
set_window(
|
|
108
|
+
return_default_window
|
|
109
|
+
)
|
|
110
|
+
end
|
|
111
|
+
|
|
140
112
|
# ========================================================================= #
|
|
141
113
|
# === run_in_the_background
|
|
142
114
|
# ========================================================================= #
|
|
@@ -145,10 +117,27 @@ class Base # === LibuiParadise::Base
|
|
|
145
117
|
end
|
|
146
118
|
|
|
147
119
|
# ========================================================================= #
|
|
148
|
-
# === run
|
|
120
|
+
# === run (run tag)
|
|
149
121
|
# ========================================================================= #
|
|
150
122
|
def run
|
|
151
123
|
create_skeleton_then_connect_skeleton
|
|
152
124
|
end
|
|
153
125
|
|
|
154
|
-
|
|
126
|
+
# ========================================================================= #
|
|
127
|
+
# === create_the_skeleton (create tag, skeleton tag)
|
|
128
|
+
# ========================================================================= #
|
|
129
|
+
def create_the_skeleton
|
|
130
|
+
end; alias create_skeleton create_the_skeleton # === create_skeleton
|
|
131
|
+
|
|
132
|
+
# ========================================================================= #
|
|
133
|
+
# === LibuiParadise::Base[]
|
|
134
|
+
# ========================================================================= #
|
|
135
|
+
def self.[](i = ARGV)
|
|
136
|
+
new(i)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
end; end
|
|
140
|
+
|
|
141
|
+
if __FILE__ == $PROGRAM_NAME
|
|
142
|
+
LibuiParadise::Base.new(ARGV)
|
|
143
|
+
end # base.rb
|