~unity-team/nux/nux.armel-fixes

« back to all changes in this revision

Viewing changes to Nux/MenuPage.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:
141
141
//}
142
142
 
143
143
 
144
 
  void MenuItem::Draw(GraphicsEngine &graphics_engine, bool force_draw)
 
144
  void MenuItem::Draw(GraphicsEngine & /* graphics_engine */, bool /* force_draw */)
145
145
  {
146
146
 
147
147
  }
148
148
 
149
 
  void MenuItem::DrawAsMenuItem(GraphicsEngine &graphics_engine, const Color &textcolor, bool is_highlighted, bool isFirstItem, bool isLastItem, bool draw_icone)
 
149
  void MenuItem::DrawAsMenuItem(GraphicsEngine &graphics_engine, const Color & /* textcolor */, bool is_highlighted, bool /* isFirstItem */, bool /* isLastItem */, bool /* draw_icone */)
150
150
  {
151
151
    Geometry geo = GetGeometry();
152
152
    Geometry icon_geo(0, 0, 20, 20);
206
206
 
207
207
  }
208
208
 
209
 
  void MenuSeparator::Draw(GraphicsEngine &graphics_engine, bool force_draw)
 
209
  void MenuSeparator::Draw(GraphicsEngine &graphics_engine, bool /* force_draw */)
210
210
  {
211
211
    Geometry base = GetGeometry();
212
212
    int y0 = base.y + base.GetHeight() / 2;
339
339
    }
340
340
  }
341
341
 
342
 
  void MenuPage::DrawContent(GraphicsEngine &graphics_engine, bool force_draw)
 
342
  void MenuPage::DrawContent(GraphicsEngine & /* graphics_engine */, bool /* force_draw */)
343
343
  {
344
344
 
345
345
  }
346
346
 
347
 
  void MenuPage::PostDraw(GraphicsEngine &graphics_engine, bool force_draw)
 
347
  void MenuPage::PostDraw(GraphicsEngine & /* graphics_engine */, bool /* force_draw */)
348
348
  {
349
349
 
350
350
  }
583
583
    return pMenuItem->GetChildMenu();
584
584
  }
585
585
 
586
 
  ActionItem *MenuPage::AddSubMenu(const char *label, MenuPage *menu)
 
586
  ActionItem *MenuPage::AddSubMenu(const char * /* label */, MenuPage *menu)
587
587
  {
588
588
    menu->m_IsTopOfMenuChain = false;
589
589
    // pMenuItem if added to the layout do not sink the Reference.
682
682
    ComputeContentSize();
683
683
  }
684
684
 
685
 
  void MenuPage::RemoveItem(ActionItem *item)
 
685
  void MenuPage::RemoveItem(ActionItem * /* item */)
686
686
  {
687
687
  }
688
688
 
700
700
    View::SetGeometry(base);
701
701
  }
702
702
 
703
 
  void MenuPage::EmitMouseMove(int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags)
 
703
  void MenuPage::EmitMouseMove(int /* x */, int y, int /* dx */, int /* dy */, unsigned long /* button_flags */, unsigned long /* key_flags */)
704
704
  {
705
705
    if (IsMouseInside())
706
706
    {
885
885
    }
886
886
  }
887
887
 
888
 
  void MenuPage::EmitMouseDrag(int x, int y, int dx, int dy, unsigned long button_flags, unsigned long key_flags)
 
888
  void MenuPage::EmitMouseDrag(int x, int y, int /* dx */, int /* dy */, unsigned long button_flags, unsigned long key_flags)
889
889
  {
890
890
    if (IsMouseInside())
891
891
      EmitMouseMove(x, y, 0, 0, button_flags, key_flags);
892
892
  }
893
893
 
894
 
  void MenuPage::RecvMouseLeave(int x, int y, unsigned long button_flags, unsigned long key_flags)
 
894
  void MenuPage::RecvMouseLeave(int /* x */, int /* y */, unsigned long /* button_flags */, unsigned long /* key_flags */)
895
895
  {
896
896
    // Cancel selected item when the mouse is out.
897
897
    if (m_HighlightedItem != -1)
914
914
    QueueDraw();
915
915
  }
916
916
 
917
 
  void MenuPage::StartMenu(int MenuXPosition, int MenuYPosition, int x, int y, bool OverrideCurrentMenuChain)
 
917
  void MenuPage::StartMenu(int MenuXPosition, int MenuYPosition, int /* x*/, int /* y */, bool /* OverrideCurrentMenuChain */)
918
918
  {
919
919
    Geometry base = GetGeometry();
920
920
    base.SetX(MenuXPosition);
971
971
    StopActionSubMenu();
972
972
  }
973
973
 
974
 
  void MenuPage::StopMenu(int x, int y)
 
974
  void MenuPage::StopMenu(int /* x */, int /* y */)
975
975
  {
976
976
    SetActive(false);
977
977
    // The Stack Manager will remove all popup that are not visible anymore
1001
1001
  }
1002
1002
 
1003
1003
// Never call this function directly
1004
 
  void MenuPage::Terminate(int x, int y, unsigned long button_flags, unsigned long key_flags)
 
1004
  void MenuPage::Terminate(int /* x */, int /* y */, unsigned long /* button_flags */, unsigned long /* key_flags */)
1005
1005
  {
1006
1006
  }
1007
1007