~ubuntu-branches/ubuntu/trusty/plee-the-bear/trusty-proposed

« back to all changes in this revision

Viewing changes to bear-factory/bear-editor/src/bf/animation_file_edit.hpp

  • 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
29
29
#ifndef __BF_ANIMATION_FILE_EDIT_HPP__
30
30
#define __BF_ANIMATION_FILE_EDIT_HPP__
31
31
 
32
 
#include "bf/base_file_edit.hpp"
33
 
#include "bf/custom_type.hpp"
 
32
#include "bf/animation_file_type.hpp"
 
33
#include "bf/base_edit.hpp"
 
34
#include "bf/default_value.hpp"
34
35
#include "bf/libeditor_export.hpp"
35
36
 
 
37
#include <wx/wx.h>
 
38
 
36
39
namespace bf
37
40
{
 
41
  class bitmap_rendering_attributes_edit;
 
42
  class animation_view_ctrl;
 
43
 
38
44
  /**
39
45
   * \brief Control for editing a field whose value is a path to an animation.
40
46
   * \author Julien Jorge
41
47
   */
42
48
  class BEAR_EDITOR_EXPORT animation_file_edit:
43
 
    public base_file_edit<animation_file_type>
 
49
    public wxPanel,
 
50
    public base_edit<animation_file_type>
44
51
  {
 
52
  public:
 
53
    /** \brief The identifiers of the controls. */
 
54
    enum control_id
 
55
      {
 
56
        IDC_BROWSE_ANIMATION
 
57
      }; // enum control_id
 
58
 
45
59
  private:
46
 
    typedef base_file_edit<animation_file_type> super;
 
60
    typedef base_edit<animation_file_type> super;
47
61
 
48
62
  public:
49
63
    animation_file_edit
51
65
      const animation_file_type& v =
52
66
      default_value<animation_file_type>::get() );
53
67
 
 
68
    bool validate();
 
69
 
 
70
  private:
 
71
    animation_file_type make_animation_file() const;
 
72
 
 
73
    void value_updated();
 
74
    void fill_controls();
 
75
 
 
76
    void create_controls();
 
77
    void create_sizer_controls();
 
78
    wxSizer* create_path_sizer();
 
79
 
 
80
    void animation_view_load();
 
81
 
 
82
    void on_browse_animation(wxCommandEvent& event);
 
83
    void on_refresh( wxCommandEvent& event );
 
84
 
 
85
  private:
 
86
    /** \brief The control in which we configure the rendering attributes. */
 
87
    bitmap_rendering_attributes_edit* m_rendering_attributes;
 
88
 
 
89
    /** \brief The control in which we display the path to the animation. */
 
90
    wxTextCtrl* m_path_text;
 
91
 
 
92
    /** \brief The control in which we display the animation. */
 
93
    animation_view_ctrl* m_animation_view;
 
94
 
 
95
    DECLARE_EVENT_TABLE()
 
96
 
54
97
  }; // class animation_file_edit
55
98
} // namespace bf
56
99