Commit Graph
100 Commits
Author SHA1 Message Date
Thomas Geymayer a69130ff10 pkg: Remove Install from list after uninstall. 2014-06-30 18:34:41 +02:00
Thomas Geymayer 0b60643053 HTTPRequest/pkg::Install: do not replace callbacks.
Keep a list of callbacks to allow registering multiple callbacks
to the same event. This is consistent with eg. jQuery.Deferred
and is needed for example to open multiple dialogs showing the
progress of installing a package at the same time.
2014-06-30 18:22:24 +02:00
Thomas Geymayer dc4644bf3a canvas::Widget: pass ghost to onRemove handler 2014-06-29 11:57:12 +02:00
Thomas Geymayer 38b766f845 canvas::BoxLayout: fix hfw layouting (fix updating size hint cache). 2014-06-28 13:08:06 +02:00
Thomas Geymayer 10d0be013e fix g++ 4.4: "warning: suggest parentheses around ‘&&’ within ‘||’"
Warning does not make sense, but the old g++ complains...
2014-06-27 01:48:08 +02:00
Thomas Geymayer 5126ae5891 SGPath: fix creating paths with permission checker.
Check permission of the whole path and not to individual
directories, as none of the intermediate directories need
to be writeable by IORules.
2014-06-26 16:07:33 +02:00
Thomas Geymayer 49bcf49db1 Nasal: fix parsing octal/hex numbers in strings as well as during lexing.
Parse the same number formats (octal, dec, hex) in literals and tokens. Was
previously quite a mess, and is still not the best solution, as lexing and
string parsing uses different implementations, although they are meant to
do exactly the same conversions.
2014-06-26 14:21:18 +02:00
Thomas Geymayer 3bbb272ad5 nasal::Ghost: improve intrusive pointer storage and weak references.
- Just increment/decrement reference count for intrusive
   smart pointers. No need to create an additional object
   on the heap.
 - Keep strong reference for weak pointer based ghosts
   to prevent destroying objects while beeing used.
