Commit Graph

200 Commits

Author SHA1 Message Date
GenevensiS 81e9a1e26f Card data in images (start)
* Add uuid implementation

* Simplify uid implementation

* Check for uid conflicts upon adding/copying cards

* Remove unnecessary checks

these are already checked as part of the first loop, since they were added to set.cards

* Implement card linking

* refactor to avoid triple loop

* Start link visualization

* Continue link visualization

* formatting

* add missing locale entries

* improve layout

* improve UI refresh

* copy links when copying cards

* implement second face editor

* refactor using macros

* get references

* pasting multiple cards and links

* start refactoring editors

* continue refactoring editors

* continue refactoring editors again

* finish refactoring editors

* refresh card list on link editor event

* tweak event handling

* Add insert_image script function

* change parameter type

* add script functions to get cards

* add dimensions_of script function

calculate both dimensions simultaneously while rendering the image only once.

* save value even if not editable

* add get_mse_locale script function

* Change zoom scale choices

* bug fixes

* Scale symbol spacing with font size

* sync locales

* standardize line ending

* handle links in new_card

* initial

waiting on wxWidgets 3.3.1

* update comment

* store rect in image filename

* store rect in temp file name

* Update package.cpp

* change line endings
2025-08-11 16:57:04 +02:00
GenevensiS 3bf9de18b1 Implement unique IDs and card linking 2025-08-11 16:17:13 +02:00
GenevensiS dc348b4812 Add to_json and from_json script functions 2025-08-07 18:45:12 +02:00
GenevensiS 70e44474a5 fix "referencing nonexistant file" bug
improve internal error message
2025-07-15 02:30:11 +02:00
GenevensiS 337f463b9a expose folder_name package property 2025-06-12 22:59:36 +02:00
GenevensiS b33fdd4856 add include localized file token 2025-03-11 02:27:03 +01:00
GenevensiS 96fd385962 exempt symbol-fonts from dependency checks (#92) 2024-09-26 22:04:02 -04:00
GenevensiS e72ee85525 Add exists_in_package script function (#86)
* add exists_in_package script function

* Update index.txt
2024-09-26 22:03:27 -04:00
Carl Miller, Jr 9d41397848 add #ifdefs for OSX-specific code 2021-08-27 06:56:59 -04:00
Carl Miller, Jr 275f18a324 make Mac OS X+ binary build again 2021-08-24 23:09:06 -04:00
halian a0b755c2d9 fixed building on linux; updated linux directions 2021-05-05 07:05:42 -04:00
Carl Miller, Jr 6de715557e added fixes that close twanvl's #105 and #107 2021-02-15 02:25:47 -05:00
Carl Miller, Jr 3a243f23e6 rebase (#1)
* Include unordered_map (fixes #104)

* Make templates localizable (Closes #100)

* Check/uncheck all selected cards in export window (Closes #93)

Co-authored-by: Twan van Laarhoven <twanvl@gmail.com>
2021-02-15 02:18:50 -05:00
Carl Miller, Jr cb3766ea82 include unordered map
Add unordered_map include directives to src/util/io/reader.hpp and ./writer.hpp to prevent an early compile-time error on Mac OS 10.14 “Mojave”.
2020-10-02 01:23:10 -04:00
Twan van Laarhoven 628f497586 size_t == unsigned int in 32 bit builds 2020-09-28 02:05:19 +02:00
Twan van Laarhoven 5b0979f58e unordered_map for locale, and const functions where possible 2020-09-27 21:53:42 +02:00
Twan van Laarhoven e14fe1f40e Use template specialization instead of name concatenation so that reflection of enums works for enums that are inside another class or namespace. 2020-09-27 18:34:46 +02:00
Twan van Laarhoven 27d7180432 GetDefaultMember::handle is not called with longs or uint64_t, only size_t 2020-06-20 16:25:43 +02:00
guy 516f36a9d2 Added changes for building on Catalina 2020-06-15 00:23:33 -04:00
Twan van Laarhoven c9c708dfbe Fix #63: don't use reference arguments in openFileInPackage 2020-05-27 22:16:48 +02:00
Twan van Laarhoven 22b1c2604b Remove reader_pragma_handler hack 2020-05-22 01:23:53 +02:00
Twan van Laarhoven 173f702ffa Warn about missing ':' in reader 2020-05-22 01:20:48 +02:00
Twan van Laarhoven cbab6481a1 When reading, don't add items to a vector before they are read. This avoids nullptrs in the list of fields, cards, etc. when exceptions are thrown 2020-05-22 00:25:55 +02:00
Twan van Laarhoven 749de23eb0 Fix error when using saveAs 2020-05-22 00:25:35 +02:00
Twan van Laarhoven 1bb61ea9ac Fix gcc build 2020-05-21 19:53:56 +02:00
Twan van Laarhoven 1a0e17221b Added StringView type (similar to std::string_view) 2020-05-21 19:29:42 +02:00
Twan van Laarhoven 6b6306fc86 Don't use wxMkDir, it shows stupid error messages 2020-05-16 20:12:04 +02:00
Twan van Laarhoven 5deaeeeb3e Cleanup: use override specifier everywhere, and enable gcc warning to check for it. 2020-05-16 00:23:18 +02:00
Twan van Laarhoven 0c3712b61a Cleanup: indentation of public/protected/private keywords 2020-05-12 21:57:37 +02:00
Twan van Laarhoven 7cf5531efd Fix #31 2020-05-11 21:36:22 +02:00
Twan van Laarhoven b57d9b7615 Enable 64 bit static build and fix linker error 2020-05-11 01:54:21 +02:00
Twan van Laarhoven 0a0dd72e36 Fix null dereference when stylesheets are missing, added an error message 2020-05-09 13:33:41 +02:00
Twan van Laarhoven 968b8eabca Add "Save as directory" 2020-05-09 13:26:33 +02:00
Twan van Laarhoven 8b25815f72 Re-enabled intrusive_ptr 2020-05-07 22:25:02 +02:00
Twan van Laarhoven 6434532dfb GetMember is not reading. So don't try to fix-up "read" data when getting a member.
Fixes #3
2020-05-05 23:11:24 +02:00
Twan van Laarhoven 6edba0c5c0 Move buffering to Reader 2020-05-02 01:04:35 +02:00
Twan van Laarhoven a1d54f36fc Use LocalFileName class for file names inside a package. 2020-04-30 00:20:32 +02:00
Twan van Laarhoven d64dee7834 Fix: images were not being loaded from zip files.
wxImage::LoadFile requires the file to be seekable to peek at the header.
We work around this by buffering the header in a wrapper class.
2020-04-28 22:46:34 +02:00
Twan van Laarhoven 5f615b3117 Fix #5. Use our own function instead of wxRemoveFile, because the latter shows an error when the file doesn't exist. 2020-04-28 21:25:05 +02:00
Twan van Laarhoven f4b2a4316f Fix: don't run after_reading multiple times when there are included files 2020-04-27 14:23:26 +02:00
Twan van Laarhoven 42b7cf52b8 Don't write keys in canonical_name_form 2020-04-26 15:42:01 +02:00
Twan van Laarhoven 40d78edf0f Cleaned up the reflection code a bit
* Renamed 'tag' variable to 'handler'
* Removed addAlias stuff, instead check for matching names with if statements
* Added after_reading function that is called by Reader after reading a complete object. This generalizes Packaged::validate, which is now also called via this mechanism.
* Removed some backwards compatibility with <0.3.0 for templates
2020-04-26 15:33:59 +02:00
Twan van Laarhoven 54a3cbfde3 Replace include guards by #pragma once 2020-04-26 01:25:16 +02:00
Twan van Laarhoven bad9981ad9 Cleaned up copyright block.
Removed the year so we don't get tempted to change this ever again.
2020-04-26 01:11:14 +02:00
Twan van Laarhoven 4327abb803 Remove DECLARE_TYPEOF
It is no longer needed since C++11
2020-04-26 00:51:16 +02:00
Twan van Laarhoven 5e92d9455c Code cleanup: remove messy spaces before line continuation (\) in macros 2020-04-26 00:37:13 +02:00
Twan van Laarhoven 37c8641641 Replace scoped_ptr by unique_ptr 2020-04-25 22:28:32 +02:00
Twan van Laarhoven 64ea1d7322 Clean up pointer use:
* Use unique_ptr for Actions instead of manual memory management
 * Use unique_ptr in KeywordDatabase
 * Use unique_ptr instead of shared_ptr for file formats
 * Don't pass shared_ptr to Reader/Writer, use references instead
Also
 * Switch to C++17 so we can use map::try_emplace
2020-04-25 22:20:51 +02:00
Twan van Laarhoven 708b4389a0 Use make_intrusive/make_shared for smart pointer construction. 2020-04-25 22:20:51 +02:00
Twan van Laarhoven 4258ce1c6c Remove AColor class, because wxColour now supports alpha values. 2020-04-25 22:20:50 +02:00