Commit graph

96 commits

Author SHA1 Message Date
Thomas Goyne 33a4a056a4 Move everything up a level since the root dir no longer has stuff 2014-03-11 12:14:57 -07:00
Thomas Goyne b1639c6162 Make the entry lists be of the appropriate type rather than just AssEntry
Eliminates a bajillion dynamic casts.
2014-03-09 15:12:39 -07:00
Thomas Goyne 805481315e Split AssFile into separate lists for each section 2014-03-09 08:06:21 -07:00
Thomas Goyne 038eb6e58b Use the new much shorter event names 2013-12-11 18:50:12 -08:00
Thomas Goyne 6fad60e58d Use NSDMIs where applicable 2013-12-11 18:50:12 -08:00
Thomas Goyne a7f4fb5b87 Run clang-modernize on things 2013-11-23 09:57:22 -08:00
Thomas Goyne ebd01c50c9 Rewrite NumValidator
Split int validating and double validating into two separate classes.

Make double parsing, validating and stringifying locale-aware. This is
far more complicated than it needs to be due to that Aegisub's locale
handling is a total mess.

Use DoubleValidator rather than wxFloatingPointValidator, because the
latter doesn't work with Aegisub's locale mess (on OS X it uses the C
locale for some things, and the locale reported by CoreFoundation for
others).

Closes #1568.
2013-10-15 10:59:23 -07:00
Thomas Goyne a75b7f6ca8 Prefetch the list of fonts for the style editor dialog
On my machine (with ~5000 fonts installed), enumerating the installed
fonts was about 75% of the total construction time of the style editor
dialog.
2013-07-09 08:35:50 -07:00
Thomas Goyne 4472552fab Fix setting the style editor preview background color 2013-06-11 19:46:28 -07:00
Thomas Goyne 39bff418ca Remove handling for no subtitle providers available 2013-06-11 19:46:26 -07:00
Thomas Goyne f5ee5ca740 Use ColorValidator in DialogStyleEditor 2013-06-11 19:46:10 -07:00
Thomas Goyne 72d4577d7d Kill scoped_ptr in favor of unique_ptr 2013-06-11 16:06:58 -07:00
Thomas Goyne f21a72992b Use unique_ptr for most non-wx owning pointers 2013-06-08 19:21:49 -07:00
Thomas Goyne 151b1cb6ac Kill AegiFloatToString and AegiIntegerToString 2013-06-08 19:21:30 -07:00
Thomas Goyne e115206998 Change VariableDataType to an enum class 2013-02-07 08:49:11 -08:00
Thomas Goyne 1e0f08c0ed Mostly purge wxWidgets from non-UI stuff
Use boost::filesystem::path for all paths, and std::string for all other
strings, converting to/from wxString as close to the actual uses of wx
as possible.

Where possible, replace the uses of non-UI wxWidgets functionality with
the additions to the standard library in C++11, or the equivalents in
boost.

Move the path token management logic to libaegisub (and rewrite it in
the process).

Add a basic thread pool based on asio and std::thread to libaegisub.

This touches nearly every file in the project and a nontrivial amount of
code had to be rewritten entirely, so there's probably a lot of broken
stuff.
2013-02-06 13:22:15 -08:00
Thomas Goyne 948d3055d5 Eliminate some unnecessary includes of subs_grid.h 2013-01-14 08:37:03 -08:00
Thomas Goyne 0b5674e6aa Hide the alpha controls when the alpha isn't used 2013-01-14 08:37:02 -08:00
Thomas Goyne 4c147cbf0b Make ColourButton saner
Emit a separate event for when a color is picked rather than horribly
overloading the onclick event, and switch to a wxButton base since
wxBitmapButton no longer does anything useful.
2013-01-14 08:37:01 -08:00
Thomas Goyne 8470ffdbf0 Allow negative values for shadow depth, angle and spacing in the style editor 2013-01-09 16:48:32 -08:00
Thomas Goyne a99428c49d Extract options and MRU stuff from main.h
Nearly all of the files including main.h are doing so only for OPT_GET
and friends, which are rather unrelated to the main things that main.h
declares.
2013-01-09 16:48:31 -08:00
Thomas Goyne 3ec82952f8 Partially de-wxify AssStyle 2012-12-31 07:09:31 -08:00
Thomas Goyne d49758edbf De-wxify AssOverride 2012-12-31 07:09:31 -08:00
Thomas Goyne d0f4d9df99 Replace all uses of lagi_wxString with to_wx 2012-12-22 15:18:38 -08:00
Thomas Goyne 8c2062f0c7 Store AssOverrideTags directly rather than a vector of pointers 2012-12-10 17:04:18 -08:00
Thomas Goyne 3949ccec24 Drop the position argument from ProcessParametersCallback since nothing needs it 2012-12-02 12:39:37 -08:00
Thomas Goyne 1c176e8568 Store parsed dialogue blocks in a ptr_vector
This eliminates the need to explicitly delete the parsed blocks.

