Click here to Skip to main content
15,887,175 members
Articles / Desktop Programming / MFC

CFlowchartEditor - linking things in CDiagramEditor

Rate me:
Please Sign up or sign in to vote.
4.94/5 (136 votes)
5 Jul 2006Public Domain8 min read 364.8K   33.9K   278  
A flowchart editor with linked objects, based on CDiagramEditor.
<html>
<header>
<style>
BODY{FONT-SIZE: 10pt;COLOR: black;FONT-FAMILY: Verdana, Helvetica, Arial, sans-serifBACKGROUND-COLOR: #ffffff}
P{FONT-SIZE: 10pt;COLOR: black;FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif;}
H2{FONT-SIZE: 13pt;COLOR: #ff9900;FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif;FONT-WEIGHT: bold;}
H3{COLOR: #ff9900;FONT-WEIGHT: bold;FONT-SIZE: 11pt;FONT-FAMILY: Arial, sans-serif;}
TABLE{BACKGROUND-COLOR:#f0f0ff;}
TD{FONT-SIZE: 10pt;COLOR: black;FONT-FAMILY: Verdana, Helvetica, Arial, sans-serif;PADDING:4px;}
PRE{PADDING-RIGHT: 7pt;PADDING-LEFT: 7pt;BACKGROUND-IMAGE: url(/images/codebg.gif);PADDING-BOTTOM: 7pt;FONT: 9pt "Courier New", Courier, mono;WIDTH: 100%;PADDING-TOP: 7pt;WHITE-SPACE: pre;BACKGROUND-COLOR: #fbedbb}
CODE{COLOR: #990000;FONT-FAMILY: "Courier New", Courier, mono;}
A:link{TEXT-DECORATION: none}
A:visited{TEXT-DECORATION: none}
A:active{TEXT-DECORATION: underline}
A:hover{TEXT-DECORATION: underline}
A.top:link{font-size:8pt;color:red;font-family:Verdana,Helvetica,Arial,sans-serif;}
A.top:visited{font-size:8pt;color:red;font-family:Verdana,Helvetica,Arial,sans-serif;}
A.top:active{font-size:8pt;color:red;font-family:Verdana,Helvetica,Arial,sans-serif;}
A.top:hoover{font-size:8pt;color:red;font-family:Verdana,Helvetica,Arial,sans-serif;}
</style>
</header>
<body>

<h2>CFlowchartClipboardHandler</h2>
<blockquote>
<code>CFlowchartClipboardHandler </code>is derived from <code>CDiagramClipboardHandler </code>and is the clipboard handler for <code>CFlowchartEditor</code>. In addition to the default clipboard handling, <code>CFlowchartClipboardHandler </code>also gives copied objects new IDs as well as copy and paste links.
</blockquote>
<a class="top" href="index.html">[back to the index page]</a><br><a name="contents"></a>
<h3>Public and protected functions</h3>
<a href="#CFlowchartClipboardHandler">CFlowchartClipboardHandler()</a><br>
<a href="#~CFlowchartClipboardHandler">~CFlowchartClipboardHandler();
<a href="#ClearPaste">ClearPaste()</a><br>
<a href="#Copy">Copy( CDiagramEntity* obj )</a><br>
<a href="#CopyAllSelected">CopyAllSelected( CDiagramEntityContainer* container )</a><br>
<a href="#Paste">Paste( CDiagramEntityContainer* container )</a><br>

<h3>Public functions</h3>
<a name="CFlowchartClipboardHandler"></a><code>CFlowchartClipboardHandler();</code>
<blockquote>Constructor.<br>
<a class="top" href="#contents">[back to the contents]</a>&nbsp;<a class="top" href="index.html">[back to the index page]</a></p></blockquote>

<h3>Public virtuals</h3>
<a name="~CFlowchartClipboardHandler"></a><code>virtual ~CFlowchartClipboardHandler();</code>
<blockquote>Destructor.<br>
<a class="top" href="#contents">[back to the contents]</a>&nbsp;<a class="top" href="index.html">[back to the index page]</a></p></blockquote>

<a name="ClearPaste"></a><code>virtual void ClearPaste();</code>
<blockquote>Clears the paste data, deallocating memory. The override also clears link data.<br>
<a class="top" href="#contents">[back to the contents]</a>&nbsp;<a class="top" href="index.html">[back to the index page]</a></p></blockquote>

<a name="Copy"></a><code>virtual void Copy( CDiagramEntity* obj );</code>
<blockquote>Copies <code>obj </code>to the paste-array. Will assign a new id with <code>CLinkFactory::GetID()</code> to the cloned object.<br>
<a class="top" href="#contents">[back to the contents]</a>&nbsp;<a class="top" href="index.html">[back to the index page]</a></p></blockquote>

<a name="CopyAllSelected"></a><code>virtual void CopyAllSelected( CDiagramEntityContainer* container );</code>
<blockquote>Copies all selected objects from <code>container </code>and their links to the paste array. All objects will be assigned new IDs and the cloned links updated accordingly.<br>
<a class="top" href="#contents">[back to the contents]</a>&nbsp;<a class="top" href="index.html">[back to the index page]</a></p></blockquote>

<a name="Paste"></a><code>virtual void Paste( CDiagramEntityContainer* container );</code>
<blockquote>Pastes all objects and links to <code>container</code>.<br>
<a class="top" href="#contents">[back to the contents]</a>&nbsp;<a class="top" href="index.html">[back to the index page]</a></p></blockquote>


<h3>Private data</h3>
<code>CObArray m_pasteLinks;</code>
<blockquote>Contains the copied links.<br>
<a class="top" href="#contents">[back to the contents]</a>&nbsp;<a class="top" href="index.html">[back to the index page]</a></p></blockquote>

<p><b>Johan Rosengren, Abstrakt Mekanik AB, 2004.</b></p>
</body>
</html>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under A Public Domain dedication


Written By
Software Developer (Senior) Abstrakt Mekanik AB
Sweden Sweden
45 years old, married, three kids.

Started with computers more than 20 years ago on a CBM-64.

Read Theoretical Philosophy at the University of Lund.

Working as a C++ consultant developer.

Science-fiction freak. Enjoy vintage punkrock.

Comments and Discussions