<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">The margins I want to have are the following:<o:p></o:p></p>
<p class="MsoNormal">0 – Line Nmber<o:p></o:p></p>
<p class="MsoNormal">1 – Text (5 characters)<o:p></o:p></p>
<p class="MsoNormal">2 – Bookmark<o:p></o:p></p>
<p class="MsoNormal">3 – Folding<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The code I use to set this up is the following<o:p></o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:blue;background:white;mso-highlight:white">enum</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span style="font-size:9.5pt;font-family:Consolas;color:#216F85;background:white;mso-highlight:white">EMargin</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">{<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">eLineNumber</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> = 0,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">eDataMark</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> = 1,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">eBookMarks</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> = 2,<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">eFoldingMargin</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">=3<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">};<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white;mso-highlight:white">setMarginType</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">eLineNumber</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">,
</span><span style="font-size:9.5pt;font-family:Consolas;color:#216F85;background:white;mso-highlight:white">QsciScintilla</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">::</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">NumberMargin</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
 );<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white;mso-highlight:white">setMarginType</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">eDataMark</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">,
</span><span style="font-size:9.5pt;font-family:Consolas;color:#216F85;background:white;mso-highlight:white">QsciScintilla</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">::</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">TextMargin</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
 );<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white;mso-highlight:white">setMarginWidth</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">eDataMark</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">,
</span><span style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">"CIWEF"</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> );  // will be set to one or more
 of these characters<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white;mso-highlight:white">setMarginType</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">eFoldingMargin</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">,
</span><span style="font-size:9.5pt;font-family:Consolas;color:#216F85;background:white;mso-highlight:white">QsciScintilla</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">::</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">SymbolMargin</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
 );<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white;mso-highlight:white">setMarginType</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">eBookMarks</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">,
</span><span style="font-size:9.5pt;font-family:Consolas;color:#216F85;background:white;mso-highlight:white">QsciScintilla</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">::</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">SymbolMargin</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
 );<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white;mso-highlight:white">setMarginWidth</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">eBookMarks</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">, 16 );<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:#216F85;background:white;mso-highlight:white">QPixmap</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
</span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white;mso-highlight:white">bookmark</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(
</span><span style="font-size:9.5pt;font-family:Consolas;color:#A31515;background:white;mso-highlight:white">":/resources/bookmark.png"</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> );<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white;mso-highlight:white">bookmark</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> =
</span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white;mso-highlight:white">bookmark</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">.</span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white;mso-highlight:white">scaled</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(
 12, 12, </span><span style="font-size:9.5pt;font-family:Consolas;color:#216F85;background:white;mso-highlight:white">Qt</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">::</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">KeepAspectRatio</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">
 );<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">   
</span><span style="font-size:9.5pt;font-family:Consolas;color:#880000;background:white;mso-highlight:white">markerDefine</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">(
</span><span style="font-size:9.5pt;font-family:Consolas;color:navy;background:white;mso-highlight:white">bookmark</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white">,
</span><span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">eBookMarks</span><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"> );<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:9.5pt;font-family:Consolas;color:black;background:white;mso-highlight:white"><o:p> </o:p></span></p>
<p class="MsoNormal">For the bookmarks<o:p></o:p></p>
<p class="MsoNormal">markerAdd( lineNum, eBookmarks) is called when the correct action is triggered.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">For the text margin I use<o:p></o:p></p>
<p class="MsoNormal">setMarginText( lineNum, text, <span style="font-size:9.5pt;font-family:Consolas;color:#6F008A;background:white;mso-highlight:white">
STYLE_LINENUMBER )<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The problem I have, is the location of where the bookmark is painted is wrong<o:p></o:p></p>
<p class="MsoNormal"><img width="363" height="334" style="width:3.7812in;height:3.4791in" id="Picture_x0020_1" src="cid:image001.png@01D3D737.82FFC650"><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Its painting it in the middle of the 1 margin and not painting it in the 2 margin.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Any ideas? <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>