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
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/ruby -w
|
|
2
|
-
# Encoding: UTF-8
|
|
3
|
-
# frozen_string_literal: true
|
|
4
|
-
# =========================================================================== #
|
|
5
|
-
# require 'libui_paradise/libui_classes/box.rb'
|
|
6
|
-
# =========================================================================== #
|
|
7
|
-
module LibuiParadise
|
|
8
|
-
|
|
9
|
-
module Extensions # === LibuiParadise::Extensions
|
|
10
|
-
|
|
11
|
-
# ========================================================================= #
|
|
12
|
-
# === LibuiParadise::Extensions.vbox (vbox tag)
|
|
13
|
-
#
|
|
14
|
-
# This method will create a vertical box.
|
|
15
|
-
# ========================================================================= #
|
|
16
|
-
def self.vbox(*optional_widgets)
|
|
17
|
-
_ = ::LibUI.new_vertical_box
|
|
18
|
-
add_to_the_registered_widgets(_, __method__)
|
|
19
|
-
if optional_widgets and !optional_widgets.empty?
|
|
20
|
-
optional_widgets.flatten.each {|this_widget| _ << this_widget }
|
|
21
|
-
end
|
|
22
|
-
return _
|
|
23
|
-
end; self.instance_eval { alias ui_vbox vbox } # === ui_vbox
|
|
24
|
-
|
|
25
|
-
# ========================================================================= #
|
|
26
|
-
# === ui_padded_vbox
|
|
27
|
-
#
|
|
28
|
-
# This method will call .is_padded on the vbox after it has been
|
|
29
|
-
# initialized.
|
|
30
|
-
# ========================================================================= #
|
|
31
|
-
def ui_padded_vbox(*optional_widgets)
|
|
32
|
-
_ = ui_vbox(optional_widgets)
|
|
33
|
-
_.is_padded
|
|
34
|
-
return _
|
|
35
|
-
end; alias padded_vbox ui_padded_vbox # === padded_vbox
|
|
36
|
-
|
|
37
|
-
# ========================================================================= #
|
|
38
|
-
# === LibuiParadise::Extensions.hbox (hbox tag)
|
|
39
|
-
#
|
|
40
|
-
# This method will create a horizontal box.
|
|
41
|
-
# ========================================================================= #
|
|
42
|
-
def self.hbox(*optional_widgets)
|
|
43
|
-
_ = ::LibUI.new_horizontal_box
|
|
44
|
-
add_to_the_registered_widgets(_, __method__)
|
|
45
|
-
if optional_widgets and !optional_widgets.flatten.empty?
|
|
46
|
-
optional_widgets.flatten.each {|this_widget|
|
|
47
|
-
_.add(this_widget)
|
|
48
|
-
}
|
|
49
|
-
end
|
|
50
|
-
return _
|
|
51
|
-
end; self.instance_eval { alias ui_hbox hbox } # === ui_hbox
|
|
52
|
-
self.instance_eval { alias create_hbox hbox } # === create_hbox
|
|
53
|
-
|
|
54
|
-
# ========================================================================= #
|
|
55
|
-
# === ui_hbox (hbox tag)
|
|
56
|
-
# ========================================================================= #
|
|
57
|
-
def hbox(*optional_widgets)
|
|
58
|
-
::LibuiParadise::Extensions.hbox(optional_widgets)
|
|
59
|
-
end; alias ui_hbox hbox # === ui_hbox
|
|
60
|
-
alias create_hbox hbox # === create_hbox
|
|
61
|
-
alias libui_hbox hbox # === libui_hbox
|
|
62
|
-
|
|
63
|
-
# ========================================================================= #
|
|
64
|
-
# === ui_padded_hbox
|
|
65
|
-
#
|
|
66
|
-
# If you want to add optional widgets then simply pass them as argument
|
|
67
|
-
# to this method.
|
|
68
|
-
# ========================================================================= #
|
|
69
|
-
def ui_padded_hbox(*optional_widgets)
|
|
70
|
-
_ = ui_hbox(optional_widgets)
|
|
71
|
-
_.is_padded
|
|
72
|
-
return _
|
|
73
|
-
end; alias padded_hbox ui_padded_hbox # === padded_hbox
|
|
74
|
-
alias libui_padded_hbox ui_padded_hbox # === libui_padded_hbox
|
|
75
|
-
|
|
76
|
-
# ========================================================================= #
|
|
77
|
-
# === two_elements_hbox
|
|
78
|
-
#
|
|
79
|
-
# This method will return a horizontal box (hbox) that is accepting
|
|
80
|
-
# two arguments (two widgets) that will be embedded onto that hbox.
|
|
81
|
-
# Then the result is returned.
|
|
82
|
-
# ========================================================================= #
|
|
83
|
-
def two_elements_hbox(
|
|
84
|
-
widget1,
|
|
85
|
-
widget2,
|
|
86
|
-
options = {
|
|
87
|
-
layout_to_use: :maximal # This is the default.
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
_ = ui_padded_hbox
|
|
91
|
-
# ======================================================================= #
|
|
92
|
-
# === Handle :layout_to_use
|
|
93
|
-
#
|
|
94
|
-
# This is mostly done to distinguish between maximal() and minimal()
|
|
95
|
-
# for widgets.
|
|
96
|
-
# ======================================================================= #
|
|
97
|
-
if options.is_a?(Hash) and options.has_key?(:layout_to_use)
|
|
98
|
-
case options[:layout_to_use]
|
|
99
|
-
# ===================================================================== #
|
|
100
|
-
# === :maximal
|
|
101
|
-
# ===================================================================== #
|
|
102
|
-
when :maximal
|
|
103
|
-
_.maximal(widget1)
|
|
104
|
-
_.maximal(widget2)
|
|
105
|
-
# ===================================================================== #
|
|
106
|
-
# === :minimal
|
|
107
|
-
# ===================================================================== #
|
|
108
|
-
when :minimal
|
|
109
|
-
_.minimal(widget1)
|
|
110
|
-
_.minimal(widget2)
|
|
111
|
-
end
|
|
112
|
-
else
|
|
113
|
-
_.minimal(widget1)
|
|
114
|
-
_.minimal(widget2)
|
|
115
|
-
end
|
|
116
|
-
return _
|
|
117
|
-
end
|
|
118
|
-
|
|
119
|
-
# ========================================================================= #
|
|
120
|
-
# === vbox
|
|
121
|
-
# ========================================================================= #
|
|
122
|
-
def vbox(*optional_widgets)
|
|
123
|
-
::LibuiParadise::Extensions.vbox(optional_widgets)
|
|
124
|
-
end; alias ui_vbox vbox # === ui_vbox
|
|
125
|
-
alias gtk_box vbox # === gtk_box
|
|
126
|
-
|
|
127
|
-
end
|
|
128
|
-
|
|
129
|
-
# ========================================================================= #
|
|
130
|
-
# === LibuiParadise.hbox
|
|
131
|
-
#
|
|
132
|
-
# This toplevel-method can be used to instantiate a new hbox.
|
|
133
|
-
# ========================================================================= #
|
|
134
|
-
def self.hbox(*optional_widgets)
|
|
135
|
-
::LibuiParadise::Extensions.hbox(optional_widgets)
|
|
136
|
-
end; self.instance_eval { alias ui_hbox hbox } # === LibuiParadise.ui_hbox
|
|
137
|
-
self.instance_eval { alias create_hbox hbox } # === LibuiParadise.create_hbox
|
|
138
|
-
|
|
139
|
-
# =========================================================================== #
|
|
140
|
-
# === LibuiParadise.padded_vbox
|
|
141
|
-
# =========================================================================== #
|
|
142
|
-
def self.padded_vbox
|
|
143
|
-
_ = ::LibuiParadise::Extensions.vbox
|
|
144
|
-
_.is_padded
|
|
145
|
-
return _
|
|
146
|
-
end
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
# =========================================================================== #
|
|
150
|
-
# === LibuiParadise.vbox
|
|
151
|
-
# =========================================================================== #
|
|
152
|
-
def self.vbox
|
|
153
|
-
::LibuiParadise::Extensions.vbox
|
|
154
|
-
end
|
|
155
|
-
|
|
156
|
-
end
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/ruby -w
|
|
2
|
-
# Encoding: UTF-8
|
|
3
|
-
# frozen_string_literal: true
|
|
4
|
-
# =========================================================================== #
|
|
5
|
-
# require 'libui_paradise/toplevel_methods/misc.rb'
|
|
6
|
-
# =========================================================================== #
|
|
7
|
-
module LibuiParadise
|
|
8
|
-
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
if __FILE__ == $PROGRAM_NAME
|
|
12
|
-
LibuiParadise
|
|
13
|
-
end # misc.rb
|