Commit Graph

130 Commits

Author SHA1 Message Date
Thomas Goyne 0893ed3f0a Remove references to tr1 2012-11-10 18:05:57 -08:00
Thomas Goyne 0e7501f45c Fix some cases where the detached video dialog would get set to bogus sizes
At very large and very small sizes, setting the window's size with
SetSize may not actually result in the window changing to the requested
size.  Once this happened future adjustments to the size were incorrect,
and the video display would sometimes not fit in the window, and on os x
the window could get set to a negative size, with weird results.
2012-10-27 20:44:09 -07:00
Thomas Goyne e44c47c863 Remove $Id$ markers since git doesn't support them 2012-10-25 17:39:49 -07:00
Thomas Goyne a13d06318b Remove all glu.h includes since no glu functions are ever used. Updates #1511. 2012-10-08 10:21:20 -07:00
Thomas Goyne 09962a56d1 Use the last valid mouse position for VideoDisplay::GetMousePosition
On Windows opening the context menu triggers a mouse leave event, which
invalidates the current mouse position, so the Copy coordinates to
Clipboard command didn't work.
2012-08-25 18:33:46 -07:00
Thomas Goyne ffe41cdf20 Don't discard frames which are decoded before the video display becomes visible
Originally committed to SVN as r6950.
2012-07-29 03:23:24 +00:00
Thomas Goyne 8ba149a7e6 Actually save the video zoom to the subtitles file
Originally committed to SVN as r6948.
2012-07-24 02:40:37 +00:00
Thomas Goyne 3dc9e4fbea Don't try to set the zoom dropdown selection if it'd be out of bounds
Originally committed to SVN as r6928.
2012-07-05 23:05:34 +00:00
Thomas Goyne 2fb6b19e45 Destroy the old video context when detaching video
It was previously not being destroyed until video was reattached, which
wasted VRAM and caused problems on OS X.

Originally committed to SVN as r6927.
2012-07-04 15:30:21 +00: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
Thomas Goyne 18f158a364 Rename option "Always show visual tools" to "Only show visual tools when mouse is over video" as the old name said nothing about when they wouldn't be shown.
Originally committed to SVN as r6754.
2012-05-05 02:11:15 +00:00
Thomas Goyne 123f02f0fb Process hotkeys in wxEVT_CHAR_HOOK rather than wxEVT_KEY_DOWN
Char hook events propagate by default, removing the need for the event
filter to make key down events propagate, which was causing some funny
issues.

On Windows, the char hook handler runs before menu accelerators, fixing
a bug where Default context hotkeys would override more specific ones
when they appeared on a menu. Unfortunately, this is not the case on
GTK, so the dumb accelerator-disabling hack is still required.

Originally committed to SVN as r6724.
2012-04-27 19:07:49 +00:00
Thomas Goyne 582e947c75 Fix errors when reattaching video with some video cards
With ATI cards, deleting a wxGLContext seems to invalidate ALL
wxGlContexts, rather than just things associated with the deleted one.
This resulted in video breaking after closing the detached video dialog,
as the embedded video display was trying to use an invalidated context.
To work around this, delete and recreate the context when reattaching
video.

Also recreate the visual typesetting tool as OpenGLText holds references
to textures created on construction.

Originally committed to SVN as r6646.
2012-04-03 17:38:38 +00:00
Thomas Goyne 73e81c3dca Rewrite the overscan mask logic so that it works with blackbarred detached video
Originally committed to SVN as r6593.
2012-03-20 00:39:42 +00:00
Thomas Goyne de9cc755d2 Stop key event propagation when checking for hotkeys to avoid checking keypresses that aren't hotkeys several times
Originally committed to SVN as r6577.
2012-03-12 23:34:34 +00:00
Thomas Goyne 45dbc8bd15 Fix checks for which OpenGL headers to include on OS X
Originally committed to SVN as r6511.
2012-02-23 19:28:08 +00:00
Thomas Goyne 9dbfe5d8e5 Update the visual tool buttons when the active tool is changed via hotkey
Originally committed to SVN as r6424.
2012-02-01 18:47:37 +00:00
Thomas Goyne 0dc0135f9a Select the appropriate entry in the zoom dropdown when the zoom is changed externally so that keyboard navigation works. Updates #1433.
Originally committed to SVN as r6379.
2012-01-27 19:23: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 f8c27feedb Skip unprocessed key events. Updates #1408.
Originally committed to SVN as r6356.
2012-01-25 05:48:53 +00:00
Thomas Goyne e10055cb59 Don't try to create an OpenGL context until video is loaded
Creating it during startup triggers a few valgrind errors in vbox's gl
driver that may or may not matter.

