Commit Graph

1779 Commits

Author SHA1 Message Date
Twan van Laarhoven 74230fefeb Fix #17: change &instrs[pos] to &instrs[0]+pos to avoid debug assertions when pos=instrs.size() 2020-05-04 13:22:44 +02:00
Twan van Laarhoven 177cc25487 Don't use wxToolBarToolBase::AddDropdownMenu, it is not supposed to be used and might not work in some ports. 2020-05-04 13:22:05 +02:00
Twan van Laarhoven 9f99bf4658 There is little point to a pool allocator with shared_ptr, since ref counters are still allocated as well. 2020-05-04 00:44:50 +02:00
Twan van Laarhoven 07fe2406e7 Don't allocate wxToolBarToolBase, that can lead to memory corruption and two days of debugging. 2020-05-04 00:43:58 +02:00
Twan van Laarhoven b1595c9179 (small clean up) 2020-05-02 16:12:15 +02:00
Twan van Laarhoven 6edba0c5c0 Move buffering to Reader 2020-05-02 01:04:35 +02:00
Twan van Laarhoven 6c4277bd35 Fix #15, menu and toolbar icons on wxGTK 2020-05-01 12:55:43 +02:00
Twan van Laarhoven 1fb3f15aff Generate image for disabled toolbar buttons and menu items.
Fixes #13.

Removed IconMenu class, use add_menu_item/add_menu_item_tr instead.
Added _tr variants that automatically do locale translation
2020-05-01 03:26:02 +02:00
Twan van Laarhoven 8468c5bd93 Fix #9: Don't use wxWidgets' best size calculation for card and keyword lists. 2020-04-30 21:11:43 +02:00
Twan van Laarhoven 77e2ff8fd7 Fix #11: Gallery list best size: Invalidate cache and don't use DoGetBestClientSize
Revert "Cleanup: use DoGetBestClientSize"
This reverts commit 5700005243.

DoGetBestClient size is a nice idea, but it doesn't take scrollbars into account.
2020-04-30 20:35:12 +02:00
Twan van Laarhoven 06471e5231 Use Base::reflect instead of reflect_impl for reflecting base properties, made reflect_impl private.
This should fix #8
2020-04-30 17:40:36 +02:00
Twan van Laarhoven e74774138c Fix warnings and linker errors on gcc 2020-04-30 14:25:28 +02:00
Twan van Laarhoven 30391672ad Exception instead of warning 2020-04-30 14:25:18 +02:00
Twan van Laarhoven a11af1767c Fix #6, fix #7: infinite loops/infinite recursion in regex script functions are now "nice" exceptions 2020-04-30 14:08:06 +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 f92c09e87a Disable hover effect on field borders for now (it causes redraw issues on some templates) 2020-04-29 21:29:01 +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 ed918ce64f changelog: improved card filter 2020-04-28 13:30:06 +02:00
Twan van Laarhoven 618df3b534 Script parser now produces warnings about statements where expressions are expected, and about the = comparison operator. 2020-04-27 19:14:17 +02:00
Twan van Laarhoven fd6f91e756 Warning instead of error for incorrect word-lists 2020-04-27 18:11:06 +02:00
Twan van Laarhoven a8b7699ac3 Revert changes to spec_sort 2020-04-27 17:21:24 +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 2c165271be Fix: scrolling on style and set info panels 2020-04-27 13:22:01 +02:00
Twan van Laarhoven 46b5075d7a Logo 2020-04-27 13:17:55 +02:00
Twan van Laarhoven 7ef0b885bb Allow "field:query" in the quick filter bar 2020-04-27 13:16:56 +02:00
Twan van Laarhoven 1a39b85b73 (fix comment) 2020-04-27 01:21:18 +02:00
Twan van Laarhoven 26dd6e570b Fix reading of word lists 2020-04-26 23:43:04 +02:00
Twan van Laarhoven 0f2e7ac3fe Fix uxtheme stuff on windows 2020-04-26 22:30:00 +02:00
Twan van Laarhoven af7e8c9d39 Switch (back) to our own Color type instead of using wxColour.
The reason is that wxColour's default constructor creates an invalid color (what is that even?). It is nicer to just have default be transparent.
2020-04-26 21:41:35 +02:00
Twan van Laarhoven 8698144ac4 Warn about parse errors in colors 2020-04-26 17:40:22 +02:00
Twan van Laarhoven c324c8bbbb to_code now adds quotes around strings.
to_code for map now includes keys.
This maans that the basic script-functions test passes.
2020-04-26 17:35:14 +02:00
Twan van Laarhoven 2e897edbbf Use toSomeType() instead of operator SomeType in ScriptValue.
This means that we are more explicit about type conversions.
Also use override specifiers for overriden virtual functions in ScriptValue.
2020-04-26 17:03:43 +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 4bebd48786 Moved tab_index to Style (instead of Field), it makes more sense there, since it pertains to the layout of stuff on the card.
Also don't precalculate list of fields sorted by tab order, just find the next/previous ones on the fly.
2020-04-26 02:16:39 +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 5d4c3402df Added fancy mouseover effect to field borders.
This might be slow, if this becomes a problem I could add a setting to disable it.
2020-04-25 23:59:56 +02:00
Twan van Laarhoven 7d06e903a4 Rename script function rotate -> rotate_image 2020-04-25 23:46:30 +02:00
Twan van Laarhoven bce298e2f0 Update changelog 2020-04-25 23:38:13 +02:00
Twan van Laarhoven b5f18ebec7 Take version number from Cmake file. This way the number is only in one place 2020-04-25 23:36:00 +02:00
Twan van Laarhoven 190d9c8ffa Clean up: remove unused code template stuff 2020-04-25 23:02:26 +02:00
Twan van Laarhoven 37c8641641 Replace scoped_ptr by unique_ptr 2020-04-25 22:28:32 +02:00
Twan van Laarhoven b7ed93cd02 Remove dependency on boost::random, since that is now in std 2020-04-25 22:22:15 +02:00
Twan van Laarhoven 787a707900 Use std::shuffle instead of std::random_shuffle, since the latter is removed in C++17 2020-04-25 22:20:51 +02:00
Twan van Laarhoven 0d42df1537 Fix type conversion errors in GCC/wxGTK 2020-04-25 22:20:51 +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