Also go ahead and remove AssDialogue::Blocks since it's really not a
very good idea in general.
2012-12-02 12:29:33 -08:00
Thomas Goyne 7090d2f513 Don't include wx/wx.h in subs_grid.h 2012-12-02 06:33:29 -08:00
Thomas Goyne 96cf5ea7ed Kill the #ifndef AGI_PRE guards
They don't actually improve compilation performance and make it more
annoying to modify what things are in the precompiled header.
2012-12-02 06:33:29 -08:00
Thomas Goyne b94547aa71 Drop format and header lines from the in-memory file representation
They're just pointless cruft, so drop them from the file when parsing
and re-add them when saving as ASS or SSA.
2012-11-24 16:24:00 -08:00
Thomas Goyne 06aaaff16b NULL -> nullptr 2012-11-13 08:51:01 -08:00
Thomas Goyne e4d6b8661b Add range adaptor for filtering to a specific subclass from a heterogeneous range
This makes looping over the subtitle file and parsed dialogue lines less
awkward in many cases.
2012-11-12 18:35:25 -08:00
Thomas Goyne 67df64e879 Use range-based for loops in a bunch of places 2012-11-12 18:35:25 -08:00
Thomas Goyne 1848aad5c1 Fix compilation with C++ 11/libc++ 2012-11-12 18:35:21 -08:00
Thomas Goyne 0893ed3f0a Remove references to tr1 2012-11-10 18:05:57 -08:00
Thomas Goyne ea5428b65f Replace AssColor with agi::Color
Add agi::Color, and replace AssColor and all uses of wxColor that are
not immediately passed to/from wx with it.
2012-11-10 18:05:56 -08:00
Thomas Goyne 83761d881a Convert AssFile::Line to an intrusive list
Gives O(1) pointer -> iterator conversions, better memory usage, better
performance, and overall slightly simplifies the code using it.
2012-11-10 18:05:56 -08:00
Thomas Goyne e44c47c863 Remove $Id$ markers since git doesn't support them 2012-10-25 17:39:49 -07:00
Thomas Goyne c7fd04a739 Rename ASS -> Ass in symbol names
Most types and functions used Ass, but a decent number used ASS, so make
them consistent.
2012-10-16 09:52:19 -07:00
Thomas Goyne a1fad1f947 Drop support for ASS2
It is very unlikely that anyone has ever actually used ASS2 for
anything, and in practice it was not usable anyway as the bottom margin
was always either ignored or blindly overwritten.
2012-10-12 14:54:08 -07:00
Thomas Goyne 63d60b9b1e Save the size of the style editor in addition to the position
Originally committed to SVN as r6743.
2012-05-02 22:42:37 +00:00
Thomas Goyne b8212512e7 Work around a bug which made style names in the style editor scrolled to the left far sooner than they needed to be
Originally committed to SVN as r6737.
2012-05-01 02:50:09 +00:00
Thomas Goyne d83507c816 Use the overload of wxComboBox::Append that takes a wxArrayString rather than manually looping over the items
Originally committed to SVN as r6703.
2012-04-16 23:54:53 +00:00
Thomas Goyne fe36760872 Use 16x16 icons for dialogs rather than cropping the 24x24 icons to 16x16
Originally committed to SVN as r6650.
2012-04-03 20:40:24 +00:00
Thomas Goyne 4bb707d663 Use "color" in all UI strings
Previously there were 29 instances of "color" and 9 of "colour".

Originally committed to SVN as r6648.
2012-04-03 17:38:50 +00:00
Thomas Goyne c4a1a93b97 Center most of the message boxes over their parent windows
Originally committed to SVN as r6629.
2012-03-28 23:59:19 +00:00
Thomas Goyne 2840fc0aea Replace most remaining uses of std::auto_ptr with agi::scoped_ptr
Originally committed to SVN as r6604.
2012-03-25 04:05:38 +00:00
Thomas Goyne b32515da80 Strip trailing whitespace from all cpp and h files
Originally committed to SVN as r6600.
2012-03-25 04:05:06 +00:00
Thomas Goyne b5a71587ff Move more of the style storage management logic to AssStyleStorage
Originally committed to SVN as r6545.
2012-03-08 04:17:29 +00:00
Thomas Goyne 49ce5275d1 Only prompt to update references to a renamed style if there actually are any
Originally committed to SVN as r6537.
2012-03-07 22:40:26 +00:00