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