~unity-team/nux/nux.redirected-views

« back to all changes in this revision

Viewing changes to Nux/VScrollBar.cpp

  • Committer: Tarmac
  • Author(s): Michi Henning
  • Date: 2012-10-02 01:05:45 UTC
  • mfrom: (667.2.5 1056633)
  • Revision ID: tarmac-20121002010545-jphizk30nj3oe9ui
Added -Wextra to compiler flags and removed a large number of warnings about unused parameters. Code compiles clean now without warnings, except for one remaining warning (see bug #1052765).. Fixes: https://bugs.launchpad.net/bugs/1056633. Approved by Michi Henning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
    QueueDraw();
156
156
  }
157
157
 
158
 
  void VScrollBar::ScrollDown(void *v)
 
158
  void VScrollBar::ScrollDown(void * /* v */)
159
159
  {
160
160
    OnScrollDown.emit(m_ScrollUnit, 1);
161
161
 
167
167
    QueueDraw();
168
168
  }
169
169
 
170
 
  void VScrollBar::ScrollUp(void *v)
 
170
  void VScrollBar::ScrollUp(void * /* v */)
171
171
  {
172
172
    OnScrollUp.emit(m_ScrollUnit, 1);
173
173
 
179
179
    QueueDraw();
180
180
  }
181
181
 
182
 
  void VScrollBar::TrackUp(void *v)
 
182
  void VScrollBar::TrackUp(void * /* v */)
183
183
  {
184
184
    if (m_TrackMouseCoord.y < _slider->GetBaseY() - _track->GetBaseY())
185
185
    {
189
189
    }
190
190
  }
191
191
 
192
 
  void VScrollBar::TrackDown(void *v)
 
192
  void VScrollBar::TrackDown(void * /* v */)
193
193
  {
194
194
    if (m_TrackMouseCoord.y > _slider->GetBaseY() + _slider->GetBaseHeight() - _track->GetBaseY())
195
195
    {
199
199
    }
200
200
  }
201
201
 
202
 
  void VScrollBar::RecvStartScrollUp(int x, int y, unsigned long button_flags, unsigned long key_flags)
 
202
  void VScrollBar::RecvStartScrollUp(int /* x */, int /* y */, unsigned long /* button_flags */, unsigned long /* key_flags */)
203
203
  {
204
204
    if (!AtMinimum())
205
205
      ScrollUp(this);
206
206
  }
207
207
 
208
 
  void VScrollBar::RecvEndScrollUp(int x, int y, unsigned long button_flags, unsigned long key_flags)
 
208
  void VScrollBar::RecvEndScrollUp(int /* x */, int /* y */, unsigned long /* button_flags */, unsigned long /* key_flags */)
209
209
  {
210
210
    if (m_UpTimerHandler.IsValid())
211
211
    {
214
214
    }
215
215
  }
216
216
 
217
 
  void VScrollBar::RecvStartScrollDown(int x, int y, unsigned long button_flags, unsigned long key_flags)
 
217
  void VScrollBar::RecvStartScrollDown(int /* x */, int /* y */, unsigned long /* button_flags */, unsigned long /* key_flags */)
218
218
  {
219
219
    if (!AtMaximum())
220
220
      ScrollDown(this);
221
221
  }
222
222
 
223
 
  void VScrollBar::RecvEndScrollDown(int x, int y, unsigned long button_flags, unsigned long key_flags)
 
223
  void VScrollBar::RecvEndScrollDown(int /* x */, int /* y */, unsigned long /* button_flags */, unsigned long /* key_flags */)
224
224
  {
225
225
    if (m_DownTimerHandler.IsValid())
226
226
    {
229
229
    }
230
230
  }
231
231
 
232
 
  void VScrollBar::RecvTrackMouseDown(int x, int y, unsigned long button_flags, unsigned long key_flags)
 
232
  void VScrollBar::RecvTrackMouseDown(int x, int y, unsigned long /* button_flags */, unsigned long /* key_flags */)
233
233
  {
234
234
    m_TrackMouseCoord = Point(x, y);
235
235
 
247
247
    }
248
248
  }
249
249
 