2014-06-23 13:14:07 +02:00
Thomas Geymayer 645cae184b SGConditionRef typedef. No functional changes. 2014-06-22 15:35:31 +02:00
Thomas Geymayer bd9fa7017f ShivaVG: fix call to shCopyPixels.
It is not used anyhow, but just in case...
2014-06-21 13:09:29 +02:00
Thomas Geymayer fc9f3abfbb ShivaVG: check for zero before dividing. 2014-06-21 12:26:58 +02:00
Thomas Geymayer f2f1b36df9 Nasal: better error message for non-numeric string. 2014-06-21 00:21:36 +02:00
Thomas Geymayer 03d2a166b7 canvas::CustomEvent: init bubbles member. 2014-06-19 13:04:21 +02:00
Thomas Geymayer f0a76aa918 Use Boost.Test for strutils_test and add some md5/hex tests. 2014-06-18 18:22:31 +02:00
Thomas Geymayer c144c3562c Keep md5 inside simgear and use single encodeHex implementation. 2014-06-18 18:07:42 +02:00
Thomas Geymayer e06f9462ab Expose md5.h to flightgear for. Will need a better interface... 2014-06-17 22:32:40 +02:00
Thomas Geymayer 9aa5c3b2ae Nasal: support for standard bitwise operators.
This makes bitwise operations a lot easier^^
2014-06-17 16:59:04 +02:00
Thomas Geymayer 2c41c25fcd canvas::Text: get maximum width (if displayed on a single line). 2014-06-17 16:12:29 +02:00
Thomas Geymayer 9ffc0ae8bc canvas::NasalWidget: ensure nasal part is destroyed 2014-06-16 23:45:52 +02:00
Thomas Geymayer 5024b62c0a cppbind: queue Ghosts for deletion and delete outside gc. 2014-06-15 16:34:47 +02:00
Thomas Geymayer 82d5c605e5 canvas::Element: check if element is valid. 2014-06-15 16:30:57 +02:00
Thomas Geymayer 737b1948bf canvas::Layout: proper cleanup/update on removing items. 2014-06-15 16:30:25 +02:00
Thomas Geymayer 1225e53162 pkg: allow 'installed' as filter criterion. 2014-06-15 13:58:12 +02:00
Thomas Geymayer b58bf443ff canvas::Layout: add clear method to remove all items. 2014-06-14 13:19:00 +02:00
Thomas Geymayer 9bef80fbef Simple Markdown parser.
Parse just a tiny subset of Markdown, to basically collapse
multiple whitespace and do paragraphs only after two newlines.
Also one-level, unordered lists are supported. The output can
be eg. directly forwarded to canvas::Text.
2014-06-13 19:12:56 +02:00
Thomas Geymayer 36cb7a752b canvas::Text: add heightForWidth method. 2014-06-13 00:08:57 +02:00
Thomas Geymayer d3b211e787 canvas::Layout: support height-for-width layouting. 2014-06-13 00:03:40 +02:00
Thomas Geymayer e3f0fad272 Package: fix property type (description) 2014-06-12 23:26:01 +02:00
Thomas Geymayer e8f10dd2e8 pkg: Fix recursion in Install destructor.
Prevent creating a shared pointer from this in
destructor, which would lead to recursively
calling the descructor.
2014-06-12 23:21:56 +02:00
Thomas Geymayer dd2bf418b9 canvas::Layout: remove/get child items. 2014-06-12 00:35:17 +02:00
Thomas Geymayer 97cc250047 Package: fix detection of unknown filter term. 2014-06-11 18:18:18 +02:00
Thomas Geymayer 49fc75926e Use Boost.Test to test utf8tolatin1 - others to be converted too... 2014-06-11 00:29:17 +02:00
Thomas Geymayer 9880ba39a7 pkg: Support for install callbacks and fix memory corruption. 2014-06-11 00:19:11 +02:00
Thomas Geymayer c716cfbb07 cppbind: expose SGRect as [x, y, w, h] 2014-06-10 18:42:12 +02:00
Thomas Geymayer ade4627f1a Package: use correct tag for download url. 2014-06-10 00:45:03 +02:00
Thomas Geymayer e508ff724c canvas::BoxLayout: add custom additional whitespace (spacer/stretch) 2014-06-08 23:30:11 +02:00
Thomas Geymayer c54e3f8101 canvas::Image: allow aspect ratio preserving display. 2014-06-08 02:16:07 +02:00
Thomas Geymayer e302ad092e canvas::Image: abort http requests if image is destroyed. 2014-06-05 17:25:12 +02:00
Thomas Geymayer 7a65d42a4c Canvas: fix transformation of clip rect. 2014-06-05 16:07:09 +02:00
Thomas Geymayer d3a14bfd61 canvas: BoxLayout shared pointer typedef. 2014-06-04 17:48:46 +02:00
Thomas Geymayer 03cafe4547 Catalog: add method to get all packages in a catalog. 2014-06-04 17:47:29 +02:00
Thomas Geymayer e5acc3f048 cppbind::Ghost: improve compiler error message for wrong usage. 2014-06-04 17:46:35 +02:00
Thomas Geymayer 4931ce0364 This has to work on windows now^^ 2014-06-04 13:41:48 +02:00
Thomas Geymayer e3d53e854a Hopefully fixing windows build. 2014-06-04 12:17:00 +02:00
Thomas Geymayer bdf6b25338 Now the real fix for old compilers... 2014-06-04 03:16:02 +02:00
Thomas Geymayer 5dddba26ac Fix headless build and reduce include dependencies. 2014-06-04 02:46:57 +02:00
Thomas Geymayer 746fa419ed Trying to fix problems retrieving static member address with old compilers. 2014-06-04 02:45:52 +02:00
Thomas Geymayer 7080f919e9 Fix for old versions of Boost.
No support for BOOST_STATIC_ASSERT_MSG before Boost 1.46.
2014-06-03 20:34:21 +02:00
Thomas Geymayer c4e0014d74 cppbind::Ghost: safely use strong and weak references.
Allow using strong and weak references within the same
class hierarchy and seemlessly convert between them -
from and to Nasal.
2014-06-03 18:40:01 +02:00
Thomas Geymayer 7d9797e091 SGSharedPtr: add constructor to convert from SGWeakPtr. 2014-06-03 01:58:57 +02:00
Thomas Geymayer 32274027ef Missing return statement 2014-06-01 12:14:31 +02:00
Thomas Geymayer d09943cbb8 Fix wrong include guard (identified by clang) 2014-06-01 12:12:28 +02:00
Thomas Geymayer 150039f9ba Canvas/Layout: tweak the way elements are exposed to Nasal. 2014-06-01 12:12:28 +02:00
Thomas Geymayer 820a315cbe Canvas: fix possible crash with destroyed canvasses 2014-06-01 12:12:28 +02:00
Thomas Geymayer 8abe4622b9 Canvas: trigger immediate update from property tree/Nasal. 2014-06-01 12:12:28 +02:00
Thomas Geymayer b36cdebe8b Canvas: basic layouting system.
Support for vertical and horizontal layouts. More layouts and
widgets can be created using Nasal.
2014-05-31 02:40:59 +02:00
Thomas Geymayer 3c0544c9a6 Sky dome: remove unused variables/code. 2014-05-31 00:09:56 +02:00
Thomas Geymayer be358f8d24 cppbind: use Hash iterators to extract simgear::Map 2014-05-30 23:59:36 +02:00
Thomas Geymayer e1abab393b Fix for clang/template dependent name lookup.
Thanks to James & Nicholas...
2014-05-30 23:57:55 +02:00
Thomas Geymayer 0b21181f1a Canvas: allow dispatching events to Canavs itself 2014-05-29 16:34:33 +02:00
Thomas Geymayer dfdd1c6d5e cppbind: some new methods and safer type check. 2014-05-29 16:30:41 +02:00
Thomas Geymayer a8e96997cb nasal::Hash: add iterators. 2014-05-29 14:14:52 +02:00
Thomas Geymayer 6db07373ee PropertyBasedElement: extend HTML5 (Canvas) data props interface
Allow check if property exists and removing properties.
2014-05-29 01:22:35 +02:00
Thomas Geymayer 36ae8cdce3 Update doxgen config and some comments. 2014-05-29 00:27:50 +02:00
Thomas Geymayer d77ba7d2db canvas::Element: setter/getter for HTML5 style data-* properties. 2014-05-28 18:11:32 +02:00
Thomas Geymayer 6e58fdac85 canvas: exclude data-* properties from triggering an update.
Allows using data-* properties on canvas and elements,
similar to HTML5, without triggering a new rendering of
the canvas.
2014-05-27 17:56:46 +02:00
Thomas Geymayer 3f6933940e ShivaVG: get rid of glu dependency.
We do not use the image rendering part anyhow, so
just disable it for now. If we want to use it we
will need a modified implementation anyhow to
integrate with OpenSceneGraph threaded OpenGL
resource management.
2014-05-27 17:56:46 +02:00
Thomas Geymayer 9c421d55a9 Canvas: support for custom events and event dispatching. 2014-05-19 00:17:23 +02:00
Thomas Geymayer 1af6cbc1aa cppbind.Ghost: more member overloads. 2014-05-18 23:55:43 +02:00
Thomas Geymayer a9e7af6e6e Enable dynamic linking on Mac for Boost.Test 2014-05-18 17:47:03 +02:00
Thomas Geymayer c967fbc0a6 cppbind.Ghost: clean up a bit 2014-05-18 17:43:30 +02:00
Thomas Geymayer 6929ba75c0 cppbind: convert maps from nasal. 2014-05-18 13:34:06 +02:00
Thomas Geymayer 289777bd99 cppbind.Ghost: register _get called on retrieving unset member.
Allow registering a callback on ghosts called upon retrieving
an unset member.
2014-05-18 13:34:06 +02:00
Thomas Geymayer 7535dfd2d0 cppbind: from_nasal/to_nasal for SGWeakReferenced based objects 2014-05-10 10:49:11 +02:00
Thomas Geymayer 23279b4d0a Canvas: move window from flightgear. 2014-05-09 16:17:40 +02:00
Thomas Geymayer d34d3ecfb1 SGWeakReferenced: fix for clang. 2014-05-09 11:52:42 +02:00
Thomas Geymayer 55f18574aa Fix for CMake 2.6
No named arguments for add_test in CMake 2.6.
2014-05-08 11:17:28 +02:00
Thomas Geymayer 02ac1a43c1 Add smart pointer tests (finally using Boost.Test) 2014-05-08 02:17:24 +02:00
Thomas Geymayer b2c3a90adf Fix use count for deleted, reference counted objects.
Remove inconsitency of returning 0 or ~0. If the object
has been deleted there are no more references, so always
return 0.
2014-05-08 01:43:41 +02:00
Thomas Geymayer 9975c751a7 Add support for using SGWeakPtr with virtual base classes.
- Add SGVirtualWeakReferenced to be used as base class
   for reference counted objects supporting weak references
   and virtual base classes.
 - Modify SGWeakPtr to copy with SGVirtualWeakReferenced
   objects.
