Sequence Chart Studio  svn HEAD revision
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Types | Public Member Functions | Private Types | Private Attributes | List of all members
CStudioAddon Class Reference

#include <addon.h>

Inheritance diagram for CStudioAddon:
Inheritance graph
Collaboration diagram for CStudioAddon:
Collaboration graph

Public Types

enum  TAddonState { STATE_INIT }
 

Public Member Functions

 CStudioAddon (LPCTSTR pNameU, UINT uIDLocalName)
 
virtual VAORC About (LPVAOV2LSTRUCT pV2L)
 
virtual VAORC Run (LPVAOV2LSTRUCT pV2L)
 
virtual VAORC Unload (WORD wParam, LPVOID p)
 
VAORC DisplayOptions (Visio::IVApplicationPtr vsoApp)
 
VAORC DoInstancesField (CDocumentMonitor *documentMonitor, Visio::IVApplicationPtr vsoApp, bool bContext=true)
 
virtual HRESULT HandleVisioEvent (IUnknown *ipSink, short nEventCode, IDispatch *pSourceObj, long nEventID, long nEventSeqNum, IDispatch *pSubjectObj, VARIANT vMoreInfo, VARIANT *pvResult)
 
void HandleCellChanged (Visio::IVCellPtr vsoCell)
 
void HandlePageAdded (Visio::IVPagePtr vsoPage)
 
void HandleConnectionsAdded (Visio::IVConnectsPtr vsoConnects)
 
void HandleMarker (Visio::IVApplicationPtr vsoApp)
 
void HandleKeyDown (Visio::IVKeyboardEventPtr vsoKeyboardEvent, Visio::IVApplicationPtr vsoApp)
 
void HandleKeyUp (Visio::IVKeyboardEventPtr vsoKeyboardEvent, Visio::IVApplicationPtr vsoApp)
 
void HandleMouseMove (Visio::IVMouseEventPtr vsoMouseEvent, Visio::IVApplicationPtr vsoApp)
 
void HandleMouseDown (Visio::IVMouseEventPtr vsoMouseEvent, Visio::IVApplicationPtr vsoApp)
 
void HandleWinSelChange (Visio::IVApplicationPtr vsoApp)
 
void HandleBeforeTextEdit (Visio::IVShapePtr shapePtr, Visio::IVApplicationPtr vsoApp)
 
void HandleAfterTextEdit (Visio::IVShapePtr shapePtr, Visio::IVApplicationPtr vsoApp)
 
void HandleBeforeShapeDeleted (Visio::IVShapePtr shapePtr, Visio::IVApplicationPtr vsoApp)
 
void HandleTextChanged (Visio::IVShapePtr shapePtr, Visio::IVDocumentPtr vsoDocument)
 
void HandleNonePending (Visio::IVApplicationPtr vsoApp)
 
void HandleVisioIsIdle (Visio::IVApplicationPtr vsoApp)
 
void HandleCoordinatesChanged (Visio::IVApplicationPtr vsoApp)
 
void HandleExitScope (Visio::IVApplicationPtr vsoApp)
 
void RegisterPersistentEvents (Visio::IVDocumentPtr vsoDocument)
 
CDocumentMonitorGetDocumentMonitor (Visio::IVApplicationPtr vsoApp, Visio::IVDocumentPtr vsoDocument)
 
void StopDocumentMonitor (Visio::IVApplicationPtr vsoApp, Visio::IVDocumentPtr vsoDocument)
 
TAddonState GetState (Visio::IVApplicationPtr vsoApp)
 
void SetState (Visio::IVApplicationPtr vsoApp, TAddonState state, const TCHAR *message=NULL)
 
void ResetState (Visio::IVApplicationPtr vsoApp)
 
double GetMousePosX ()
 
double GetMousePosY ()
 
void SaveMousePos (Visio::IVApplicationPtr vsoApp)
 
double GetPrevMousePosX (Visio::IVApplicationPtr vsoApp)
 
double GetPrevMousePosY (Visio::IVApplicationPtr vsoApp)
 
