Commit Graph

64 Commits

Author SHA1 Message Date
Thomas Goyne a7f4fb5b87 Run clang-modernize on things 2013-11-23 09:57:22 -08:00
Thomas Goyne e0fcfef32e Remove some unused includes in video_box.cpp 2013-06-12 20:01:21 -07:00
Thomas Goyne d7d2e17093 Remove calls to SetBackgroundStyle(wxBG_STYLE_COLOUR)
With wx2.9 it's a no-op.
2013-01-09 19:40:49 -08:00
Thomas Goyne ca80156a4d Add some padding between the video box textctrls 2013-01-09 19:38:41 -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 7c477f3cd1 Use a real toolbar for the video box's buttons 2012-12-11 08:25:24 -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 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 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 e4a6092b36 Use signals for selection change notifications 2012-10-12 14:54:07 -07:00
Thomas Goyne f90d7a56fa Mostly rewrite the VideoDisplay sizing logic
Fixes layout errors after maximizing when the window previously wasn't
big enough to fit the video and an infinite loop caused by wxGTK not
updating the window size immediately.

Makes it so that the bottom video toolbar is not pushed offscreen by
high video zoom. This is not always desirable, but should be an
improvement in most cases.

Closes #1409.

Originally committed to SVN as r6926.
2012-07-04 15:30:16 +00:00
cantabile 4b78e05695 Video box: tweak the tab order
Move the slider before the buttons,
and move the video display before the slider.

Originally committed to SVN as r6895.
2012-06-12 02:59:41 +00:00
Thomas Goyne 571752a955 Make the visual typesetting toolbar use all available space
When toolbars actually have a background (as on OS X), the stretch
spacer was very ugly, and there's no different on platforms without a
background.

Originally committed to SVN as r6880.
2012-05-26 20:16:12 +00:00
Thomas Goyne 5e96d6e8c3 Remove periods from single-sentence tooltips
Originally committed to SVN as r6449.
2012-02-07 01:22:32 +00:00
Thomas Goyne a114238396 Use AssTime::GetASSFormated for the video position display
Originally committed to SVN as r6399.
2012-01-31 00:44:26 +00:00
Thomas Goyne 2d5df24fd6 Update the zoom on Enter in the zoom box. Updates #1433.
Originally committed to SVN as r6378.
2012-01-27 19:23:16 +00:00
Thomas Goyne 6c879c12f1 Move the visual tool submode buttons to the main visual tool toolbar
Creating an entire toolbar for one button in the drag mode is a
pointless waste of space and source of ugliness. The secondary toolbar
was more reasonable for the vector clip tool, but it's still a bit
pointless as there's enough space for it on the main toolbar at any
reasonable zoom level.

Closes #1401.

Originally committed to SVN as r6333.
2012-01-22 05:59:36 +00:00
Thomas Goyne 6d4a56d391 Delete most of VideoBox's members
VideoBox is down to one method so it doesn't actually need to be able to
reference most of the stuff it constructs.

Originally committed to SVN as r6331.
2012-01-22 05:59:23 +00:00
Thomas Goyne 71345af81a Overload operator int() on AssTime and remove GetMS/SetMS
Originally committed to SVN as r6123.
2011-12-22 21:28:51 +00:00
Thomas Goyne ec63fad7c5 Make help buttons fall back to the docs wiki if the scraped html files aren't available locally
Originally committed to SVN as r6084.
2011-12-22 21:22:31 +00:00
Thomas Goyne c26e61f209 Remove the audio resync code from VideoContext. It didn't actually work with the threaded video provider and should be unneccesary as video now always plays back at full speed (dropping frames if needed).
Originally committed to SVN as r5965.
2011-12-05 05:27:05 +00:00
Thomas Goyne 51149104d9 Make all of VideoBox's members private
Originally committed to SVN as r5846.
2011-11-12 01:23:29 +00:00
Thomas Goyne be77dc8307 Mostly rewrite the visual tools and related classes
Convert all coordinates within the visual tools to Vector2D, which has
been significantly extended. Eliminates a lot of issues with accumulated
rounding errors and simplifies a lot of code.

Modernize the visual tools' interactions with the rest of Aegisub by
connecting to signals directly rather than routing everything through
the video display and converting the main visual tool mode toolbar to
the command system.

Extract all references to OpenGL from the visual tools and move them to
OpenGLWrapper as a first step towards making it possible to implement an
alternative video renderer. In the process, eliminate all uses of OpenGL
immediate mode.

Fix a bunch of minor issues and general instability.

