~ubuntu-branches/ubuntu/natty/plee-the-bear/natty

« back to all changes in this revision

Viewing changes to bear-factory/bear-editor/src/bf/code/sprite_view_ctrl.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Julien Jorge, Julien Jorge
  • Date: 2010-11-17 20:13:34 UTC
  • mfrom: (6.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20101117201334-o4dp7uq437to7oxb
Tags: 0.5.1-1
[ Julien Jorge ]
* New upstream release (Closes: #565062, #546514).
* Add armhf architecture (Closes: #604689).
* Remove patches integrated upstream: rpath-editors.diff, rpath-game.diff,
  editors-menu-section.diff.
* Bump the Standard-Version, no changes.
* Update my email address.
* Set build dependency of libclaw to 1.6.0.
* Add the missing ${misc:Depends} in debian/control.
* List gettext translations in bear-factory.install and plee-the-bear.install.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
2
    Bear Engine - Editor library
3
3
 
4
 
    Copyright (C) 2005-2009 Julien Jorge, Sebastien Angibaud
 
4
    Copyright (C) 2005-2010 Julien Jorge, Sebastien Angibaud
5
5
 
6
6
    This program is free software; you can redistribute it and/or modify it
7
7
    under the terms of the GNU General Public License as published by the
28
28
 */
29
29
#include "bf/sprite_view_ctrl.hpp"
30
30
 
 
31
#include "bf/sprite_view.hpp"
 
32
 
31
33
#include "bf/icon/zoom_original.xpm"
32
34
#include "bf/icon/zoom_in.xpm"
33
35
#include "bf/icon/zoom_out.xpm"
174
176
 * \brief Answer to a click on "Zoom 100%".
175
177
 * \param event This event occured.
176
178
 */
177
 
void bf::sprite_view_ctrl::on_zoom_100( wxCommandEvent& event )
 
179
void bf::sprite_view_ctrl::on_zoom_100( wxCommandEvent& WXUNUSED(event) )
178
180
{
179
181
  m_combo_zoom->SetSelection( m_combo_zoom->FindString(wxT("100")) );
180
182
  m_sprite_view->set_zoom( 100 );
187
189
 * \brief Answer to a click on "Zoom fit".
188
190
 * \param event This event occured.
189
191
 */
190
 
void bf::sprite_view_ctrl::on_zoom_fit( wxCommandEvent& event )
 
192
void bf::sprite_view_ctrl::on_zoom_fit( wxCommandEvent& WXUNUSED(event) )
191
193
{
192
194
  m_sprite_view->auto_zoom();
193
195
  m_combo_zoom->SetValue
201
203
 * \brief Answer to a click on "Zoom in".
202
204
 * \param event This event occured.
203
205
 */
204
 
void bf::sprite_view_ctrl::on_zoom_in( wxCommandEvent& event )
 
206
void bf::sprite_view_ctrl::on_zoom_in( wxCommandEvent& WXUNUSED(event) )
205
207
{
206
208
  int index = m_combo_zoom->GetSelection();
207
209
 
226
228
 * \brief Answer to a click on "Zoom out".
227
229
 * \param event This event occured.
228
230
 */
229
 
void bf::sprite_view_ctrl::on_zoom_out( wxCommandEvent& event )
 
231
void bf::sprite_view_ctrl::on_zoom_out( wxCommandEvent& WXUNUSED(event) )
230
232
{
231
233
  int index = m_combo_zoom->GetSelection();
232
234
 
254
256
 * \brief The user selected a zoom in the combo box.
255
257
 * \param event This event occured.
256
258
 */
257
 
void bf::sprite_view_ctrl::on_zoom_selection( wxCommandEvent& event )
 
259
void bf::sprite_view_ctrl::on_zoom_selection( wxCommandEvent& WXUNUSED(event) )
258
260
{
259
261
  set_zoom_from_combo();
260
262
} // sprite_view_ctrl::on_zoom_selection()
264
266
 * \brief Change the position of the view.
265
267
 * \param event The scroll event.
266
268
 */
267
 
void bf::sprite_view_ctrl::on_scroll(wxScrollEvent& event)
 
269
void bf::sprite_view_ctrl::on_scroll( wxScrollEvent& WXUNUSED(event) )
268
270
{
269
271
  m_sprite_view->set_view_delta
270
272
    ( m_h_scrollbar->GetThumbPosition(), m_v_scrollbar->GetThumbPosition() );
275
277
 * \brief Event sent to a resized window.
276
278
 * \param event The event.
277
279
 */
278
 
void bf::sprite_view_ctrl::on_size(wxSizeEvent& event)
 
280
void bf::sprite_view_ctrl::on_size( wxSizeEvent& event )
279
281
{
280
282
  adjust_scrollbars();
281
283
  event.Skip();