libguib 1.1.0
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 +7 -0
- checksums.yaml.gz.sig +0 -0
- data/install-pkg.rb +1042 -0
- data/install.rb +4 -0
- data/lgpl.txt +515 -0
- data/lib/libGUIb14.rb +1617 -0
- data/lib/libGUIb16.rb +1613 -0
- data/libguib.gemspec +23 -0
- data/readme.txt +14 -0
- data/src/Container.rb +103 -0
- data/src/FileSelector.rb +43 -0
- data/src/FileSelector.rbin +0 -0
- data/src/PathSelector-extension.rb +37 -0
- data/src/PathSelector.rb +62 -0
- data/src/PathSelector.rbin +0 -0
- data/src/__FX__.rb +17 -0
- data/src/_guib_FileSelector.rb +60 -0
- data/src/app.rb +21 -0
- data/src/dcwindow.rb +88 -0
- data/src/event_listener.rb +59 -0
- data/src/fox_classes.rb +22 -0
- data/src/fxbase.rb +855 -0
- data/src/fxobjects.rb +253 -0
- data/src/icon_not_found.png +0 -0
- data/src/main-window.rb +1 -0
- data/src/make.rb +196 -0
- data/src/middle-right-mouse.rb +51 -0
- data/src/radio_group.rb +46 -0
- data/src/radio_matrix.rb +95 -0
- data/src/relative-path.rb +14 -0
- data/src/style.rb +116 -0
- data/src/table.rb +84 -0
- data.tar.gz.sig +0 -0
- metadata +147 -0
- metadata.gz.sig +0 -0
data/src/style.rb
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
# Copyright (c) 2004-2006 by Henon (meinrad dot recheis at gmail dot com)
|
2
|
+
|
3
|
+
require "libGUIb14" if __FILE__ == $0 # MAKE_DROP
|
4
|
+
|
5
|
+
class StyleVisitor
|
6
|
+
def apply_to(widget, recursive = true)
|
7
|
+
widget.recursive { |w|
|
8
|
+
identifier = "#{w.class.to_s.gsub(/Fox|::|FX/, "")}_style"
|
9
|
+
send identifier, w # if respond_to? identifier
|
10
|
+
break unless recursive
|
11
|
+
}
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
class FlatStyle < StyleVisitor
|
16
|
+
attr_accessor :frameColor
|
17
|
+
def initialize
|
18
|
+
@frameColor = Fox::FXRGB 0, 0, 0
|
19
|
+
@backColor = Fox::FXRGB 230, 230, 230
|
20
|
+
end
|
21
|
+
|
22
|
+
def Button_style w
|
23
|
+
w.frameStyle = Fox::FRAME_LINE
|
24
|
+
w.hiliteColor = @frameColor
|
25
|
+
w.shadowColor = @frameColor
|
26
|
+
w.backColor = @backColor
|
27
|
+
end
|
28
|
+
|
29
|
+
def TextField_style w
|
30
|
+
w.frameStyle = Fox::FRAME_LINE
|
31
|
+
w.borderColor = Fox::FXRGB 168, 168, 168
|
32
|
+
# w.shadowColor=@frameColor
|
33
|
+
end
|
34
|
+
|
35
|
+
def method_missing(*args)
|
36
|
+
identifier, w = args
|
37
|
+
unless /style/.match?(identifier.to_s)
|
38
|
+
raise args.join(",")
|
39
|
+
end
|
40
|
+
w.backColor = @backColor
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# unit test
|
45
|
+
if __FILE__ == $0 # MAKE_CUTOFF
|
46
|
+
|
47
|
+
# source generated by foxGUIb 0.5.1
|
48
|
+
class DialogBox
|
49
|
+
def initialize(parent)
|
50
|
+
construct_widget_tree(parent)
|
51
|
+
init if respond_to? :init
|
52
|
+
end
|
53
|
+
|
54
|
+
def construct_widget_tree(parent)
|
55
|
+
@topwin =
|
56
|
+
FX::MainWindow.new(parent) { |w|
|
57
|
+
@dialogBox = w
|
58
|
+
w.wdg_name = "dialogBox"
|
59
|
+
w.width = 500
|
60
|
+
w.shown = true
|
61
|
+
w.y = 552
|
62
|
+
w.height = 400
|
63
|
+
w.x = 121
|
64
|
+
FX::Label.new(@dialogBox) { |w|
|
65
|
+
@label = w
|
66
|
+
w.wdg_name = "label"
|
67
|
+
w.width = 38
|
68
|
+
w.height = 19
|
69
|
+
}
|
70
|
+
FX::TextField.new(@dialogBox) { |w|
|
71
|
+
@textfield = w
|
72
|
+
w.wdg_name = "textfield"
|
73
|
+
w.width = 86
|
74
|
+
w.y = 23
|
75
|
+
w.height = 21
|
76
|
+
w.numColumns = 10
|
77
|
+
}
|
78
|
+
FX::Button.new(@dialogBox) { |w|
|
79
|
+
@button = w
|
80
|
+
w.wdg_name = "button"
|
81
|
+
w.width = 51
|
82
|
+
w.y = 48
|
83
|
+
w.height = 23
|
84
|
+
}
|
85
|
+
FX::CheckButton.new(@dialogBox) { |w|
|
86
|
+
@checkbutton = w
|
87
|
+
w.wdg_name = "checkbutton"
|
88
|
+
w.width = 103
|
89
|
+
w.y = 75
|
90
|
+
w.height = 19
|
91
|
+
}
|
92
|
+
FX::RadioButton.new(@dialogBox) { |w|
|
93
|
+
@radiobutton = w
|
94
|
+
w.wdg_name = "radiobutton"
|
95
|
+
w.width = 99
|
96
|
+
w.y = 98
|
97
|
+
w.height = 19
|
98
|
+
}
|
99
|
+
}
|
100
|
+
end
|
101
|
+
attr_reader :topwin
|
102
|
+
attr_reader :dialogBox
|
103
|
+
attr_reader :label
|
104
|
+
attr_reader :textfield
|
105
|
+
attr_reader :button
|
106
|
+
attr_reader :checkbutton
|
107
|
+
attr_reader :radiobutton
|
108
|
+
end
|
109
|
+
|
110
|
+
app = FX::App.new
|
111
|
+
w = DialogBox.new app
|
112
|
+
w.topwin.show(Fox::PLACEMENT_SCREEN)
|
113
|
+
FlatStyle.new.apply_to w.topwin
|
114
|
+
app.create
|
115
|
+
app.run
|
116
|
+
end
|
data/src/table.rb
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
# Copyright (c) 2004-2006 by Henon (meinrad dot recheis at gmail dot com)
|
2
|
+
|
3
|
+
module FX
|
4
|
+
class TableWidget < FX::VerticalFrame
|
5
|
+
HEADER_COLOR = Fox::FXRGB(200, 200, 200)
|
6
|
+
|
7
|
+
def initialize(*args)
|
8
|
+
super
|
9
|
+
@autoresize_titles = true
|
10
|
+
Header.new(self) { |w|
|
11
|
+
@header = w
|
12
|
+
w.headerStyle = HEADER_HORIZONTAL | HEADER_TRACKING
|
13
|
+
w.frameStyle = 0
|
14
|
+
w.backColor = HEADER_COLOR
|
15
|
+
w.connect(SEL_CONFIGURE) {
|
16
|
+
set_title_widths
|
17
|
+
}
|
18
|
+
w.layoutHints = LAYOUT_FILL_X | LAYOUT_FIX_HEIGHT
|
19
|
+
w.height = 20
|
20
|
+
}
|
21
|
+
FXMatrix.new(self, 1) { |w|
|
22
|
+
@matrix = w
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
attr_accessor :autoresize_titles
|
27
|
+
|
28
|
+
def create
|
29
|
+
super
|
30
|
+
end
|
31
|
+
|
32
|
+
def set_titles stringarr
|
33
|
+
stringarr.each { |str|
|
34
|
+
@header.appendItem(" " + str)
|
35
|
+
}
|
36
|
+
set_cols stringarr.size
|
37
|
+
set_title_widths
|
38
|
+
end
|
39
|
+
|
40
|
+
def set_title_widths numarray = nil
|
41
|
+
if numarray
|
42
|
+
else # ok, calculate the item widths from their titles
|
43
|
+
total = 0
|
44
|
+
totalsize = 0
|
45
|
+
i = 0
|
46
|
+
@header.each { |item|
|
47
|
+
total += item.text.size
|
48
|
+
totalsize += item.size
|
49
|
+
item.data = i
|
50
|
+
i += 1
|
51
|
+
}
|
52
|
+
if @autoresize_titles or totalsize == 0
|
53
|
+
quant = (@header.width / total.to_f)
|
54
|
+
offset = 0
|
55
|
+
@header.each { |item|
|
56
|
+
i = item.data
|
57
|
+
size = (item.text.size * quant).to_i
|
58
|
+
@header.setItemSize i, size
|
59
|
+
# @header.setItemOffset i, offset
|
60
|
+
offset += size
|
61
|
+
}
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
def set_cols n
|
67
|
+
end
|
68
|
+
|
69
|
+
def set_rows n
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# unit test
|
75
|
+
if __FILE__ == $0
|
76
|
+
app = App.new
|
77
|
+
mw = MainWindow.new app
|
78
|
+
w = TableWidget.new mw
|
79
|
+
mw.show(0)
|
80
|
+
app.create
|
81
|
+
w.set_titles ["title1", "h2", "supadupa-long title"]
|
82
|
+
|
83
|
+
app.run
|
84
|
+
end
|
data.tar.gz.sig
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,147 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: libguib
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Meinrad Recheis aka Henon
|
8
|
+
- Lars Kanis
|
9
|
+
autorequire:
|
10
|
+
bindir: exe
|
11
|
+
cert_chain:
|
12
|
+
- |
|
13
|
+
-----BEGIN CERTIFICATE-----
|
14
|
+
MIIDLjCCAhagAwIBAgIBDDANBgkqhkiG9w0BAQsFADA9MQ4wDAYDVQQDDAVrYW5p
|
15
|
+
czEXMBUGCgmSJomT8ixkARkWB2NvbWNhcmQxEjAQBgoJkiaJk/IsZAEZFgJkZTAe
|
16
|
+
Fw0yNDA1MDIxMTAwNDVaFw0yNTA1MDIxMTAwNDVaMD0xDjAMBgNVBAMMBWthbmlz
|
17
|
+
MRcwFQYKCZImiZPyLGQBGRYHY29tY2FyZDESMBAGCgmSJomT8ixkARkWAmRlMIIB
|
18
|
+
IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApop+rNmg35bzRugZ21VMGqI6
|
19
|
+
HGzPLO4VHYncWn/xmgPU/ZMcZdfj6MzIaZJ/czXyt4eHpBk1r8QOV3gBXnRXEjVW
|
20
|
+
9xi+EdVOkTV2/AVFKThcbTAQGiF/bT1n2M+B1GTybRzMg6hyhOJeGPqIhLfJEpxn
|
21
|
+
lJi4+ENAVT4MpqHEAGB8yFoPC0GqiOHQsdHxQV3P3c2OZqG+yJey74QtwA2tLcLn
|
22
|
+
Q53c63+VLGsOjODl1yPn/2ejyq8qWu6ahfTxiIlSar2UbwtaQGBDFdb2CXgEufXT
|
23
|
+
L7oaPxlmj+Q2oLOfOnInd2Oxop59HoJCQPsg8f921J43NCQGA8VHK6paxIRDLQID
|
24
|
+
AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQUvgTdT7fe
|
25
|
+
x17ugO3IOsjEJwW7KP4wDQYJKoZIhvcNAQELBQADggEBAH+LA+CcA9vbbqtuhK4J
|
26
|
+
lG1lQwA+hCKiueQgVsepNbXyDzx6PMC8ap/bFaKSaoUWABBA/bsh3jDNXT/eVZrN
|
27
|
+
lFP8cVGrznSYIBG8D/QQmJKpvDBJgnC4Zk01HkhYlqJC4qCTn9X+/uZNHLPLbAEL
|
28
|
+
xl3P43zyL3GQb1IP9bp0xV6oxwG9FO9Rk8bYDojky/69ylowFI5aODS39v01Siu2
|
29
|
+
FsEjM9tMSNb7lQRywQ/432KXi+8AAPTm+wdGnlt3wLE9w2TTpGUBsNKk+QiytTZO
|
30
|
+
zwbjAdVlRm0pg/vpDzzFmRf1GYVckMm8hpCRt8BP0akAbNyw1snYvZBwgLqxztru
|
31
|
+
bEo=
|
32
|
+
-----END CERTIFICATE-----
|
33
|
+
date: 2024-07-02 00:00:00.000000000 Z
|
34
|
+
dependencies:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: fxruby
|
37
|
+
requirement: !ruby/object:Gem::Requirement
|
38
|
+
requirements:
|
39
|
+
- - "~>"
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
version: 1.6.0
|
42
|
+
type: :runtime
|
43
|
+
prerelease: false
|
44
|
+
version_requirements: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - "~>"
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: 1.6.0
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
name: bundler
|
51
|
+
requirement: !ruby/object:Gem::Requirement
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: '1.11'
|
56
|
+
- - "<="
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
version: '3.0'
|
59
|
+
type: :development
|
60
|
+
prerelease: false
|
61
|
+
version_requirements: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '1.11'
|
66
|
+
- - "<="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '13.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '13.0'
|
83
|
+
description: Helper library for the Fox GUI builder
|
84
|
+
email:
|
85
|
+
- meinrad.recheis@gmail.com
|
86
|
+
- lars@greiz-reinsdorf.de
|
87
|
+
executables: []
|
88
|
+
extensions: []
|
89
|
+
extra_rdoc_files: []
|
90
|
+
files:
|
91
|
+
- install-pkg.rb
|
92
|
+
- install.rb
|
93
|
+
- lgpl.txt
|
94
|
+
- lib/libGUIb14.rb
|
95
|
+
- lib/libGUIb16.rb
|
96
|
+
- libguib.gemspec
|
97
|
+
- readme.txt
|
98
|
+
- src/Container.rb
|
99
|
+
- src/FileSelector.rb
|
100
|
+
- src/FileSelector.rbin
|
101
|
+
- src/PathSelector-extension.rb
|
102
|
+
- src/PathSelector.rb
|
103
|
+
- src/PathSelector.rbin
|
104
|
+
- src/__FX__.rb
|
105
|
+
- src/_guib_FileSelector.rb
|
106
|
+
- src/app.rb
|
107
|
+
- src/dcwindow.rb
|
108
|
+
- src/event_listener.rb
|
109
|
+
- src/fox_classes.rb
|
110
|
+
- src/fxbase.rb
|
111
|
+
- src/fxobjects.rb
|
112
|
+
- src/icon_not_found.png
|
113
|
+
- src/main-window.rb
|
114
|
+
- src/make.rb
|
115
|
+
- src/middle-right-mouse.rb
|
116
|
+
- src/radio_group.rb
|
117
|
+
- src/radio_matrix.rb
|
118
|
+
- src/relative-path.rb
|
119
|
+
- src/style.rb
|
120
|
+
- src/table.rb
|
121
|
+
homepage: https://github.com/larskanis/foxGUIb
|
122
|
+
licenses:
|
123
|
+
- LGPL-2.1
|
124
|
+
metadata: {}
|
125
|
+
post_install_message:
|
126
|
+
rdoc_options: []
|
127
|
+
require_paths:
|
128
|
+
- lib
|
129
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '2.5'
|
134
|
+
- - "<"
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '4.0'
|
137
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: '0'
|
142
|
+
requirements: []
|
143
|
+
rubygems_version: 3.5.11
|
144
|
+
signing_key:
|
145
|
+
specification_version: 4
|
146
|
+
summary: Helper library for foxGUIb
|
147
|
+
test_files: []
|
metadata.gz.sig
ADDED
Binary file
|