Document a few classes

Originally committed to SVN as r6569.
This commit is contained in:
Thomas Goyne 2012-03-12 00:07:09 +00:00
parent 30d7a18e97
commit 812e2e8025
3 changed files with 31 additions and 37 deletions

View File

@ -49,11 +49,8 @@ class AssDialogue;
class wxComboBox;
class wxTextCtrl;
/// DOCME
/// @class VideoBox
/// @brief DOCME
///
/// DOCME
/// @brief The box containing the video display and associated controls
class VideoBox : public wxPanel, private SelectionListener<AssDialogue> {
std::list<agi::signal::Connection> slots;
agi::Context *context; ///< Project context

View File

@ -58,11 +58,12 @@ namespace agi {
class OptionValue;
}
/// DOCME
/// @class VideoContext
/// @brief DOCME
/// @brief Manage a bunch of things vaguely related to video playback
///
/// DOCME
/// VideoContext's core responsibility is opening and playing videos. Along
/// with that, it also manages video timecodes and keyframes, and some
/// video-related UI properties
class VideoContext : public wxEvtHandler {
/// Current frame number changed (new frame number)
agi::signal::Signal<int> Seek;
@ -93,7 +94,8 @@ class VideoContext : public wxEvtHandler {
/// File name of the currently open keyframes or empty if keyframes are not overridden
wxString keyFramesFilename;
/// DOCME
/// Playback timer used to periodically check if we should go to the next
/// frame while playing video
wxTimer playback;
/// Time since playback was last started
@ -114,16 +116,20 @@ class VideoContext : public wxEvtHandler {
/// overridden by the user
double arValue;
/// DOCME
/// @brief The current AR type
///
/// 0 is square pixels; 1-3 are predefined ARs; 4 is custom, where the real
/// AR is in arValue
int arType;
/// Does the currently loaded video file have subtitles muxed into it?
bool hasSubtitles;
/// Filename of the currently loaded timecodes file, or empty if timecodes
/// have not been overriden
/// have not been overridden
wxString ovrTimecodeFile;
/// Cached option for audio playing when frame stepping
const agi::OptionValue* playAudioOnStep;
void OnPlayTimer(wxTimerEvent &event);
@ -193,6 +199,7 @@ public:
/// Get the current frame number
int GetFrameN() const { return frame_n; }
/// Get the actual aspect ratio from a predefined AR type
double GetARFromType(int type) const;
/// Override the aspect ratio of the currently loaded video
@ -200,8 +207,7 @@ public:
/// @param value If type is 4 (custom), the aspect ratio to use
void SetAspectRatio(int type, double value=1.0);
/// @brief DOCME
/// @return
/// Get the current AR type
int GetAspectRatioType() const { return arType; }
/// Get the current aspect ratio of the video

View File

@ -41,46 +41,32 @@
class OpenGLWrapper;
class AssDialogue;
/// DOCME
/// VisualDraggableFeature display types
enum DraggableFeatureType {
/// DOCME
DRAG_NONE,
/// DOCME
DRAG_BIG_SQUARE,
/// DOCME
DRAG_BIG_CIRCLE,
/// DOCME
DRAG_BIG_TRIANGLE,
/// DOCME
DRAG_SMALL_SQUARE,
/// DOCME
DRAG_SMALL_CIRCLE
};
/// DOCME
/// @class VisualDraggableFeature
/// @brief Onscreen control used by many visual tools which doesn't do much
/// @brief Onscreen control used by many visual tools
///
/// By itself this class doesn't do much. It mostly just draws itself at a
/// specified position and performs hit-testing.
class VisualDraggableFeature {
Vector2D start; ///< position before the last operation began
Vector2D start; ///< position before the last drag operation began
public:
/// @brief Constructor
/// Constructor
VisualDraggableFeature();
/// Shape of feature
DraggableFeatureType type;
Vector2D pos;
int layer; /// Layer; Higher = above
AssDialogue* line; /// The dialogue line this feature is for
DraggableFeatureType type; ///< Shape of feature
Vector2D pos; ///< Position of this feature
int layer; ///< Layer; Higher = above
AssDialogue* line; ///< The dialogue line this feature is for; may be NULL
/// @brief Is the given point over this feature?
/// @param mouse_pos Position of the mouse
@ -90,9 +76,14 @@ public:
/// @param gl OpenGLWrapper to use
void Draw(OpenGLWrapper const& gl) const;
/// Start a drag
void StartDrag();
/// Update the position of the feature during a drag
/// @param d New position of the feature
/// @param single_axis Only apply the larger of the two changes to the position
void UpdateDrag(Vector2D d, bool single_axis);
/// Has this feature actually moved since a drag was last started?
bool HasMoved() const;
};