| 1146 | } |
| 1147 | |
| 1148 | void MeterPanel::SetActiveStyle(Style newStyle) |
| 1149 | { |
| 1150 | mStyle = newStyle; |
| 1151 | |
| 1152 | // Set dummy ruler bounds so width/height can be retrieved |
| 1153 | // NOTE: Make sure the Right and Bottom values are large enough to |
| 1154 | // ensure full width/height of digits get calculated. |
| 1155 | mRuler.SetBounds(0, 0, 500, 500); |
| 1156 | |
| 1157 | if (mDB) |
| 1158 | { |
| 1159 | mRuler.SetFormat(&LinearDBFormat::Instance()); |
| 1160 | if (mStyle == HorizontalStereo || mStyle == HorizontalStereoCompact) |
| 1161 | { |
| 1162 | mRuler.SetOrientation(wxHORIZONTAL); |
| 1163 | mRuler.SetRange(-mDBRange, 0); |
| 1164 | } |
| 1165 | else |
| 1166 | { |
| 1167 | mRuler.SetOrientation(wxVERTICAL); |
| 1168 | mRuler.SetRange(0, -mDBRange); |
| 1169 | } |
| 1170 | } |
| 1171 | else |
| 1172 | { |
| 1173 | mRuler.SetFormat(&RealFormat::LinearInstance()); |
| 1174 | if (mStyle == HorizontalStereo || mStyle == HorizontalStereoCompact) |
| 1175 | { |
| 1176 | mRuler.SetOrientation(wxHORIZONTAL); |
| 1177 | mRuler.SetRange(0, 1); |
| 1178 | } |
| 1179 | else |
| 1180 | { |
| 1181 | mRuler.SetOrientation(wxVERTICAL); |
| 1182 | mRuler.SetRange(1, 0); |
| 1183 | } |
| 1184 | } |
| 1185 | |
| 1186 | mRuler.GetMaxSize(&mRulerWidth, &mRulerHeight); |
| 1187 | } |
| 1188 | |
| 1189 | void MeterPanel::SetBarAndClip(int iBar, bool vert) |
| 1190 | { |
nothing calls this directly
no test coverage detected