source: trunk/Documentation/Developer/PluginHowTo/HowToDeveloper.tex @ 1624

Last change on this file since 1624 was 1624, checked in by Matthäus Wander, 11 years ago

Plugin HowTo:

  • updated part 1 to VS2010 and VC# Express
File size: 7.6 KB
Line 
1\documentclass[11pt, a4paper, titlepage]{scrreprt}
2
3\usepackage[latin1]{inputenc}
4\usepackage[english]{babel}
5\usepackage{graphicx}
6\usepackage{booktabs}
7\usepackage{geometry}
8\usepackage{setspace}
9\usepackage{fancyhdr}
10\usepackage{url}
11\usepackage{wrapfig}
12\usepackage[usenames,dvipsnames]{color}
13\usepackage{colortbl}
14\usepackage{eso-pic}
15\usepackage{listings}
16\usepackage{fix-cm}
17\usepackage{textcomp}
18\usepackage[T1]{fontenc}
19\usepackage{color,soul}
20
21%\usepackage[automark]{scrpage2}
22%\usepackage[absolute]{textpos}
23
24
25\lstset{language=[Sharp]C, % base language is C and dialect is Sharp (C#)
26captionpos=b, % descriptions are underneath
27frame=lines, % above und underneath the code listing are horizontal lines
28basicstyle=\ttfamily, % font
29keywordstyle=\color{blue}, % Color for keywords like public, void, object, etc.
30commentstyle=\color{ForestGreen}, % Color for comments
31stringstyle=\color{BrickRed}, % Color for strings
32numbers=left, % line numbers to the left of the code
33numberstyle=\tiny, % small line numbers
34numbersep=5pt,
35tabsize=2,
36breaklines=true, % Wordwrap activated
37showstringspaces=false,
38morestring=[b]', % counts single quote pairs as strings (and thus also colors them red)
39upquote=true, % changes smart single quotes to straight ' marks
40% emph defines certain colors for specific words
41% emph={double,bool,int,unsigned,char,true,false,void},emphstyle=\color{blue},
42emph={Assert,Test}, emphstyle=\color{BrickRed},
43emph={[2]double,bool,int,unsigned,char,true,false,void,using,\# ,region,endregion},
44emphstyle={[2]\color{blue}}
45}
46
47\geometry{a4paper, portrait, left=2cm, right=2cm, top=2cm, bottom=2cm, includefoot}
48
49%\pagestyle{headings}
50%\pagestyle{scrheadings}
51\pagestyle{fancy} % self-made page style
52\fancyhf{} % clear all header and footer fields
53\fancyhead[L]{\leftmark} % left header
54\fancyhead[C]{\AddToShipoutPicture*{\BackgroundHeaderPic}} % center header
55%\fancyhead[R]{\rightmark} % right header --> Removed because it overflows on the leftmark if the text is too long
56
57\fancyfoot[C]{\thepage\AddToShipoutPicture*{\BackgroundFooterPic}} % center footer
58%\fancyfoot[EL,OR]{\thepage} % page number
59%\fancyfoot[ER,OL]{\includegraphics[height=0.3cm]{figures/ct_logo}}
60
61\renewcommand{\headrulewidth}{2pt} % upper separator
62\renewcommand{\footrulewidth}{2pt} % lower separator
63
64\newlength{\headbgwidth}
65\setlength{\headbgwidth}{\headwidth}
66%\addtolength{\headbgwidth}{0.3mm}
67%\addtolength{\headwidth}{\marginparwidth}
68
69
70\renewcommand{\headrule}{{\color{orange}\hrule width\headwidth height\headrulewidth \vskip-\headrulewidth}}
71\renewcommand{\footrule}{{\color{orange}\vskip-\footruleskip\vskip-\footrulewidth\hrule width\headwidth height\footrulewidth\vskip\footruleskip}}
72
73
74\makeatletter
75\newcommand\BackgroundHeaderPic{
76%\AddToShipoutPicture{%
77    \setlength{\@tempdimb}{1.87cm}%
78    \setlength{\@tempdimc}{28.4cm}%
79    \setlength{\unitlength}{1pt}%
80    \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){
81        \includegraphics[width=\headbgwidth, height=\headheight]{figures/ct_page_header}%
82    }
83}
84
85\newcommand\BackgroundFooterPic{
86%\AddToShipoutPicture{%
87    \setlength{\@tempdimb}{1.87cm}%
88    \setlength{\@tempdimc}{1.8cm}%
89    \setlength{\unitlength}{1pt}%
90    \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){
91        \includegraphics[width=\headbgwidth, height=0.7cm]{figures/ct_page_footer_pure}%
92    }
93}
94
95\newcommand\WaterMarkPic{%
96    \setlength{\@tempdimb}{1.85cm}%
97    \setlength{\@tempdimc}{2.7cm}%
98    \setlength{\unitlength}{1pt}%
99    \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){
100            \includegraphics[width=0.6\textwidth]{figures/ct_logo_watermark}%
101    }
102}
103\makeatother
104
105% finetune the gaps between figure and text in the subfigure environment (basically close the gap as much as possible)
106%\renewcommand{\subfigtopskip}{0pt}
107%\renewcommand{\subfigbottomskip}{0pt}
108
109% some color definitions for the pdf statements below
110\definecolor{mygrey}{rgb}{0.45,0.45,0.45}
111\definecolor{mydarkgrey}{rgb}{0.2,0.2,0.2}
112\definecolor{red}{rgb}{1.0,0.33,0.33}
113\definecolor{orange}{rgb}{1.00,0.73,0.33}
114\definecolor{yellow}{rgb}{0.95,0.92,0.}
115\definecolor{lightgreen}{rgb}{0.3,0.95,0.46}
116\definecolor{titleblue}{rgb}{0.03,0.10,0.46}
117
118
119\input{frontpage}
120
121
122\title{Plugin Developer Manual}
123\subtitle{How to build your own plugins for CrypTool 2.0}
124\author{S.\ Przybylski, A.\ Wacker, M.\ Wander, F.\ Enkler and P.\ Vacek}
125\email{\{przybylski$|$wacker$|$wander$|$enkler$|$vacek\}@cryptool.org}
126\version{0.6}
127\date{\today}
128
129% Metadata and configuration of the pdf output:
130% Do not forget to enter the correct title, author, subject, and keywords
131
132% For screen viewing it is nice to have references marked in a slightly different
133% color than the rest of the text, since they will be hyperlinks to the
134% referenced objects.
135\usepackage[pdftex,
136             pdftitle={\@title},
137             colorlinks,
138             linkcolor={mydarkgrey},
139             citecolor={mygrey},
140             urlcolor={blue},
141             plainpages={false},
142             bookmarksnumbered={true},
143             bookmarksopenlevel={3},
144             pdfauthor={\@author},
145             pdfsubject={\@subtitle},
146             pdfkeywords={CrypTool,Cryptography,eLearning,Cryptanalysis},
147             pdfstartview={Fit}]{hyperref}
148
149%\usepackage{pdfsync}
150
151% To avoid nasty mistakes like having comments directly in the textflow
152% the following \todo macro was defined. With that you can enter
153% \todo{What I still have to do here}
154% inside of your text and a marker will appear at the page's margin with the
155% text "What I still have to do here".
156% The first line activates this feature. If you comment it out and uncomment
157% the second line below there will be no error messages and no todos will be shown
158% anymore. So - even if you have forgotten to delete one of them - they will not appear
159% in the final printout.
160\newcommand{\todo}[1]{\marginpar{\textcolor{red}{ToDo:} #1}}
161
162% Only prints on title page:
163\AddToShipoutPicture*{\WaterMarkPic}
164
165%\AtBeginDocument{\markboth{\@author}{\@title}}
166\begin{document}
167        \maketitle
168
169        \begin{abstract}
170CrypTool 2 is the modern successor of the well-known e-learning platform for cryptography and cryptanalysis \htmladdnormallink{CrypTool 1}{http://www.cryptool.org/}, which is used worldwide for educational purposes at schools and universities as well as in companies and agencies.
171
172Since the first launch of CrypTool 1 in 1999 the art of software development has changed dramatically. The CrypTool 2 team began working in 2008 to develop a completely new e-learning application, embracing the newest trends in both didactics and software architecture to delight the end-user with an entirely new experience.\\
173
174To reach these goals, CrypTool 2 is built using the following:
175
176\begin{itemize}
177        \item .NET (a modern software framework from Microsoft with solutions to common programming problems)
178        \item C\# (a modern object-oriented programming language, comparable to Java)
179    \item WPF (a modern purely vector-based graphical subsystem for rendering user interfaces in Windows-based applications)
180    \item Visual Studio 2010 (a development environment)
181        \item Subversion (a source code and documentation version management system)
182\end{itemize}
183
184This document is intended for plugin developers who want to contribute new visual or mathematical functionality to CrypTool 2. As of January 2010, the program consists of over 7000 lines of C\# code in the core application and over 250,000 lines of C\# code in about 100 plugins.
185
186For further information, please visit the CrypTool 2 website at \htmladdnormallink{http://www.cryptool2.vs.uni-due.de}{http://www.cryptool2.vs.uni-due.de}.
187    \end{abstract}
188
189        \tableofcontents
190    \listoffigures
191
192%    \AddToShipoutPicture{\WaterMarkPic}
193
194        \include{part1}
195        \include{part2}
196
197\end{document}
Note: See TracBrowser for help on using the repository browser.