double GetRelMousePosX ()
 
double GetRelMousePosY ()
 
void SetOnDropShapeState (bool state)
 
bool GetOnDropShapeState ()
 
bool GetCtrlKeyDown ()
 

Private Types

typedef std::map< long,
CDocumentMonitor * > 
DocumentMonitorsMap
 

Private Attributes

IUnknown * m_pIAddonSink
 
Visio::IVEventPtr m_vsoMarkerEvent
 
DocumentMonitorsMap m_DocumentMonitors
 
long m_keyButtonState
 
double m_mousePosX
 
double m_mousePosY
 
bool m_bKeyDown
 
bool m_bCoorX
 
bool m_bCoorY
 
std::map< long, TAddonStatem_states
 
std::map< long,
Visio::IVSelectionPtr > 
m_oldSelections
 
std::map< long,
Visio::IVSelectionPtr > 
m_curSelections
 
std::map< long, double > m_prevMousePosX
 
std::map< long, double > m_prevMousePosY
 
enum TShapeType last_selected
 
bool m_bMessageTextEdited
 
bool m_bNumberedShapeChanged
 
bool m_bShapeDeleted
 
std::set< _bstr_t > m_enumerationGroups
 
bool m_bSnap
 
bool m_bBeginChanged
 
bool m_bEndChanged
 
bool m_bMoving
 
bool m_bCtrlDown
 
bool m_bArrowKeyDown
 
bool m_bOnDropShape
 
bool m_bShapeChanged
 
bool m_bResnaping
 
double m_mouseRelPosX
 
double m_mouseRelPosY
 
std::vector< Visio::IVShapePtr > instances
 
bool m_bOrderSnap
 
int m_iJumpType
 

Detailed Description

Definition at line 31 of file addon.h.

Member Typedef Documentation

typedef std::map<long, CDocumentMonitor*> CStudioAddon::DocumentMonitorsMap
private

Definition at line 133 of file addon.h.

Member Enumeration Documentation

Enumerator
STATE_INIT 

Definition at line 74 of file addon.h.

Constructor & Destructor Documentation

CStudioAddon::CStudioAddon ( LPCTSTR  pNameU,
UINT  uIDLocalName 
)

Member Function Documentation

VAORC CStudioAddon::About ( LPVAOV2LSTRUCT  pV2L)
virtual

Definition at line 93 of file addon.cpp.

References GetVersionInfo(), CAboutDlg::m_version, message, and TRACE.

VAORC CStudioAddon::DisplayOptions ( Visio::IVApplicationPtr  vsoApp)
VAORC CStudioAddon::DoInstancesField ( CDocumentMonitor documentMonitor,
Visio::IVApplicationPtr  vsoApp,
bool  bContext = true 
)
bool CStudioAddon::GetCtrlKeyDown ( )
inline

Definition at line 128 of file addon.h.

References m_bCtrlDown.

Referenced by CDocumentMonitor::OnDropShape().

CDocumentMonitor * CStudioAddon::GetDocumentMonitor ( Visio::IVApplicationPtr  vsoApp,
Visio::IVDocumentPtr  vsoDocument 
)
double CStudioAddon::GetMousePosX ( )
inline

Gets last mouse X-coordinate. Watch out! It is in units of current page.

Returns
last X-coordinate of mouse pointer in units of current page

Definition at line 88 of file addon.h.

References m_mousePosX.

Referenced by CDocumentMonitor::OnShortcutDropInstace().

double CStudioAddon::GetMousePosY ( )
inline

Gets last mouse Y-coordinate. Watch out! It is in units of current page.

Returns
last Y-coordinate of mouse pointer in units of current page

Definition at line 95 of file addon.h.

References m_mousePosY.

Referenced by CDocumentMonitor::OnMenuMessageSequence(), and CDocumentMonitor::OnShortcutDropInstace().

bool CStudioAddon::GetOnDropShapeState ( )
inline

Definition at line 126 of file addon.h.

References m_bOnDropShape.

