Files
GDevelop/IDE/EditorLayers.h
T
Florian 4ebe69e1fd Adapted editors and resources classes to use filenames which are relatives to the project directory.
The current working directory is changed on the fly when loading/previewing a scene so that every filename in a project is relative to the project directory.
Adapted to changes in GDL/GDCore.
Added MillionthVector in Credits.

git-svn-id: svn://localhost@745 8062f311-0dae-4547-b526-b8ab9ac864a5
2012-06-03 12:22:54 +00:00

114 lines
3.0 KiB
C++

#ifndef EDITORLAYERS_H
#define EDITORLAYERS_H
//(*Headers(EditorLayers)
#include <wx/listctrl.h>
#include <wx/sizer.h>
#include <wx/menu.h>
#include <wx/aui/aui.h>
#include <wx/panel.h>
#include <wx/imaglist.h>
//*)
#include <wx/toolbar.h>
#include "GDL/Scene.h"
#include "GDL/Game.h"
#include "GDL/IDE/MainEditorCommand.h"
class SceneCanvas;
class EditorLayers: public wxPanel
{
public:
EditorLayers(wxWindow* parent, Game & game_, Scene & scene_, vector < Layer > * layers_, MainEditorCommand & mainEditorCommand_);
virtual ~EditorLayers();
//(*Declarations(EditorLayers)
wxAuiManager* AuiManager1;
wxAuiToolBar* toolbar;
wxMenuItem* MenuItem2;
wxMenuItem* MenuItem1;
wxListCtrl* layersList;
wxMenu contextMenu;
wxPanel* toolBarPanel;
wxImageList* imageList;
//*)
/**
* Refresh the layers list.
*/
void Refresh();
/**
* The editor can be linked to a scene canvas to update it according to changes made in the editor.
*/
void SetAssociatedSceneCanvas(SceneCanvas * sceneCanvas_) { sceneCanvas = sceneCanvas_; Refresh(); };
/**
* Return the associated scene canvas.
* \see EditorLayers::SetAssociatedSceneCanvas
*/
SceneCanvas * GetAssociatedSceneCanvas() { return sceneCanvas; };
protected:
//(*Identifiers(EditorLayers)
static const long ID_AUITOOLBAR1;
static const long ID_PANEL3;
static const long ID_LISTCTRL1;
static const long idMenuEdit;
static const long idMenuAdd;
static const long idMenuDel;
static const long idMenuUp;
static const long idMenuDown;
//*)
static const long ID_BITMAPBUTTON1;
static const long ID_BITMAPBUTTON6;
static const long ID_BITMAPBUTTON3;
private:
//(*Handlers(EditorLayers)
void OntoolBarPanelResize(wxSizeEvent& event);
void OnAddSelected(wxCommandEvent& event);
void OnDelSelected(wxCommandEvent& event);
void OnUpSelected(wxCommandEvent& event);
void OnDownSelected(wxCommandEvent& event);
void OnlayersListItemRClick(wxListEvent& event);
void OnlayersListItemSelect(wxListEvent& event);
void OnlayersListItemActivated(wxListEvent& event);
void OnEditSelected1(wxCommandEvent& event);
void OnlayersListItemSelect1(wxListEvent& event);
void OnlayersListItemFocused(wxListEvent& event);
//*)
void UpdateSelectedLayerIcon();
void OnRefresh(wxCommandEvent& event);
void OnMoreOptions(wxCommandEvent& event);
void EditSelectedLayer();
Layer* GetSelectedLayer();
void OnHelp(wxCommandEvent& event);
/**
* Reference to game containing the datas to edit
*/
Game & game;
/**
* Pointer to scene containing the datas to edit
* Use a pointer instead of a reference because scene pointer/reference can change
* @see EditorScene
*/
Scene & scene;
vector < Layer > * layers;
SceneCanvas * sceneCanvas;
MainEditorCommand & mainEditorCommand;
string layerSelected;
void CreateToolbar();
DECLARE_EVENT_TABLE()
};
#endif