Git Product home page Git Product logo

libzeug's People

Contributors

cgcostume avatar dgimb89 avatar dommueller avatar j-o avatar jenniferstamm avatar jklimke avatar kateyy avatar lanice avatar lw0 avatar mjendruk avatar rlux avatar scheibel avatar somae avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libzeug's Issues

Property GUI Refinement

the following issues are tested only on a windows machine:

  • after entering a number in, e.g., double field and pressing [Enter], the field needs to be clicked twice for editing again
  • when clicking a checkbox of a property that has no current focus, it needs to be clicked twice do get check/uncheck
  • when going through the list with the arrow keys, it would be nice to hold [Ctrl] or [Alt] to allow iterating over all properties instead of manipulating the first property that takes the "arrow key focus"
  • entering e number field and adding a digit at any cursor position is not possible (one needs to select and replace single/all digits). this should be allowed.
  • add drag scroll for all number fields (as in 3dsmax or blender)
  • add copy and paste as in blender (just hovering over a field with the mouse and press [ctrl]+[c] or [ctrl]+[v] - You will quickly get addicted to this functionality 😄
  • The hovering is very slow, even for only a few items.
  • The color fields should have a more appropriate alpha raster pattern, relating to their extend and probably have a 1px grey border
  • the line height might probably be a little smaller (-2px?)
  • if not already (didn't check): the header should be optional and be hidden by default, for me it is also ok to have no header at all, since the group or dockwidget should contain an appropriate description

some extensions

  • a array2 or array3 field might show tooltips with the array interpreted as vector (2d coordsystem with arrow room root to point as vector.. same for 3d)
  • all array fields should allow simple math, like add and multiply: (,,) * x etc.
  • every the property gui should allow filtering: i will add a text input as property filter anywhere and e.g. use its string as regexp to filter the shown properties in selected/all property guis
  • add "set to default/initial value" button when focus is on the property

Use annotations

The annotations member in AbstractProperty aren't currently used at all.
They could be used for tooltips

Allow serializer/deserializer interface to use intermediate format instead of files

I want to serialize a property group to an intermediate ini object and manipulate it before writing it to a file.
I want to deserialize a file to an ini object and manipulate it before parsing it as a property group.

Use case:
I have several different types of proerty trees and want to encode in the ini file what type of tree it is.
Currently this is only possible with a lot of warnings and a 2-pass parsing.

Extended std::vector editing

Property<std::vector<?>> rows should be expandable to seperate rows for each value, which can be edited with spinboxes

Catching javascript exceptions with scriptzeug

Hello!

How can I catch exceptions which result from invalid javascript given to scriptzeug? As long as the javascript code is syntactically correct, I can add a try-catch-block on script side. But if it is not syntactically correct, this doesn't work.
In pure v8, a v8::TryCatch construct is provided (https://developers.google.com/v8/embed#exceptions). How do I accomplish something similar with scriptzeug? A simple c++ try-catch-block won't do the trick.

Thanks!

Compiler requirements

It seems that compiler requirements (e.g., gcc 4.7 -> gcc 4.8) are updated "on the fly", when someone wants to use a cool new feature that wasn't supported before, without discussing that first. And the change is not even communicated. This is not OK, because unfortunately, sometimes one cannot just upgrade the compiler (e.g., we sometimes have to deploy prototypes for other systems, e.g. in a cooperation, and those systems often run old software).

We shouldn't require the newest compiler. The project should be buildable and deployable on "fairly new" systems, so I think, gcc 4.7 would still be a good choice.

Refine project structure

Change the project structure as follows:

  • New module reflectionzeug
  • Move everything from propertyzeug to reflectionzeug
  • Move management and registration of functions from scriptzeug to reflectionzeug
  • Implement Object class in reflectionzeug that allows to register properties and functions

Enum Property Refinement

  • automatically inherit from EnumProperty<> by using SFINAE
  • add the option to specify a subset of values
  • add a template method that returns a list of enum-string pairs that can be specialized
  • add method for setting string-enum pairs

Properties shouldn't be allocated on stack

Because a PropertyGroup owns the properties it manages, properties shouldn't be allocated on stack.

Possible solutions:

  • make the its constructors protected and
    • add a static create method
    • make PropertyGroup a friend and let them only be created by a PropertyGroup

Change of Scriptzeug to Support v8 Version 3.21.17

On OS X it is quite convenient to install v8 using brew. The compiled and installed version of v8 is 3.21.17. To comply with this version (especially when using OS X) some changes in the API of v8 require changes in Scriptzeug as well.

Improve Property constructors

When you create a Property with an object pointer and two method pointers, which aren't declared in the same class (e.g. in a base class), the automatical type deduction fails.
So instead of
Property<int>("value", object, &Class::getter, &Class::setter)
you have to write Property<int, Class>("value", object, &Class::getter, &Class::setter)

Linking against reflectionzeug failes with MSVC

faulting commit: 102d51d
Error:

3>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) const reflectionzeug::StringProperty::`vbtable'" (__imp_??_8StringProperty@reflectionzeug@@7B@)

Wild guess: MSVC emits the vbtable together with constructor, but since the commit removed all non-templated constructors that never happens.

Two solutions seem to work:

  1. Remove API declaration from class and add to individual non-template member functions so the linker doesn't expect the vbtable to be exported
  2. Re-add at least one non-template constructor

Applies to StringProperty and FilePathProperty

CMake error on Windows

CMake Error at packages/pack-libzeug.cmake:81 (string):
string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
command.
Call Stack (most recent call first):
packages/CMakeLists.txt:9 (include)

Introduce private namespace

Because of propertyzeugs mainly template-driven designs most of its implementation is in headers. This is why I would like to add a private namespace (as in glm) for classes and utility methods that are not intended to be used by the user.

Bundle regular expressions

Create a place to bundle regex values (color hex code, array list, bool values) which should be used in serializer and editors

Use property interfaces for all standard types

As already implemented for integral and floating point types, create interface classes also for the other basic types, e.g., strings and colors. That way, one can implement a new property type, e.g., a QColor, using that interface, and the GUI will be able to show the already implemented color dialog. Currently, one would also have to subclass the editor factory and re-implement the color editor, because this only works with 'Color'. This change would make the property system much more flexible to work with classes that are not directly supported, but have similar functionality.

Array properties with brace initialization does not work

on gcc 4.7.3, all examples with brace initialization fail with the following error message:

/workspace/hpi/projects/libzeug/source/examples/properties/main.cpp:66:64: Fehler: keine passende Funktion für Aufruf von »reflectionzeug::PropertyGroup::addProperty(const char [6], )«
/workspace/hpi/projects/libzeug/source/examples/properties/main.cpp:66:64: Anmerkung: Kandidaten sind:
In file included from /workspace/hpi/projects/libzeug/source/examples/properties/main.cpp:6:0:
/workspace/hpi/projects/libzeug/source/reflectionzeug/include/reflectionzeug/PropertyGroup.h:33:22: Anmerkung: template reflectionzeug::Property* reflectionzeug::PropertyGroup::addProperty(const string&, const Type&)
/workspace/hpi/projects/libzeug/source/reflectionzeug/include/reflectionzeug/PropertyGroup.h:33:22: Anmerkung: Herleitung/Ersetzung von Templateargument gescheitert:
/workspace/hpi/projects/libzeug/source/examples/properties/main.cpp:66:64: Anmerkung: »{1, 2, 3}« (Typ »«) kann nicht in den Typ »const std::array<int, 3ul>&« umgewandelt werden
[...]

libzeug should not directly write to console

Especially in the property deserializer, but in general too.

As a user of a library, I want to customize which outputs I show on the console and which not. Libraries should not directly generate output, instead error callbacks should be provided, so that the user can either ignore them or send them to the console if he wishes to.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.