double CStudioAddon::GetPrevMousePosX ( Visio::IVApplicationPtr  vsoApp)
inline

Retrieves a previously stored mouse position. It is in units of current page.

Parameters
vsoAppthe app it was stored in
Returns
previously stored X-coordinate of mouse pointer in units of current page

Definition at line 112 of file addon.h.

References m_prevMousePosX.

double CStudioAddon::GetPrevMousePosY ( Visio::IVApplicationPtr  vsoApp)
inline

Retrieves a previously stored mouse position. It is in units of current page.

Parameters
vsoAppthe app it was stored in
Returns
previously stored Y-coordinate of mouse pointer in units of current page

Definition at line 120 of file addon.h.

References m_prevMousePosY.

double CStudioAddon::GetRelMousePosX ( )
inline

Definition at line 122 of file addon.h.

References m_mouseRelPosX.

Referenced by CDocumentMonitor::OnDropShape().

double CStudioAddon::GetRelMousePosY ( )
inline

Definition at line 123 of file addon.h.

References m_mouseRelPosY.

TAddonState CStudioAddon::GetState ( Visio::IVApplicationPtr  vsoApp)
inline

Definition at line 79 of file addon.h.

References m_states.

void CStudioAddon::HandleAfterTextEdit ( Visio::IVShapePtr  shapePtr,
Visio::IVApplicationPtr  vsoApp 
)
void CStudioAddon::HandleBeforeShapeDeleted ( Visio::IVShapePtr  shapePtr,
Visio::IVApplicationPtr  vsoApp 
)

Definition at line 1132 of file addon.cpp.

References CEnumerateUtils::isShapeValid(), m_bShapeDeleted, and m_enumerationGroups.

Referenced by HandleVisioEvent().

void CStudioAddon::HandleBeforeTextEdit ( Visio::IVShapePtr  shapePtr,
Visio::IVApplicationPtr  vsoApp 
)
void CStudioAddon::HandleCellChanged ( Visio::IVCellPtr  vsoCell)
void CStudioAddon::HandleConnectionsAdded ( Visio::IVConnectsPtr  vsoConnects)

Definition at line 783 of file addon.cpp.

Referenced by HandleVisioEvent().

void CStudioAddon::HandleCoordinatesChanged ( Visio::IVApplicationPtr  vsoApp)
void CStudioAddon::HandleExitScope ( Visio::IVApplicationPtr  vsoApp)

Definition at line 1145 of file addon.cpp.

Referenced by HandleVisioEvent().

void CStudioAddon::HandleKeyDown ( Visio::IVKeyboardEventPtr  vsoKeyboardEvent,
Visio::IVApplicationPtr  vsoApp 
)
void CStudioAddon::HandleKeyUp ( Visio::IVKeyboardEventPtr  vsoKeyboardEvent,
Visio::IVApplicationPtr  vsoApp 
)
void CStudioAddon::HandleMarker ( Visio::IVApplicationPtr  vsoApp)
void CStudioAddon::HandleMouseDown ( Visio::IVMouseEventPtr  vsoMouseEvent,
Visio::IVApplicationPtr  vsoApp 
)

Definition at line 907 of file addon.cpp.

References m_mousePosX, m_mousePosY, m_mouseRelPosX, and m_mouseRelPosY.

Referenced by HandleVisioEvent().

void CStudioAddon::HandleMouseMove ( Visio::IVMouseEventPtr  vsoMouseEvent,
Visio::IVApplicationPtr  vsoApp 
)

Definition at line 901 of file addon.cpp.

References m_mousePosX, and m_mousePosY.

Referenced by HandleVisioEvent().

void CStudioAddon::HandleNonePending ( Visio::IVApplicationPtr  vsoApp)
void CStudioAddon::HandlePageAdded ( Visio::IVPagePtr  vsoPage)

Definition at line 691 of file addon.cpp.

Referenced by HandleVisioEvent().

void CStudioAddon::HandleTextChanged ( Visio::IVShapePtr  shapePtr,
Visio::IVDocumentPtr  vsoDocument 
)

