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

« back to all changes in this revision

Viewing changes to Nux/ToolButton.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:
60
60
    m_Texture->UnReference();
61
61
  }
62
62
 
63
 
  void ToolButton::Draw(GraphicsEngine &graphics_engine, bool force_draw)
 
63
  void ToolButton::Draw(GraphicsEngine &graphics_engine, bool /* force_draw */)
64
64
  {
65
65
    Geometry base = GetGeometry();
66
66
 
84
84
      GetPainter().Draw2DTextureAligned(graphics_engine, m_Texture, base, TextureAlignmentStyle(eTACenter, eTACenter));
85
85
  }
86
86
 
87
 
  void ToolButton::DrawContent(GraphicsEngine &graphics_engine, bool force_draw)
88
 
  {
89
 
 
90
 
  }
91
 
 
92
 
  void ToolButton::PostDraw(GraphicsEngine &graphics_engine, bool force_draw)
93
 
  {
94
 
 
95
 
  }
96
 
 
97
 
  void ToolButton::SetState(bool b)
 
87
  void ToolButton::DrawContent(GraphicsEngine & /* graphics_engine */, bool /* force_draw */)
 
88
  {
 
89
 
 
90
  }
 
91
 
 
92
  void ToolButton::PostDraw(GraphicsEngine & /* graphics_engine */, bool /* force_draw */)
 
93
  {
 
94
 
 
95
  }
 
96
 
 
97
  void ToolButton::SetState(bool /* b */)
98
98
  {
99
99
 
100
100
  }
109
109
    m_Texture = Texture->Clone();
110
110
  }
111
111
 
112
 
  void ToolButton::EmitClick(int x, int y, unsigned long button_flags, unsigned long key_flags)
 
112
  void ToolButton::EmitClick(int /* x */, int /* y */, unsigned long /* button_flags */, unsigned long /* key_flags */)
113
113
  {
114
114
    sigClick.emit();
115
115
    if (m_ActionItem)
116
116
      m_ActionItem->Trigger();
117
117
  }
118
118
 
119
 
  void ToolButton::RecvMouseDoubleClick(int x, int y, unsigned long button_flags, unsigned long key_flags)
120
 
  {
121
 
    QueueDraw();
122
 
  }
123
 
 
124
 
  void ToolButton::RecvMouseDown(int x, int y, unsigned long button_flags, unsigned long key_flags)
125
 
  {
126
 
    QueueDraw();
127
 
  }
128
 
 
129
 
  void ToolButton::RecvMouseUp(int x, int y, unsigned long button_flags, unsigned long key_flags)
130
 
  {
131
 
    QueueDraw();
132
 
  }
133
 
 
134
 
  void ToolButton::RecvMouseEnter(int x, int y, unsigned long button_flags, unsigned long key_flags)
135
 
  {
136
 
    QueueDraw();
137
 
  }
138
 
 
139
 
  void ToolButton::RecvMouseLeave(int x, int y, unsigned long button_flags, unsigned long key_flags)
 
119
  void ToolButton::RecvMouseDoubleClick(int /* x */, int /* y */, unsigned long /* button_flags */, unsigned long /* key_flags */)
 
120
  {
 
121
    QueueDraw();
 
122
  }
 
123
 
 
124
  void ToolButton::RecvMouseDown(int /* x */, int /* y */, unsigned long /* button_flags */, unsigned long /* key_flags */)
 
125
  {
 
126
    QueueDraw();
 
127
  }
 
128
 
 
129
  void ToolButton::RecvMouseUp(int /* x */, int /* y */, unsigned long /* button_flags */, unsigned long /* key_flags */)
 
130
  {
 
131
    QueueDraw();
 
132
  }
 
133
 
 
134
  void ToolButton::RecvMouseEnter(int /* x */, int /* y */, unsigned long /* button_flags */, unsigned long /* key_flags */)
 
135
  {
 
136
    QueueDraw();
 
137
  }
 
138
 
 
139
  void ToolButton::RecvMouseLeave(int /* x */, int /* y */, unsigned long /* button_flags */, unsigned long /* key_flags */)
140
140
  {
141
141
    QueueDraw();
142
142
  }