2014-05-08 00:27:00 +02:00
Thomas Geymayer efbec8b367 Canvas: base Elements/Canvas on SGWeakReferenced. 2014-05-06 18:10:42 +02:00
Thomas Geymayer 9642f6d946 cppbind: add naContext/naRef overload to Ghost::_set 2014-05-06 18:10:35 +02:00
Thomas Geymayer 247aa49849 SGSharedPtr/SGWeakPtr: add some methods/operators
- allow placing SGWeakPtr in sorted STL containers (eg. requiring
   operator<)
 - add reset() like for boost::shared_ptr/boost::weak_ptr
 - add helper to extract pointer from SGWeakPtr
2014-05-06 18:10:14 +02:00
Thomas Geymayer edaae885ee cppbind: small logging/warning updates. 2014-05-05 15:06:15 +02:00
Thomas Geymayer b101f64cd8 cppbind.Ghost: register _set called on setting new properties. 2014-05-05 15:06:09 +02:00
Thomas Geymayer f75d1cbcb1 cppbind: disable special handling of 'parents' for ghost. 2014-05-05 14:48:29 +02:00
Thomas Geymayer ac2e80dc07 Nasal: allow ghost as 'me' for 'call' 2014-05-05 14:47:10 +02:00
Thomas Geymayer 77955e5c3c math/nasal: Add more SGRect members and nasal helper. 2014-04-15 10:07:01 +02:00
Thomas Geymayer 338a748823 Canvas::Path: also restore glBlendFunc. 2014-04-01 12:35:43 +02:00
Thomas Geymayer 8c45796dc8 Canvas::Path: reduce number of OpenGL state changes.
- Do not enable any multisampling as for FBOs it is not
   supported anyhow.
 - Just restore GL_BLEND and GL_STENCIL_TEST manually
   => Getting rid of the huge load of glPushAttrib/glPopAttrib
      gets us a huge performance boost, especially for drivers
      with slow state stack implementations.