Originally committed to SVN as r6334.
2012-01-22 05:59:43 +00:00
Thomas Goyne 1bcbc728c8 Mark the current visual tool as active in the toolbar
Originally committed to SVN as r6285.
2012-01-13 20:18:40 +00:00
Thomas Goyne cd48b711b4 Fix opengl errors when the file is modified with a minimized detached video window open
Originally committed to SVN as r6257.
2012-01-09 20:31:38 +00:00
Thomas Goyne cfc7e009f2 Don't disable or hide the visual tools while video is playing. Updates #1336.
Originally committed to SVN as r6168.
2011-12-27 01:38:00 +00:00
Thomas Goyne be3e9dae68 Update the value of the zoom dropdown when the detached video dialog is resized
Originally committed to SVN as r6143.
2011-12-22 21:32:09 +00:00
Thomas Goyne 43b6d910fb Resize the detached video dialog to the specified size when the video zoom is changed. Closes #493.
Originally committed to SVN as r6142.
2011-12-22 21:31:57 +00:00
Thomas Goyne a66cc26706 Remove all calls to wxKeyEvent::StopPropagation. Key events don't propagate by default and even if they did, events which are marked as processed don't propagate further.
Originally committed to SVN as r6046.
2011-12-22 21:16:43 +00:00
Thomas Goyne c0cfe8afce Make Vector2D's default constructor initialize to the invalid value rather than a seemingly valid value. Fixes a few cases where uninitialized vectors were used as if they were initialized.
Originally committed to SVN as r5987.
2011-12-06 23:13:06 +00:00
Thomas Goyne 904e0769b1 Remove unused paramters to VideoDisplay::UpdateSize
Originally committed to SVN as r5971.
2011-12-06 00:18:13 +00:00
Thomas Goyne 009d99407b Force a relayout of the video display after switching visual tools. Fixes a bug where the subtoolbar would sometimes appear in the wrong place.
Originally committed to SVN as r5959.
2011-12-05 01:45:08 +00:00
Thomas Goyne d6ba00883e Fix infinite loop when opening video with wxgtk
Originally committed to SVN as r5954.
2011-12-01 03:47:19 +00:00
Thomas Goyne dc8dbbb535 Make VideoContext::Reset private and use SetVideo to close the video so that the change gets announced properly
Originally committed to SVN as r5903.
2011-11-23 18:32:37 +00:00
Thomas Goyne eb2a6e14fa Fix a crash caused by the video display recieving a paint event before the first video frame is ready
Originally committed to SVN as r5902.
2011-11-23 18:32:23 +00:00
Thomas Goyne 28c7e7dec3 Bind wxEVT_SIZE in the video display even when attached. There doesn't seem to be any reason not to and it fixes some bugs with resizing the main window.
Originally committed to SVN as r5873.
2011-11-18 01:20:47 +00:00
Thomas Goyne 4be9c302d3 Fix rendering of the clip visual tools with detached video
Originally committed to SVN as r5847.
2011-11-12 01:23:40 +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 feb752c24c Store the video display and slider in the context directly rather than going through the video box. Fxes a crash when detaching video.
Originally committed to SVN as r5845.
2011-11-12 01:23:18 +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 1741ce93f6 Factor out the mouse wheel forwarding code in the audio display to a function used by the audio display, video display and subtitles grid, and make it actually work
Originally committed to SVN as r5781.
2011-10-25 19:40:45 +00:00
Thomas Goyne da6a208062 Bind wxEVT_LEFT_DCLICK in VideoDisplay so the cross and drag visual tools work
Originally committed to SVN as r5697.
2011-09-30 20:42:37 +00:00
Thomas Goyne cc147d1660 Eliminate uses of c_str made unnecessary by changed to wxString::Format in wx 2.9
Originally committed to SVN as r5612.
2011-09-28 19:43:48 +00:00
Thomas Goyne d990bbbb99 Eliminate all unnecessary uses of L and _T
Originally committed to SVN as r5611.
2011-09-28 19:43:11 +00:00
Thomas Goyne 934a5b24eb Refine the commit types
Switch to a bitmask with much more finely-grained information about what
changed in the commit, fixing a few potential correctness problems and
significantly improving the performance of several scenarios where commits
are spammed very frequently.

Originally committed to SVN as r5590.
2011-09-15 05:16:32 +00:00
Thomas Goyne e5d660e281 Hide visual tools while video is playing. Closes #1336.
Originally committed to SVN as r5586.
2011-09-02 00:03:40 +00:00
Thomas Goyne d82e2bb496 Use wxEVT_CONTEXT_MENU for context menus rather than right button down so that the context menu key works correctly. Updates #1238.
Originally committed to SVN as r5578.
2011-08-31 04:17:37 +00:00
Thomas Goyne fc0db4fc36 Convert the VideoDisplay context menu over to the new menu system
Originally committed to SVN as r5563.
2011-08-27 06:30:35 +00:00
Thomas Goyne e2f464c94f Add commands for the video display context menu items
Originally committed to SVN as r5562.
2011-08-27 06:30:29 +00:00
Thomas Goyne ca6d5b1f3e Rearrange VideoDisplay's privates to make them a bit less randomly ordered and switch from auto_ptr to scoped_ptr
Originally committed to SVN as r5561.
2011-08-27 06:30:23 +00:00
Thomas Goyne 561216d4c8 Make hotkey::check take a project context and make FrameMain::context private
Originally committed to SVN as r5532.
2011-07-29 23:16:55 +00:00
Thomas Goyne 88f0659307 Rewrite the toolbar generation code
The old toolbar code didn't actually support any nontrivial
customization of toolbars, as it had a hardcoded list of commands which
would be enabled or disabled, and the checks for enabling/disabling
toolbar buttons was done only in the specific situations which those
commands used.

Make icon size a user customizable option and add support for
dynamically changing it at runtime.

Originally committed to SVN as r5468.
2011-07-15 04:06:23 +00:00