Definition at line 1141 of file addon.cpp.

Referenced by HandleVisioEvent().

HRESULT CStudioAddon::HandleVisioEvent ( IUnknown *  ipSink,
short  nEventCode,
IDispatch *  pSourceObj,
long  nEventID,
long  nEventSeqNum,
IDispatch *  pSubjectObj,
VARIANT  vMoreInfo,
VARIANT *  pvResult 
)
virtual
void CStudioAddon::HandleVisioIsIdle ( Visio::IVApplicationPtr  vsoApp)
void CStudioAddon::HandleWinSelChange ( Visio::IVApplicationPtr  vsoApp)
void CStudioAddon::RegisterPersistentEvents ( Visio::IVDocumentPtr  vsoDocument)

Definition at line 1149 of file addon.cpp.

References ADDON_NAME.

Referenced by Run().

void CStudioAddon::ResetState ( Visio::IVApplicationPtr  vsoApp)

Definition at line 1286 of file addon.cpp.

References m_states, and STATE_INIT.

Referenced by HandleKeyUp(), and Run().

VAORC CStudioAddon::Run ( LPVAOV2LSTRUCT  pV2L)
virtual

Definition at line 109 of file addon.cpp.

References CSimpleOpt, DisplayException(), DisplayOptions(), DoInstancesField(), GetDocumentMonitor(), HandleCoordinatesChanged(), IDS_ERROR_VISIO_VERSION, LoadStringResource(), CDocumentMonitor::MENU_ADD_INSTANCES, CDocumentMonitor::MENU_ADD_INSTANCES_CONTEXT, CDocumentMonitor::MENU_CHECK_OPTIONS, CDocumentMonitor::MENU_DISABLE_MESSAGE_ENUMERATION, CDocumentMonitor::MENU_ENABLE_MESSAGE_ENUMERATION, CDocumentMonitor::MENU_EXPORT, CDocumentMonitor::MENU_FIND_FLOW, CDocumentMonitor::MENU_FLIP_MESSAGE_DIRECTION, CDocumentMonitor::MENU_HELP, CDocumentMonitor::MENU_IMPORT, CDocumentMonitor::MENU_MESSAGE_JUMP_LEFT, CDocumentMonitor::MENU_MESSAGE_JUMP_LEFT_COPY, CDocumentMonitor::MENU_MESSAGE_JUMP_RIGHT, CDocumentMonitor::MENU_MESSAGE_JUMP_RIGHT_COPY, CDocumentMonitor::MENU_MESSAGE_SEQUENCE, CDocumentMonitor::MENU_MESSAGE_SEQUENCE_CONTEXT, CDocumentMonitor::MENU_REMOVE_COLORS, CDocumentMonitor::MENU_REPAINT, CDocumentMonitor::MENU_SELECT_ADD_ALL_INSTANCES, CDocumentMonitor::MENU_SELECT_ADD_ALL_MESSAGES, CDocumentMonitor::MENU_SELECT_ALL, CDocumentMonitor::MENU_SELECT_ALL_INSTANCES, CDocumentMonitor::MENU_SELECT_ALL_MESSAGES, CDocumentMonitor::MENU_SELECT_NUMBERED_GROUP, CDocumentMonitor::MENU_SIMULATION_START, CDocumentMonitor::MENU_SIMULATION_STOP, CDocumentMonitor::MENU_THICKEN_LINES, CDocumentMonitor::MENU_THIN_LINES, CDocumentMonitor::MENU_VERIFY, CDocumentMonitor::MENU_WINDOWS_REPORTER, message, MIN_VISIO_VERSION, CDocumentMonitor::OnDropShape(), CDocumentMonitor::OnHelp(), CDocumentMonitor::OnMenuDisableMessageEnumeration(), CDocumentMonitor::OnMenuEnableMessageEnumeration(), CDocumentMonitor::OnMenuExport(), CDocumentMonitor::OnMenuFindFlow(), CDocumentMonitor::OnMenuFlipMessageDirection(), CDocumentMonitor::OnMenuImport(), CDocumentMonitor::OnMenuMessageJump(), CDocumentMonitor::OnMenuMessageSequence(), CDocumentMonitor::OnMenuRemoveColors(), CDocumentMonitor::OnMenuRepaint(), CDocumentMonitor::OnMenuSelectAll(), CDocumentMonitor::OnMenuSelectAllInstances(), CDocumentMonitor::OnMenuSelectAllMessages(), CDocumentMonitor::OnMenuSelectNumberedGroup(), CDocumentMonitor::OnMenuSimulationStart(), CDocumentMonitor::OnMenuSimulationStop(), CDocumentMonitor::OnMenuThickenLines(), CDocumentMonitor::OnMenuThinLines(), CDocumentMonitor::OnMenuTransform(), CDocumentMonitor::OnMenuVerify(), CDocumentMonitor::OnMenuWindowsReporter(), CDocumentMonitor::OnOpenReference(), CDocumentMonitor::OnShortcutDropInstace(), RegisterPersistentEvents(), ResetState(), SELECTION_ADD, SELECTION_REPLACE, CDocumentMonitor::SHORT_DROP_INST, SO_END_OF_OPTIONS, SO_O_USEALL, SO_REQ_CMB, SO_SUCCESS, TRACE, and VST_FILE_NAME.

