Commit Graph

180 Commits (bb7e111e006726695064bb33e45d29d4ee0ea5f7)

Author SHA1 Message Date
Elio Gubser 28f63005bc revert changes to min/max functions, getMinSize and getMaxSize should remain un-implemented in widget.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6408 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-30 11:48:50 +00:00
Elio Gubser d6c203c74a added widgetGetMinSizeImpl() and widgetGetMaxSizeImpl() copied from window.[c/h],because there was an assert when using textEntry
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6407 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-30 11:27:13 +00:00
Giel van Schijndel b2b9e78bbe Use $(LUA_LIBS) instead of $(LUA_LIBTOOL) to link with Lua (the latter variable isn't defined anymore)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6398 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-26 22:17:15 +00:00
Freddie Witherden 8c92c4931b Rewrite the hBox class in terms of the table class. This helps to cut down on code duplication.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6394 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-26 20:42:03 +00:00
Freddie Witherden 6bf597ba14 Improve the tableSetPadding function that it now returns false on failure and true on success.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6393 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-26 20:40:10 +00:00
Freddie Witherden cc25793143 Fix compilation of betawidget after the source move.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6387 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-26 00:49:02 +00:00
Giel van Schijndel e63189b4f9 * Add libtool version information to betawidget
- Use 0:0:0 as current version (API=0, API_IMPLEMENTATION=0, IMPLEMENTATION_AGE=0)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6375 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-23 21:38:25 +00:00
Giel van Schijndel 0e80daf989 * Don't bother trying to get at the libtool libraries (.la)
- We currently do this for Lua
  - Libtool is apparently smart enough to find out about libtool libraries on its own (so we don't need to "hack" our way to finding those)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6374 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-23 21:32:26 +00:00
Giel van Schijndel 11f4f2df83 Lets generate a pkg-config .pc-file for betawidget.
This allows easy detection of betawidget by means of pkg-config


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6373 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-23 20:58:30 +00:00
Giel van Schijndel 2c1e2e282c Include tools/sdl-testapp.lua, src/betawidget.i and src/lua-wrap.h as part of "make dist" (i.e. they're required at build time)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6372 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-23 20:26:26 +00:00
Giel van Schijndel 0505129930 Lets build table.[ch] along with the rest of betawidget
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6371 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-23 20:24:16 +00:00
Giel van Schijndel 97931f21eb Move the actual library code of betawidget from lib/betawidget/ into lib/betawidget/src/
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6370 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-23 19:49:36 +00:00
Giel van Schijndel b48b300697 * Use "recursive make" to build the test apps in lib/betawidget/tools/
- Make sure to build libbetawidget.la in lib/betawidget/ first though (because tools/ depends on that)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6369 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-23 19:32:54 +00:00
Giel van Schijndel d719e9977b Betawidget:
* Use plain "cairo" instead of "cairo-svg" because "cairo-svg" is an ''output'' backend in which we're not interested
 * When re-running aclocal make sure to pass `-I m4` to it
 * For lack of -Werror lets compile with -Werror-implicit-function-declaration to die at implicit function declarations (rather than getting stranger errors)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6368 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-23 17:57:23 +00:00
Freddie Witherden 2b11839902 Fix an indentation error in table.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6361 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-22 13:55:01 +00:00
Freddie Witherden 5bca9c8df9 Add support for setting the horizontal/vertical padding of a table and fix a bug in the padding alignment code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6360 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-21 18:51:34 +00:00
Freddie Witherden 4d163dd309 Provide a complete, mostly working, table widget implementation. Unit tests are still required.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6357 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-21 18:10:56 +00:00
Freddie Witherden b278bbb4ee Add the concept of a NUL size to betawidget which is needed to allow widgets to be added to a parent-less container.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6356 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-21 17:52:21 +00:00
Freddie Witherden 19f1175c04 Making padding a const int, as opposed to accessing it directly, in the hBox class.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6175 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-16 12:34:19 +00:00
Freddie Witherden c12227b453 Simplify the fitting algorithm for the hBox class.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6174 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-16 11:36:38 +00:00
Freddie Witherden f42ce71599 Fix a nasty typo in the hBox class which caused hBoxGetMinSize to be called for widgetGetMaxSize.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6173 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-16 11:33:49 +00:00
Freddie Witherden 3a4b246ff7 Add padding support to the hBox class; also, ensure that we set the default alignment/padding in the constructor; finally, improve the Doxygen documentation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6172 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-16 10:38:50 +00:00
Freddie Witherden 96509127b1 Add table.[ch] which is a partially completed table container implementation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6171 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-15 20:06:18 +00:00
Freddie Witherden ec00337b6c Use alloca as opposed to malloc for allocating temporary storage in hBox.c.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6163 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-15 11:38:09 +00:00
Giel van Schijndel 810fac209b * Wrap all file lists in the automake and win32 makefiles across lines such that there's only one file on each line
* Alphabetically sort the file lists

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6144 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-13 13:04:37 +00:00
Freddie Witherden 784b40d2a0 Slight cosmetic improvement to the window alignment code (factoring out a / 2).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6049 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 22:56:36 +00:00
Freddie Witherden ba9c453857 Make sure we correctly enable double buffering for SDL.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6048 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 22:21:08 +00:00
Freddie Witherden 6e3ff77160 Vsync for the win, also enable double-buffering.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6047 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 22:10:40 +00:00
Freddie Witherden f499f08a49 Use glPushMatrix and glPopMatrix when compositing as opposed to manually restoring it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6046 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 21:56:02 +00:00
Freddie Witherden dc878823c2 Fix the inclusion of GLEE in betawidget; this fixes the blending problems under nVidia Linux. Plus some minor indentation fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6037 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 11:24:36 +00:00
Freddie Witherden 26444e8e07 Switch from a virtal method to an event handler for re-generating the window's pattern.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6020 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:49:37 +00:00
Giel van Schijndel e2fa071a02 Replace the custom crafted Lua interface code for the addEventHandler and addTimerEventHandler methods of class widget with a SWIG typemap
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6017 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:27:03 +00:00
Giel van Schijndel 4d79c24838 * Add Lua support for widget animations
* These can be defined using Lua tables; see the example code in sdl-testapp.lua

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6016 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:26:48 +00:00
Giel van Schijndel 8681483c7d Make sure to translate before scaling in widgetCompositeImpl as that yields in-place scaling as opposed to scaled translating
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6015 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:16:49 +00:00
Giel van Schijndel e3c884a249 When resizing windows make sure to resize their gradient as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6011 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 01:34:16 +00:00
Giel van Schijndel e766b2f605 Allow Lua event handlers to remove themselves (i.e. don't segfault in that case)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6010 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 01:32:59 +00:00
Giel van Schijndel 41e74888ef Make sure to use "destroy" as the method name in lua_widget_destroy for error message generation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6009 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 00:48:29 +00:00
Giel van Schijndel ee7cfc1ac5 * Add enum spacerDirection and its contents to the Lua betawidget module
* Add method `destroy` to the Lua class `widget` and its children in the betawidget module
 * Add some code that demonstrates the usage of widget:destroy() and its current flaws (i.e. segfaults ''will'' occur when using widget after calling the destroy() method on it, garbage collection is included in "using")


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6008 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 00:37:20 +00:00
Giel van Schijndel c661cb9bc4 * Don't use a single cairo_pattern to store the window gradient for ''all'' windows
* Use a separate cairo_pattern for each window to store the window gradient in


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6007 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 23:15:44 +00:00
Giel van Schijndel a2a22b3804 Check both the `lua5.1` and `lua` pkg-config package in betawidget's ./configure script
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6006 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 22:36:47 +00:00
Giel van Schijndel 07e8a802f9 Remove the last remnants from platform selection in betawidget/Makefile.am
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6003 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 18:36:33 +00:00
Giel van Schijndel ea446b8653 * Use recursive make (through SUBDIRS) to build the `platform` portion of betawidget
* Compile the utility part we use from Warzone (framework/utf.c and ivis_opengl/GLee.c) separately


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6002 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 18:35:26 +00:00
Elio Gubser 2395064bc8 outsourced the pathing function from windowDoDrawMaskImpl and windowDoDrawImpl, corrected some obvious nasty bugs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5998 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-12 18:58:18 +00:00
Elio Gubser 413cc540a9 outsourced the pathing function from windowDoDrawMaskImpl and windowDoDrawImpl, corrected some obvious nasty bugs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5997 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-12 18:52:23 +00:00
Elio Gubser 426f09cf9b nicer window design implemented
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5996 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-12 18:05:28 +00:00
Giel van Schijndel 50c974f74b Install all betawidget headers into $(pkgincludedir)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5988 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 07:56:28 +00:00
Freddie Witherden 4bb879d64c Make sure we fill out the event structure for EVT_DESTRUCT events.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5983 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 18:10:06 +00:00
Giel van Schijndel 6061eb40d9 Add an example of window/widget destruction by means of employing the garbage collector (this should be improved to something like widget:destroy())
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5980 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 11:33:40 +00:00
Giel van Schijndel 9177d9cf2f * Register widgetGetTime() as betawidget.getTime() in Lua
* In the Lua test app use betawidget.getTime() to determine the *true* amount of time passed since registering of the timer event


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5979 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 11:17:38 +00:00
Giel van Schijndel 0d3b868de7 * After calling the Lua event handler function make sure to pop the return value from the stack
* If the Lua event handler function didn't return a value, assume it was successful (and leave the stack as is)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5978 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 11:04:56 +00:00