|
From: <ob...@us...> - 2010-04-10 22:50:35
|
Revision: 715
http://scstudio.svn.sourceforge.net/scstudio/?rev=715&view=rev
Author: obouda
Date: 2010-04-10 22:50:23 +0000 (Sat, 10 Apr 2010)
Log Message:
-----------
Add Instances function: added fixed default values - now the instances fit in the page entirely; added HTML help
Modified Paths:
--------------
trunk/doc/help/frontend.html
trunk/doc/help/help.css
trunk/src/view/visio/addon/instancesfielddlg.cpp
trunk/src/view/visio/addon/instancesfielddlg.h
Modified: trunk/doc/help/frontend.html
===================================================================
--- trunk/doc/help/frontend.html 2010-04-06 08:29:29 UTC (rev 714)
+++ trunk/doc/help/frontend.html 2010-04-10 22:50:23 UTC (rev 715)
@@ -13,6 +13,9 @@
are available:</p>
<img class="big" src="pictures/frontend.png" alt="SCStudio toolbar and menu in MS Visio">
+<h2>Shape Selection</h2>
+<p>On top of standard Visio functions for selecting shapes (such as <code>Ctrl+A</code>
+shortcut for selecting all shapes), SCStudio offers several useful selection functions.</p>
<p>The first toolbar button
<img src="pictures/icon_select_instances.png" alt="Select instances button">
selects all instances in the current page of active document. The second button
@@ -32,6 +35,35 @@
selection.</p>
+<h2>Automatic drawing</h2>
+<p>With all required shapes available in the BMSC and HMSC stencils, it is possible
+to draw virtually any MSC diagram. In practice, there are many stereotypes, however.
+SCStudio helps the user draw some frequently used patterns by several automatic
+drawing functions.</p>
+<h3>Add Instances</h3>
+<p>The first of them is the <code>Add Instances</code> function accessible via menu
+<code>Check → Drawing → Add Instances</code>, or <code>Ctrl+Alt+F</code>
+keyboard shortcut. It is available in the context (right-click) menu of the document, too.
+The function draws a given number of instances on the active
+page of the document, with constant or dynamic space between each two of them.</p>
+<p>When invoked, the following dialog appears:</p>
+<img class="big" src="pictures/add_instances_options.png" alt="Add Instances options dialog">
+<p>The first two fields set the number of instances to be drawn and their length.
+Next two fields set the starting point from which to start drawing. If the cursor
+was in the document drawing area in the time of Add Instances invocation (that is,
+the keyboard shortcut or context-menu was used), the start position fields are
+filled with the cursor position, i.e. drawing will start from the point where
+the cursor was.</p>
+<p>In the Options panel, if the Total width switch is chosen, all the instances
+will be drawn in the place of a width given, so the gaps between instances will be
+calculated to fit this area. On the contrary, the Spacing switch sets constant gaps
+between the instances not limiting the total width.</p>
+<p>All numbers in the dialog are in units of the current page of the document.</p>
+
+<h3>Message Sequence</h3>
+<p><i>Under development…</i></p>
+
+
</body>
</html>
Modified: trunk/doc/help/help.css
===================================================================
--- trunk/doc/help/help.css 2010-04-06 08:29:29 UTC (rev 714)
+++ trunk/doc/help/help.css 2010-04-10 22:50:23 UTC (rev 715)
@@ -8,10 +8,10 @@
margin-bottom: 0.7em;
}
h1 {
- font-size: 1.2em;
+ font-size: 1.4em;
}
h2 {
- font-size: 1.0em;
+ font-size: 1.2em;
}
h3 {
font-size: 1.0em;
Modified: trunk/src/view/visio/addon/instancesfielddlg.cpp
===================================================================
--- trunk/src/view/visio/addon/instancesfielddlg.cpp 2010-04-06 08:29:29 UTC (rev 714)
+++ trunk/src/view/visio/addon/instancesfielddlg.cpp 2010-04-10 22:50:23 UTC (rev 715)
@@ -131,11 +131,13 @@
LRESULT CInstancesFieldDlg::OnDefaultCmd(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled)
{
m_start_pos_x = 0.0f;
- m_start_pos_y = m_pageHeight;
- m_total_width = (m_pageWidth > 0 ? m_pageWidth :
+ m_start_pos_y = m_pageHeight - CPageUtils::ConvertUnits(m_vsoApp->ActivePage, IF_BORDER, 0, visPageUnits);
+ m_total_width = (m_pageWidth > 0 ?
+ m_pageWidth :
CPageUtils::ConvertUnits(m_vsoApp->ActivePage, DEFAULT_IF_TOTAL_WIDTH, 0, visPageUnits)
);
- m_instance_length = (m_pageHeight > 0 ? m_pageHeight :
+ m_instance_length = (m_pageHeight > 0 ?
+ m_pageHeight - 2 * CPageUtils::ConvertUnits(m_vsoApp->ActivePage, IF_BORDER, 0, visPageUnits) :
CPageUtils::ConvertUnits(m_vsoApp->ActivePage, DEFAULT_IF_INSTANCE_LENGTH, 0, visPageUnits)
);
Modified: trunk/src/view/visio/addon/instancesfielddlg.h
===================================================================
--- trunk/src/view/visio/addon/instancesfielddlg.h 2010-04-06 08:29:29 UTC (rev 714)
+++ trunk/src/view/visio/addon/instancesfielddlg.h 2010-04-10 22:50:23 UTC (rev 715)
@@ -132,5 +132,6 @@
static const float DEFAULT_IF_TOTAL_WIDTH = 7.8740157480314960f; // 200 mm
static const float DEFAULT_IF_SPACING = 1.18110236220472f; // 30 mm
static const bool DEFAULT_IF_OPTIONS_VISIBLE = false;
+static const float IF_BORDER = 0.0787401574803149f; // 2 mm border for the default command
// $Id$
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|