2014-04-01 12:03:53 +02:00
Thomas Geymayer a160e176da cppbind: fix testing for naRef identity. 2014-03-31 14:21:21 +02:00
Thomas Geymayer d332da0605 Canvas: do not write bounding box to property tree.
- Prevent writing to property tree in wrong thread.
 - Add Element::getBoundingBox and
   Element::getTightBoundingBox as uniform way to
   retrieve bounding boxes of all canvas elements.
 - Update path bounding boxe in update traversal.
2014-03-31 13:28:03 +02:00
Thomas Geymayer 6ea55c6851 nasal::Ghost: remove bogus warning. 2014-03-27 12:09:05 +01:00
Thomas Geymayer 10ee7a901f ShivaVG: disable paint textures (Fixes #1414)
Currently there is no need for paint textures so just
disable them to prevent releasing OpenGL resources
from the wrong context/thread.
2014-03-27 11:20:38 +01:00
Thomas Geymayer db8b60ec49 Revert "CanvasGroup: return empty bounding box without children."
Returning somehow valid data in case it is used unchecked was
probably not a good idea. Better fix the code using it^^

This fixes #1421.

This reverts commit 3525fff8d0.
2014-03-23 17:27:30 +01:00
Thomas Geymayer 09d47e7f55 cppbind: fix problem with function call without arguments. 2014-03-22 13:23:21 +01:00
Thomas Geymayer 13a3ea3503 cppbind: allow calling methods with 'me' object from C++. 2014-03-22 12:41:47 +01:00
Thomas Geymayer ff53792e4f CanvasImage: rename 'file' to 'src'. 2014-03-20 11:42:02 +01:00
Thomas Geymayer fd51518d92 CanvasImage: improve fetching from http and add mime detection. 2014-03-20 01:44:31 +01:00
Thomas Geymayer 01a43b49a5 Canvas: Respect clipping while event handling. 2014-03-19 18:21:25 +01:00