void CStudioAddon::SaveMousePos ( Visio::IVApplicationPtr  vsoApp)
inline

Saves current mouse position for a later retrieval.

Parameters
vsoAppthe app to save the position for

Definition at line 101 of file addon.h.

References m_mousePosX, m_mousePosY, m_prevMousePosX, and m_prevMousePosY.

void CStudioAddon::SetOnDropShapeState ( bool  state)
inline

Definition at line 125 of file addon.h.

References m_bOnDropShape.

Referenced by CDocumentMonitor::OnDropShape().

void CStudioAddon::SetState ( Visio::IVApplicationPtr  vsoApp,
TAddonState  state,
const TCHAR *  message = NULL 
)

Definition at line 1278 of file addon.cpp.

References m_states.

void CStudioAddon::StopDocumentMonitor ( Visio::IVApplicationPtr  vsoApp,
Visio::IVDocumentPtr  vsoDocument 
)

Definition at line 1265 of file addon.cpp.

References m_DocumentMonitors.

VAORC CStudioAddon::Unload ( WORD  wParam,
LPVOID  p 
)
virtual

Definition at line 421 of file addon.cpp.

References m_DocumentMonitors, m_pIAddonSink, and m_vsoMarkerEvent.

Member Data Documentation

std::vector<Visio::IVShapePtr> CStudioAddon::instances
private

Definition at line 171 of file addon.h.

Referenced by HandleKeyDown(), and HandleNonePending().

enum TShapeType CStudioAddon::last_selected
private

Definition at line 151 of file addon.h.

Referenced by CStudioAddon(), HandleNonePending(), and HandleWinSelChange().

bool CStudioAddon::m_bArrowKeyDown
private

Definition at line 165 of file addon.h.

Referenced by CStudioAddon().

bool CStudioAddon::m_bBeginChanged
private

Definition at line 161 of file addon.h.

Referenced by CStudioAddon(), HandleCellChanged(), and HandleNonePending().

bool CStudioAddon::m_bCoorX
private

Definition at line 141 of file addon.h.

Referenced by CStudioAddon().

bool CStudioAddon::m_bCoorY
private

Definition at line 142 of file addon.h.

Referenced by CStudioAddon().

bool CStudioAddon::m_bCtrlDown
private

Definition at line 164 of file addon.h.

Referenced by CStudioAddon(), GetCtrlKeyDown(), HandleKeyDown(), and HandleKeyUp().

bool CStudioAddon::m_bEndChanged
private

Definition at line 162 of file addon.h.

Referenced by CStudioAddon(), HandleCellChanged(), and HandleNonePending().

bool CStudioAddon::m_bKeyDown
private

Definition at line 139 of file addon.h.

Referenced by CStudioAddon(), HandleKeyDown(), and HandleNonePending().

