diff options
Diffstat (limited to '')
-rw-r--r-- | ClientHamr/GuiLua/GuiLua.c | 63 |
1 files changed, 1 insertions, 62 deletions
diff --git a/ClientHamr/GuiLua/GuiLua.c b/ClientHamr/GuiLua/GuiLua.c index 510eadf..d70aabc 100644 --- a/ClientHamr/GuiLua/GuiLua.c +++ b/ClientHamr/GuiLua/GuiLua.c | |||
@@ -101,73 +101,12 @@ Currently this is in skang.lua, but should bring this in here later. | |||
101 | 101 | ||
102 | Currently Stuff is in skang.lua, but should bring this in here later. | 102 | Currently Stuff is in skang.lua, but should bring this in here later. |
103 | 103 | ||
104 | Squeal was the database driver interface for SquealStuff, the database | ||
105 | version of Stuff. Maybe we could wrap esskyuehl? Not really in need of | ||
106 | database stuff for now, but should keep it in mind. | ||
107 | |||
108 | For SquealStuff, the metadata would be read from the SQL database | ||
109 | autamatically. | ||
110 | |||
111 | */ | 104 | */ |
112 | 105 | ||
113 | 106 | ||
114 | /* widget package | 107 | /* widget package |
115 | 108 | ||
116 | Should include functions for actually dealing with widgets, plus a way | 109 | Currently widget design is in skang.lua, but should bring this in here later. |
117 | of creating widgets via introspection. Should also allow access to | ||
118 | widget internals via table access. Lua code could look like this - | ||
119 | |||
120 | foo = widget.label(0, "0.1", 0.5, 0, 'Text goes here :") | ||
121 | -- Method style. | ||
122 | foo:colour(255, 255, 255, 0, 0, 100, 255, 0) | ||
123 | foo:hide() | ||
124 | foo:action("skang.load(some/skang/file.skang)") | ||
125 | -- Table style. | ||
126 | foo.action = "skang.load('some/skang/file.skang')" | ||
127 | foo.colour.r = 123 | ||
128 | foo.look('some/edje/file/somewhere.edj') | ||
129 | foo.help = 'This is a widget for labelling some foo.' | ||
130 | |||
131 | For widgets with "rows", which was handled by Stuff in skang, we could | ||
132 | maybe use the Lua concat operator via metatable. I think that works by | ||
133 | having the widget (a table) on one side of the concat or the other, and | ||
134 | the metatable function gets passed left and right sides, then must | ||
135 | return the result. Needs some experimentation, but this might look like | ||
136 | this - | ||
137 | |||
138 | this.bar = this.bar .. 'new choice' | ||
139 | this.bar = 'new first choice' .. this.bar | ||
140 | |||
141 | */ | ||
142 | |||
143 | |||
144 | /* coordinates and sizes | ||
145 | |||
146 | Originally skang differentiated between pixels and character cells, | ||
147 | using plain integers to represent pixels, and _123 to represent | ||
148 | character cells. The skang TODO wanted to expand that to percentages | ||
149 | and relative numbers. We can't use _123 in Lua, so some other method | ||
150 | needs to be used. Should include those TODO items in this new design. | ||
151 | |||
152 | Specifying character cells should be done as strings - "123" | ||
153 | |||
154 | Percentages can be done as small floating point numbers between 0 and 1, | ||
155 | which is similar to Edje. Since Lua only has a floating point number | ||
156 | type, both 0 and 1 should still represent pixels / character cells - | ||
157 | |||
158 | 0.1, 0.5, "0.2", "0.9" | ||
159 | |||
160 | Relative numbers could be done as strings, with the widget to be | ||
161 | relative to, a + or -, then the number. This still leaves the problem | ||
162 | of telling if the number is pixels or character cells. Also, relative | ||
163 | to what part of the other widget? Some more thought needs to be put | ||
164 | into this. | ||
165 | |||
166 | Another idea for relative numbers could be to have a coord object with | ||
167 | various methods, so we could have something like - | ||
168 | |||
169 | widget:bottom(-10):right(5) -- 10 pixels below the bottom of widget, 5 pixels to the right of the right edge of widget. | ||
170 | widget:width("12") -- 12 characters longer than the width of widget. | ||
171 | 110 | ||
172 | */ | 111 | */ |
173 | 112 | ||