250
 
  void VScrollBar::RecvTrackMouseUp(int x, int y, unsigned long button_flags, unsigned long key_flags)
 
250
  void VScrollBar::RecvTrackMouseUp(int /* x */, int /* y */, unsigned long /* button_flags */, unsigned long /* key_flags */)
251
251
  {
252
252
    if (m_TrackUpTimerHandler.IsValid())
253
253
      GetTimer().RemoveTimerHandler(m_TrackUpTimerHandler);
259
259
    m_TrackDownTimerHandler = 0;
260
260
  }
261
261
 
262
 
  void VScrollBar::RecvTrackMouseDrag(int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags)
 
262
  void VScrollBar::RecvTrackMouseDrag(int /* x */, int /* y */, int /* dx */, int /* dy */, unsigned long /* button_flags */, unsigned long /* key_flags */)
263
263
  {
264
264
 
265
265
  }
281
281
    return this;
282
282
  }
283
283
 
284
 
  void VScrollBar::Draw(GraphicsEngine &graphics_engine, bool force_draw)
 
284
  void VScrollBar::Draw(GraphicsEngine &graphics_engine, bool /* force_draw */)
285
285
  {
286
286
    Geometry base = GetGeometry();
287
287
    GetPainter().PaintBackground(graphics_engine, base);
307
307
      //Color(0.2156 * m_color_factor, 0.2156 * m_color_factor, 0.2156 * m_color_factor, 1.0f));
308
308
  }
309
309
 
310
 
  void VScrollBar::SetContainerSize(int x, int y, int w, int h)
 
310
  void VScrollBar::SetContainerSize(int /* x */, int /* y */, int w, int h)
311
311
  {
312
312
    container_width_ = w;
313
313
    container_height_ = h;
314
314
    ComputeScrolling();
315
315
  }
316
316
 
317
 
  void VScrollBar::SetContentSize(int x, int y, int w, int h)
 
317
  void VScrollBar::SetContentSize(int /* x */, int /* y */, int w, int h)
318
318
  {
319
319
    // x and y are not needed
320
320
    content_width_ = w;
368
368
/////////////////
369
369
//  RECEIVERS  //
370
370
/////////////////
371
 
  void VScrollBar::SetValue(float value)
 
371
  void VScrollBar::SetValue(float /* value */)
372
372
  {
373
373
    //m_ValueString.setCaption(value);
374
374
  }
375
 
  void VScrollBar::SetParameterName(const char *parameter_name)
 
375
  void VScrollBar::SetParameterName(const char * /* parameter_name */)
376
376
  {
377
377
    //m_ParameterName.setCaption(parameter_name);
378
378
  }
389
389
//    OnScrollDown.emit(m_ScrollUnit, 1);
390
390
//}
391
391
 
392
 
  void VScrollBar::OnSliderMouseDown(int x, int y, unsigned long button_flags, unsigned long key_flags)
 
392
  void VScrollBar::OnSliderMouseDown(int x, int y, unsigned long /* button_flags */, unsigned long /* key_flags */)
393
393
  {
394
394
    m_SliderDragPositionX = x;
395
395
    m_SliderDragPositionY = y;
399
399
    GetTimer().AddOneShotTimer(10, callback, this);
400
400
  }
401
401
 
402
 
  void VScrollBar::OnSliderMouseUp(int x, int y, unsigned long button_flags, unsigned long key_flags)
 
402
  void VScrollBar::OnSliderMouseUp(int /* x */, int /* y */, unsigned long /* button_flags */, unsigned long /* key_flags */)
403
403
  {
404
404
    b_MouseDownTimer = false;
405
405
    b_MouseUpTimer = true;
406
406
    GetTimer().AddOneShotTimer(10, callback, this);
407
407
  }
408
408
 
409
 
  void VScrollBar::OnSliderMouseDrag(int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags)
 
409
  void VScrollBar::OnSliderMouseDrag(int /* x */, int y, int /* dx */, int dy, unsigned long /* button_flags */, unsigned long /* key_flags */)
410
410
  {
411
411
    if (_track->GetBaseHeight() - _slider->GetBaseHeight() > 0)
412
412
    {