2007-01-08 22:11:06 +01:00
|
|
|
// Copyright (c) 2007, Rodrigo Braz Monteiro
|
|
|
|
// All rights reserved.
|
|
|
|
//
|
|
|
|
// Redistribution and use in source and binary forms, with or without
|
|
|
|
// modification, are permitted provided that the following conditions are met:
|
|
|
|
//
|
|
|
|
// * Redistributions of source code must retain the above copyright notice,
|
|
|
|
// this list of conditions and the following disclaimer.
|
|
|
|
// * Redistributions in binary form must reproduce the above copyright notice,
|
|
|
|
// this list of conditions and the following disclaimer in the documentation
|
|
|
|
// and/or other materials provided with the distribution.
|
|
|
|
// * Neither the name of the Aegisub Group nor the names of its contributors
|
|
|
|
// may be used to endorse or promote products derived from this software
|
|
|
|
// without specific prior written permission.
|
|
|
|
//
|
|
|
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
|
|
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
|
|
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
// POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
//
|
2009-07-29 07:43:02 +02:00
|
|
|
// Aegisub Project http://www.aegisub.org/
|
2007-01-08 22:11:06 +01:00
|
|
|
//
|
2009-07-29 07:43:02 +02:00
|
|
|
// $Id$
|
|
|
|
|
|
|
|
/// @file visual_tool.h
|
|
|
|
/// @see visual_tool.cpp
|
|
|
|
/// @ingroup visual_ts
|
2007-01-08 22:11:06 +01:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2009-09-11 04:36:34 +02:00
|
|
|
#ifndef AGI_PRE
|
2010-05-23 10:53:27 +02:00
|
|
|
#include <list>
|
2007-07-01 09:09:37 +02:00
|
|
|
#include <vector>
|
2009-09-11 04:36:34 +02:00
|
|
|
|
2007-09-12 01:22:26 +02:00
|
|
|
#include <wx/log.h>
|
2009-09-10 07:25:25 +02:00
|
|
|
#include <wx/event.h>
|
|
|
|
#include <wx/button.h>
|
2009-09-11 04:36:34 +02:00
|
|
|
#endif
|
|
|
|
|
2007-01-21 07:30:19 +01:00
|
|
|
#include "gl_wrap.h"
|
|
|
|
|
2007-01-08 22:11:06 +01:00
|
|
|
class VideoDisplay;
|
|
|
|
class AssDialogue;
|
2010-05-16 08:39:11 +02:00
|
|
|
struct VideoState;
|
2007-07-04 06:24:47 +02:00
|
|
|
|
2010-05-20 10:55:46 +02:00
|
|
|
/// First window id for visualsubtoolbar items
|
2007-07-07 07:51:18 +02:00
|
|
|
#define VISUAL_SUB_TOOL_START 1300
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2010-05-20 10:55:46 +02:00
|
|
|
/// Last window id for visualsubtoolbar items
|
2007-07-07 07:51:18 +02:00
|
|
|
#define VISUAL_SUB_TOOL_END (VISUAL_SUB_TOOL_START+100)
|
|
|
|
|
2010-05-20 10:55:46 +02:00
|
|
|
class IVisualTool : public OpenGLWrapper {
|
|
|
|
protected:
|
|
|
|
/// DOCME
|
|
|
|
static const wxColour colour[4];
|
|
|
|
public:
|
|
|
|
virtual void OnMouseEvent(wxMouseEvent &event)=0;
|
|
|
|
virtual void OnSubTool(wxCommandEvent &)=0;
|
|
|
|
virtual void Update()=0;
|
|
|
|
virtual void Draw()=0;
|
|
|
|
virtual void Refresh()=0;
|
|
|
|
virtual ~IVisualTool() { };
|
|
|
|
};
|
|
|
|
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
/// DOCME
|
|
|
|
/// @class VisualTool
|
|
|
|
/// @brief DOCME
|
|
|
|
/// DOCME
|
2010-05-20 10:55:46 +02:00
|
|
|
template<class FeatureType>
|
|
|
|
class VisualTool : public IVisualTool {
|
2010-05-20 10:55:35 +02:00
|
|
|
private:
|
2010-05-20 10:55:58 +02:00
|
|
|
int dragStartX; /// Starting x coordinate of the current drag, if any
|
|
|
|
int dragStartY; /// Starting y coordinate of the current drag, if any
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
/// @brief Get the topmost visual feature under the mouse, or NULL if none are under the mouse
|
|
|
|
FeatureType* GetHighlightedFeature();
|
2007-01-08 22:11:06 +01:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
typedef typename std::list<FeatureType*>::iterator SelFeatureIter;
|
|
|
|
typedef typename std::list<FeatureType>::iterator FeatureIter;
|
|
|
|
typedef typename std::list<FeatureType>::const_iterator FeatureCIter;
|
2010-05-16 08:39:11 +02:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
std::list<FeatureType*> selFeatures; /// Currently selected visual features
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
bool externalChange; /// Only invalid drag lists when refreshing due to external changes
|
|
|
|
bool selChanged; /// Has the selection already been changed in the current click?
|
|
|
|
protected:
|
|
|
|
VideoDisplay *parent; /// VideoDisplay which this belongs to, used to frame conversion
|
|
|
|
bool holding; /// Is a hold currently in progress?
|
|
|
|
AssDialogue *curDiag; /// Active dialogue line for a hold; only valid when holding = true
|
|
|
|
bool dragging; /// Is a drag currently in progress?
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
FeatureType* curFeature; /// Topmost feature under the mouse; only valid during a drag?
|
|
|
|
std::list<FeatureType> features; /// List of features which are drawn and can be clicked on
|
|
|
|
bool dragListOK; /// Do the features not need to be regenerated?
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
int frame_n; /// Current frame number
|
|
|
|
VideoState const& video; /// Mouse and video information
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
bool leftClick; /// Is a left click event currently being processed?
|
|
|
|
bool leftDClick; /// Is a left double click event currently being processed?
|
|
|
|
bool shiftDown; /// Is shift down?
|
|
|
|
bool ctrlDown; /// Is ctrl down?
|
|
|
|
bool altDown; /// Is alt down?
|
2007-06-30 23:56:15 +02:00
|
|
|
|
2007-01-08 22:11:06 +01:00
|
|
|
void GetLinePosition(AssDialogue *diag,int &x,int &y);
|
2007-01-09 07:25:25 +01:00
|
|
|
void GetLinePosition(AssDialogue *diag,int &x,int &y,int &orgx,int &orgy);
|
2007-07-04 02:36:04 +02:00
|
|
|
void GetLineMove(AssDialogue *diag,bool &hasMove,int &x1,int &y1,int &x2,int &y2,int &t1,int &t2);
|
2007-01-09 07:25:25 +01:00
|
|
|
void GetLineRotation(AssDialogue *diag,float &rx,float &ry,float &rz);
|
2007-01-10 22:01:47 +01:00
|
|
|
void GetLineScale(AssDialogue *diag,float &scalX,float &scalY);
|
2008-09-10 18:13:54 +02:00
|
|
|
void GetLineClip(AssDialogue *diag,int &x1,int &y1,int &x2,int &y2,bool &inverse);
|
|
|
|
wxString GetLineVectorClip(AssDialogue *diag,int &scale,bool &inverse);
|
2010-05-20 10:55:29 +02:00
|
|
|
void SetOverride(AssDialogue* line, wxString tag, wxString value);
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
/// @brief Get the dialogue line currently in the edit box
|
|
|
|
/// @return NULL if the line is not active on the current frame
|
2007-07-01 09:09:37 +02:00
|
|
|
AssDialogue *GetActiveDialogueLine();
|
|
|
|
void DrawAllFeatures();
|
2007-07-07 09:27:28 +02:00
|
|
|
void Commit(bool full=false);
|
2007-01-08 22:11:06 +01:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
/// @brief Called when a hold is begun
|
|
|
|
/// @return Should the hold actually happen?
|
2010-05-20 10:55:35 +02:00
|
|
|
virtual bool InitializeHold() { return false; }
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
/// @brief Called on every mouse event during a hold
|
|
|
|
virtual void UpdateHold() { }
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
/// @brief Called at the end of a hold
|
|
|
|
virtual void CommitHold() { }
|
2007-07-01 04:23:57 +02:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
/// @brief Called when the feature list needs to be (re)generated
|
2010-05-20 10:55:35 +02:00
|
|
|
virtual void PopulateFeatureList() { }
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
/// @brief Called at the beginning of a drag
|
|
|
|
/// @param feature The visual feature clicked on
|
|
|
|
/// @return Should the drag happen?
|
|
|
|
virtual bool InitializeDrag(FeatureType* feature) { return true; }
|
|
|
|
|
|
|
|
/// @brief Called on every mouse event during a drag
|
|
|
|
/// @param feature The current feature to process; not necessarily the one clicked on
|
|
|
|
virtual void UpdateDrag(FeatureType* feature) { }
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
// @brief Called at the end of a drag
|
|
|
|
virtual void CommitDrag(FeatureType* feature) { }
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
/// @brief Called when there's stuff
|
|
|
|
virtual void DoRefresh() { }
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
/// @brief Must be called before removing entries from features
|
|
|
|
void ClearSelection();
|
2007-07-04 06:24:47 +02:00
|
|
|
|
2007-01-08 22:11:06 +01:00
|
|
|
public:
|
2010-05-20 10:55:58 +02:00
|
|
|
/// @brief Handler for all mouse events
|
|
|
|
/// @param event Shockingly enough, the mouse event
|
2007-07-01 02:19:55 +02:00
|
|
|
void OnMouseEvent(wxMouseEvent &event);
|
Note: This was done using a script! it's far from perfect but 95% of the work has been done already formatting-wise.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
2009-07-30 00:59:22 +02:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
/// @brief Event handler for the subtoolbar
|
|
|
|
virtual void OnSubTool(wxCommandEvent &) { }
|
|
|
|
/// @brief Called when there's stuff
|
2010-05-16 08:39:11 +02:00
|
|
|
virtual void Update() { };
|
2010-05-20 10:55:58 +02:00
|
|
|
/// @brief Draw stuff
|
2007-07-01 02:19:55 +02:00
|
|
|
virtual void Draw()=0;
|
2010-05-20 10:55:58 +02:00
|
|
|
/// @brief Called when there's stuff
|
2007-07-01 09:09:37 +02:00
|
|
|
void Refresh();
|
2007-01-11 07:15:56 +01:00
|
|
|
|
2010-05-20 10:55:58 +02:00
|
|
|
/// @brief Constructor
|
|
|
|
/// @param parent The VideoDisplay to use for coordinate conversion
|
|
|
|
/// @param video Video and mouse information passing blob
|
2010-05-16 08:39:11 +02:00
|
|
|
VisualTool(VideoDisplay *parent, VideoState const& video);
|
2010-05-20 10:55:58 +02:00
|
|
|
|
|
|
|
/// @brief Destructor
|
2007-07-01 02:19:55 +02:00
|
|
|
virtual ~VisualTool();
|
2007-01-08 22:11:06 +01:00
|
|
|
};
|
2007-07-04 06:24:47 +02:00
|
|
|
|