|
From: <mbe...@us...> - 2010-07-07 20:36:55
|
Revision: 828
http://scstudio.svn.sourceforge.net/scstudio/?rev=828&view=rev
Author: mbezdeka
Date: 2010-07-07 20:36:49 +0000 (Wed, 07 Jul 2010)
Log Message:
-----------
Message numbering:
- some changes in help
- fixed conflict with message sequence
Message snapping:
- add GUI to dialog Settings
Modified Paths:
--------------
trunk/doc/help/frontend/message-numbering.html
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/globalSettingsDlg.cpp
trunk/src/view/visio/addon/globalSettingsDlg.h
trunk/src/view/visio/addon/resource.h
trunk/src/view/visio/addon/scstudio.vcproj
Added Paths:
-----------
trunk/src/view/visio/addon/snapGlobalDlg.cpp
trunk/src/view/visio/addon/snapGlobalDlg.h
Modified: trunk/doc/help/frontend/message-numbering.html
===================================================================
--- trunk/doc/help/frontend/message-numbering.html 2010-07-06 19:26:23 UTC (rev 827)
+++ trunk/doc/help/frontend/message-numbering.html 2010-07-07 20:36:49 UTC (rev 828)
@@ -2,25 +2,25 @@
<html>
<head>
<title>Message Numbering – SCStudio frontend</title>
-<link href="../help.css" rel="stylesheet" type="text/css"/>
+<link href="../help.css" rel="stylesheet" type="text/css">
</head>
<body>
<h1>Message Numbering</h1>
-<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>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>
<h2>Enable message numbering</h2>
-<p>By pressing Message numbering button <img src="pictures/icon_message_enumeration.png" alt="Message Numbering" />, via menu <code>Check->Drawing->Message numbering->Message numbering</code> or by using hotkey <Code>Ctrl+Alt+E</Code> the dialog with options will be shown:</p>
+<p>By pressing Message numbering button <img src="pictures/icon_message_enumeration.png" alt="Message Numbering">, via menu <code>Check->Drawing->Message numbering->Message numbering</code> 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"/>
+<img src="pictures/message_numbering_options.png" alt="Message Numbering options dialog">
</p>
-<p>You can choose:<br/>
-- specific numbering type (numbers, letters, capital letters, romans)<br/>
-- starting index (1-9999 for number, letters and capital letters and 1-3999 for romans)<br/>
-- and additional string following the index such as ".", "-", … (max 4 chars). A space between the index and the message label is added automatically.<br/>
+<p>You can choose:<br>
+- specific numbering type (numbers, letters, capital letters, romans)<br>
+- starting index (1-9999 for number, letters and capital letters and 1-3999 for romans)<br>
+- and additional string following the index such as ".", "-", … (max 4 chars). A space between the index and the message label is added automatically.<br>
</p>
<p>
@@ -40,31 +40,31 @@
<p>When a group of messages is numbered, user can select it by right-click on any of numbered messages from group and choose <code>Select numbering group</code> from context menu. Example is shown in the following picture:</p>
<p>
-<img src="pictures/select_numbering_group.png" alt="Select numbering group" />
+<img src="pictures/select_numbering_group.png" alt="Select numbering group">
</p>
<h2>Auto numbering</h2>
<p>New messages can be automatically numbered after they are dropped on the page. Specific behavior can be set via menu <code>Check->Drawing->Settings</code>, tab Numbering. Following dialog will be shown:</p>
<p>
-<img src="pictures/message_numbering_autoenum_options.png" alt="Auto numbering options" />
+<img src="pictures/message_numbering_autoenum_options.png" alt="Auto numbering options">
</p>
<p>
-Options are:<br />
-<p/>
+Options are:<br>
+</p>
<p>
-<code>automatic numbering new messages</code><br />
- - sets whether auto numbering is enabled, otherwise all other options are disabled.<br /><br />
-<code>as nearest message</code><br />
- - new messages will be numbered according to the group of the closest message on the active page. All message indexes in the current group will be recounted. If the closest message isn't numbered, new one won't be either. <br />
-<code>as nearest numbered message</code><br />
- - new messages will be numbered according to the closest <b>numbered</b> message on the active page. If there are no numbered messages on the active page you can choose between: <br /><br />
- <code>don't number</code><br />
- - don't number new messages if there are no numbered messages on the page.<br />
- <code>use numbering style</code><br />
- - use specific numbering style if there are no numbered messages on the page.<br />
+<code>automatic numbering new messages</code><br>
+ - sets whether auto numbering is enabled, otherwise all other options are disabled.<br><br>
+<code>as nearest message</code><br>
+ - new messages will be numbered according to the group of the closest message on the active page. All message indexes in the current group will be recounted. If the closest message isn't numbered, new one won't be either. <br>
+<code>as nearest numbered message</code><br>
+ - new messages will be numbered according to the closest <b>numbered</b> message on the active page. If there are no numbered messages on the active page you can choose between: <br><br>
+ <code>don't number</code><br>
+ - don't number new messages if there are no numbered messages on the page.<br>
+ <code>use numbering style</code><br>
+ - use specific numbering style if there are no numbered messages on the page.<br>
</p>
</body>
</html>
\ No newline at end of file
Modified: trunk/src/view/visio/addon/addon.cpp
===================================================================
--- trunk/src/view/visio/addon/addon.cpp 2010-07-06 19:26:23 UTC (rev 827)
+++ trunk/src/view/visio/addon/addon.cpp 2010-07-07 20:36:49 UTC (rev 828)
@@ -661,20 +661,23 @@
docMon->drawNumbers(shapesPtr,*it);
m_enumerationGroups.clear();
-
- //Check whether there are still some numbered messages, otherwise erase enum info
- bool bNumberedMsg = false;
- for(int i=1; i<=vsoApp->ActivePage->Shapes->Count; i++)
+
+ if(m_bShapeDeleted)
{
- Visio::IVShapePtr shape = vsoApp->ActivePage->Shapes->Item[i];
- if(docMon->isMessageShape(shape) && _tcsicmp(shape->Data1,_T("1")) == 0)
+ //Check whether there are still some numbered messages, otherwise erase enum info
+ bool bNumberedMsg = false;
+ for(int i=1; i<=vsoApp->ActivePage->Shapes->Count; i++)
{
- bNumberedMsg = true;
- break;
+ Visio::IVShapePtr shape = vsoApp->ActivePage->Shapes->Item[i];
+ if(docMon->isMessageShape(shape) && _tcsicmp(shape->Data1,_T("1")) == 0)
+ {
+ bNumberedMsg = true;
+ break;
+ }
}
+ if(!bNumberedMsg)
+ CEnumerateUtils::eraseEnumInfo(vsoApp);
}
- if(!bNumberedMsg)
- CEnumerateUtils::eraseEnumInfo(vsoApp);
//Set variables to false to prevent this function from loop
m_bShapeDeleted = m_bCellChanged = false;
Modified: trunk/src/view/visio/addon/addon.h
===================================================================
--- trunk/src/view/visio/addon/addon.h 2010-07-06 19:26:23 UTC (rev 827)
+++ trunk/src/view/visio/addon/addon.h 2010-07-07 20:36:49 UTC (rev 828)
@@ -134,6 +134,7 @@
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-07-06 19:26:23 UTC (rev 827)
+++ trunk/src/view/visio/addon/dllmodule.rc 2010-07-07 20:36:49 UTC (rev 828)
@@ -224,7 +224,15 @@
GROUPBOX "If no nearest (numbered) message found:",IDC_STATIC,7,65,261,54,WS_GROUP
END
+IDD_SNAP_GLOBAL DIALOGEX 0, 0, 200, 98
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "Dialog"
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ CONTROL "Enable message snapping",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,7,98,10
+END
+
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
@@ -289,6 +297,14 @@
TOPMARGIN, 7
BOTTOMMARGIN, 119
END
+
+ IDD_SNAP_GLOBAL, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 193
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 91
+ END
END
#endif // APSTUDIO_INVOKED
Modified: trunk/src/view/visio/addon/document.cpp
===================================================================
--- trunk/src/view/visio/addon/document.cpp 2010-07-06 19:26:23 UTC (rev 827)
+++ trunk/src/view/visio/addon/document.cpp 2010-07-07 20:36:49 UTC (rev 828)
@@ -1327,6 +1327,7 @@
Visio::IVPagePtr page = from->Application->ActivePage;
Visio::IVShapePtr vsoMsg = page->Drop(msgMaster, 0, 0);
vsoMsg->Text = caption;
+ vsoMsg->Data2 = caption; //NOTE: fixes bad captions when using auto message numbering
Visio::IVShapePtr fromShape = (fromCoregion == NULL ? from : fromCoregion);
Visio::IVShapePtr toShape = (toCoregion == NULL ? to : toCoregion);
Modified: trunk/src/view/visio/addon/globalSettingsDlg.cpp
===================================================================
--- trunk/src/view/visio/addon/globalSettingsDlg.cpp 2010-07-06 19:26:23 UTC (rev 827)
+++ trunk/src/view/visio/addon/globalSettingsDlg.cpp 2010-07-07 20:36:49 UTC (rev 828)
@@ -23,13 +23,14 @@
CGlobalSettingsDlg::CGlobalSettingsDlg(ATL::_U_STRINGorID title,UINT uStartPage, HWND hWndParent):
CPropertySheetImpl<CGlobalSettingsDlg>(title,uStartPage,hWndParent)
{
- m_bCentered = false;
-
- //Disable APPLY button and CONTEXT HELP button
- m_psh.dwFlags |= PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP;
+ m_bCentered = false;
- //Adding pages
- page1.SetTitle(_T("Numbering")); AddPage(page1);
+ //Disable APPLY button and CONTEXT HELP button
+ m_psh.dwFlags |= PSH_NOAPPLYNOW | PSH_NOCONTEXTHELP;
+
+ //Adding pages
+ page1.SetTitle(_T("Numbering")); AddPage(page1);
+ page2.SetTitle(_T("Snap && Glue")); AddPage(page2);
}
Modified: trunk/src/view/visio/addon/globalSettingsDlg.h
===================================================================
--- trunk/src/view/visio/addon/globalSettingsDlg.h 2010-07-06 19:26:23 UTC (rev 827)
+++ trunk/src/view/visio/addon/globalSettingsDlg.h 2010-07-07 20:36:49 UTC (rev 828)
@@ -21,27 +21,31 @@
#include <atldlgs.h>
#include <atlctrls.h>
#include <atlddx.h>
+
+//dialogs for tabs
#include "numberingGlobalDlg.h"
+#include "snapGlobalDlg.h"
class CGlobalSettingsDlg : public CPropertySheetImpl<CGlobalSettingsDlg>
{
public:
- CGlobalSettingsDlg(ATL::_U_STRINGorID title = (LPCTSTR) NULL,
- UINT uStartPage = 0, HWND hWndParent = NULL);
+ CGlobalSettingsDlg(ATL::_U_STRINGorID title = (LPCTSTR) NULL,
+ UINT uStartPage = 0, HWND hWndParent = NULL);
-BEGIN_MSG_MAP(CGlobalSettingsDlg)
- MSG_WM_SHOWWINDOW(OnShowWindow)
- CHAIN_MSG_MAP(CPropertySheetImpl<CGlobalSettingsDlg>)
-END_MSG_MAP()
+ BEGIN_MSG_MAP(CGlobalSettingsDlg)
+ MSG_WM_SHOWWINDOW(OnShowWindow)
+ CHAIN_MSG_MAP(CPropertySheetImpl<CGlobalSettingsDlg>)
+ END_MSG_MAP()
- //Message handlers
- void OnShowWindow(BOOL bShowing, int nReason);
+ //Message handlers
+ void OnShowWindow(BOOL bShowing, int nReason);
protected:
- bool m_bCentered;
+ bool m_bCentered;
- //Pages of property sheet
- CNumberingGlobalDlg page1;
+ //Pages of property sheet
+ CNumberingGlobalDlg page1;
+ CSnapGlobalDlg page2;
};
// $Id$
\ No newline at end of file
Modified: trunk/src/view/visio/addon/resource.h
===================================================================
--- trunk/src/view/visio/addon/resource.h 2010-07-06 19:26:23 UTC (rev 827)
+++ trunk/src/view/visio/addon/resource.h 2010-07-07 20:36:49 UTC (rev 828)
@@ -43,6 +43,8 @@
#define IDD_NUMBERING_GLOBAL 225
#define IDC_OPTIONS_SWITCH_BTN 226
#define IDC_OPTIONS_SWITCH_LBL 227
+#define IDD_DIALOG1 227
+#define IDD_SNAP_GLOBAL 227
#define IDC_OPTIONS_GROUP_BOX 228
#define IDC_IF_LBL1 229
#define IDC_IF_LBL2 230
@@ -106,7 +108,7 @@
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 227
+#define _APS_NEXT_RESOURCE_VALUE 228
#define _APS_NEXT_COMMAND_VALUE 32768
#define _APS_NEXT_CONTROL_VALUE 280
#define _APS_NEXT_SYMED_VALUE 105
Modified: trunk/src/view/visio/addon/scstudio.vcproj
===================================================================
--- trunk/src/view/visio/addon/scstudio.vcproj 2010-07-06 19:26:23 UTC (rev 827)
+++ trunk/src/view/visio/addon/scstudio.vcproj 2010-07-07 20:36:49 UTC (rev 828)
@@ -420,6 +420,14 @@
>
</File>
<File
+ RelativePath=".\snapGlobalDlg.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\snapGlobalDlg.h"
+ >
+ </File>
+ <File
RelativePath=".\stdafx.cpp"
>
<FileConfiguration
Added: trunk/src/view/visio/addon/snapGlobalDlg.cpp
===================================================================
--- trunk/src/view/visio/addon/snapGlobalDlg.cpp (rev 0)
+++ trunk/src/view/visio/addon/snapGlobalDlg.cpp 2010-07-07 20:36:49 UTC (rev 828)
@@ -0,0 +1,32 @@
+/*
+ * 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...>
+ *
+ * $Id$
+ */
+
+#include "stdafx.h"
+#include "snapGlobalDlg.h"
+
+BOOL CSnapGlobalDlg::OnInitDialog(HWND hWndFocus, LPARAM lParam)
+{
+ return TRUE;
+}
+
+int CSnapGlobalDlg::OnApply()
+{
+ return PSNRET_NOERROR;
+}
+
+// $Id$
\ No newline at end of file
Property changes on: trunk/src/view/visio/addon/snapGlobalDlg.cpp
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/src/view/visio/addon/snapGlobalDlg.h
===================================================================
--- trunk/src/view/visio/addon/snapGlobalDlg.h (rev 0)
+++ trunk/src/view/visio/addon/snapGlobalDlg.h 2010-07-07 20:36:49 UTC (rev 828)
@@ -0,0 +1,54 @@
+/*
+ * 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...>
+ *
+ * $Id$
+ */
+
+#pragma once
+
+#include <atldlgs.h>
+#include <atlctrls.h>
+#include <atlddx.h>
+#include <atlcrack.h>
+#include <atlmisc.h>
+
+class CSnapGlobalDlg:
+ public CPropertyPageImpl<CSnapGlobalDlg>,
+ public CWinDataExchange<CSnapGlobalDlg>
+{
+public:
+ enum { IDD = IDD_SNAP_GLOBAL };
+
+ BEGIN_MSG_MAP(CSnapGlobalDlg)
+ MSG_WM_INITDIALOG(OnInitDialog)
+ CHAIN_MSG_MAP(CPropertyPageImpl<CSnapGlobalDlg>)
+ END_MSG_MAP()
+
+
+ BEGIN_DDX_MAP(CSnapGlobalDlg)
+ END_DDX_MAP()
+
+protected:
+
+public:
+ //Message handlers
+ BOOL OnInitDialog(HWND hWndFocus, LPARAM lParam);
+
+ //Property page notification handlers (override method)
+ int OnApply();
+
+};
+
+// $Id$
\ No newline at end of file
Property changes on: trunk/src/view/visio/addon/snapGlobalDlg.h
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|