bool CStudioAddon::m_bMessageTextEdited
private

Definition at line 154 of file addon.h.

Referenced by HandleAfterTextEdit(), and HandleBeforeTextEdit().

bool CStudioAddon::m_bMoving
private

Definition at line 163 of file addon.h.

Referenced by CStudioAddon(), HandleCellChanged(), and HandleNonePending().

bool CStudioAddon::m_bNumberedShapeChanged
private

Definition at line 155 of file addon.h.

Referenced by CStudioAddon(), HandleCellChanged(), and HandleNonePending().

bool CStudioAddon::m_bOnDropShape
private

Definition at line 166 of file addon.h.

Referenced by CStudioAddon(), GetOnDropShapeState(), HandleNonePending(), and SetOnDropShapeState().

bool CStudioAddon::m_bOrderSnap
private

Definition at line 173 of file addon.h.

Referenced by CStudioAddon(), HandleCellChanged(), and HandleNonePending().

bool CStudioAddon::m_bResnaping
private
bool CStudioAddon::m_bShapeChanged
private

Definition at line 167 of file addon.h.

Referenced by CStudioAddon(), HandleCellChanged(), HandleNonePending(), and HandleVisioIsIdle().

bool CStudioAddon::m_bShapeDeleted
private

Definition at line 156 of file addon.h.

Referenced by CStudioAddon(), HandleBeforeShapeDeleted(), and HandleNonePending().

bool CStudioAddon::m_bSnap
private

Definition at line 160 of file addon.h.

Referenced by CStudioAddon(), HandleCellChanged(), and HandleNonePending().

std::map<long, Visio::IVSelectionPtr> CStudioAddon::m_curSelections
private

Definition at line 147 of file addon.h.

Referenced by HandleWinSelChange().

DocumentMonitorsMap CStudioAddon::m_DocumentMonitors
private

Definition at line 134 of file addon.h.

Referenced by GetDocumentMonitor(), StopDocumentMonitor(), and Unload().

std::set<_bstr_t> CStudioAddon::m_enumerationGroups
private

Definition at line 157 of file addon.h.

Referenced by HandleBeforeShapeDeleted(), HandleCellChanged(), and HandleNonePending().

int CStudioAddon::m_iJumpType
private

Definition at line 176 of file addon.h.

Referenced by CStudioAddon(), HandleKeyDown(), and HandleNonePending().

long CStudioAddon::m_keyButtonState
private

Definition at line 136 of file addon.h.

Referenced by CStudioAddon(), HandleKeyDown(), and HandleKeyUp().

double CStudioAddon::m_mousePosX
private
double CStudioAddon::m_mousePosY
private
double CStudioAddon::m_mouseRelPosX
private
double CStudioAddon::m_mouseRelPosY
private
std::map<long, Visio::IVSelectionPtr> CStudioAddon::m_oldSelections
private

Definition at line 146 of file addon.h.

Referenced by HandleWinSelChange().

IUnknown* CStudioAddon::m_pIAddonSink
private

Definition at line 130 of file addon.h.

Referenced by CStudioAddon(), GetDocumentMonitor(), and Unload().

std::map<long, double> CStudioAddon::m_prevMousePosX
private

Definition at line 148 of file addon.h.

Referenced by GetPrevMousePosX(), and SaveMousePos().

std::map<long, double> CStudioAddon::m_prevMousePosY
private

Definition at line 149 of file addon.h.

Referenced by GetPrevMousePosY(), and SaveMousePos().

std::map<long, TAddonState> CStudioAddon::m_states
private

Definition at line 145 of file addon.h.

Referenced by GetState(), ResetState(), and SetState().

Visio::IVEventPtr CStudioAddon::m_vsoMarkerEvent
private

Definition at line 131 of file addon.h.

Referenced by GetDocumentMonitor(), and Unload().


The documentation for this class was generated from the following files:

SourceForge.net Logo
Generated on Fri Jan 15 2016 16:26:58 for Sequence Chart Studio by  doxygen