-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsrc$Controls4U$StarIndicator$en-us.html
247 lines (246 loc) · 19.8 KB
/
src$Controls4U$StarIndicator$en-us.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<META NAME="Generator" CONTENT="U++ HTML Package">
<TITLE>StarIndicator :: Anboto</TITLE>
<STYLE TYPE="text/css"><!--
.A{border-collapse:collapse;table-layout:auto;border: 2px solid #000000;}
.B{padding: 3px 5px 3px 5px;border-left: 1px solid #000000;border-top: 1px solid #000000;border-right: 1px solid #000000;border-bottom: 1px solid #000000;background-color:#712A00;vertical-align:middle;}
.C{margin:0px 0px 0px 0px;text-indent:0px;text-align:left;color:#e0e0e0;font-family:sans-serif;font-size:16pt;font-weight:bold;font-style:normal;}
.D{margin:0px 0px 0px 0px;text-indent:0px;text-align:left;color:#000000;font-family:sans-serif;font-size:6pt;font-weight:normal;font-style:normal;}
.E{margin:0px 0px 5px 0px;text-indent:0px;text-align:left;color:#800000;font-family:sans-serif;font-size:12pt;font-weight:bold;font-style:normal;}
.F{color:#0000ff;font-weight:normal;}
.G{color:#000000;font-weight:normal;}
.H{color:#000000;}
.I{margin:0px 0px 5px 0px;text-indent:0px;text-align:left;color:#0000ff;font-family:sans-serif;font-size:10pt;font-weight:normal;font-style:normal;}
.J{margin:8px 0px 0px 0px;text-indent:0px;text-align:left;color:#000000;font-family:sans-serif;font-size:10pt;font-weight:normal;font-style:italic;}
.K{margin:8px 0px 0px 0px;text-indent:0px;text-align:left;color:#000000;font-family:sans-serif;font-size:10pt;font-weight:normal;font-style:normal;}
.L{display:list-item;list-style-type:disc;margin:8px 0px 0px 20px;text-indent:0px;text-align:left;color:#000000;font-family:sans-serif;font-size:10pt;font-weight:normal;font-style:normal;}
.M{font-weight:bold;font-style:italic;}
.N{display:list-item;list-style-type:disc;margin:8px 0px 0px 20px;text-indent:0px;text-align:left;color:#000000;font-family:sans-serif;font-size:10pt;font-weight:bold;font-style:normal;}
.O{font-weight:normal;}
.P{border-collapse:collapse;table-layout:auto;border: 2px solid #808080;}
.Q{padding: 3px 5px 3px 5px;border-left: 1px solid #808080;border-top: 1px solid #808080;border-right: 1px solid #808080;border-bottom: 1px solid #808080;background-color:#C0C0C0;vertical-align:middle;}
.R{margin:0px 0px 0px 0px;text-indent:0px;text-align:left;color:#000000;font-family:sans-serif;font-size:10pt;font-weight:bold;font-style:normal;}
.S{margin:0px 0px 5px 0px;text-indent:0px;text-align:left;color:#000000;font-family:sans-serif;font-size:10pt;font-weight:bold;font-style:normal;}
.T{margin:0px 0px 0px 57px;text-indent:0px;text-align:left;color:#000000;font-family:sans-serif;font-size:10pt;font-weight:normal;font-style:normal;}
.U{display:list-item;list-style-type:disc;margin:0px 0px 0px 77px;text-indent:0px;text-align:left;color:#000000;font-family:sans-serif;font-size:10pt;font-weight:normal;font-style:normal;}
.V{margin:0px 0px 5px 0px;text-indent:0px;text-align:left;color:#000000;font-family:sans-serif;font-size:10pt;font-weight:normal;font-style:normal;}
.W{color:#0000ff;}
.X{font-weight:bold;}
.Y{color:#800000;font-weight:bold;}
.Z{font-style:italic;}
.AA{margin:0px 0px 0px 0px;text-indent:0px;text-align:left;color:#000000;font-family:sans-serif;font-size:10pt;font-weight:normal;font-style:normal;}
.AB{color:#800000;font-family:monospace;font-weight:bold;}
.AC{margin:3px 0px 3px 57px;text-indent:0px;text-align:left;color:#000000;font-family:sans-serif;font-size:10pt;font-weight:normal;font-style:normal;}
a.l1 { text-decoration:none; font-size: 8pt; font-family: sans-serif; font-weight: normal; }
a.l1:link { color:#000000; }
a.l1:visited { color:#000080; }
a.l1:hover { color:#9933CC; }
a.l1:active { color:#000000; }
a.l2 { text-decoration:none; font-size: 12pt; font-family: sans-serif; font-variant: small-caps; }
a.l2:link { color:#0066FF; }
a.l2:visited { color:#FF6600; }
a.l2:hover { color:#BC0624; }
a.l2:active { color:#BC0024; }
-->
</STYLE>
<META NAME="keywords" CONTENT="framework, toolkit, widget, c++, visual, studio, dev-cpp, builder, ide, class, component,wxwidgets, qt, rapid, application, development, rad, mfc, linux, gui, sdl, directx, desktop"><META name="robots" content="index,follow">
<LINK rel="alternate" type="application/rss+xml" title="SVN changes" href="svnchanges.xml">
<LINK rel="shortcut icon" type="image/png" href="favicon.png">
</HEAD><BODY BGCOLOR="#D2D9D2" ALINK="#800000" LINK="#000000" VLINK="#000080"><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="100%"><TR><TD COLSPAN="3"></TD>
</TR>
</TABLE>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="100%"><TR><TD COLSPAN="3" BGCOLOR="#D2D9D2" HEIGHT="6"></TD>
</TR>
<TR><TD VALIGN="TOP" WIDTH="100%" BGCOLOR="#D2D9D2"><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" BGCOLOR="#FFFFFF" WIDTH="100%" style="border-style: solid; border-width: 1px; border-color: #6E89AE;padding: 10px;;"><TR><TD><TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" WIDTH="100%"><TR><TD><table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td width="100%"><table width="100%" class="A"><colgroup><col width="100%"></colgroup>
<tr><td class="B"><p class="C">StarIndicator</p>
</td>
</tr>
</table></td>
</tr></table>
<p class="D"> </p>
<p id="StarIndicator::class" class="E"><span class="F">class</span><span class="G"> </span><span class="H">StarIndicator</span><span class="G"> : </span><span class="F">public</span><span class="G"> </span>ProgressIndicator</p>
<p class="I"> </p>
<p class="J">Derived from <a href="topic://CtrlLib/src/ProgressInd$en-us#ProgressIndicator::class">ProgressIndicator</a>. Part of <a href="src$Controls4U$Controls4U$en-us.html">Controls4U</a> library.</p>
<p class="K"> </p>
<p class="K">StarIndicator is a kind of ProgressIndicator allowing to show the popularity of something, as we can see on some merchant web sites. It indicates the popularity with stars, and shows with text the exact rate (with one decimal) of the popularity and the number of votes.</p>
<p class="K"> </p>
<p class="K">Colors are used to show the confidence we can give to the grade, according to the number of votes :</p>
<p class="L">Light blue if undefined,</p>
<p class="L">Red if less than the value defined in the variable <span class="M">m_nVotesLow</span>,</p>
<p class="L">Yellow if more than the value defined in the variable <span class="M">m_nVotesLow</span> and less than the value defined in the variable <span class="M">m_nVotesHigh</span>,</p>
<p class="N"><span class="O">Light Green if more than the value defined in the variable </span>m_nVotesHigh</p>
<p class="K"> </p>
<p class="K">As seen in layout designer :</p>
<p class="K"> <a href="src$Controls4U$StarIndicator$en-us.html_0.png"><img src="src$Controls4U$StarIndicator$en-us.html_0.png" border="0" alt="" style="width: 630px; height: 126px"></a></p>
<p class="K">As seen in program :</p>
<p class="K"> <a href="src$Controls4U$StarIndicator$en-us.html_1.png"><img src="src$Controls4U$StarIndicator$en-us.html_1.png" border="0" alt="" style="width: 373px; height: 68px"></a></p>
<p class="K"> <a href="src$Controls4U$StarIndicator$en-us.html_2.png"><img src="src$Controls4U$StarIndicator$en-us.html_2.png" border="0" alt="" style="width: 373px; height: 68px"></a></p>
<p class="K"> </p>
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td width="100%"><table width="100%" class="P"><colgroup><col width="100%"></colgroup>
<tr><td class="Q"><p class="R">Constructor detail</p>
</td>
</tr>
</table></td>
</tr></table>
<hr><p class="D"> </p>
<p id="StarIndicator::StarIndicator()" class="S">StarIndicator()</p>
<p class="T">Initializes StarIndicator with the default behavior :</p>
<p class="U">The text will be displayed when the mouse goes over the control,</p>
<p class="U">The text will be black,</p>
<p class="U">The total will be shown,</p>
<p class="U">The number of votes will be shown,</p>
<p class="U">The number of votes is 0,</p>
<p class="U">The minimal number of votes is 5 (for yellow stars),</p>
<p class="U">The optimal number of votes is 50 (for green stars).</p>
<p class="D"> </p>
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td width="100%"><table width="100%" class="P"><colgroup><col width="100%"></colgroup>
<tr><td class="Q"><p class="R">Public Method List</p>
</td>
</tr>
</table></td>
</tr></table>
<hr><p class="D"> </p>
<p id="StarIndicator::AlwaysShowValue(bool)" class="V"><span class="W">virtual</span> <u>StarIndicator</u><span class="W">&</span> <span class="X">AlwaysShowValue</span>(<span class="W">bool</span> <span class="Y">b</span>)</p>
<p class="T">If <span class="Y">b</span> is <span class="Z">true</span>, the text will always appear. If not, it will appear only when the mouse is over the control.</p>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">b</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">Indicates if the text must be always shown or not.</p></td></tr></table>
<p class="D"> </p>
<hr><p class="D"> </p>
<p id="StarIndicator::Layout()" class="V"><span class="W">virtual</span> <span class="W">void</span> <span class="X">Layout</span>()</p>
<p class="T">This method is invoked when layout of StarIndicator has to be refreshed. This is usually either before window is displayed or when the StarIndicator is resized.</p>
<p class="D"> </p>
<hr><p class="D"> </p>
<p id="StarIndicator::MouseEnter(Point,dword)" class="V"><span class="W">virtual</span> <span class="W">void</span> <span class="X">MouseEnter</span>(<a href="Point"><u>Point</u></a> <span class="Y">p</span>, <a href="dword"><u>dword</u></a> <span class="Y">keyflags</span>)</p>
<p class="T">This method is called by default implementation of MouseEvent when mouse cursor enters the view area of StarIndicator.</p>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">p</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">Point of mouse cursor in view coordinates.</p></td></tr></table>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">keyflags</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">Combination of key flags for Shift, Ctrl and Alt keys.</p></td></tr></table>
<p class="D"> </p>
<hr><p class="D"> </p>
<p id="StarIndicator::MouseLeave()" class="V"><span class="W">virtual</span> <span class="W">void</span> <span class="X">MouseLeave</span>()</p>
<p class="AC">This method is called by default implementation of MouseEvent when mouse cursor leaves view area of StarIndicator.</p>
<p class="D"> </p>
<hr><p class="D"> </p>
<p class="V"><span class="W">virtual</span> <span class="W">void</span> <span class="X">MouseMove</span>(<u>Point</u> <span class="Y">p</span>, <u>dword</u> <span class="Y">keyflags</span>)</p>
<p class="AC">This method is called by default implementation of MouseEvent when mouse cursor hovers above view area of StarIndicator.</p>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">p</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">Position of mouse cursor in view coordinates.</p></td></tr></table>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">keyflags</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">Combination of key flags for Shift, Ctrl and Alt keys.</p></td></tr></table>
<p class="D"> </p>
<hr><p class="D"> </p>
<p id="StarIndicator::Paint(Draw&)" class="V"><span class="W">virtual</span> <span class="W">void</span> <span class="X">Paint</span>(<u>Draw</u><span class="W">&</span> <span class="Y">draw</span>)</p>
<p class="AC">This method is called when StarIndicator's view area is about to be repainted.</p>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">draw</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">Target of draw operations.</p></td></tr></table>
<p class="AA"> </p>
<hr><p class="D"> </p>
<p id="StarIndicator::Set(double)" class="V"><span class="W">virtual</span> <span class="W">void</span> <span class="X">Set</span>(<span class="W">double</span> <span class="Y">n</span>)</p>
<p class="AC">Sets the new rate.</p>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">n</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">New value.</p></td></tr></table>
<p class="D"> </p>
<hr><p class="D"> </p>
<p id="StarIndicator::Set(int)" class="V"><span class="W">virtual</span> <span class="W">void</span> <span class="X">Set</span>(<span class="W">int</span> <span class="Y">n</span>)</p>
<p class="AC">Sets the new rate as integer value.</p>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">n</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">New value.</p></td></tr></table>
<p class="D"> </p>
<hr><p class="D"> </p>
<p id="StarIndicator::Set(int,int)" class="V"><span class="W">virtual</span> <span class="W">void</span> <span class="X">Set</span>(<span class="W">int</span> <span class="Y">n</span>,<span class="Y"> </span><span class="W">int</span> <span class="Y">tot</span>)</p>
<p class="AC">Sets the new rate as integer value and the maximum possible rate.</p>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">n</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">New value.</p></td></tr></table>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">tot</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">New maximum rate.</p></td></tr></table>
<p class="D"> </p>
<hr><p class="D"> </p>
<p id="StarIndicator::SetFontColor(Color)" class="V"><span class="W">virtual</span> <u>StarIndicator</u><span class="W">&</span> <span class="X">SetFontColor</span>(<u>Color</u> <span class="Y">c</span>)</p>
<p class="T">Sets the color of the text.</p>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">c</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">Color of the text.</p></td></tr></table>
<p class="D"> </p>
<hr><p class="D"> </p>
<p id="StarIndicator::SetVotes(int)" class="V"><span class="W">virtual</span> <u>StarIndicator</u><span class="W">&</span> <span class="X">SetVotes</span>(<span class="W">int</span> <span class="Y">n</span>)</p>
<p class="T">Sets the number of votes.</p>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">n</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">Number of votes.</p></td></tr></table>
<p class="D"> </p>
<hr><p class="D"> </p>
<p id="StarIndicator::SetVotesHigh(int)" class="V"><span class="W">virtual</span> <u>StarIndicator</u><span class="W">&</span> <span class="X">SetVotesHigh</span>(<span class="W">int</span> <span class="Y">n</span>)</p>
<p class="T">Sets the minimal number of votes giving full confidence to the rate. The stars will be colored in light green if the number of votes is more than <span class="Y">n</span>.</p>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">n</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">Number of votes for full confidence.</p></td></tr></table>
<p class="D"> </p>
<hr><p class="D"> </p>
<p id="StarIndicator::SetVotesLow(int)" class="V"><span class="W">virtual</span> <u>StarIndicator</u><span class="W">&</span> <span class="X">SetVotesLow</span>(<span class="W">int</span> <span class="Y">n</span>)</p>
<p class="T">Sets the minimal number of votes giving half confidence to the rate. The stars will be colored in yellow if the number of votes is more than <span class="Y">n</span>, in red if lower than <span class="Y">n</span>.</p>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">n</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">Number of votes for half confidence.</p></td></tr></table>
<p class="D"> </p>
<hr><p class="D"> </p>
<p id="StarIndicator::ShowPercent(bool)" class="V"><span class="W">virtual</span> <u>StarIndicator</u><span class="W">&</span> <span class="X">ShowPercent</span>(<span class="W">bool</span> <span class="Y">b</span>)</p>
<p class="T">Changes the way the text will display the rate : in percents if <span class="Y">b</span> is true or in value if false. It will be displayed according to the choice set by the call of <span class="X">AlwaysShowValue</span>(<span class="W">bool</span> <span class="Y">b</span>).</p>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">b</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">Indicates if the text will display the rate in percents or in value.</p></td></tr></table>
<p class="D"> </p>
<hr><p class="D"> </p>
<p id="StarIndicator::ShowTotal(bool)" class="V"><span class="W">virtual</span> <u>StarIndicator</u><span class="W">&</span> <span class="X">ShowTotal</span>(<span class="W">bool</span> <span class="Y">b</span>)</p>
<p class="T">The maximum rate value can be displayed or not, according to <span class="Y">b</span>. It will be displayed according to the choice set by the call of <span class="X">AlwaysShowValue</span>(<span class="W">bool</span> <span class="Y">b</span>).</p>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">b</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">If <span class="Z">true</span>, the total (maximum rate value) will be displayed.</p></td></tr></table>
<p class="D"> </p>
<hr><p class="D"> </p>
<p id="StarIndicator::ShowVotes(bool)" class="V"><span class="W">virtual</span> <u>StarIndicator</u><span class="W">&</span> <span class="X">ShowVotes</span>(<span class="W">bool</span> <span class="Y">b</span>)</p>
<p class="T">The number of votes can be displayed or not, according to <span class="Y">b</span>. It will be displayed according to the choice set by the call of <span class="X">AlwaysShowValue</span>(<span class="W">bool</span> <span class="Y">b</span>).</p>
<table width="100%" border="0" cellpadding="2" cellspacing="2"><tr><td width="49"></td><td valign="top" width="224" bgcolor="#F0F0F0">
<p class="AA"><span class="AB">b</span></p></td>
<td valign="top" bgcolor="#F0F0F0">
<p class="AA">If <span class="Z">true</span>, the number of votes will be displayed.</p></td></tr></table>
<p class="D"> </p>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
</BODY>