|
From: <mbe...@us...> - 2010-05-12 21:29:15
|
Revision: 769
http://scstudio.svn.sourceforge.net/scstudio/?rev=769&view=rev
Author: mbezdeka
Date: 2010-05-12 21:29:09 +0000 (Wed, 12 May 2010)
Log Message:
-----------
message numbering added
Modified Paths:
--------------
trunk/doc/help/frontend.html
trunk/doc/help/pictures/frontend.png
trunk/src/view/visio/addon/addon.cpp
trunk/src/view/visio/addon/addon.h
trunk/src/view/visio/addon/dllmodule.rc
trunk/src/view/visio/addon/document.cpp
trunk/src/view/visio/addon/document.h
trunk/src/view/visio/addon/document_check.cpp
trunk/src/view/visio/addon/resource.h
trunk/src/view/visio/addon/scstudio.vcproj
Added Paths:
-----------
trunk/doc/help/pictures/
trunk/doc/help/pictures/icon_message_enumeration.png
trunk/doc/help/pictures/icon_message_enumeration_disable.png
trunk/doc/help/pictures/message_numbering_options.png
trunk/src/view/visio/addon/enumerateUtils.cpp
trunk/src/view/visio/addon/enumerateUtils.h
trunk/src/view/visio/addon/enumerationDlg.cpp
trunk/src/view/visio/addon/enumerationDlg.h
trunk/src/view/visio/addon/icon_message_enumeration.ico
trunk/src/view/visio/addon/icon_message_enumeration_disable.ico
Modified: trunk/doc/help/frontend.html
===================================================================
--- trunk/doc/help/frontend.html 2010-05-12 20:30:56 UTC (rev 768)
+++ trunk/doc/help/frontend.html 2010-05-12 21:29:09 UTC (rev 769)
@@ -23,5 +23,21 @@
See the <a href="frontend/shortcuts.html">Keyboard accelerators</a> section to
list all of them.</p>
+<h2>Message Numbering</h2>
+<p>Message numbering allows users to enumerate all types of message shapes (left, right, lost, found).<br>
+You can enumerate all messages on the active page (if no messages are selected) or the selection. <br>
+
+<p>By pressing Message numbering button <img src="pictures/icon_message_enumeration.png" alt="Message Numbering"> or by using hotkey <Code>Ctrl+Alt+E</Code> the dialog with options will be shown:</p>
+
+<p>
+<img src="pictures/message_numbering_options.png" alt="Message Numbering options dialog">
+</p>
+
+<p>You can choose specific numbering type (numbers, letters, capital letters, romans), starting index (1-9999) and additional string following the index such as ".", ",", …</p>
+
+<p>If <code>automatically enumerate new messages</code> is checked, any newly dropped messages will be enumerate according to the nearest numbered group.</p>
+
+<p>Numbering can be deleted by pressing Delete numbering button <img src="pictures/icon_message_enumeration_disable.png" alt="Disable message numbering"> on the toolbar or by using hotkey <Code>Ctrl+Alt+D.</Code></p>
+
</body>
</html>
Modified: trunk/doc/help/pictures/frontend.png
===================================================================
(Binary files differ)
Added: trunk/doc/help/pictures/icon_message_enumeration.png
===================================================================
(Binary files differ)
Property changes on: trunk/doc/help/pictures/icon_message_enumeration.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/doc/help/pictures/icon_message_enumeration_disable.png
===================================================================
(Binary files differ)
Property changes on: trunk/doc/help/pictures/icon_message_enumeration_disable.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/doc/help/pictures/message_numbering_options.png
===================================================================
(Binary files differ)
Property changes on: trunk/doc/help/pictures/message_numbering_options.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/src/view/visio/addon/addon.cpp
===================================================================
--- trunk/src/view/visio/addon/addon.cpp 2010-05-12 20:30:56 UTC (rev 768)
+++ trunk/src/view/visio/addon/addon.cpp 2010-05-12 21:29:09 UTC (rev 769)
@@ -59,6 +59,8 @@
m_pIAddonSink = NULL;
m_keyButtonState = 0;
m_mousePosX = m_mousePosY = 0.0;
+ m_bCellChanged = false;
+ m_bShapeDeleted = false;
};
VAORC CStudioAddon::About(LPVAOV2LSTRUCT pV2L)
@@ -276,6 +278,9 @@
case CDocumentMonitor::MENU_MESSAGE_SEQUENCE: // 103
TRACE("CStudioAddon::Run() menu item 'Check--Drawing--Message Sequence'");
return pDocumentMonitor->OnMenuMessageSequence(vsoApp);
+ case CDocumentMonitor::MENU_SELECT_NUMBERED_GROUP: //104
+ TRACE("CStudioAddon::Run() menu item 'context menu - select numbering group'");
+ return pDocumentMonitor->OnMenuSelectNumberedGroup(vsoApp);
// 2xx events
case CDocumentMonitor::MENU_WINDOWS_REPORTER:
@@ -320,6 +325,12 @@
case CDocumentMonitor::MENU_SELECT_ADD_ALL_MESSAGES:
TRACE("CStudioAddon::Run() add all messages to the current selection");
return pDocumentMonitor->OnMenuSelectAllMessages(vsoApp, SELECTION_ADD);
+ case CDocumentMonitor::MENU_ENABLE_MESSAGE_ENUMERATION:
+ TRACE("CStudioAddon::Run() enable message enumeration");
+ return pDocumentMonitor->OnMenuEnableMessageEnumeration(vsoApp);
+ case CDocumentMonitor::MENU_DISABLE_MESSAGE_ENUMERATION:
+ TRACE("CStudioAddon::Run() disable message enumeration");
+ return pDocumentMonitor->OnMenuDisableMessageEnumeration(vsoApp);
default:
TRACE("CStudioAddon::Run() unexpected event id=" << iEvent);
@@ -467,7 +478,28 @@
TRACE("CStudioAddon::HandleVisioEvent() visEvtCodeWinSelChange");
HandleWinSelChange(pSourceObj);
break;
+ case Visio::visEvtCodeShapeBeforeTextEdit:
+ TRACE("CStudioAddon::HandleVisioEvent() visEvtCodeShapeBeforeTextEdit");
+ HandleBeforeTextEdit(pSubjectObj, pSourceObj);
+ break;
+ case Visio::visEvtCodeShapeExitTextEdit:
+ TRACE("CStudioAddon::HandleVisioEvent() visEvtCodeShapeExitTextEdit");
+ HandleAfterTextEdit(pSubjectObj, pSourceObj);
+ break;
+ case Visio::visEvtDel+Visio::visEvtShape:
+ TRACE("CStudioAddon::HandleVisioEvent() visEvtCodeShapeDelete");
+ HandleBeforeShapeDeleted(pSubjectObj, pSourceObj);
+ break;
+
+ case visEvtApp+visEvtNonePending:
+ TRACE("CStudioAddon::HandleVisioEvent() visEvtNonePending");
+ HandleNonePending(pSourceObj);
+ break;
+ case visEvtMod+visEvtText:
+ HandleTextChanged(pSubjectObj,pSourceObj);
+ break;
+
default:
TRACE("CStudioAddon::HandleVisioEvent() unexpected event id="
<< std::ios::hex << event);
@@ -507,8 +539,18 @@
if(get_shape_type(fromConnect->FromSheet) == ST_BMSC_COREGION)
fromConnect->FromSheet->CellsSRC[visSectionObject][visRowXFormOut][visXFormHeight]->ResultIU = value*2;
}
- }
+ }
}
+
+ //Message enumeration
+ if((_tcsicmp(vsoCell->Name,_T("PinX")) == 0 || _tcsicmp(vsoCell->Name,_T("PinY")) == 0) &&
+ (GetDocumentMonitor(vsoCell->Application,vsoCell->Application->ActiveDocument)->isMessageShape(vsoCell->Shape)) &&
+ (_tcsicmp(vsoCell->Shape->Data1,_T("1")) == 0))
+ {
+ //vlozit do mnoziny
+ m_enumerationGroups.insert(vsoCell->Shape->Data3);
+ m_bCellChanged = true;
+ }
}
void CStudioAddon::HandleConnectionsAdded(Visio::IVConnectsPtr vsoConnects)
@@ -602,6 +644,86 @@
}
}
+void CStudioAddon::HandleNonePending(Visio::IVApplicationPtr vsoApp)
+{
+ if(m_bShapeDeleted || m_bCellChanged)
+ {
+ Visio::IVShapesPtr shapesPtr = vsoApp->ActivePage->Shapes;
+
+ for(std::set<_bstr_t>::iterator it = m_enumerationGroups.begin(); it != m_enumerationGroups.end(); it++)
+ GetDocumentMonitor(vsoApp,vsoApp->ActiveDocument)->drawNumbers(shapesPtr,*it);
+
+ m_enumerationGroups.clear();
+
+ //for(int i=1; i<=shapesPtr->Count; i++)
+ //{
+ // Visio::IVShapePtr shape = shapesPtr->Item[i];
+ // if(!GetDocumentMonitor(vsoApp,vsoApp->ActiveDocument)->isMessageShape(shape) || !_tcsicmp(shape->Data1,_T("1")) == 0)
+ // continue;
+ //
+ // GetDocumentMonitor(vsoApp,vsoApp->ActiveDocument)->OnMenuDisableMessageEnumeration(vsoApp);
+ // break;
+ //}
+ m_bShapeDeleted = m_bCellChanged = false;
+ }
+ //if(m_bTextChanged)
+ //{
+ // for(std::set<_bstr_t>::iterator it = m_enumerationGroups.begin(); it != m_enumerationGroups.end(); it++)
+ // GetDocumentMonitor(vsoApp,vsoApp->ActiveDocument)->drawNumbers(vsoApp->ActivePage->Shapes,*it);
+
+ // m_enumerationGroups.clear();
+ // m_bTextChanged = false;
+ //}
+}
+
+void CStudioAddon::HandleBeforeTextEdit(Visio::IVShapePtr shapePtr, Visio::IVApplicationPtr vsoApp)
+{
+ if(GetDocumentMonitor(vsoApp,vsoApp->ActiveDocument)->isMessageShape(shapePtr) && _tcsicmp(shapePtr->Data1,_T("1")) == 0)
+ {
+ GetDocumentMonitor(vsoApp,vsoApp->ActiveDocument)->ToogleNumeration(false);
+ shapePtr->Text = shapePtr->Data2;
+ m_bMessageTextEdited = true;
+ }
+ /*else if(_tcsicmp(shapePtr->Data1,_T("")) != 0)
+ MessageBox(GetActiveWindow(),_T("Corrupted enumeration! Data1 has wrong format"),_T("Error"),MB_OK | MB_ICONERROR);*/
+}
+
+void CStudioAddon::HandleAfterTextEdit(Visio::IVShapePtr shapePtr, Visio::IVApplicationPtr vsoApp)
+{
+ if(m_bMessageTextEdited)
+ {
+ shapePtr->Data2 = shapePtr->Text;
+ GetDocumentMonitor(vsoApp,vsoApp->ActiveDocument)->drawNumbers(vsoApp->ActivePage->Shapes, shapePtr->Data3);
+ m_bMessageTextEdited = false;
+ }
+ GetDocumentMonitor(vsoApp,vsoApp->ActiveDocument)->ToogleNumeration(true);
+}
+
+void CStudioAddon::HandleBeforeShapeDeleted(Visio::IVShapePtr shapePtr, Visio::IVApplicationPtr vsoApp)
+{
+ if(GetDocumentMonitor(vsoApp,vsoApp->ActiveDocument)->isMessageShape(shapePtr) && _tcsicmp(shapePtr->Data1,_T("1")) == 0)
+ {
+ m_enumerationGroups.insert(shapePtr->Data3);
+ m_bShapeDeleted = true;
+ }
+}
+
+void CStudioAddon::HandleTextChanged(Visio::IVShapePtr shapePtr,Visio::IVDocumentPtr vsoDocument)
+{
+ //if(m_bMessageTextEdited)
+ // return;
+
+ //if(vsoDocument->Application->IsUndoingOrRedoing == VARIANT_TRUE)
+ // return;
+
+ //if(GetDocumentMonitor(vsoDocument->Application,vsoDocument)->isMessageShape(shapePtr) && _tcsicmp(shapePtr->Data1,_T("1")) == 0)
+ //{
+ // shapePtr->Data2 = shapePtr->Text;
+ // m_enumerationGroups.insert(shapePtr->Data3);
+ // m_bTextChanged = true;
+ //}
+}
+
void CStudioAddon::RegisterPersistentEvents(Visio::IVDocumentPtr vsoDocument)
{
Visio::IVEventPtr vsoDocumentCreateEvent = NULL;
@@ -673,6 +795,11 @@
vsoApp->EventList->AddAdvise(Visio::visEvtCodeKeyDown, varSink, _T(""), _T("KeyDown"));
vsoApp->EventList->AddAdvise(Visio::visEvtCodeKeyUp, varSink, _T(""), _T("KeyUp"));
vsoApp->EventList->AddAdvise(Visio::visEvtCodeMouseMove, varSink, _T(""), _T("MouseMove"));
+ // Message enumeration events
+ vsoApp->EventList->AddAdvise(Visio::visEvtCodeShapeBeforeTextEdit, varSink, _T(""), _T("BeforeTextEdit"));
+ vsoApp->EventList->AddAdvise(Visio::visEvtCodeShapeExitTextEdit, varSink, _T(""), _T("AfterTextEdit"));
+ vsoApp->EventList->AddAdvise(visEvtApp+visEvtNonePending, varSink, _T(""), _T("NonePending"));
+ vsoApp->EventList->AddAdvise(visEvtDel+visEvtShape, varSink, _T(""), _T("ShapeDeleted"));
vsoApp->EventList->AddAdvise(visEvtCodeWinSelChange, varSink, _T(""), _T("SelectionChanges"));
@@ -689,6 +816,7 @@
vsoEvent = vsoDocumentEventList->AddAdvise(visEvtPageAdded, varSink, _T(""), _T(""));
pDocumentMonitor->m_vsoPageAddedEvent = vsoEvent;
+ vsoDocumentEventList->AddAdvise(visEvtMod+visEvtText, varSink, _T(""), _T("TextChanged"));
vsoDocumentEventList->AddAdvise(visEvtCellChanged, varSink, _T(""), _T("CellChanged"));
vsoDocumentEventList->AddAdvise(visEvtConnectionsAdded, varSink, _T(""), _T("ConnectionsAdded"));
vsoDocumentEventList->AddAdvise(visEvtConnectionsDeleted, varSink, _T(""), _T("ConnectionsDeleted"));
Modified: trunk/src/view/visio/addon/addon.h
===================================================================
--- trunk/src/view/visio/addon/addon.h 2010-05-12 20:30:56 UTC (rev 768)
+++ trunk/src/view/visio/addon/addon.h 2010-05-12 21:29:09 UTC (rev 769)
@@ -19,6 +19,7 @@
#pragma once
#include <map>
+#include <set>
class CReportView;
class CDocumentMonitor;
@@ -55,6 +56,11 @@
void HandleKeyUp(Visio::IVKeyboardEventPtr vsoKeyboardEvent, Visio::IVApplicationPtr vsoApp);
void HandleMouseMove(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 RegisterPersistentEvents(Visio::IVDocumentPtr vsoDocument);
CDocumentMonitor *GetDocumentMonitor(Visio::IVApplicationPtr vsoApp, Visio::IVDocumentPtr vsoDocument);
@@ -124,6 +130,11 @@
std::map<long, Visio::IVSelectionPtr> m_oldSelections;
std::map<long, Visio::IVSelectionPtr> m_curSelections;
std::map<long, double> m_prevMousePosX;
+ //Message enumeration
+ bool m_bMessageTextEdited;
+ bool m_bCellChanged;
+ bool m_bShapeDeleted;
+ std::set<_bstr_t> m_enumerationGroups;
std::map<long, double> m_prevMousePosY;
};
Modified: trunk/src/view/visio/addon/dllmodule.rc
===================================================================
--- trunk/src/view/visio/addon/dllmodule.rc 2010-05-12 20:30:56 UTC (rev 768)
+++ trunk/src/view/visio/addon/dllmodule.rc 2010-05-12 21:29:09 UTC (rev 769)
@@ -26,31 +26,26 @@
// Dialog
//
-IDD_MESSAGE_SEQUENCE_OPTIONS DIALOGEX 0, 0, 506, 146
+IDD_MESSAGE_SEQUENCE_OPTIONS DIALOGEX 0, 0, 311, 113
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Message Sequence Options"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- DEFPUSHBUTTON "OK",IDOK,449,7,50,14
- PUSHBUTTON "Cancel",IDCANCEL,449,25,50,14
- GROUPBOX "Direction:",IDC_STATIC,7,7,432,64
- CONTROL "Right only",IDC_MS_DIR_RIGHT,"Button",BS_AUTORADIOBUTTON,13,19,48,10
- CONTROL "Left only",IDC_MS_DIR_LEFT,"Button",BS_AUTORADIOBUTTON,13,31,44,10
- CONTROL "Right, Left",IDC_MS_DIR_RIGHT_LEFT,"Button",BS_AUTORADIOBUTTON,13,43,50,10
- CONTROL "Left, Right",IDC_MS_DIR_LEFT_RIGHT,"Button",BS_AUTORADIOBUTTON,13,55,50,10
- LTEXT "Right Message Captions:",IDC_STATIC,90,19,80,8
- EDITTEXT IDC_MS_RIGHT_MESSAGE,171,17,259,14,ES_AUTOHSCROLL
- LTEXT "Left Message Captions:",IDC_STATIC,90,43,76,8
- EDITTEXT IDC_MS_LEFT_MESSAGE,171,41,259,14,ES_AUTOHSCROLL
+ DEFPUSHBUTTON "OK",IDOK,254,7,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,254,25,50,14
+ GROUPBOX "Direction:",IDC_STATIC,7,7,241,64
+ CONTROL "Left only",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON,13,19,44,10
+ CONTROL "Right only",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON,13,31,48,10
+ CONTROL "Left, Right",IDC_RADIO3,"Button",BS_AUTORADIOBUTTON,13,43,50,10
+ CONTROL "Right, Left",IDC_RADIO4,"Button",BS_AUTORADIOBUTTON,13,55,50,10
+ LTEXT "Left Message Captions:",IDC_STATIC,90,19,76,8
+ EDITTEXT IDC_MC_LEFT_MESSAGE,171,17,67,14,ES_AUTOHSCROLL
+ LTEXT "Right Message Captions:",IDC_STATIC,90,43,80,8
+ EDITTEXT IDC_MS_RIGHT_MESSAGE,171,41,67,14,ES_AUTOHSCROLL
LTEXT "Starting Y-position:",IDC_STATIC,7,78,62,8
LTEXT "Vertical space between messages:",IDC_STATIC,7,94,111,8
- EDITTEXT IDC_MS_START_POS_Y,164,76,40,14,ES_AUTOHSCROLL
- EDITTEXT IDC_MS_VERTICAL_SPACE,164,92,40,14,ES_AUTOHSCROLL
- LTEXT "Vertical space between left and right sequence:",IDC_STATIC,7,110,154,8
- EDITTEXT IDC_MS_VERTICAL_SPACE_LEFT_RIGHT,164,108,40,14,ES_AUTOHSCROLL
- LTEXT "<units>",IDC_MS_UNITS0,207,78,27,8
- LTEXT "<units>",IDC_MS_UNITS1,207,94,27,8
- LTEXT "<units>",IDC_MS_UNITS2,207,110,27,8
+ EDITTEXT IDC_EDIT2,121,76,40,14,ES_AUTOHSCROLL
+ EDITTEXT IDC_EDIT3,121,92,40,14,ES_AUTOHSCROLL
END
@@ -65,11 +60,10 @@
IDD_MESSAGE_SEQUENCE_OPTIONS, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 499
+ RIGHTMARGIN, 304
VERTGUIDE, 13
- VERTGUIDE, 430
TOPMARGIN, 7
- BOTTOMMARGIN, 139
+ BOTTOMMARGIN, 106
END
END
#endif // APSTUDIO_INVOKED
@@ -146,16 +140,16 @@
CONTROL "",IDC_DRAWING2,"SysTreeView32",TVS_HASBUTTONS | TVS_HASLINES | TVS_LINESATROOT | TVS_SHOWSELALWAYS | WS_BORDER | WS_HSCROLL | WS_TABSTOP,110,14,100,92
END
-IDD_INSTANCES_FIELD_OPTIONS DIALOGEX 0, 0, 210, 127
+IDD_INSTANCES_FIELD_OPTIONS DIALOGEX 0, 0, 201, 127
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Add Instances Options"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- DEFPUSHBUTTON "OK",IDOK,155,5,50,14
- PUSHBUTTON "Cancel",IDCANCEL,155,25,50,14
+ DEFPUSHBUTTON "OK",IDOK,146,5,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,146,25,50,14
LTEXT "Number of instances:",IDC_STATIC,5,5,70,12,SS_CENTERIMAGE
EDITTEXT IDC_IF_INSTANCES_CNT,80,5,43,14,ES_AUTOHSCROLL
- GROUPBOX "",IDC_OPTIONS_GROUP_BOX,5,73,200,50
+ GROUPBOX "",IDC_OPTIONS_GROUP_BOX,5,73,191,50
LTEXT " Options ",IDC_OPTIONS_SWITCH_LBL,19,73,30,8
LTEXT "Instance length:",IDC_STATIC,5,23,70,12,SS_CENTERIMAGE
EDITTEXT IDC_IF_INSTANCE_LENGTH,80,23,43,14,ES_AUTOHSCROLL
@@ -167,17 +161,30 @@
CONTROL "Spacing:",IDC_SPACING_RDO,"Button",BS_AUTORADIOBUTTON,10,104,43,10
EDITTEXT IDC_IF_TOTAL_WIDTH,63,88,40,14,ES_AUTOHSCROLL
EDITTEXT IDC_IF_SPACING,63,103,40,14,ES_AUTOHSCROLL
- PUSHBUTTON "Default values",IDC_DEFAULT_BTN,140,88,58,14
+ PUSHBUTTON "Default values",IDC_DEFAULT_BTN,131,88,58,14
LTEXT "x:",IDC_STATIC,64,40,9,12,SS_CENTERIMAGE
LTEXT "y:",IDC_STATIC,64,54,9,12,SS_CENTERIMAGE
- LTEXT "<units>",IDC_IF_UNITS0,127,24,27,8
- LTEXT "<units>",IDC_IF_UNITS1,127,41,27,8
- LTEXT "<units>",IDC_IF_UNITS2,127,55,27,8
- LTEXT "<units>",IDC_IF_UNITS3,107,90,27,8
- LTEXT "<units>",IDC_IF_UNITS4,107,104,27,8
END
+IDD_ENUMERATION_OPTIONS DIALOGEX 0, 0, 236, 75
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Message numbering"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,179,10,50,14
+ PUSHBUTTON "Cancel",IDCANCEL,179,27,50,14
+ GROUPBOX "Options",IDC_STATIC,6,7,168,65
+ COMBOBOX IDC_COMBO_NUMBERING,48,18,71,66,CBS_DROPDOWNLIST | CBS_SORT | WS_VSCROLL | WS_TABSTOP
+ LTEXT "Type:",IDC_STATIC,11,20,24,8,SS_CENTERIMAGE
+ CTEXT "+",IDC_STATIC,125,18,12,12,SS_CENTERIMAGE
+ EDITTEXT IDC_ADDITION,143,18,25,14,ES_AUTOHSCROLL | ES_NOHIDESEL
+ EDITTEXT IDC_STARTING_INDEX,63,36,25,14,ES_AUTOHSCROLL | ES_NUMBER
+ LTEXT "Starting index:",IDC_STATIC,11,39,50,8,SS_CENTERIMAGE
+ CONTROL "automatically enumerate new messages",IDC_CHECK_ENUMERATE_NEW,
+ "Button",BS_AUTOCHECKBOX | BS_LEFT | BS_VCENTER | WS_TABSTOP,12,54,144,12
+END
+
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
@@ -213,7 +220,7 @@
IDD_INSTANCES_FIELD_OPTIONS, DIALOG
BEGIN
LEFTMARGIN, 5
- RIGHTMARGIN, 205
+ RIGHTMARGIN, 196
VERTGUIDE, 10
VERTGUIDE, 19
VERTGUIDE, 48
@@ -224,6 +231,14 @@
BOTTOMMARGIN, 122
HORZGUIDE, 54
END
+
+ IDD_ENUMERATION_OPTIONS, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 229
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 68
+ END
END
#endif // APSTUDIO_INVOKED
@@ -243,6 +258,8 @@
IDI_ICON_SIMULATION_STOP ICON "icon_simulation_stop.ico"
IDI_ICON_SELECT_ADD_INSTANCES ICON "icon_select_add_instances.ico"
IDI_ICON_SELECT_ADD_MESSAGES ICON "icon_select_add_messages.ico"
+IDI_ICON_ENABLE_MESSAGE_ENUMERATION ICON "icon_message_enumeration.ico"
+IDI_ICON_DISABLE_MESSAGE_ENUMERATION ICON "icon_message_enumeration_disable.ico"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
Modified: trunk/src/view/visio/addon/document.cpp
===================================================================
--- trunk/src/view/visio/addon/document.cpp 2010-05-12 20:30:56 UTC (rev 768)
+++ trunk/src/view/visio/addon/document.cpp 2010-05-12 21:29:09 UTC (rev 769)
@@ -25,6 +25,7 @@
#include "visualize.h"
#include "finddlg.h"
#include "messagesequencedlg.h"
+#include "enumerationDlg.h"
#include <fstream>
#include "shapeutils.h"
@@ -70,6 +71,9 @@
LoadModulesFromRegistry(HKEY_LOCAL_MACHINE);
LoadModulesFromRegistry(HKEY_CURRENT_USER);
+
+
+ ID = 1; // message group ID
}
CDocumentMonitor::~CDocumentMonitor()
@@ -256,6 +260,24 @@
case ST_BMSC_MESSAGE_FOUND:
if(vsoShape->Text.length() == 0)
vsoShape->Text = _T("NAME");
+ //DODELAT!!
+ {
+ bool bEnumNewMsg = false;
+ int temp;
+ std::wstring tempString;
+
+ Visio::IVShapePtr closestShape = CEnumerateUtils::getClosestMessage(m_vsoApp,vsoShape);
+ if(closestShape)
+ {
+ _bstr_t groupID = closestShape->Data3;
+ CEnumerateUtils::loadGroupSettings(m_vsoApp,groupID,temp,temp,bEnumNewMsg,tempString);
+
+ if(bEnumNewMsg)
+ enumerate(m_vsoApp,groupID,true,true);
+ else
+ enumerate(m_vsoApp,groupID,false,true);
+ }
+ }
break;
case ST_COMMENT:
@@ -426,6 +448,25 @@
stringize() << L"/event=" << 300+(tpos-m_transformers.begin());
}
+ itemMessageEnumerating = itemDrawing->MenuItems->Add();
+ itemMessageEnumerating->Caption = "&Message numbering";
+ itemMessageEnumerating->BeginGroup = true;
+ itemMessageEnumerating->CmdNum = Visio::visCmdHierarchical;
+
+ Visio::IVMenuItemPtr itemEnableEnumerating = itemMessageEnumerating->MenuItems->Add();
+ itemEnableEnumerating->Caption = "&Message numbering";
+ itemEnableEnumerating->AddOnName = ADDON_NAME;
+ itemEnableEnumerating->AddOnArgs = stringize() << L"/event=" << MENU_ENABLE_MESSAGE_ENUMERATION;
+ vslIconFile = vslFileName+_T(",8");
+ itemEnableEnumerating->IconFileName(vslIconFile.c_str());
+
+ Visio::IVMenuItemPtr itemDisableEnumerating = itemMessageEnumerating->MenuItems->Add();
+ itemDisableEnumerating->Caption = "&Delete numbering";
+ itemDisableEnumerating->AddOnName = ADDON_NAME;
+ itemDisableEnumerating->AddOnArgs = stringize() << L"/event=" << MENU_DISABLE_MESSAGE_ENUMERATION;
+ vslIconFile = vslFileName+_T(",9");
+ itemDisableEnumerating->IconFileName(vslIconFile.c_str());
+
Visio::IVMenuItemPtr itemFindFlow = menu->MenuItems->Add();
itemFindFlow->Caption = "&Find Flow...";
itemFindFlow->AddOnName = ADDON_NAME;
@@ -501,6 +542,29 @@
accelItemMessageSequence->Control = true;
accelItemMessageSequence->Alt = true;
+ accelItemMessageEnumeration = accelTable->AccelItems->Add();
+ accelItemMessageEnumeration->CmdNum = itemEnableEnumerating->CmdNum;
+ accelItemMessageEnumeration->Key = 'E';
+ accelItemMessageEnumeration->Control = true;
+ accelItemMessageEnumeration->Alt = true;
+
+ accelItemMessageEnumerationDisable = accelTable->AccelItems->Add();
+ accelItemMessageEnumerationDisable->CmdNum = itemDisableEnumerating->CmdNum;
+ accelItemMessageEnumerationDisable->Key = 'D';
+ accelItemMessageEnumerationDisable->Control = true;
+ accelItemMessageEnumerationDisable->Alt = true;
+
+ //Visio::IVMenuSetsPtr visMenuSets = vsoMenus->MenuSets;
+
+ //Visio::IVMenuSetPtr visMenuSet = visMenuSets->ItemAtID[visUIObjSetCntx_DrawObjSel];
+ //Visio::IVMenusPtr visMenus = visMenuSet->Menus;
+ //Visio::IVMenuPtr visMenu = visMenus->Item[0];
+ //visMenuItems = visMenu->MenuItems;
+
+ //visMenuItems->AddAt(0);
+ //visMenuItems->Item[0]->Caption = _T("Select numbering group");
+ //visMenuItems->Item[0]->Visible = false;
+
m_vsoDocument->SetCustomMenus(vsoMenus);
}
@@ -578,6 +642,24 @@
vslIconFile = vslFileName+_T(",5");
m_simulationStopToolbarItem->IconFileName(vslIconFile.c_str());
+ m_enableMessageEnumerationToolbarItem = m_toolbar->ToolbarItems->Add();
+ m_enableMessageEnumerationToolbarItem->Caption = "Message numbering";
+ m_enableMessageEnumerationToolbarItem->AddOnName = ADDON_NAME;
+ m_enableMessageEnumerationToolbarItem->AddOnArgs = stringize() << L"/event=" << MENU_ENABLE_MESSAGE_ENUMERATION;
+ m_enableMessageEnumerationToolbarItem->Visible = true;
+ m_enableMessageEnumerationToolbarItem->Enabled = true;
+ vslIconFile = vslFileName+_T(",8");
+ m_enableMessageEnumerationToolbarItem->IconFileName(vslIconFile.c_str());
+
+ m_disableMessageEnumerationToolbarItem = m_toolbar->ToolbarItems->Add();
+ m_disableMessageEnumerationToolbarItem->Caption = "Delete numbering";
+ m_disableMessageEnumerationToolbarItem->AddOnName = ADDON_NAME;
+ m_disableMessageEnumerationToolbarItem->AddOnArgs = stringize() << L"/event=" << MENU_DISABLE_MESSAGE_ENUMERATION;
+ m_disableMessageEnumerationToolbarItem->Visible = true;
+ m_disableMessageEnumerationToolbarItem->Enabled = true;
+ vslIconFile = vslFileName+_T(",9");
+ m_disableMessageEnumerationToolbarItem->IconFileName(vslIconFile.c_str());
+
Visio::IVToolbarItemPtr itemVerify = m_toolbar->ToolbarItems->Add();
itemVerify->Caption = "Verify";
itemVerify->AddOnName = ADDON_NAME;
@@ -599,6 +681,20 @@
m_vsoDocument->CustomToolbars->UpdateUI();
}
+void CDocumentMonitor::ToogleNumeration(bool enabled)
+{
+ m_enableMessageEnumerationToolbarItem->Enabled = enabled;
+ m_disableMessageEnumerationToolbarItem->Enabled = enabled;
+ itemMessageEnumerating->Enabled = enabled;
+
+ //DODELAT HORKE KLAVESY!!!!
+ accelItemMessageEnumeration->Control = enabled;
+ accelItemMessageEnumerationDisable->Control = enabled;
+
+ m_vsoDocument->CustomToolbars->UpdateUI();
+ m_vsoDocument->CustomMenus->UpdateUI();
+}
+
VAORC CDocumentMonitor::DrawInstancesField(Visio::IVApplicationPtr vsoApp, int instancesCnt, Coordinate instanceLength, Coordinate instanceWidth, Coordinate startX, Coordinate startY, bool useConstSpacing, Coordinate spacingOrWidth)
{
TRACE("CDocumentMonitor::DrawInstancesField() Drawing instances field");
@@ -851,7 +947,9 @@
}
VAORC CDocumentMonitor::OnMenuRepaint(Visio::IVApplicationPtr vsoApp)
-{
+{
+ selectAll(vsoApp,false,SelectionType::SELECTION_REPLACE);
+ OnMenuDisableMessageEnumeration(vsoApp);
// clear the verification report
m_reportView->Reset();
@@ -875,6 +973,7 @@
m_reportView->Print(RS_ERROR,
stringize() << "Repaint failed.");
+
return VAORC_FAILURE;
}
@@ -889,11 +988,14 @@
m_reportView->Print(RS_NOTICE,
stringize() << "Repaint completed.");
+
return VAORC_SUCCESS;
}
VAORC CDocumentMonitor::OnMenuTransform(Visio::IVApplicationPtr vsoApp, int index)
{
+ selectAll(vsoApp,false,SelectionType::SELECTION_REPLACE);
+ OnMenuDisableMessageEnumeration(vsoApp);
// clear the verification report
m_reportView->Reset();
@@ -915,6 +1017,7 @@
m_reportView->Print(RS_ERROR,
stringize() << transformer->get_name() << " failed.");
+
return VAORC_FAILURE;
}
@@ -927,7 +1030,7 @@
m_vsoApp->EndUndoScope(scope_id, false);
m_reportView->Print(RS_ERROR,
- stringize() << transformer->get_name() << " failed.");
+ stringize() << transformer->get_name() << " failed.");
return VAORC_FAILURE;
}
@@ -942,6 +1045,7 @@
m_reportView->Print(RS_NOTICE,
stringize() << transformer->get_name() << " completed.");
+
return VAORC_SUCCESS;
}
@@ -1253,6 +1357,247 @@
return VAORC_SUCCESS;
}
+VAORC CDocumentMonitor::OnMenuEnableMessageEnumeration(Visio::IVApplicationPtr vsoApp)
+{
+ static int startingIndex = 1;
+ static int numberingType = 0;
+ static bool enumerateNew = false;
+ static BSTR add = _T(". ");
+
+ CEnumerationDlg options(startingIndex,numberingType, enumerateNew, add);
+ if(options.DoModal() != IDOK)
+ return VAORC_FAILURE;
+
+ int ID = CEnumerateUtils::getGroupCount(vsoApp);
+
+ _bstr_t groupID = stringize() << _T("Enum") << ++ID;
+
+ startingIndex = options.getStartingIndex();
+ numberingType = options.getNumberingType();
+ enumerateNew = options.getEnumerateNew();
+ add = options.getAddition();
+
+ CEnumerateUtils::saveGroupSettings(vsoApp,groupID,startingIndex,numberingType,enumerateNew,add);
+
+ if (vsoApp->ActiveWindow->Selection->Count)
+ {
+ enumerate(vsoApp, groupID, true,true);
+ }
+ else
+ enumerate(vsoApp, groupID, true,false);
+
+ CEnumerateUtils::setGroupCount(vsoApp,ID);
+
+ return VAORC_SUCCESS;
+}
+VAORC CDocumentMonitor::OnMenuDisableMessageEnumeration(Visio::IVApplicationPtr vsoApp)
+{
+ Visio::IVSelectionPtr selection = vsoApp->ActiveWindow->Selection;
+ Visio::IVShapePtr page = vsoApp->ActivePage->PageSheet;
+ std::set<_bstr_t> groups;
+ int ID = CEnumerateUtils::getGroupCount(vsoApp);
+
+ //get all numbered messages on the page
+ int numberedMessages = 0;
+ for(int i=1; i<=page->Shapes->Count; i++)
+ {
+ Visio::IVShapePtr shape = page->Shapes->Item[i];
+ if(isMessageShape(shape) && _tcsicmp(shape->Data1,_T("1")) == 0)
+ numberedMessages++;
+ }
+
+ //get all SELECTED numbered messages on the page
+ int selectedMessages = 0;
+ for(int i=1; i<=selection->Count; i++)
+ {
+ Visio::IVShapePtr shape = selection->Item[i];
+ if(isMessageShape(shape) && _tcsicmp(shape->Data1,_T("1")) == 0)
+ selectedMessages++;
+ }
+
+ if (selection->Count && (selectedMessages != numberedMessages))
+ {
+ //get which groups are selected
+ for(int i=1; i<= selection->Count; i++)
+ if(_tcsicmp(selection->Item[i]->Data1,_T("1")) == 0)
+ groups.insert(selection->Item[i]->Data3);
+
+ //remove specific messages from groups
+ for(std::set<_bstr_t>::iterator it = groups.begin(); it != groups.end(); it++)
+ enumerate(vsoApp, *it, false,true);
+ }
+ else
+ {
+ enumerate(vsoApp,_T(""), false,false);
+ //erase all enum row information
+ for(int i=1; i<=ID; i++)
+ {
+ _bstr_t userGroupID = stringize() << _T("User.Enum") << i;
+ if(page->GetCellExists(userGroupID,0) != -1)
+ continue;
+ page->DeleteRow(visSectionUser,page->GetCells(userGroupID)->Row);
+ }
+ //restore IDs
+ CEnumerateUtils::setGroupCount(vsoApp,0);
+ }
+
+ return VAORC_SUCCESS;
+}
+
+VAORC CDocumentMonitor::OnMenuSelectNumberedGroup(Visio::IVApplicationPtr vsoApp)
+{
+ CEnumerateUtils::selectGroup(vsoApp,vsoApp->ActiveWindow->Selection->Item[1]->Data3);
+
+ return VAORC_SUCCESS;
+}
+
+bool CDocumentMonitor::temporaryDisableEnumeration(Visio::IVApplicationPtr vsoApp)
+{
+ //Visio::IVShapesPtr shapesPtr = vsoApp->ActivePage->Shapes;
+ //bool isNumbered = false;
+
+ //for(int i=1; i<=shapesPtr->Count; i++)
+ //{
+ // Visio::IVShapePtr shape = shapesPtr->Item[i];
+ // if(isMessageShape(shape) && _tcsicmp(shape->Data1,_T("1")) == 0)
+ // {
+ // vsoApp->EventsEnabled = false;
+ // shape->Text = shape->Data2;
+ // vsoApp->EventsEnabled = true;
+ // isNumbered = true;
+ // }
+ //}
+
+ //if(!isNumbered)
+ // return false;
+
+ //Visio::IVShapePtr page = vsoApp->ActivePage->PageSheet;
+ //if(page->GetCellExists(_T("User.enumNewMsg"),0))
+ // if(page->GetCells(_T("User.enumNewMsg"))-> ResultInt[visNone][visTruncate] != 1)
+ // {
+ // page->GetCells(_T("User.enumNewMsg"))->Formula = _T("1");
+ // return true;
+ // }
+
+ return false;
+}
+
+void CDocumentMonitor::restoreDisabledEnumeration(Visio::IVApplicationPtr vsoApp, bool UndoEnumNewMsg)
+{
+ //Visio::IVShapesPtr shapesPtr = vsoApp->ActivePage->Shapes;
+ //Visio::IVShapePtr page = vsoApp->ActivePage->PageSheet;
+
+ //if(UndoEnumNewMsg)
+ // if(page->GetCellExists(_T("User.enumNewMsg"),0))
+ // if(page->GetCells(_T("User.enumNewMsg"))-> ResultInt[visNone][visTruncate] == 1)
+ // page->GetCells(_T("User.enumNewMsg"))->Formula = _T("0");
+
+ //drawNumbers(shapesPtr);
+}
+
+void CDocumentMonitor::enumerate(Visio::IVApplicationPtr vsoApp, _bstr_t groupID, bool enable, bool onlySelected)
+{
+ Visio::IVShapesPtr shapesOnPage = vsoApp->ActivePage->Shapes;
+ Visio::IVSelectionPtr selection = vsoApp->ActiveWindow->Selection;
+ std::set<_bstr_t> formerGroups;
+
+ /*DWORD start = GetTickCount();*/
+
+ if(onlySelected)
+ {
+ onlySelected = false;
+ for(int i=1; i<=selection->Count; i++)
+ if(isMessageShape(selection->Item[i]))
+ {
+ onlySelected = true; break;
+ }
+ }
+
+ int maxCount = (onlySelected ? (selection->Count) : (shapesOnPage->Count));
+ for(int i=1; i<=maxCount; i++)
+ {
+ Visio::IVShapePtr shape;
+
+ if(onlySelected)
+ shape = selection->Item[i];
+ else
+ shape = shapesOnPage->Item[i];
+
+ if(isMessageShape(shape))
+ {
+ if(enable)
+ CEnumerateUtils::enableEnumeration(shape,groupID,formerGroups);
+ else
+ CEnumerateUtils::disableEnumeration(shape);
+
+ }
+ }
+
+ if(enable || onlySelected)
+ drawNumbers(shapesOnPage, groupID);
+
+ if(formerGroups.size())
+ for(std::set<_bstr_t>::iterator it = formerGroups.begin(); it != formerGroups.end(); it++)
+ drawNumbers(shapesOnPage,*it);
+
+ //Debug
+ //DWORD diff = GetTickCount() - start;
+ //std::wstring rozdil = stringize() << std::setprecision(5) << diff/1000.0;
+ //MessageBox(GetActiveWindow(),rozdil.c_str(),_T(""),MB_OK);
+}
+
+void CDocumentMonitor::drawNumbers(Visio::IVShapesPtr shapesOnPage, _bstr_t groupID)
+{
+ std::vector<Visio::IVShapePtr> messageShapes;
+ Visio::IVShapePtr page = shapesOnPage->Application->ActivePage->PageSheet;
+
+ //Default values
+ int index = 1;
+ int enumerationType = 0;
+ bool enumNewMsg = false;
+ std::wstring addition = _T(". ");
+ CEnumerateUtils::loadGroupSettings(shapesOnPage->Application,groupID,index,enumerationType,enumNewMsg,addition);
+
+ //for all message shapes check whether they are checked as numbered (Data1 == 1)
+ for(int i=1; i<=shapesOnPage->Count; i++)
+ {
+ Visio::IVShapePtr shape = shapesOnPage->Item[i];
+ //It must be message shape, marked as numbered and in the right group
+ if(isMessageShape(shape) && _tcsicmp(shape->Data1,_T("1")) == 0 && _tcsicmp(shape->Data3,groupID) == 0)
+ messageShapes.push_back(shape); //Then put into vector
+ }
+
+ //heap sort (std::sort failed on bigger numbers, deletes pointers..)
+ std::make_heap(messageShapes.begin(), messageShapes.end(),&CEnumerateUtils::messageCompare);
+ std::sort_heap(messageShapes.begin(),messageShapes.end(),&CEnumerateUtils::messageCompare);
+
+ std::wstring textIndex;
+ for(std::vector<Visio::IVShapePtr>::iterator it = messageShapes.begin(); it != messageShapes.end(); ++it)
+ {
+ switch(enumerationType)
+ {
+ case 0: textIndex = stringize() << index; break; //numbers
+ case 1: textIndex = (index <= 4000) ? CEnumerateUtils::int2Romans(index) : _T("?"); break; //romans
+ case 2: textIndex = CEnumerateUtils::int2Char(index,false); break; //small letters
+ case 3: textIndex = CEnumerateUtils::int2Char(index,true); break; //capital letters
+ }
+ (*it)->Text = stringize() << textIndex << addition << (*it)->Data2;
+ index++;
+ }
+}
+
+bool CDocumentMonitor::isMessageShape(Visio::IVShapePtr shape)
+{
+ switch(get_shape_type(shape))
+ {
+ case ST_BMSC_MESSAGE:
+ case ST_BMSC_MESSAGE_FOUND:
+ case ST_BMSC_MESSAGE_LOST:
+ return true;
+ }
+ return false;
+}
+
void CDocumentMonitor::ShowReportView()
{
if(m_reportVisible)
Modified: trunk/src/view/visio/addon/document.h
===================================================================
--- trunk/src/view/visio/addon/document.h 2010-05-12 20:30:56 UTC (rev 768)
+++ trunk/src/view/visio/addon/document.h 2010-05-12 21:29:09 UTC (rev 769)
@@ -25,6 +25,7 @@
#include "data/simulator.h"
#include "data/transformer.h"
#include "pageutils.h"
+#include "enumerateUtils.h"
#include "addon.h"
//! template used to create new documents
@@ -68,6 +69,7 @@
// context menu items
MENU_ADD_INSTANCES = 102,
MENU_MESSAGE_SEQUENCE,
+ MENU_SELECT_NUMBERED_GROUP,
// standard Check menu items
MENU_WINDOWS_REPORTER = 200,
MENU_IMPORT,
@@ -83,6 +85,8 @@
MENU_SELECT_ALL_MESSAGES,
MENU_SELECT_ADD_ALL_INSTANCES,
MENU_SELECT_ADD_ALL_MESSAGES,
+ MENU_ENABLE_MESSAGE_ENUMERATION,
+ MENU_DISABLE_MESSAGE_ENUMERATION,
};
VAORC OnMenuWindowsReporter(Visio::IVApplicationPtr vsoApp);
@@ -97,6 +101,9 @@
VAORC OnMenuSimulationStart(Visio::IVApplicationPtr vsoApp);
VAORC OnMenuSimulationStop(Visio::IVApplicationPtr vsoApp);
VAORC OnMenuVerify(Visio::IVApplicationPtr vsoApp);
+ VAORC OnMenuEnableMessageEnumeration(Visio::IVApplicationPtr vsoApp);
+ VAORC OnMenuDisableMessageEnumeration(Visio::IVApplicationPtr vsoApp);
+ VAORC OnMenuSelectNumberedGroup(Visio::IVApplicationPtr vsoApp);
void ShowReportView();
void OnHideReportView();
@@ -223,6 +230,9 @@
Visio::IVToolbarItemPtr m_selMessagesToolbarItem;
Visio::IVToolbarItemPtr m_selAddInstancesToolbarItem;
Visio::IVToolbarItemPtr m_selAddMessagesToolbarItem;
+ //Message enumeration
+ Visio::IVToolbarItemPtr m_enableMessageEnumerationToolbarItem;
+ Visio::IVToolbarItemPtr m_disableMessageEnumerationToolbarItem;
/**
* Selects all instances or all messages on the active page.
@@ -293,6 +303,39 @@
Visio::IVShapePtr DrawMessage(Visio::IVMasterPtr msgMaster, Visio::IVShapePtr from, Visio::IVShapePtr to, double yCoord, const TCHAR* caption);
public:
+ /**
+ *******************************
+ * Message enumeration functions
+ *******************************
+ *
+ *
+ * Returns whether shape is message (ordinary, lost, found)
+ * @param shape a shape to check
+ */
+ bool isMessageShape(Visio::IVShapePtr shape);
+ /**
+ * Recompute positions in order left - right, top - down a draws the numbers into text field
+ * @param shapesOnPage pointer to all shapes on a page
+ */
+ void drawNumbers(Visio::IVShapesPtr shapesOnPage, _bstr_t groupID);
+ /**
+ * Disable/enable enumeration toolbar buttons, menu buttons and hot keys during text editing
+ * @param enabled Enable or disable controls
+ */
+ void ToogleNumeration(bool enabled);
+
+private:
+ void enumerate(Visio::IVApplicationPtr vsoApp, _bstr_t groupID, bool enable, bool onlySelected);
+ bool temporaryDisableEnumeration(Visio::IVApplicationPtr vsoApp);
+ void restoreDisabledEnumeration(Visio::IVApplicationPtr vsoApp, bool UndoEnumNewMsg);
+
+ int ID;
+
+ Visio::IVMenuItemsPtr visMenuItems;
+ Visio::IVMenuItemPtr itemMessageEnumerating;
+ Visio::IVAccelItemPtr accelItemMessageEnumerationDisable;
+ Visio::IVAccelItemPtr accelItemMessageEnumeration;
+
Visio::IVUIObjectPtr GetMostCustomMenus();
Visio::IVUIObjectPtr GetMostCustomToolbars();
};
Modified: trunk/src/view/visio/addon/document_check.cpp
===================================================================
--- trunk/src/view/visio/addon/document_check.cpp 2010-05-12 20:30:56 UTC (rev 768)
+++ trunk/src/view/visio/addon/document_check.cpp 2010-05-12 21:29:09 UTC (rev 769)
@@ -96,6 +96,7 @@
VAORC CDocumentMonitor::OnMenuVerify(Visio::IVApplicationPtr vsoApp)
{
+ bool enumMsg = temporaryDisableEnumeration(vsoApp);
// clear the verification report
m_reportView->Reset();
@@ -144,6 +145,8 @@
stringize() << "No verification algorithms applicable. No properties verified.");
}
+ restoreDisabledEnumeration(vsoApp,enumMsg);
+
return VAORC_SUCCESS;
}
Added: trunk/src/view/visio/addon/enumerateUtils.cpp
===================================================================
--- trunk/src/view/visio/addon/enumerateUtils.cpp (rev 0)
+++ trunk/src/view/visio/addon/enumerateUtils.cpp 2010-05-12 21:29:09 UTC (rev 769)
@@ -0,0 +1,299 @@
+/*
+ * scstudio - Sequence Chart Studio
+ * http://scstudio.sourceforge.net
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * Copyright (c) 2010 Martin Bezdeka <mbe...@se...>
+ *
+ */
+
+#include "enumerateUtils.h"
+
+std::wstring CEnumerateUtils::int2Romans(int index)
+{
+ if(index < 0 || index > 3999)
+ {
+ MessageBox(GetActiveWindow(),
+ _T("Index too big! Use another type of enumeration. Roman index can be from 0-3999."),
+ _T("Error"),MB_OK | MB_ICONERROR);
+ return _T("?");
+ }
+
+ if(index == 0)
+ return _T("N");
+
+ int numeral[] = {1000, 900, 500, 400, 100,90, 50, 40, 10, 9, 5, 4, 1};
+ std::wstring romans[] = {L"M", L"CM", L"D", L"CD", L"C", L"XC", L"L", L"XL", L"X", L"IX", L"V", L"IV", L"I" };
+ std::wstring result;
+
+ for(int i=0; i < 13; i++)
+ while(index >=numeral[i])
+ {
+ index -= numeral[i];
+ result += romans[i];
+ }
+
+ return result;
+}
+
+std::wstring CEnumerateUtils::int2Char(int index, bool capitals)
+{
+ index--;
+
+ if(index < 0)
+ {
+ MessageBox(GetActiveWindow(),
+ _T("Index less than one! Char index can be from 1-inf."),
+ _T("Error"),MB_OK | MB_ICONERROR);
+ return _T("?");
+ }
+
+ std::wstring result;
+
+ if(index == 0)
+ return (capitals ? _T("A") : _T("a"));
+
+ bool bLast = true;
+
+ while(index > 0)
+ {
+ if(bLast)
+ {
+ result.insert(0,(capitals ? (stringize() << (char)((index % 26)+65)) : (stringize() << (char)((index % 26)+97))));
+ index = index / 26;
+
+ if(index/27 == 0)
+ bLast = false;
+ }
+ else
+ {
+ result.insert(0,(capitals ? (stringize() << (char)((index % 27)+64)) : (stringize() << (char)((index % 27)+96))));
+ index = index / 27;
+ }
+ }
+
+ return result;
+}
+
+bool CEnumerateUtils::messageCompare(Visio::IVShapePtr p1, Visio::IVShapePtr p2)
+{
+ double beginP1Y = p1->Cells["BeginY"]->ResultIU;
+ double beginP2Y = p2->Cells["BeginY"]->ResultIU;
+
+ if(beginP1Y - beginP2Y != 0.0)
+ return beginP1Y > beginP2Y;
+ else
+ {
+ double beginP1X = p1->Cells["BeginX"]->ResultIU;
+ double beginP2X = p2->Cells["BeginX"]->ResultIU;
+
+ if(beginP1X - beginP2X != 0.0)
+ return beginP1X < beginP2X;
+ else
+ {
+ double endP1X = p1->Cells["EndX"]->ResultIU;
+ double endP2X = p2->Cells["EndX"]->ResultIU;
+
+ return endP1X < endP2X;
+ }
+ }
+}
+
+bool CEnumerateUtils::loadGroupSettings(Visio::IVApplicationPtr vsoApp, _bstr_t groupID, int& startIndex, int& numberingType, bool& enumNewMsg, std::wstring& addition)
+{
+ Visio::IVShapePtr page = vsoApp->ActivePage->PageSheet;
+ if(!page->SectionExists[visSectionUser][0])
+ return false;
+
+ _bstr_t userGroupID = stringize() << _T("User.") << groupID;
+ Visio::IVCellPtr groupCell = page->GetCells(userGroupID);
+ if(!groupCell)
+ return false;
+
+ std::wstringstream ss(std::wstringstream::in | std::stringstream::out);
+ ss << groupCell->ResultStr[visNone];
+ ss >> startIndex >> numberingType >> enumNewMsg >> addition;
+
+ //Get spaces in addition back
+ for(int i=0; i<addition.size(); i++)
+ if(addition[i] == '$')
+ addition[i] = ' ';
+
+ addition = addition + _T(" ");
+
+ return true;
+}
+
+bool CEnumerateUtils::saveGroupSettings(Visio::IVApplicationPtr vsoApp, _bstr_t groupID, int startIndex, int numberingType, bool enumNewMsg, BSTR addition)
+{
+ Visio::IVShapePtr page = vsoApp->ActivePage->PageSheet;
+
+ if(!page->SectionExists[visSectionUser][0])
+ page->AddSection(visSectionUser);
+
+ _bstr_t userGroupID = stringize() << _T("User.") << groupID;
+
+ if(page->GetCellExists(userGroupID,0) != -1)
+ page->AddNamedRow(visSectionUser, groupID, visTagDefault);
+
+ Visio::IVCellPtr groupCell = page->GetCells(userGroupID);
+
+ if(!groupCell)
+ return false;
+
+ std::wstring additionTemp = addition;
+
+ for(int i=0; i<additionTemp.size(); i++)
+ if(additionTemp[i] == 32)
+ additionTemp[i] = '$';
+
+ groupCell->FormulaU = stringize() << _T("=\"") << startIndex << _T(" ")
+ << numberingType << _T(" ")
+ << enumNewMsg << _T(" ")
+ << additionTemp << _T("\"");
+ return true;
+}
+
+void CEnumerateUtils::selectGroup(Visio::IVApplicationPtr vsoApp, _bstr_t groupID)
+{
+ Visio::IVPagePtr page = vsoApp->ActivePage;
+ Visio::IVSelectionPtr selection = page->CreateSelection(Visio::visSelTypeEmpty, Visio::visSelModeSkipSuper);
+
+ for(int i=1; i<=page->Shapes->Count; i++)
+ {
+ Visio::IVShapePtr shape = page->Shapes->Item[i];
+ if(_tcsicmp(shape->Data1,_T("1")) == 0 && _tcsicmp(shape->Data3,groupID) == 0)
+ selection->Select(shape,visSelect);
+ }
+
+ vsoApp->ActiveWindow->Selection = selection;
+}
+
+Visio::IVShapePtr CEnumerateUtils::getClosestMessage(Visio::IVApplicationPtr vsoApp, const Visio::IVShapePtr shapePtr)
+{
+ Visio::IVShapesPtr shapes = vsoApp->ActivePage->Shapes;
+ std::map<double, Visio::IVShapePtr> messages;
+
+ double x = shapePtr->Cells["PinX"]->ResultIU;
+ double y = shapePtr->Cells["PinY"]->ResultIU;
+
+ for(int i=1; i<=shapes->Count; i++)
+ {
+ Visio::IVShapePtr shape = shapes->Item[i];
+
+ if(_tcsicmp(shape->Data1,_T("1")) == 0)
+ {
+ double tempX = shape->Cells["PinX"]->ResultIU;
+ double tempY = shape->Cells["PinY"]->ResultIU;
+
+ double distance = sqrt(pow(x-tempX,2) + pow(y-tempY,2));
+
+ messages.insert(std::pair<double, Visio::IVShapePtr>(distance, shape));
+ }
+ }
+ if (!messages.size())
+ return NULL;
+
+ return messages.begin()->second;
+}
+
+int CEnumerateUtils::getGroupCount(Visio::IVApplicationPtr vsoApp)
+{
+ Visio::IVShapePtr pagesheet = vsoApp->ActivePage->PageSheet;
+
+ if(!pagesheet->GetCellExists(_T("User.EnumCount"),0))
+ {
+ pagesheet->AddNamedRow(visSectionUser,_T("EnumCount"),visTagDefault);
+ pagesheet->Cells["User.EnumCount"]->FormulaU = _T("0");
+ return 0;
+ }
+
+ return pagesheet->Cells["User.EnumCount"]->ResultInt[visNone][visTruncate];
+}
+
+void CEnumerateUtils::setGroupCount(Visio::IVApplicationPtr vsoApp, int count)
+{
+ Visio::IVShapePtr pagesheet = vsoApp->ActivePage->PageSheet;
+
+ if(!pagesheet->GetCellExists(_T("User.EnumCount"),0) && count != 0)
+ {
+ pagesheet->AddNamedRow(visSectionUser,_T("EnumCount"),visTagDefault);
+ }
+ else if(count == 0)
+ {
+ pagesheet->DeleteRow(visSectionUser,pagesheet->CellsRowIndex["User.EnumCount"]);
+ return;
+ }
+
+ pagesheet->Cells["User.EnumCount"]->FormulaU = stringize() << count;
+}
+
+VAORC CEnumerateUtils::enableEnumeration(Visio::IVShapePtr shape, _bstr_t groupID, std::set<_bstr_t>& formerGroups)
+{
+ if(_tcsicmp(shape->Data1,_T("")) == 0)
+ {
+ shape->Data1 = _T("1");
+ shape->Data2 = shape->Text;
+ shape->Data3 = groupID;
+ shape->AddNamedRow(visSectionAction,_T("enumeration"),visTagDefault);
+ shape->Cells["Actions.enumeration.Action"]->FormulaU = _T("=RUNADDONWARGS(\"Sequence Chart Studio\",\"/event=104\")");
+ shape->Cells["Actions.enumeration.Menu"]->FormulaU = _T("=\"Select numbering group\"");
+ shape->Cells["Actions.enumeration.BeginGroup"]->FormulaU = _T("=TRUE");
+ }
+ else if(_tcsicmp(shape->Data1,_T("1")) == 0)
+ {
+ formerGroups.insert(shape->Data3);
+ shape->Data3 = groupID;
+ }
+ else
+ {
+ if(MessageBox(GetActiveWindow(),
+ _T("Data fields (Format -> Special...) are not empty! Message enumeration use Data1, Data2 and Data3 for storing enumeration information. One or more shapes can't be numbered! Do you want to clear data fields (invalid shape lose its caption)?"),
+ _T("Error"),MB_YESNO | MB_ICONWARNING))
+ {
+ shape->Data1 = _T("1");
+ shape->Data2 = _T("");
+ shape->Data3 = _T("");
+ }
+ else
+ return VAORC_FAILURE;
+ }
+
+ return VAORC_SUCCESS;
+}
+
+VAORC CEnumerateUtils::disableEnumeration(Visio::IVShapePtr shape)
+{
+
+ if(_tcsicmp(shape->Data1,_T("1")) == 0) //if the enumeration was enabled
+ {
+ shape->Text = shape->Data2;
+ shape->Data1 = _T(""); //Clean the data fields
+ shape->Data2 = _T("");
+ shape->Data3 = _T("");
+ shape->DeleteRow(visSectionAction,shape->GetCells(_T("Actions.enumeration"))->Row);
+ }
+ else if(_tcsicmp(shape->Data1,_T("")) != 0)
+ {
+ if(MessageBox(GetActiveWindow(),
+ _T("Data1 field has wrong format. Message enumeration was corrupted! Do you want to delete data fields?"),
+ _T("Error"),MB_YESNO | MB_ICONWARNING) == IDYES)
+ {
+ shape->Data1 = _T(""); //Clean the data fields
+ shape->Data2 = _T("");
+ shape->Data3 = _T("");
+ }
+ else
+ return VAORC_FAILURE;
+ }
+
+ return VAORC_SUCCESS;
+}
Added: trunk/src/view/visio/addon/enumerateUtils.h
===================================================================
--- trunk/src/view/visio/addon/enumerateUtils.h (rev 0)
+++ trunk/src/view/visio/addon/enumerateUtils.h 2010-05-12 21:29:09 UTC (rev 769)
@@ -0,0 +1,52 @@
+/*
+ * scstudio - Sequence Chart Studio
+ * http://scstudio.sourceforge.net
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * Copyright (c) 2010 Martin Bezdeka <mbe...@se...>
+ *
+ */
+#pragma once
+
+#include "stdafx.h"
+#include "extract.h"
+#include <string>
+
+class CEnumerateUtils
+{
+public:
+ /**
+ * Add comment
+ */
+ static std::wstring int2Romans(int index);
+ /**
+ * Convers integer to char: a-z,aa-az,ba-bz,...,aaa-aaz,..etc.
+ * @param index integer to convert to char
+ * @param capitals if true, creates capitals Chars as: A-Z, AA-AZ
+ * @return string representing index
+ */
+ static std::wstring int2Char(int index, bool capitals);
+ /**
+ * Compare function for drawNumbers, decides order of message shape according to their position
+ * @param p1 pointer to first message shape to compare
+ * @param p2 pointer to second message shape to compare
+ * @return whether first shape is "smaller" then the second one
+ */
+ static bool messageCompare(Visio::IVShapePtr p1, Visio::IVShapePtr p2);
+ static bool loadGroupSettings(Visio::IVApplicationPtr vsoApp, _bstr_t groupID, int& startIndex, int& numberingType, bool& enumNewMsg, std::wstring& addition);
+ static bool saveGroupSettings(Visio::IVApplicationPtr vsoApp, _bstr_t groupID, int startIndex, int numberingType, bool enumNewMsg, BSTR addition);
+ static void selectGroup(Visio::IVApplicationPtr vsoApp, _bstr_t groupID);
+ static Visio::IVShapePtr getClosestMessage(Visio::IVApplicationPtr vsoApp, const Visio::IVShapePtr shapePtr);
+ static int getGroupCount(Visio::IVApplicationPtr vsoApp);
+ static void setGroupCount(Visio::IVApplicationPtr vsoApp, int count);
+ static VAORC disableEnumeration(Visio::IVShapePtr shape);
+ static VAORC enableEnumeration(Visio::IVShapePtr shape, _bstr_t groupID, std::set<_bstr_t>& formerGroups);
+};
Added: trunk/src/view/visio/addon/enumerationDlg.cpp
===================================================================
--- trunk/src/view/visio/addon/enumerationDlg.cpp (rev 0)
+++ trunk/src/view/visio/addon/enumerationDlg.cpp 2010-05-12 21:29:09 UTC (rev 769)
@@ -0,0 +1,110 @@
+/*
+ * scstudio - Sequence Chart Studio
+ * http://scstudio.sourceforge.net
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * Copyright (c) 2010 Martin Bezdeka <mbe...@se...>
+ *
+ */
+
+#include "stdafx.h"
+#include "dllmodule.h"
+#include "enumerationDlg.h"
+
+CEnumerationDlg::CEnumerationDlg(int startIndex, int enumType, bool enumNew, BSTR addition)
+{
+ this->index = startIndex;
+ this->numberingType = enumType;
+ this->bEnumerateNew = enumNew;
+ this->addition = addition;
+}
+
+LRESULT CEnumerationDlg::OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled)
+{
+ CenterWindow(GetParent());
+
+ DoDataExchange();
+ LoadRegistryData();
+
+
+ return bHandled = FALSE;
+}
+
+LRESULT CEnumerationDlg::OnCloseCmd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
+{
+ if(wID == IDOK)
+ {
+ DoDataExchange(TRUE);
+ if(SaveRegistryData() == 0)
+ EndDialog(wID);
+ }
+ else if(wID == IDCANCEL)
+ EndDialog(wID);
+
+ return 0;
+}
+
+int CEnumerationDlg::LoadRegistryData()
+{
+ m_numbering.InsertString(0,_T("1, 2, 3,..."));
+ m_numbering.InsertString(1,_T("I, II, III,..."));
+ m_numbering.InsertString(2,_T("a, b, c,..."));
+ m_numbering.InsertString(3,_T("A, B, C,..."));
+ m_numbering.SetCurSel(this->numberingType);
+
+ m_enumerateNew.SetCheck((int)this->bEnumerateNew);
+ m_addition.SetWindowText(addition);
+ m_addition.SetLimitText(4);
+
+ std::wstring indexString = stringize() << index;
+ m_index.SetWindowText(indexString.c_str());
+ m_index.SetLimitText(4);
+
+ return 0;
+}
+
+int CEnumerationDlg::SaveRegistryData()
+{
+ numberingType = m_numbering.GetCurSel();
+ bEnumerateNew = (bool)m_enumerateNew.GetCheck();
+
+ addition = 0;
+ m_addition.GetWindowText(addition);
+ if(addition == 0)
+ addition = _T("");
+
+ if(!m_index.GetWindowTextLength())
+ {
+ MessageBox(_T("Starting index is empty!"), _T("Error"), MB_OK | MB_ICONERROR);
+ return 1;
+ }
+
+ BSTR temp = 0;
+ m_index.GetWindowText(temp);
+ std::wstringstream ss(std::wstringstream::in | std::stringstream::out);
+ ss << _bstr_t(temp);
+ ss >> index;
+
+ if(index <= 0)
+ {
+ MessageBox(_T("Starting index must be in range of 1-9999!"), _T("Error"), MB_OK | MB_ICONERROR);
+ return 1;
+ }
+
+ if(index > 3999 && numberingType == 1)
+ {
+ MessageBox(_T("Index too big! Use another type of enumeration. Roman index can be from 0-3999."),
+ _T("Error"),MB_OK | MB_ICONERROR);
+ return 1;
+ }
+
+ return 0;
+}
Added: trunk/src/view/visio/addon/enumerationDlg.h
===================================================================
--- trunk/src/view/visio/addon/enumerationDlg.h (rev 0)
+++ trunk/src/view/visio/addon/enumerationDlg.h 2010-05-12 21:29:09 UTC (rev 769)
@@ -0,0 +1,78 @@
+/*
+ * scstudio - Sequence Chart Studio
+ * http://scstudio.sourceforge.net
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * Copyright (c) 2010 Martin Bezdeka <mbe...@se...>
+ *
+ */
+
+#pragma once
+
+#include <atldlgs.h>
+#include <atlctrls.h>
+#include <atlddx.h>
+#include <string>
+#include <sstream>
+#include "data/msc.h"
+
+class CEnumerationDlg
+ : public ATL::CDialogImpl<CEnumerationDlg>, public CWinDataExchange<CEnumerationDlg>
+{
+public:
+ CEnumerationDlg(int startIndex, int enumType, bool enumNew, BSTR addition);
+ enum { IDD = IDD_ENUMERATION_OPTIONS };
+ enum NumberingType
+ {
+ NT_NUMBERS = 0,
+ NT_GREEK,
+ NT_LETTER_SMALL,
+ NT_LETTER_BIG
+ };
+
+ CComboBox m_numbering;
+ CEdit m_addition;
+ CEdit m_index;
+ CButton m_enumerateNew;
+
+protected:
+BEGIN_DDX_MAP(CNumberMessage)
+ DDX_CONTROL_HANDLE(IDC_COMBO_NUMBERING, m_numbering);
+ DDX_CONTROL_HANDLE(IDC_ADDITION, m_addition);
+ DDX_CONTROL_HANDLE(IDC_STARTING_INDEX, m_index);
+ DDX_CONTROL_HANDLE(IDC_CHECK_ENUMERATE_NEW, m_enumerateNew);
+END_DDX_MAP()
+
+BEGIN_MSG_MAP(CNumberMessage)
+ MESSAGE_HANDLER(WM_INITDIALOG, OnInitDialog)
+ COMMAND_ID_HANDLER(IDOK, OnCloseCmd)
+ COMMAND_ID_HANDLER(IDCANCEL, OnCloseCmd)
+END_MSG_MAP()
+
+// Handler prototypes:
+
+ LRESULT OnInitDialog(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled);
+ LRESULT OnCloseCmd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled);
+
+ int LoadRegistryData();
+ int SaveRegistryData();
+
+ int numberingType;
+ BSTR addition;
+ bool bEnumerateNew;
+ int index;
+
+public:
+ int getNumberingType() { return numberingType; }
+ BSTR getAddition() { return addition; }
+ int getStartingIndex() { return index; }
+ bool getEnumerateNew() { return bEnumerateNew; }
+};
Added: trunk/src/view/visio/addon/icon_message_enumeration.ico
===================================================================
(Binary files differ)
Property changes on: trunk/src/view/visio/addon/icon_message_enumeration.ico
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/src/view/visio/addon/icon_message_enumeration_disable.ico
===================================================================
(Binary files differ)
Property changes on: trunk/src/view/visio/addon/icon_message_enumeration_disable.ico
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/src/view/visio/addon/resource.h
===================================================================
--- trunk/src/view/visio/addon/resource.h 2010-05-12 20:30:56 UTC (rev 768)
+++ trunk/src/view/visio/addon/resource.h 2010-05-12 21:29:09 UTC (rev 769)
@@ -32,9 +32,12 @@
#define IDD_MESSAGE_SEQUENCE_OPTIONS 220
#define IDC_IF_MARGIN_SIDE 221
#define IDC_IF_INSTANCE_LENGTH 221
+#define IDI_ICON_ENABLE_MESSAGE_ENUMERATION 221
#define IDC_IF_MARGIN_TOP 222
+#define IDI_ICON_DISABLE_MESSAGE_ENUMERATION 222
#define IDC_IF_INSTANCES_HEIGHT 223
#define IDC_IF_START_POS_X 223
+#define IDD_ENUMERATION_OPTIONS 223
#define IDC_OPTIONS_SWITCH_BTN 226
#define IDC_OPTIONS_SWITCH_LBL 227
#define IDC_OPTIONS_GROUP_BOX 228
@@ -49,14 +52,27 @@
#define IDC_IF_LBL5 240
#define IDC_IF_START_POS_Y 241
#define IDC_TOTAL_WIDTH_RDO 242
+#define IDC_RADIO2 243
#define IDC_SPACING_RDO 243
-#define IDC_MS_DIR_RIGHT 243
#define IDC_IF_TOTAL_WIDTH 244
#define IDC_DEFAULT_BTN 245
-#define IDC_MS_DIR_LEFT 251
-#define IDC_MS_DIR_LEFT_RIGHT 252
-#define IDC_MS_LEFT_MESSAGE 254
+#define IDC_UNITS_LBL1 246
+#define IDC_UNITS_LBL2 247
+#define IDC_UNITS_LBL3 248
+#define IDC_UNITS_LBL4 249
+#define IDC_UNITS_LBL5 250
+#define IDC_RADIO1 251
+#define IDC_RADIO3 252
+#define IDC_RADIO4 253
+#define IDC_EDIT1 254
+#define IDC_MC_LEFT_MESSAGE 254
+#define IDC_ADDITION 254
#define IDC_MS_RIGHT_MESSAGE 255
+#define IDC_EDIT2 256
+#define IDC_EDIT3 257
+#define IDC_CHECK_ENUMERATE_NEW 259
+#define IDC_COMBO_NUMBERING 260
+#define IDC_STARTING_INDEX 261
#define IDC_MS_YSTART 256
#define IDC_MS_START_POS_Y 256
#define IDC_MS_VERTICAL_SPACE 257
@@ -71,14 +87,17 @@
#define IDC_IF_UNITS2 267
#define IDC_IF_UNITS3 ...
[truncated message content] |