Originally committed to SVN as r5823.
2011-11-06 17:18:20 +00:00
Thomas Goyne 29f0786c81 Update the video box time boxes when the active line changes
Originally committed to SVN as r5809.
2011-11-04 05:11:24 +00:00
Thomas Goyne 8aca250fd0 Kill cmd::id and friends. It didn't work correctly as ids weren't stable and only VideoBox still used it
Originally committed to SVN as r5635.
2011-09-28 19:47:53 +00:00
Thomas Goyne 1f095b0a01 Remove the SubsEditBox from the context in favor of the SubsEditTextCtrl as it was the only public member of SubsEditBox
Originally committed to SVN as r5595.
2011-09-15 05:17:07 +00:00
Thomas Goyne a45b971b3a Redesign ToggleBitmap to operate on a command
Originally committed to SVN as r5565.
2011-08-27 06:30:49 +00:00
Thomas Goyne d3e7f02597 Update the video box time boxes when detached video is first opened
Originally committed to SVN as r5537.
2011-08-17 05:32:21 +00:00
Thomas Goyne 1e2abbd45a Fix leak of all icon bitmaps
Originally committed to SVN as r5471.
2011-07-15 17:24:05 +00:00
Thomas Goyne f4d44f7c18 Move the zoom box from the main toolbar to the video box
Originally committed to SVN as r5467.
2011-07-15 04:06:16 +00:00
Thomas Goyne 8d968e4dd5 Move the code for updating the time/frame display boxes from VideoDisplay to VideoBox
Originally committed to SVN as r5266.
2011-01-23 07:48:07 +00:00
Thomas Goyne 091c8170f2 Make several of VideoDisplay's members private
Originally committed to SVN as r5265.
2011-01-23 07:47:59 +00:00
Thomas Goyne 6ad2098749 Make VideoSlider use commands for its key events
Originally committed to SVN as r5256.
2011-01-21 04:57:36 +00:00
Thomas Goyne 71daddeeb2 Convert the video box buttons over to commands
Originally committed to SVN as r5252.
2011-01-20 05:58:01 +00:00
Thomas Goyne d84b768171 Remove the 'audio' and 'grid' public members from VideoContext and migrate everything that used them over to Context
Originally committed to SVN as r5211.
2011-01-16 07:17:08 +00:00
Thomas Goyne 3345797ff6 Use signals in AudioController and AudioTimingController
Originally committed to SVN as r4907.
2010-12-08 08:09:16 +00:00
Amar Takhar c15777f844 Merge audio_display_rewrite branch to trunk. This is not a complete work, don't expect to time anything for a while.
Originally committed to SVN as r4903.
2010-12-08 03:36:10 +00:00
Thomas Goyne 6d2b941e76 Rework how committing changes works
Rather than everything having to separately commit changes to the ass
and then tell the subs grid to notify various parts of Aegisub about the
changes, committing the AssFile now triggers an event which objects
listen for.

AssFile::Commit now also has an argument to indicate what sorts of
changes were made to the file. For now these types are very broad.

Originally committed to SVN as r4901.
2010-12-07 19:09:28 +00:00
Thomas Goyne d9006b0eb4 Make VideoContext use events for some of its communication with other objects
Originally committed to SVN as r4900.
2010-12-07 19:09:21 +00:00
Thomas Goyne 6432ea1f94 Remove the realtime visual tool option, as the threaded video display makes it pointless
Originally committed to SVN as r4825.
2010-10-26 04:12:10 +00:00
Thomas Goyne 768f74ae3c Make VideoDisplay set its initial zoom itself rather than FrameMain
Originally committed to SVN as r4739.
2010-08-13 05:51:17 +00:00
Thomas Goyne c10e9e3a5b Make video and audio providers throw typed exceptions.
Don't display error messages and try other providers when the user
cancels loading a file.

Remove files from the MRU lists if they can't be found.

Closes #717.

Originally committed to SVN as r4717.
2010-08-02 06:32:01 +00:00
Thomas Goyne 4a8abae3a3 Kill options.h and options.cpp, which have been empty for a while
Originally committed to SVN as r4676.
2010-07-12 21:49:48 +00:00
Thomas Goyne acba2c6b63 Rewrite VFR handling in Aegisub.
Kill vfr.h and vfr.cpp and use the libaegisub versions of them instead.

Rather than the globals VFR_Input and VFR_Output, everything related to
frame rate is now part of the video context. Most things which used to
use VFR_Output now call VideoContext::TimeAtFrame etc.; video providers,
rather than modifying VFR_Input directly, now have getters for their
frame rates which VideoContext calls. Read-only public access to
VFR_Input and VFR_Output are still provided (hopefully temporarily) for
a few things which were awkward to do through VideoContext.

The Avisynth provider now might correctly handle VFR MKVs which can be
opened with DirectShowSource but not DSS2.

Rework keyframe handling as well, so that it continues to match the vfr
handling in design and implementation.

Originally committed to SVN as r4662.
2010-07-08 04:29:04 +00:00
Amar Takhar 40e12403d5 Merge all changes from the libaegisub branch into trunk, the effective range is r4175:4330. All options have been re-done and now use Cajun to support a json-backed format.
Initial support for low-level access and file I/O methods are included as well.

Originally committed to SVN as r4331.
2010-05-21 01:13:36 +00:00
Thomas Goyne 2c876e79c3 Make visual tools use only screen coordinates.
Previously the visual typesetting tools and the overlay mask used
several coordinate frames, converting between them in many places in
inconsistent ways.  This elimiates all uses of coordinate frames other
than screen and script, and makes the conversion done in one place, and
only when parsing or serializing ASS.

This fixes:

 - A few minor rounding errors

 - Horrible brokeness when only part of the video frame is being
   displayed, due to higher levels of zoom than fit onscreen or panning
   the video

 - Distortion of the visual typesetting tools when the combination of
   overridden aspect ratio, script resolution, and video resolution did
   not result in square pixels.

 - Resolution-dependence of the visual typesetting tools, which resulted
   in some tools becoming hard to use at zooms outside the range of
   100-200%.

 - Some draggable controls used the mouse's script coordinates,
   resulting in noticable jerky movement at high zoom levels or when
   using strange script resolutions.

Closes #966.

Originally committed to SVN as r4289.
2010-05-16 06:39:11 +00:00
Thomas Goyne cbd76e7010 Rewrite the video rendering code to support displaying videos which are larger than the maximum texture size. This does not currently support YV12 (which Aegisub currently never uses), but should be otherwise functional.
Originally committed to SVN as r3615.
2009-10-05 04:22:28 +00:00
Amar Takhar d348b4e33e Fix all the headers in *.cpp, this includes:
* Wrapping all headers that are in agi_pre.h with AGI_PRE.
 * Sorting alphabetically.

Originally committed to SVN as r3515.
2009-09-10 13:06:40 +00:00