Merge pull request #34 from victorlevasseur/gdcpp-dialogs-wxcrafter

LayersEditorPanel generated by wxCrafter
This commit is contained in:
Florian Rival
2014-10-03 19:13:08 +02:00
12 changed files with 3224 additions and 1992 deletions

View File

@@ -104,11 +104,12 @@ ENDIF(WIN32)
#The target
###
include_directories(.)
file(
GLOB_RECURSE
source_files
GDCore/*
)
file(GLOB_RECURSE source_files GDCore/*)
IF(NO_GUI)
list(REMOVE_ITEM source_files "${CMAKE_CURRENT_SOURCE_DIR}/GDCore/IDE/Dialogs/GDCoreDialogs.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/GDCore/IDE/Dialogs/GDCoreDialogs.h" "${CMAKE_CURRENT_SOURCE_DIR}/GDCore/IDE/Dialogs/GDCoreDialogs_dialogs_bitmaps.cpp")
ENDIF()
add_library(GDCore SHARED ${source_files})
IF(EMSCRIPTEN)
set_target_properties(GDCore PROPERTIES SUFFIX ".bc")

View File

@@ -0,0 +1,102 @@
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: GDCoreDialogs.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////
#include "GDCoreDialogs.h"
// Declare the bitmap loading function
extern void wxC629BInitBitmapResources();
static bool bBitmapLoaded = false;
LayersEditorPanelBase::LayersEditorPanelBase(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
: wxPanel(parent, id, pos, size, style)
{
if ( !bBitmapLoaded ) {
// We need to initialise the default bitmap handler
wxXmlResource::Get()->AddHandler(new wxBitmapXmlHandler);
wxC629BInitBitmapResources();
bBitmapLoaded = true;
}
m_auimgr = new wxAuiManager;
m_auimgr->SetManagedWindow( this );
m_auimgr->SetFlags( wxAUI_MGR_LIVE_RESIZE|wxAUI_MGR_TRANSPARENT_HINT|wxAUI_MGR_TRANSPARENT_DRAG|wxAUI_MGR_ALLOW_ACTIVE_PANE|wxAUI_MGR_ALLOW_FLOATING);
m_auimgr->GetArtProvider()->SetMetric( wxAUI_DOCKART_PANE_BORDER_SIZE, 0);
m_auimgr->GetArtProvider()->SetMetric(wxAUI_DOCKART_GRADIENT_TYPE, wxAUI_GRADIENT_NONE);
m_toolbar = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE);
m_toolbar->SetToolBitmapSize(wxSize(16,16));
m_auimgr->AddPane(m_toolbar, wxAuiPaneInfo().Caption(_("Layers editor")).Direction(wxAUI_DOCK_TOP).Layer(0).Row(0).Position(0).Fixed().CaptionVisible(false).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false));
m_toolbar->AddTool(ADD_LAYER_TOOL, _("Add a layer"), wxXmlResource::Get()->LoadBitmap(wxT("add16")), wxNullBitmap, wxITEM_NORMAL, _("Add a new layer"), wxT(""), NULL);
m_toolbar->AddTool(DELETE_LAYER_TOOL, _("Delete the selected layer"), wxXmlResource::Get()->LoadBitmap(wxT("delete16")), wxNullBitmap, wxITEM_NORMAL, _("Delete the selected layer"), wxT(""), NULL);
m_toolbar->AddSeparator();
m_toolbar->AddTool(EDIT_LAYER_TOOL, _("Edit the properties of the layer"), wxXmlResource::Get()->LoadBitmap(wxT("properties16")), wxNullBitmap, wxITEM_NORMAL, _("Edit the properties of the layer"), wxT(""), NULL);
m_toolbar->AddTool(LAYER_UP_TOOL, _("Move the layer over"), wxXmlResource::Get()->LoadBitmap(wxT("up16")), wxNullBitmap, wxITEM_NORMAL, _("Move the layer over"), wxT(""), NULL);
m_toolbar->AddTool(LAYER_DOWN_TOOL, _("Move the layer below"), wxXmlResource::Get()->LoadBitmap(wxT("down16")), wxNullBitmap, wxITEM_NORMAL, _("Move the layer below"), wxT(""), NULL);
m_toolbar->AddSeparator();
m_toolbar->AddTool(REFRESH_TOOL, _("Refresh the list"), wxXmlResource::Get()->LoadBitmap(wxT("refreshicon")), wxNullBitmap, wxITEM_NORMAL, _("Refresh the list"), wxT(""), NULL);
m_toolbar->AddSeparator();
m_toolbar->AddTool(HELP_TOOL, _("Help"), wxXmlResource::Get()->LoadBitmap(wxT("help16")), wxNullBitmap, wxITEM_NORMAL, _("Display help about the layers editor"), wxT(""), NULL);
m_toolbar->Realize();
m_panel7 = new wxPanel(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxTAB_TRAVERSAL);
m_auimgr->AddPane(m_panel7, wxAuiPaneInfo().Direction(wxAUI_DOCK_CENTER).Layer(0).Row(0).Position(0).BestSize(100,100).MinSize(100,100).MaxSize(100,100).CaptionVisible(false).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false));
m_auimgr->Update();
wxFlexGridSizer* flexGridSizer13 = new wxFlexGridSizer(1, 1, 0, 0);
flexGridSizer13->SetFlexibleDirection( wxBOTH );
flexGridSizer13->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
flexGridSizer13->AddGrowableCol(0);
flexGridSizer13->AddGrowableRow(0);
m_panel7->SetSizer(flexGridSizer13);
m_layersList = new wxListCtrl(m_panel7, LAYERS_LIST_ID, wxDefaultPosition, wxDefaultSize, wxLC_REPORT);
flexGridSizer13->Add(m_layersList, 0, wxALL|wxEXPAND, 0);
SetSizeHints(500,300);
if ( GetSizer() ) {
GetSizer()->Fit(this);
}
Centre(wxBOTH);
// Connect events
this->Connect(ADD_LAYER_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnAddLayerClicked), NULL, this);
this->Connect(DELETE_LAYER_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnDeleteLayerClicked), NULL, this);
this->Connect(EDIT_LAYER_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnEditLayerClicked), NULL, this);
this->Connect(LAYER_UP_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnLayerUpClicked), NULL, this);
this->Connect(LAYER_DOWN_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnLayerDownClicked), NULL, this);
this->Connect(REFRESH_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnRefreshClicked), NULL, this);
this->Connect(HELP_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnHelpClicked), NULL, this);
}
LayersEditorPanelBase::~LayersEditorPanelBase()
{
this->Disconnect(ADD_LAYER_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnAddLayerClicked), NULL, this);
this->Disconnect(DELETE_LAYER_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnDeleteLayerClicked), NULL, this);
this->Disconnect(EDIT_LAYER_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnEditLayerClicked), NULL, this);
this->Disconnect(LAYER_UP_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnLayerUpClicked), NULL, this);
this->Disconnect(LAYER_DOWN_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnLayerDownClicked), NULL, this);
this->Disconnect(REFRESH_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnRefreshClicked), NULL, this);
this->Disconnect(HELP_TOOL, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(LayersEditorPanelBase::OnHelpClicked), NULL, this);
m_auimgr->UnInit();
delete m_auimgr;
}

View File

@@ -0,0 +1,58 @@
//////////////////////////////////////////////////////////////////////
// This file was auto-generated by codelite's wxCrafter Plugin
// wxCrafter project file: GDCoreDialogs.wxcp
// Do not modify this file by hand!
//////////////////////////////////////////////////////////////////////
#ifndef GDCOREDIALOGS_BASE_CLASSES_H
#define GDCOREDIALOGS_BASE_CLASSES_H
#include <wx/settings.h>
#include <wx/xrc/xmlres.h>
#include <wx/xrc/xh_bmp.h>
#include <wx/panel.h>
#include <wx/artprov.h>
#include <wx/aui/framemanager.h>
#include <wx/aui/dockart.h>
#include <wx/pen.h>
#include <wx/aui/auibar.h>
#include <map>
#include <wx/menu.h>
#include <wx/toolbar.h>
#include <wx/sizer.h>
#include <wx/listctrl.h>
class LayersEditorPanelBase : public wxPanel
{
public:
enum {
ADD_LAYER_TOOL = 1001,
DELETE_LAYER_TOOL = 1002,
EDIT_LAYER_TOOL = 1003,
HELP_TOOL = 1004,
LAYERS_LIST_ID = 1005,
LAYER_DOWN_TOOL = 1006,
LAYER_UP_TOOL = 1007,
REFRESH_TOOL = 1008,
};
protected:
wxAuiManager* m_auimgr;
wxAuiToolBar* m_toolbar;
wxPanel* m_panel7;
wxListCtrl* m_layersList;
protected:
virtual void OnAddLayerClicked(wxCommandEvent& event) { event.Skip(); }
virtual void OnDeleteLayerClicked(wxCommandEvent& event) { event.Skip(); }
virtual void OnEditLayerClicked(wxCommandEvent& event) { event.Skip(); }
virtual void OnLayerUpClicked(wxCommandEvent& event) { event.Skip(); }
virtual void OnLayerDownClicked(wxCommandEvent& event) { event.Skip(); }
virtual void OnRefreshClicked(wxCommandEvent& event) { event.Skip(); }
virtual void OnHelpClicked(wxCommandEvent& event) { event.Skip(); }
public:
LayersEditorPanelBase(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize(500,300), long style = wxTAB_TRAVERSAL);
virtual ~LayersEditorPanelBase();
};
#endif

View File

@@ -0,0 +1,863 @@
{
"metadata": {
"m_generatedFilesDir": ".",
"m_objCounter": 37,
"m_includeFiles": [],
"m_bitmapFunction": "wxC629BInitBitmapResources",
"m_bitmapsFile": "GDCoreDialogs_dialogs_bitmaps.cpp",
"m_GenerateCodeTypes": 1,
"m_outputFileName": "",
"m_firstWindowId": 1000,
"m_useEnum": true,
"m_templateClasses": [{
"m_includeFile": "#include <wx/listctrl.h>",
"m_allocationLine": "$name = new wxListCtrl($parent, $id, wxDefaultPosition, wxDefaultSize, wxLC_REPORT)",
"m_className": "wxListCtrl",
"m_xrcPreviewClass": "",
"m_events": []
}]
},
"windows": [{
"m_type": 4407,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": ["wxTAB_TRAVERSAL"],
"m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"],
"m_properties": [{
"type": "string",
"m_label": "Size:",
"m_value": "500,300"
}, {
"type": "string",
"m_label": "Minimum Size:",
"m_value": "-1,-1"
}, {
"type": "string",
"m_label": "Name:",
"m_value": "LayersEditorPanelBase"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
"m_value": ""
}, {
"type": "colour",
"m_label": "Bg Colour:",
"colour": "<Default>"
}, {
"type": "colour",
"m_label": "Fg Colour:",
"colour": "<Default>"
}, {
"type": "font",
"m_label": "Font:",
"m_value": ""
}, {
"type": "bool",
"m_label": "Hidden",
"m_value": false
}, {
"type": "bool",
"m_label": "Disabled",
"m_value": false
}, {
"type": "bool",
"m_label": "Focused",
"m_value": false
}, {
"type": "string",
"m_label": "Class Name:",
"m_value": ""
}, {
"type": "string",
"m_label": "Include File:",
"m_value": ""
}, {
"type": "string",
"m_label": "Style:",
"m_value": ""
}, {
"type": "string",
"m_label": "Title:",
"m_value": ""
}, {
"type": "virtualFolderPicker",
"m_label": "Virtual Folder:",
"m_path": ""
}, {
"type": "choice",
"m_label": "Centre:",
"m_selection": 1,
"m_options": ["", "wxBOTH", "wxVERTICAL", "wxHORIZONTAL"]
}, {
"type": "string",
"m_label": "Inherited Class",
"m_value": "LayersEditorPanel"
}, {
"type": "string",
"m_label": "File:",
"m_value": "LayersEditorPanel"
}, {
"type": "string",
"m_label": "Class Decorator",
"m_value": ""
}],
"m_events": [],
"m_children": [{
"m_type": 4480,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": ["wxAUI_MGR_LIVE_RESIZE", "wxAUI_MGR_TRANSPARENT_HINT", "wxAUI_MGR_TRANSPARENT_DRAG", "wxAUI_MGR_ALLOW_ACTIVE_PANE", "wxAUI_MGR_ALLOW_FLOATING"],
"m_sizerFlags": [],
"m_properties": [{
"type": "string",
"m_label": "Name:",
"m_value": "m_auimgr"
}, {
"type": "colour",
"m_label": "Bg Colour:",
"colour": "<Default>"
}, {
"type": "integer",
"m_label": "Pane Border Size",
"m_value": 0
}, {
"type": "colour",
"m_label": "Sash Colour",
"colour": "<Default>"
}, {
"type": "integer",
"m_label": "Sash Size",
"m_value": -1
}, {
"type": "choice",
"m_label": "Gradient Type",
"m_selection": 0,
"m_options": ["wxAUI_GRADIENT_NONE", "wxAUI_GRADIENT_VERTICAL", "wxAUI_GRADIENT_HORIZONTAL"]
}, {
"type": "colour",
"m_label": "Caption Colour",
"colour": "<Default>"
}, {
"type": "colour",
"m_label": "Caption Gradient Colour",
"colour": "<Default>"
}, {
"type": "colour",
"m_label": "Inactive Caption Colour",
"colour": "<Default>"
}, {
"type": "colour",
"m_label": "Inactive Caption Gradient Colour",
"colour": "<Default>"
}, {
"type": "colour",
"m_label": "Active Caption Text Colour",
"colour": "<Default>"
}, {
"type": "colour",
"m_label": "Inactive Caption Text Colour",
"colour": "<Default>"
}],
"m_events": [],
"m_children": [{
"m_type": 4463,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": ["wxAUI_TB_PLAIN_BACKGROUND", "wxAUI_TB_DEFAULT_STYLE"],
"wxAuiPaneInfo": {
"m_name": "",
"m_caption": "Layers editor",
"m_dockDirection": "wxAUI_DOCK_TOP",
"m_layer": 0,
"m_row": 0,
"m_position": 0,
"m_bestSize": "-1,-1",
"m_minSize": "-1,-1",
"m_maxSize": "-1,-1",
"m_resizable": false,
"m_captionVisible": false,
"m_closeButton": false,
"m_minButton": false,
"m_maxButton": false,
"m_pinButton": false,
"m_toolbarPane": false
},
"m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"],
"m_properties": [{
"type": "winid",
"m_label": "ID:",
"m_winid": "wxID_ANY"
}, {
"type": "string",
"m_label": "Size:",
"m_value": "-1,-1"
}, {
"type": "string",
"m_label": "Name:",
"m_value": "m_toolbar"
}, {
"type": "string",
"m_label": "Tooltip:",
"m_value": ""
}, {
"type": "string",
"m_label": "Bitmap Size:",
"m_value": "16,16"
}, {
"type": "string",
"m_label": "Margins:",
"m_value": "-1,-1"
}],
"m_events": [],
"m_children": [{
"m_type": 4462,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": [],
"m_sizerFlags": [],
"m_properties": [{
"type": "winid",
"m_label": "ID:",
"m_winid": "ADD_LAYER_TOOL"
}, {
"type": "string",
"m_label": "Name:",
"m_value": "m_toolbarItem9"
}, {
"type": "string",
"m_label": "Label:",
"m_value": "Add a layer"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
"m_value": "Add a new layer"
}, {
"type": "string",
"m_label": "Help String:",
"m_value": ""
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
"m_path": "../../../../Binaries/Output/Release_Windows/res/icons_default/add16.png"
}, {
"type": "filePicker",
"m_label": "Disabled-Bitmap File",
"m_path": ""
}, {
"type": "choice",
"m_label": "Kind:",
"m_selection": 0,
"m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
}, {
"type": "bool",
"m_label": "Construct the Dropdown Menu:",
"m_value": true
}],
"m_events": [{
"m_eventName": "wxEVT_COMMAND_TOOL_CLICKED",
"m_eventClass": "wxCommandEvent",
"m_eventHandler": "wxCommandEventHandler",
"m_functionNameAndSignature": "OnAddLayerClicked(wxCommandEvent& event)",
"m_description": "Process a wxEVT_COMMAND_TOOL_CLICKED event (a synonym for wxEVT_COMMAND_MENU_SELECTED). Pass the id of the tool",
"m_noBody": false
}],
"m_children": []
}, {
"m_type": 4462,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": [],
"m_sizerFlags": [],
"m_properties": [{
"type": "winid",
"m_label": "ID:",
"m_winid": "DELETE_LAYER_TOOL"
}, {
"type": "string",
"m_label": "Name:",
"m_value": "m_toolbarItem15"
}, {
"type": "string",
"m_label": "Label:",
"m_value": "Delete the selected layer"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
"m_value": "Delete the selected layer"
}, {
"type": "string",
"m_label": "Help String:",
"m_value": ""
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
"m_path": "../../../../Binaries/Output/Release_Windows/res/icons_default/delete16.png"
}, {
"type": "filePicker",
"m_label": "Disabled-Bitmap File",
"m_path": ""
}, {
"type": "choice",
"m_label": "Kind:",
"m_selection": 0,
"m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
}, {
"type": "bool",
"m_label": "Construct the Dropdown Menu:",
"m_value": true
}],
"m_events": [{
"m_eventName": "wxEVT_COMMAND_TOOL_CLICKED",
"m_eventClass": "wxCommandEvent",
"m_eventHandler": "wxCommandEventHandler",
"m_functionNameAndSignature": "OnDeleteLayerClicked(wxCommandEvent& event)",
"m_description": "Process a wxEVT_COMMAND_TOOL_CLICKED event (a synonym for wxEVT_COMMAND_MENU_SELECTED). Pass the id of the tool",
"m_noBody": false
}],
"m_children": []
}, {
"m_type": 4504,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": [],
"m_sizerFlags": [],
"m_properties": [{
"type": "string",
"m_label": "Name:",
"m_value": "m_tbSeparator19"
}, {
"type": "choice",
"m_label": "Kind:",
"m_selection": 0,
"m_options": ["separator"]
}],
"m_events": [],
"m_children": []
}, {
"m_type": 4462,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": [],
"m_sizerFlags": [],
"m_properties": [{
"type": "winid",
"m_label": "ID:",
"m_winid": "EDIT_LAYER_TOOL"
}, {
"type": "string",
"m_label": "Name:",
"m_value": "m_toolbarItem21"
}, {
"type": "string",
"m_label": "Label:",
"m_value": "Edit the properties of the layer"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
"m_value": "Edit the properties of the layer"
}, {
"type": "string",
"m_label": "Help String:",
"m_value": ""
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
"m_path": "../../../../Binaries/Output/Release_Windows/res/icons_default/properties16.png"
}, {
"type": "filePicker",
"m_label": "Disabled-Bitmap File",
"m_path": ""
}, {
"type": "choice",
"m_label": "Kind:",
"m_selection": 0,
"m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
}, {
"type": "bool",
"m_label": "Construct the Dropdown Menu:",
"m_value": true
}],
"m_events": [{
"m_eventName": "wxEVT_COMMAND_TOOL_CLICKED",
"m_eventClass": "wxCommandEvent",
"m_eventHandler": "wxCommandEventHandler",
"m_functionNameAndSignature": "OnEditLayerClicked(wxCommandEvent& event)",
"m_description": "Process a wxEVT_COMMAND_TOOL_CLICKED event (a synonym for wxEVT_COMMAND_MENU_SELECTED). Pass the id of the tool",
"m_noBody": false
}],
"m_children": []
}, {
"m_type": 4462,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": [],
"m_sizerFlags": [],
"m_properties": [{
"type": "winid",
"m_label": "ID:",
"m_winid": "LAYER_UP_TOOL"
}, {
"type": "string",
"m_label": "Name:",
"m_value": "m_layerUpTool"
}, {
"type": "string",
"m_label": "Label:",
"m_value": "Move the layer over"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
"m_value": "Move the layer over"
}, {
"type": "string",
"m_label": "Help String:",
"m_value": ""
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
"m_path": "../../../../Binaries/Output/Release_Windows/res/icons_default/up16.png"
}, {
"type": "filePicker",
"m_label": "Disabled-Bitmap File",
"m_path": ""
}, {
"type": "choice",
"m_label": "Kind:",
"m_selection": 0,
"m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
}, {
"type": "bool",
"m_label": "Construct the Dropdown Menu:",
"m_value": true
}],
"m_events": [{
"m_eventName": "wxEVT_COMMAND_TOOL_CLICKED",
"m_eventClass": "wxCommandEvent",
"m_eventHandler": "wxCommandEventHandler",
"m_functionNameAndSignature": "OnLayerUpClicked(wxCommandEvent& event)",
"m_description": "Process a wxEVT_COMMAND_TOOL_CLICKED event (a synonym for wxEVT_COMMAND_MENU_SELECTED). Pass the id of the tool",
"m_noBody": false
}],
"m_children": []
}, {
"m_type": 4462,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": [],
"m_sizerFlags": [],
"m_properties": [{
"type": "winid",
"m_label": "ID:",
"m_winid": "LAYER_DOWN_TOOL"
}, {
"type": "string",
"m_label": "Name:",
"m_value": "m_layerDownTool"
}, {
"type": "string",
"m_label": "Label:",
"m_value": "Move the layer below"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
"m_value": "Move the layer below"
}, {
"type": "string",
"m_label": "Help String:",
"m_value": ""
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
"m_path": "../../../../Binaries/Output/Release_Windows/res/icons_default/down16.png"
}, {
"type": "filePicker",
"m_label": "Disabled-Bitmap File",
"m_path": ""
}, {
"type": "choice",
"m_label": "Kind:",
"m_selection": 0,
"m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
}, {
"type": "bool",
"m_label": "Construct the Dropdown Menu:",
"m_value": true
}],
"m_events": [{
"m_eventName": "wxEVT_COMMAND_TOOL_CLICKED",
"m_eventClass": "wxCommandEvent",
"m_eventHandler": "wxCommandEventHandler",
"m_functionNameAndSignature": "OnLayerDownClicked(wxCommandEvent& event)",
"m_description": "Process a wxEVT_COMMAND_TOOL_CLICKED event (a synonym for wxEVT_COMMAND_MENU_SELECTED). Pass the id of the tool",
"m_noBody": false
}],
"m_children": []
}, {
"m_type": 4504,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": [],
"m_sizerFlags": [],
"m_properties": [{
"type": "string",
"m_label": "Name:",
"m_value": "m_tbSeparator29"
}, {
"type": "choice",
"m_label": "Kind:",
"m_selection": 0,
"m_options": ["separator"]
}],
"m_events": [],
"m_children": []
}, {
"m_type": 4462,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": [],
"m_sizerFlags": [],
"m_properties": [{
"type": "winid",
"m_label": "ID:",
"m_winid": "REFRESH_TOOL"
}, {
"type": "string",
"m_label": "Name:",
"m_value": "m_toolbarItem31"
}, {
"type": "string",
"m_label": "Label:",
"m_value": "Refresh the list"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
"m_value": "Refresh the list"
}, {
"type": "string",
"m_label": "Help String:",
"m_value": ""
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
"m_path": "../../../../Binaries/Output/Release_Windows/res/refreshicon.png"
}, {
"type": "filePicker",
"m_label": "Disabled-Bitmap File",
"m_path": ""
}, {
"type": "choice",
"m_label": "Kind:",
"m_selection": 0,
"m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
}, {
"type": "bool",
"m_label": "Construct the Dropdown Menu:",
"m_value": true
}],
"m_events": [{
"m_eventName": "wxEVT_COMMAND_TOOL_CLICKED",
"m_eventClass": "wxCommandEvent",
"m_eventHandler": "wxCommandEventHandler",
"m_functionNameAndSignature": "OnRefreshClicked(wxCommandEvent& event)",
"m_description": "Process a wxEVT_COMMAND_TOOL_CLICKED event (a synonym for wxEVT_COMMAND_MENU_SELECTED). Pass the id of the tool",
"m_noBody": false
}],
"m_children": []
}, {
"m_type": 4504,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": [],
"m_sizerFlags": [],
"m_properties": [{
"type": "string",
"m_label": "Name:",
"m_value": "m_tbSeparator35"
}, {
"type": "choice",
"m_label": "Kind:",
"m_selection": 0,
"m_options": ["separator"]
}],
"m_events": [],
"m_children": []
}, {
"m_type": 4462,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": [],
"m_sizerFlags": [],
"m_properties": [{
"type": "winid",
"m_label": "ID:",
"m_winid": "HELP_TOOL"
}, {
"type": "string",
"m_label": "Name:",
"m_value": "m_toolbarItem37"
}, {
"type": "string",
"m_label": "Label:",
"m_value": "Help"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
"m_value": "Display help about the layers editor"
}, {
"type": "string",
"m_label": "Help String:",
"m_value": ""
}, {
"type": "bitmapPicker",
"m_label": "Bitmap File:",
"m_path": "../../../../Binaries/Output/Release_Windows/res/icons_default/help16.png"
}, {
"type": "filePicker",
"m_label": "Disabled-Bitmap File",
"m_path": ""
}, {
"type": "choice",
"m_label": "Kind:",
"m_selection": 0,
"m_options": ["normal", "checkable", "radio", "separator", "dropdown"]
}, {
"type": "bool",
"m_label": "Construct the Dropdown Menu:",
"m_value": true
}],
"m_events": [{
"m_eventName": "wxEVT_COMMAND_TOOL_CLICKED",
"m_eventClass": "wxCommandEvent",
"m_eventHandler": "wxCommandEventHandler",
"m_functionNameAndSignature": "OnHelpClicked(wxCommandEvent& event)",
"m_description": "Process a wxEVT_COMMAND_TOOL_CLICKED event (a synonym for wxEVT_COMMAND_MENU_SELECTED). Pass the id of the tool",
"m_noBody": false
}],
"m_children": []
}]
}, {
"m_type": 4408,
"proportion": 0,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": ["wxTAB_TRAVERSAL"],
"wxAuiPaneInfo": {
"m_name": "",
"m_caption": "",
"m_dockDirection": "wxAUI_DOCK_CENTER",
"m_layer": 0,
"m_row": 0,
"m_position": 0,
"m_bestSize": "100,100",
"m_minSize": "100,100",
"m_maxSize": "100,100",
"m_resizable": true,
"m_captionVisible": false,
"m_closeButton": false,
"m_minButton": false,
"m_maxButton": false,
"m_pinButton": false,
"m_toolbarPane": false
},
"m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM"],
"m_properties": [{
"type": "winid",
"m_label": "ID:",
"m_winid": "wxID_ANY"
}, {
"type": "string",
"m_label": "Size:",
"m_value": "-1,-1"
}, {
"type": "string",
"m_label": "Minimum Size:",
"m_value": "-1,-1"
}, {
"type": "string",
"m_label": "Name:",
"m_value": "m_panel7"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
"m_value": ""
}, {
"type": "colour",
"m_label": "Bg Colour:",
"colour": "<Default>"
}, {
"type": "colour",
"m_label": "Fg Colour:",
"colour": "<Default>"
}, {
"type": "font",
"m_label": "Font:",
"m_value": ""
}, {
"type": "bool",
"m_label": "Hidden",
"m_value": false
}, {
"type": "bool",
"m_label": "Disabled",
"m_value": false
}, {
"type": "bool",
"m_label": "Focused",
"m_value": false
}, {
"type": "string",
"m_label": "Class Name:",
"m_value": ""
}, {
"type": "string",
"m_label": "Include File:",
"m_value": ""
}, {
"type": "string",
"m_label": "Style:",
"m_value": ""
}],
"m_events": [],
"m_children": [{
"m_type": 4403,
"proportion": 1,
"border": 5,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": [],
"m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"],
"m_properties": [{
"type": "string",
"m_label": "Name:",
"m_value": "flexGridSizer13"
}, {
"type": "string",
"m_label": "Style:",
"m_value": ""
}, {
"type": "string",
"m_label": "# Columns:",
"m_value": "1"
}, {
"type": "string",
"m_label": "# Rows:",
"m_value": "1"
}, {
"type": "string",
"m_label": "Growable columns:",
"m_value": "0"
}, {
"type": "string",
"m_label": "Growable rows:",
"m_value": "0"
}, {
"type": "string",
"m_label": "Horizontal gap:",
"m_value": "0"
}, {
"type": "string",
"m_label": "Vertical gap:",
"m_value": "0"
}],
"m_events": [],
"m_children": [{
"m_type": 4465,
"proportion": 0,
"border": 0,
"gbSpan": "1,1",
"gbPosition": "0,0",
"m_styles": [],
"m_sizerFlags": ["wxALL", "wxLEFT", "wxRIGHT", "wxTOP", "wxBOTTOM", "wxEXPAND"],
"m_properties": [{
"type": "winid",
"m_label": "ID:",
"m_winid": "LAYERS_LIST_ID"
}, {
"type": "string",
"m_label": "Size:",
"m_value": "-1,-1"
}, {
"type": "string",
"m_label": "Minimum Size:",
"m_value": "-1,-1"
}, {
"type": "string",
"m_label": "Name:",
"m_value": "m_layersList"
}, {
"type": "multi-string",
"m_label": "Tooltip:",
"m_value": ""
}, {
"type": "colour",
"m_label": "Bg Colour:",
"colour": "<Default>"
}, {
"type": "colour",
"m_label": "Fg Colour:",
"colour": "<Default>"
}, {
"type": "font",
"m_label": "Font:",
"m_value": ""
}, {
"type": "bool",
"m_label": "Hidden",
"m_value": false
}, {
"type": "bool",
"m_label": "Disabled",
"m_value": false
}, {
"type": "bool",
"m_label": "Focused",
"m_value": false
}, {
"type": "string",
"m_label": "Class Name:",
"m_value": ""
}, {
"type": "string",
"m_label": "Include File:",
"m_value": ""
}, {
"type": "string",
"m_label": "Style:",
"m_value": ""
}],
"m_events": [],
"m_children": [],
"m_templInfoName": "wxListCtrl"
}]
}]
}]
}]
}]
}

View File

@@ -0,0 +1,295 @@
//
// This file was automatically generated by wxrc, do not edit by hand.
//
#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include <wx/filesys.h>
#include <wx/fs_mem.h>
#include <wx/xrc/xmlres.h>
#include <wx/xrc/xh_all.h>
#if wxCHECK_VERSION(2,8,5) && wxABI_VERSION >= 20805
#define XRC_ADD_FILE(name, data, size, mime) \
wxMemoryFSHandler::AddFileWithMimeType(name, data, size, mime)
#else
#define XRC_ADD_FILE(name, data, size, mime) \
wxMemoryFSHandler::AddFile(name, data, size)
#endif
static size_t xml_res_size_0 = 683;
static unsigned char xml_res_file_0[] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,
0,31,243,255,97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,9,112,
72,89,115,0,0,15,209,0,0,15,209,1,86,48,26,164,0,0,0,25,116,69,88,116,83,
111,102,116,119,97,114,101,0,119,119,119,46,105,110,107,115,99,97,112,101,
46,111,114,103,155,238,60,26,0,0,2,40,73,68,65,84,56,141,141,147,49,76,
83,81,20,134,191,243,250,2,175,22,74,106,33,5,139,233,0,152,48,152,20,136,
147,10,147,194,128,97,48,113,146,205,132,201,17,28,155,38,46,66,226,226,
68,100,195,201,141,196,1,101,2,49,33,34,165,145,24,98,208,152,70,42,212,
250,130,62,3,173,77,95,143,67,227,179,117,40,158,233,222,156,123,255,252,
39,231,255,68,85,169,173,225,165,195,126,196,157,172,8,131,2,113,0,133,
180,161,164,80,223,226,218,68,231,110,237,123,249,35,32,32,151,159,101,
167,69,73,74,38,103,201,193,17,98,59,0,104,56,136,118,133,208,88,164,168,
66,226,213,120,116,78,65,61,1,1,137,63,253,176,220,234,114,221,88,221,65,
178,54,29,237,1,252,150,9,64,161,88,38,255,237,24,141,134,169,140,92,68,
91,252,43,235,55,162,163,10,42,170,74,239,194,214,140,56,39,15,66,43,239,
8,152,213,79,179,201,49,46,13,118,3,176,153,218,103,38,177,92,245,220,108,
226,222,188,66,165,213,127,111,125,60,58,107,244,205,111,247,83,209,164,
177,186,131,147,207,115,124,82,160,97,253,42,99,172,238,32,74,114,120,233,
176,223,64,220,73,201,228,44,201,218,0,56,63,190,159,42,34,89,27,201,228,
44,215,231,222,54,43,48,232,59,56,162,163,61,192,244,221,171,222,163,216,
249,160,119,190,208,219,206,108,114,204,187,207,61,122,73,238,224,8,137,
69,134,76,129,184,216,14,126,203,244,102,6,112,203,199,148,74,22,77,77,
77,180,5,173,186,158,223,50,17,219,65,32,110,52,178,106,219,54,165,82,169,
225,56,166,66,90,195,193,209,194,151,175,108,166,246,235,108,183,5,45,108,
219,198,103,6,200,124,118,188,94,161,88,70,207,157,69,33,109,26,144,210,
174,208,104,254,237,167,191,171,162,126,141,27,175,223,115,255,225,6,129,
51,126,175,175,67,33,84,216,50,80,223,162,198,34,69,141,134,27,90,173,221,
142,70,195,104,44,82,244,185,190,39,198,222,212,192,46,134,36,42,35,23,
161,217,60,93,164,92,174,166,81,72,172,77,116,238,122,81,238,121,252,230,
185,252,44,92,251,159,40,183,116,119,189,72,223,234,29,243,162,12,85,152,
122,22,182,166,169,104,67,152,48,36,241,241,206,80,61,76,181,213,55,191,
93,197,153,127,112,166,138,243,222,212,64,29,206,191,1,250,100,14,188,126,
190,102,171,0,0,0,0,73,69,78,68,174,66,96,130};
static size_t xml_res_size_1 = 551;
static unsigned char xml_res_file_1[] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,
0,31,243,255,97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,1,222,73,
68,65,84,56,141,165,147,207,107,19,65,20,199,191,51,59,59,89,106,154,31,
219,31,32,57,72,145,16,40,72,80,66,16,234,161,151,8,57,152,156,60,232,161,
94,91,196,67,254,146,8,69,154,107,123,208,131,183,150,178,208,92,122,176,
151,18,10,9,164,176,45,181,20,41,84,155,172,214,104,140,155,221,29,15,146,
49,155,184,30,234,187,205,227,205,103,190,223,247,230,17,33,4,254,39,216,
104,226,209,230,121,206,19,40,81,130,252,112,222,19,48,40,65,121,171,144,
168,14,231,201,176,130,194,230,249,90,239,234,219,178,179,111,194,57,187,
132,176,157,223,69,156,129,221,154,1,203,166,160,68,194,111,140,98,226,
233,24,224,238,122,227,181,214,117,159,168,198,129,188,56,26,132,51,104,
133,251,80,103,98,149,237,98,98,69,2,22,55,234,185,15,173,206,142,242,118,
15,209,208,13,104,154,26,232,153,112,6,237,241,3,132,162,225,135,91,133,
68,149,2,128,229,162,68,107,38,132,237,226,75,231,43,122,189,126,32,64,
216,14,156,125,19,158,64,73,54,177,235,137,60,61,109,225,206,109,29,243,
201,89,0,64,52,26,67,136,243,49,64,243,232,2,135,103,151,24,52,153,253,
33,187,152,79,206,226,249,139,5,89,172,79,233,224,170,223,206,234,203,119,
104,190,111,203,51,13,212,10,192,106,91,176,251,193,118,124,10,8,87,112,
120,252,9,175,86,247,198,138,134,237,52,143,46,64,56,243,3,38,40,49,126,
204,77,231,27,230,71,52,78,172,191,190,20,155,140,200,233,168,201,155,240,
4,12,105,65,87,80,246,50,41,16,174,4,74,29,76,135,112,6,150,77,129,18,148,
37,96,119,41,93,141,199,195,21,81,204,254,19,114,245,243,59,250,249,123,
80,35,225,202,224,75,251,190,114,102,189,190,246,185,221,89,166,53,19,228,
180,5,97,187,178,63,98,110,26,94,38,133,248,212,100,165,246,44,189,34,123,
55,186,141,139,27,245,156,229,162,212,245,132,111,153,38,40,49,116,5,229,
221,165,116,240,50,93,39,126,1,157,215,183,111,35,213,143,230,0,0,0,0,73,
69,78,68,174,66,96,130};
static size_t xml_res_size_2 = 295;
static unsigned char xml_res_file_2[] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,
0,31,243,255,97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,222,73,
68,65,84,56,141,99,252,255,255,63,3,37,128,9,155,160,173,251,204,101,232,
98,14,19,78,223,35,218,0,6,70,134,72,100,67,28,38,156,190,199,171,36,165,
136,77,41,11,78,183,65,12,97,96,246,52,178,192,165,25,191,1,80,67,120,149,
164,240,42,193,234,133,31,63,126,227,213,68,208,128,15,159,63,17,109,8,
246,64,36,193,16,156,6,192,12,249,248,11,191,33,140,176,132,164,99,209,
185,236,231,239,191,145,232,10,254,103,121,49,72,241,11,48,240,179,177,
194,197,62,223,123,118,255,64,129,169,18,138,11,174,156,40,143,98,103,101,
94,142,205,150,103,31,63,192,93,130,172,25,195,11,132,12,121,117,243,33,
138,102,12,3,240,25,194,241,236,237,253,147,165,86,74,232,226,88,3,17,221,
16,142,103,111,239,95,169,117,198,208,204,192,192,192,192,240,255,255,127,
156,88,219,188,99,153,118,211,158,123,248,212,48,82,154,157,1,167,234,139,
75,70,228,147,104,0,0,0,0,73,69,78,68,174,66,96,130};
static size_t xml_res_size_3 = 603;
static unsigned char xml_res_file_3[] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,
0,31,243,255,97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,2,18,73,
68,65,84,56,141,165,147,77,104,19,81,16,199,255,187,228,163,49,194,150,
170,16,79,122,201,77,34,180,224,23,77,61,109,55,193,82,132,160,65,65,16,
60,180,5,81,2,146,222,2,158,212,94,114,10,137,224,65,122,104,72,21,177,
185,36,49,7,107,171,208,75,132,228,26,20,15,85,104,80,247,189,26,55,221,
216,221,241,80,243,236,54,185,136,3,15,30,243,102,126,51,243,102,70,34,
34,252,143,184,14,42,194,145,199,42,8,9,72,136,58,30,8,37,72,72,175,151,
103,170,78,61,145,56,225,72,46,27,139,47,82,33,95,39,166,27,212,19,166,
27,84,200,215,41,22,95,164,11,106,118,105,191,143,184,156,58,251,112,233,
202,181,167,196,116,131,218,166,69,169,213,22,77,173,108,210,212,202,38,
165,86,91,212,54,45,98,186,65,55,110,230,105,124,50,151,237,249,73,68,132,
177,137,5,245,144,199,245,234,73,38,134,19,39,3,120,176,177,141,247,188,
235,200,116,84,241,224,254,197,99,224,172,131,91,179,207,177,197,140,201,
245,242,76,85,6,0,211,180,19,241,233,16,20,101,8,76,103,120,221,250,1,0,
208,2,62,104,1,31,0,8,160,50,236,195,213,203,167,1,66,2,0,246,0,187,118,
84,213,130,34,218,114,216,143,103,218,81,220,62,51,50,240,231,181,72,16,
189,79,22,93,80,148,33,135,17,211,25,174,191,235,192,239,118,139,18,132,
237,176,79,220,229,129,33,254,200,231,109,142,174,101,97,84,241,32,121,
254,200,64,27,1,224,124,167,239,209,178,9,159,152,142,212,248,8,252,158,
191,177,56,235,56,1,94,151,92,170,86,154,125,128,183,151,142,227,77,52,
128,175,223,190,195,178,44,161,175,148,155,123,131,37,0,94,57,93,40,54,
250,178,200,212,116,100,106,58,200,182,5,132,179,14,150,95,214,1,9,105,
1,168,173,37,171,252,103,55,119,247,94,113,96,41,0,64,182,141,15,31,191,
96,238,206,11,108,233,70,174,55,210,210,254,101,10,157,123,148,85,14,187,
103,227,211,33,168,90,80,116,134,243,29,84,43,77,20,138,13,240,246,175,
92,99,99,126,174,231,35,29,220,198,177,137,5,213,52,237,132,185,107,59,
150,201,235,146,75,94,175,156,174,173,37,29,203,212,7,248,87,249,13,137,
45,22,202,33,129,14,207,0,0,0,0,73,69,78,68,174,66,96,130};
static size_t xml_res_size_4 = 338;
static unsigned char xml_res_file_4[] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,
0,31,243,255,97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,1,9,73,68,
65,84,56,141,165,147,49,75,195,64,24,134,159,196,75,69,28,90,218,169,209,
193,197,73,112,233,90,218,201,69,209,31,226,111,115,106,233,148,169,32,
56,5,68,237,80,186,148,150,246,16,20,18,36,216,26,225,28,74,98,175,189,
52,132,190,211,113,223,247,62,223,123,199,157,165,148,98,31,9,128,214,195,
88,149,75,78,97,115,247,238,196,178,1,230,97,64,248,19,231,26,34,207,39,
242,124,109,207,78,22,121,144,229,96,12,64,60,146,26,196,94,111,202,130,
68,158,207,119,255,13,0,231,188,110,78,144,5,137,60,159,120,36,211,233,
194,173,113,124,213,72,235,194,20,119,30,6,80,174,32,250,47,169,57,153,
126,120,113,182,59,65,162,233,211,51,95,175,19,205,188,62,57,23,32,228,
39,129,123,196,98,17,103,154,119,2,24,190,3,240,209,56,229,183,125,153,
217,102,188,3,0,117,127,13,192,1,255,119,98,122,108,41,224,241,166,190,
85,220,84,181,86,165,228,172,32,183,157,153,14,104,246,164,217,165,73,226,
110,36,41,148,160,217,147,91,199,41,152,96,165,4,2,96,237,251,157,255,0,
108,203,106,70,24,166,53,75,0,0,0,0,73,69,78,68,174,66,96,130};
static size_t xml_res_size_5 = 637;
static unsigned char xml_res_file_5[] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,
0,31,243,255,97,0,0,2,68,73,68,65,84,120,156,149,147,75,72,148,81,24,134,
159,243,95,231,154,151,209,201,17,221,72,228,140,154,118,177,104,92,152,
210,194,112,83,102,180,146,160,77,171,130,144,32,23,17,4,182,107,23,65,
4,17,8,109,50,9,90,20,17,65,4,42,212,128,162,86,84,16,133,78,58,227,48,
94,152,25,103,230,159,255,255,91,140,129,215,168,23,190,205,225,125,191,
195,247,156,243,193,127,200,121,145,219,114,43,242,198,51,101,55,179,116,
0,73,56,168,182,12,84,108,230,165,18,202,60,157,92,207,85,97,175,70,184,
241,199,39,182,6,229,83,132,245,70,174,104,53,116,107,1,74,204,28,228,127,
97,96,48,235,106,160,78,117,99,46,61,163,43,253,128,55,155,26,136,163,84,
170,45,220,211,235,57,39,123,17,138,11,228,245,82,156,96,172,130,101,128,
94,1,100,152,143,223,231,96,246,57,241,226,60,237,28,83,143,240,86,241,
115,220,90,38,97,46,16,41,204,51,105,38,152,195,192,173,250,240,104,21,
160,184,193,54,65,11,224,85,43,105,206,206,242,88,208,70,151,168,230,142,
200,240,196,154,99,132,41,62,109,28,73,236,71,120,123,24,241,245,210,163,
184,192,204,129,164,131,86,14,241,33,6,20,50,24,118,132,22,251,7,214,142,
52,45,132,99,31,109,80,188,189,176,72,62,247,147,137,124,148,177,181,105,
190,108,131,184,77,205,180,236,233,230,86,33,198,88,238,43,99,118,146,136,
245,153,236,206,175,16,196,41,74,105,85,106,9,171,123,105,91,27,229,166,
61,193,212,223,250,43,218,105,206,184,154,56,161,86,19,206,44,112,72,42,
69,83,60,96,198,137,145,102,102,183,160,220,132,68,57,29,138,231,48,245,
129,75,92,205,39,65,124,132,181,104,209,96,68,25,69,199,222,26,84,59,104,
112,135,233,117,7,57,191,242,142,126,33,135,16,254,1,94,122,90,233,202,
37,32,245,173,8,75,82,193,74,18,179,243,76,75,10,41,217,77,153,230,39,228,
10,225,55,151,137,198,30,114,54,253,136,247,2,64,237,196,95,117,141,73,
225,33,144,75,64,62,9,178,190,225,35,185,65,118,130,164,96,167,62,48,188,
244,148,203,249,215,44,110,130,232,236,227,164,175,143,87,133,12,114,122,
134,239,182,76,173,22,64,213,125,96,167,89,41,44,240,34,53,206,221,236,
48,227,187,18,245,246,51,88,57,68,65,110,39,32,130,56,68,35,117,82,51,53,
82,112,251,206,236,40,41,132,236,184,192,224,63,153,215,245,27,31,165,188,
247,209,205,117,196,0,0,0,0,73,69,78,68,174,66,96,130};
static size_t xml_res_size_6 = 293;
static unsigned char xml_res_file_6[] = {
137,80,78,71,13,10,26,10,0,0,0,13,73,72,68,82,0,0,0,16,0,0,0,16,8,6,0,0,
0,31,243,255,97,0,0,0,4,115,66,73,84,8,8,8,8,124,8,100,136,0,0,0,220,73,
68,65,84,56,141,99,252,255,255,63,3,37,128,9,159,164,85,226,170,123,222,
27,159,46,35,203,0,171,196,85,247,152,159,191,87,100,98,100,136,196,103,
8,86,3,96,154,225,138,240,24,130,97,128,81,204,18,20,205,132,12,65,49,64,
53,100,206,189,207,215,31,41,254,248,241,27,187,115,177,24,2,55,64,53,100,
206,61,134,251,175,20,25,24,24,24,62,124,254,196,64,172,33,140,216,162,
81,213,184,237,63,3,3,3,131,0,47,31,131,68,81,32,92,124,179,159,52,35,94,
47,160,131,15,159,63,49,124,252,133,221,37,68,25,192,192,192,192,240,236,
227,7,188,134,16,52,128,144,33,68,25,0,51,132,116,3,20,197,238,243,50,51,
46,199,167,132,5,159,230,219,107,82,148,24,24,24,24,12,23,92,100,248,252,
247,127,36,86,117,255,255,255,199,192,42,193,179,239,161,139,25,204,191,
176,12,155,90,172,233,128,20,0,0,51,248,137,124,211,129,183,253,0,0,0,0,
73,69,78,68,174,66,96,130};
static size_t xml_res_size_7 = 1224;
static unsigned char xml_res_file_7[] = {
60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101,
110,99,111,100,105,110,103,61,34,85,84,70,45,56,34,63,62,10,60,114,101,
115,111,117,114,99,101,32,120,109,108,110,115,61,34,104,116,116,112,58,
47,47,119,119,119,46,119,120,119,105,110,100,111,119,115,46,111,114,103,
47,119,120,120,114,99,34,32,118,101,114,115,105,111,110,61,34,50,46,51,
46,48,46,49,34,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,
61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,97,100,100,
49,54,34,62,71,68,67,111,114,101,68,105,97,108,111,103,115,95,100,105,97,
108,111,103,115,95,98,105,116,109,97,112,115,46,99,112,112,36,46,46,95,
46,46,95,46,46,95,46,46,95,66,105,110,97,114,105,101,115,95,79,117,116,
112,117,116,95,82,101,108,101,97,115,101,95,87,105,110,100,111,119,115,
95,114,101,115,95,105,99,111,110,115,95,100,101,102,97,117,108,116,95,97,
100,100,49,54,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,
111,98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,
97,112,34,32,110,97,109,101,61,34,100,101,108,101,116,101,49,54,34,62,71,
68,67,111,114,101,68,105,97,108,111,103,115,95,100,105,97,108,111,103,115,
95,98,105,116,109,97,112,115,46,99,112,112,36,46,46,95,46,46,95,46,46,95,
46,46,95,66,105,110,97,114,105,101,115,95,79,117,116,112,117,116,95,82,
101,108,101,97,115,101,95,87,105,110,100,111,119,115,95,114,101,115,95,
105,99,111,110,115,95,100,101,102,97,117,108,116,95,100,101,108,101,116,
101,49,54,46,112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,
98,106,101,99,116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,
112,34,32,110,97,109,101,61,34,100,111,119,110,49,54,34,62,71,68,67,111,
114,101,68,105,97,108,111,103,115,95,100,105,97,108,111,103,115,95,98,105,
116,109,97,112,115,46,99,112,112,36,46,46,95,46,46,95,46,46,95,46,46,95,
66,105,110,97,114,105,101,115,95,79,117,116,112,117,116,95,82,101,108,101,
97,115,101,95,87,105,110,100,111,119,115,95,114,101,115,95,105,99,111,110,
115,95,100,101,102,97,117,108,116,95,100,111,119,110,49,54,46,112,110,103,
60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,
108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,
61,34,104,101,108,112,49,54,34,62,71,68,67,111,114,101,68,105,97,108,111,
103,115,95,100,105,97,108,111,103,115,95,98,105,116,109,97,112,115,46,99,
112,112,36,46,46,95,46,46,95,46,46,95,46,46,95,66,105,110,97,114,105,101,
115,95,79,117,116,112,117,116,95,82,101,108,101,97,115,101,95,87,105,110,
100,111,119,115,95,114,101,115,95,105,99,111,110,115,95,100,101,102,97,
117,108,116,95,104,101,108,112,49,54,46,112,110,103,60,47,111,98,106,101,
99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,61,34,
119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,112,114,111,112,
101,114,116,105,101,115,49,54,34,62,71,68,67,111,114,101,68,105,97,108,
111,103,115,95,100,105,97,108,111,103,115,95,98,105,116,109,97,112,115,
46,99,112,112,36,46,46,95,46,46,95,46,46,95,46,46,95,66,105,110,97,114,
105,101,115,95,79,117,116,112,117,116,95,82,101,108,101,97,115,101,95,87,
105,110,100,111,119,115,95,114,101,115,95,105,99,111,110,115,95,100,101,
102,97,117,108,116,95,112,114,111,112,101,114,116,105,101,115,49,54,46,
112,110,103,60,47,111,98,106,101,99,116,62,10,32,32,60,111,98,106,101,99,
116,32,99,108,97,115,115,61,34,119,120,66,105,116,109,97,112,34,32,110,
97,109,101,61,34,114,101,102,114,101,115,104,105,99,111,110,34,62,71,68,
67,111,114,101,68,105,97,108,111,103,115,95,100,105,97,108,111,103,115,
95,98,105,116,109,97,112,115,46,99,112,112,36,46,46,95,46,46,95,46,46,95,
46,46,95,66,105,110,97,114,105,101,115,95,79,117,116,112,117,116,95,82,
101,108,101,97,115,101,95,87,105,110,100,111,119,115,95,114,101,115,95,
114,101,102,114,101,115,104,105,99,111,110,46,112,110,103,60,47,111,98,
106,101,99,116,62,10,32,32,60,111,98,106,101,99,116,32,99,108,97,115,115,
61,34,119,120,66,105,116,109,97,112,34,32,110,97,109,101,61,34,117,112,
49,54,34,62,71,68,67,111,114,101,68,105,97,108,111,103,115,95,100,105,97,
108,111,103,115,95,98,105,116,109,97,112,115,46,99,112,112,36,46,46,95,
46,46,95,46,46,95,46,46,95,66,105,110,97,114,105,101,115,95,79,117,116,
112,117,116,95,82,101,108,101,97,115,101,95,87,105,110,100,111,119,115,
95,114,101,115,95,105,99,111,110,115,95,100,101,102,97,117,108,116,95,117,
112,49,54,46,112,110,103,60,47,111,98,106,101,99,116,62,10,60,47,114,101,
115,111,117,114,99,101,62,10};
void wxC629BInitBitmapResources()
{
// Check for memory FS. If not present, load the handler:
{
wxMemoryFSHandler::AddFile(wxT("XRC_resource/dummy_file"), wxT("dummy one"));
wxFileSystem fsys;
wxFSFile *f = fsys.OpenFile(wxT("memory:XRC_resource/dummy_file"));
wxMemoryFSHandler::RemoveFile(wxT("XRC_resource/dummy_file"));
if (f) delete f;
else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase);
}
XRC_ADD_FILE(wxT("XRC_resource/GDCoreDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_icons_default_add16.png"), xml_res_file_0, xml_res_size_0, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCoreDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_icons_default_delete16.png"), xml_res_file_1, xml_res_size_1, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCoreDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_icons_default_down16.png"), xml_res_file_2, xml_res_size_2, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCoreDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_icons_default_help16.png"), xml_res_file_3, xml_res_size_3, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCoreDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_icons_default_properties16.png"), xml_res_file_4, xml_res_size_4, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCoreDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_refreshicon.png"), xml_res_file_5, xml_res_size_5, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCoreDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_icons_default_up16.png"), xml_res_file_6, xml_res_size_6, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCoreDialogs_dialogs_bitmaps.cpp$_home_victor_Developpement_GD_Core_GDCore_IDE_Dialogs_GDCoreDialogs_dialogs_bitmaps.xrc"), xml_res_file_7, xml_res_size_7, wxT("text/xml"));
wxXmlResource::Get()->Load(wxT("memory:XRC_resource/GDCoreDialogs_dialogs_bitmaps.cpp$_home_victor_Developpement_GD_Core_GDCore_IDE_Dialogs_GDCoreDialogs_dialogs_bitmaps.xrc"));
}

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
<object class="wxBitmap" name="add16">../../../../Binaries/Output/Release_Windows/res/icons_default/add16.png</object>
<object class="wxBitmap" name="delete16">../../../../Binaries/Output/Release_Windows/res/icons_default/delete16.png</object>
<object class="wxBitmap" name="down16">../../../../Binaries/Output/Release_Windows/res/icons_default/down16.png</object>
<object class="wxBitmap" name="help16">../../../../Binaries/Output/Release_Windows/res/icons_default/help16.png</object>
<object class="wxBitmap" name="properties16">../../../../Binaries/Output/Release_Windows/res/icons_default/properties16.png</object>
<object class="wxBitmap" name="refreshicon">../../../../Binaries/Output/Release_Windows/res/refreshicon.png</object>
<object class="wxBitmap" name="up16">../../../../Binaries/Output/Release_Windows/res/icons_default/up16.png</object>
</resource>

View File

@@ -1,445 +1,382 @@
/*
* GDevelop Core
* Copyright 2008-2014 Florian Rival (Florian.Rival@gmail.com). All rights reserved.
* This project is released under the GNU Lesser General Public License.
*/
#if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
#include "LayersEditorPanel.h"
//(*InternalHeaders(LayersEditorPanel)
#include <wx/bitmap.h>
#include "GDCore/Tools/Localization.h"
#include <wx/image.h>
#include <wx/string.h>
//*)
#include <wx/config.h>
#include "GDCore/Tools/Log.h"
#include "GDCore/CommonTools.h"
#include "GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvas.h"
#include "GDCore/PlatformDefinition/InitialInstancesContainer.h"
#include "GDCore/PlatformDefinition/Project.h"
#include "GDCore/PlatformDefinition/Layout.h"
#include "GDCore/PlatformDefinition/Layer.h"
#include "GDCore/Tools/HelpFileAccess.h"
#include "GDCore/IDE/Dialogs/ObjectsOnBadLayerDialog.h"
#include "GDCore/IDE/SkinHelper.h"
namespace gd
{
//(*IdInit(LayersEditorPanel)
const long LayersEditorPanel::ID_AUITOOLBARITEM1 = wxNewId();
const long LayersEditorPanel::ID_AUITOOLBARITEM4 = wxNewId();
const long LayersEditorPanel::ID_AUITOOLBARITEM5 = wxNewId();
const long LayersEditorPanel::ID_AUITOOLBARITEM3 = wxNewId();
const long LayersEditorPanel::ID_AUITOOLBARITEM2 = wxNewId();
const long LayersEditorPanel::ID_AUITOOLBARITEM6 = wxNewId();
const long LayersEditorPanel::ID_AUITOOLBARITEM7 = wxNewId();
const long LayersEditorPanel::ID_AUITOOLBAR1 = wxNewId();
const long LayersEditorPanel::ID_PANEL3 = wxNewId();
const long LayersEditorPanel::ID_LISTCTRL1 = wxNewId();
const long LayersEditorPanel::idMenuEdit = wxNewId();
const long LayersEditorPanel::idMenuAdd = wxNewId();
const long LayersEditorPanel::idMenuDel = wxNewId();
const long LayersEditorPanel::idMenuUp = wxNewId();
const long LayersEditorPanel::idMenuDown = wxNewId();
//*)
const long LayersEditorPanel::ID_BITMAPBUTTON1 = wxNewId();
const long LayersEditorPanel::ID_BITMAPBUTTON6 = wxNewId();
const long LayersEditorPanel::ID_BITMAPBUTTON3 = wxNewId();
BEGIN_EVENT_TABLE(LayersEditorPanel,wxPanel)
//(*EventTable(LayersEditorPanel)
//*)
END_EVENT_TABLE()
LayersEditorPanel::LayersEditorPanel(wxWindow* parent, gd::Project & project_, gd::Layout & layout_, gd::MainFrameWrapper & mainFrameWrapper_) :
project(project_),
layout(layout_),
layoutCanvas(NULL),
mainFrameWrapper(mainFrameWrapper_)
{
//(*Initialize(LayersEditorPanel)
wxMenuItem* MenuItem5;
wxMenuItem* MenuItem4;
wxMenuItem* MenuItem3;
wxFlexGridSizer* FlexGridSizer1;
Create(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL, _T("wxID_ANY"));
FlexGridSizer1 = new wxFlexGridSizer(0, 1, 0, 0);
FlexGridSizer1->AddGrowableCol(0);
FlexGridSizer1->AddGrowableRow(1);
toolBarPanel = new wxPanel(this, ID_PANEL3, wxDefaultPosition, wxSize(120,25), wxTAB_TRAVERSAL, _T("ID_PANEL3"));
AuiManager1 = new wxAuiManager(toolBarPanel, wxAUI_MGR_DEFAULT);
toolbar = new wxAuiToolBar(toolBarPanel, ID_AUITOOLBAR1, wxDefaultPosition, wxDefaultSize, wxAUI_TB_DEFAULT_STYLE);
toolbar->AddTool(ID_AUITOOLBARITEM1, _("Add a layer"), gd::SkinHelper::GetIcon("add", 16), wxNullBitmap, wxITEM_NORMAL, _("Add a layer"), _("Add a new layer"), NULL);
toolbar->AddTool(ID_AUITOOLBARITEM4, _("Delete the selected layer"), gd::SkinHelper::GetIcon("delete", 16), wxNullBitmap, wxITEM_NORMAL, _("Delete the selected layer"), _("Delete the selected layer"), NULL);
toolbar->AddSeparator();
toolbar->AddTool(ID_AUITOOLBARITEM5, _("Edit the properties of the layer"), gd::SkinHelper::GetIcon("properties", 16), wxNullBitmap, wxITEM_NORMAL, _("Edit the properties of the layer"), _("Edit the properties of the layer"), NULL);
toolbar->AddTool(ID_AUITOOLBARITEM3, _("Move the layer over"), gd::SkinHelper::GetIcon("up", 16), wxNullBitmap, wxITEM_NORMAL, _("Move the layer over"), _("Move the layer over"), NULL);
toolbar->AddTool(ID_AUITOOLBARITEM2, _("Move the layer below"), gd::SkinHelper::GetIcon("down", 16), wxNullBitmap, wxITEM_NORMAL, _("Move the layer below"), _("Move the layer below"), NULL);
toolbar->AddSeparator();
toolbar->AddTool(ID_AUITOOLBARITEM6, _("Refresh the list"), wxBitmap(wxImage(_T("res/refreshicon.png"))), wxNullBitmap, wxITEM_NORMAL, _("Refresh the list"), _("Refresh the list"), NULL);
toolbar->AddSeparator();
toolbar->AddTool(ID_AUITOOLBARITEM7, _("Help"), gd::SkinHelper::GetIcon("help", 16), wxNullBitmap, wxITEM_NORMAL, _("Display help about the layers editor"), _("Display help about the layers editor"), NULL);
toolbar->Realize();
AuiManager1->AddPane(toolbar, wxAuiPaneInfo().Name(_T("PaneName")).ToolbarPane().Caption(_("Pane caption")).Layer(10).Top().Gripper(false));
AuiManager1->Update();
FlexGridSizer1->Add(toolBarPanel, 1, wxALL|wxEXPAND|wxALIGN_LEFT|wxALIGN_CENTER_VERTICAL, 0);
layersList = new wxListCtrl(this, ID_LISTCTRL1, wxDefaultPosition, wxSize(191,198), wxLC_REPORT, wxDefaultValidator, _T("ID_LISTCTRL1"));
FlexGridSizer1->Add(layersList, 1, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 0);
SetSizer(FlexGridSizer1);
MenuItem1 = new wxMenuItem((&contextMenu), idMenuEdit, _("Edit the layer properties"), wxEmptyString, wxITEM_NORMAL);
MenuItem1->SetBitmap(gd::SkinHelper::GetIcon("rename", 16));
contextMenu.Append(MenuItem1);
contextMenu.AppendSeparator();
MenuItem2 = new wxMenuItem((&contextMenu), idMenuAdd, _("Add a layer"), wxEmptyString, wxITEM_NORMAL);
MenuItem2->SetBitmap(gd::SkinHelper::GetIcon("add", 16));
contextMenu.Append(MenuItem2);
MenuItem3 = new wxMenuItem((&contextMenu), idMenuDel, _("Delete the layer"), wxEmptyString, wxITEM_NORMAL);
MenuItem3->SetBitmap(gd::SkinHelper::GetIcon("delete", 16));
contextMenu.Append(MenuItem3);
contextMenu.AppendSeparator();
MenuItem4 = new wxMenuItem((&contextMenu), idMenuUp, _("Move over"), wxEmptyString, wxITEM_NORMAL);
MenuItem4->SetBitmap(gd::SkinHelper::GetIcon("up", 16));
contextMenu.Append(MenuItem4);
MenuItem5 = new wxMenuItem((&contextMenu), idMenuDown, _("Move below"), wxEmptyString, wxITEM_NORMAL);
MenuItem5->SetBitmap(gd::SkinHelper::GetIcon("down", 16));
contextMenu.Append(MenuItem5);
imageList = new wxImageList(16, 16, 1);
FlexGridSizer1->Fit(this);
FlexGridSizer1->SetSizeHints(this);
Connect(ID_AUITOOLBARITEM1,wxEVT_COMMAND_TOOL_CLICKED,(wxObjectEventFunction)&LayersEditorPanel::OnAddSelected);
Connect(ID_AUITOOLBARITEM4,wxEVT_COMMAND_TOOL_CLICKED,(wxObjectEventFunction)&LayersEditorPanel::OnDelSelected);
Connect(ID_AUITOOLBARITEM5,wxEVT_COMMAND_TOOL_CLICKED,(wxObjectEventFunction)&LayersEditorPanel::OnEditSelected1);
Connect(ID_AUITOOLBARITEM3,wxEVT_COMMAND_TOOL_CLICKED,(wxObjectEventFunction)&LayersEditorPanel::OnUpSelected);
Connect(ID_AUITOOLBARITEM2,wxEVT_COMMAND_TOOL_CLICKED,(wxObjectEventFunction)&LayersEditorPanel::OnDownSelected);
Connect(ID_AUITOOLBARITEM6,wxEVT_COMMAND_TOOL_CLICKED,(wxObjectEventFunction)&LayersEditorPanel::OnRefreshClick);
Connect(ID_AUITOOLBARITEM7,wxEVT_COMMAND_TOOL_CLICKED,(wxObjectEventFunction)&LayersEditorPanel::OnHelpClick);
Connect(ID_LISTCTRL1,wxEVT_COMMAND_LIST_ITEM_SELECTED,(wxObjectEventFunction)&LayersEditorPanel::OnlayersListItemSelect1);
Connect(ID_LISTCTRL1,wxEVT_COMMAND_LIST_ITEM_ACTIVATED,(wxObjectEventFunction)&LayersEditorPanel::OnlayersListItemActivated);
Connect(ID_LISTCTRL1,wxEVT_COMMAND_LIST_ITEM_FOCUSED,(wxObjectEventFunction)&LayersEditorPanel::OnlayersListItemFocused);
Connect(ID_LISTCTRL1,wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK,(wxObjectEventFunction)&LayersEditorPanel::OnlayersListItemRClick);
Connect(idMenuEdit,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&LayersEditorPanel::OnEditSelected1);
Connect(idMenuAdd,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&LayersEditorPanel::OnAddSelected);
Connect(idMenuDel,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&LayersEditorPanel::OnDelSelected);
Connect(idMenuUp,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&LayersEditorPanel::OnUpSelected);
Connect(idMenuDown,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&LayersEditorPanel::OnDownSelected);
//*)
imageList->Add(wxBitmap("res/rightArrowGrey.png", wxBITMAP_TYPE_ANY));
imageList->Add(wxBitmap("res/1rightarrow.png", wxBITMAP_TYPE_ANY));
imageList->Add(wxBitmap("res/eye.png", wxBITMAP_TYPE_ANY));
imageList->Add(wxBitmap("res/eyeGrey.png", wxBITMAP_TYPE_ANY));
layersList->AssignImageList(imageList, wxIMAGE_LIST_SMALL);
layersList->InsertColumn(1, _("Layer"));
layersList->InsertColumn(2, _("Visible"));
gd::SkinHelper::ApplyCurrentSkin(*toolbar);
Refresh();
}
LayersEditorPanel::~LayersEditorPanel()
{
//(*Destroy(LayersEditorPanel)
//*)
AuiManager1->UnInit();
}
void LayersEditorPanel::OnRefresh(wxCommandEvent& event)
{
Refresh();
}
void LayersEditorPanel::OnMoreOptions(wxCommandEvent& event)
{
PopupMenu(&contextMenu);
}
void LayersEditorPanel::OnHelpClick(wxCommandEvent& event)
{
gd::HelpFileAccess::Get()->OpenURL(_("http://www.wiki.compilgames.net/doku.php/en/game_develop/documentation/manual/editors/scene_editor/edit_layer"));
}
void LayersEditorPanel::Refresh()
{
layersList->DeleteAllItems();
for (unsigned int i =0;i<layout.GetLayersCount();++i)
{
std::string name = layout.GetLayer(i).GetName();
if ( name == "" ) name = _("Base layer");
layersList->InsertItem(0, name);
if ( layout.GetLayer(i).GetVisibility() )
layersList->SetItemColumnImage(0, 1, 2);
else
layersList->SetItemColumnImage(0, 1, 3);
layersList->SetItemImage(0,-1,0);
}
layersList->SetColumnWidth( 0, wxLIST_AUTOSIZE );
layersList->SetColumnWidth( 1, wxLIST_AUTOSIZE );
UpdateSelectedLayerIcon();
}
void LayersEditorPanel::OnRefreshClick(wxCommandEvent& event)
{
Refresh();
}
void LayersEditorPanel::UpdateSelectedLayerIcon()
{
if ( !layoutCanvas ) return;
for (unsigned int i =0;i<layout.GetLayersCount();++i)
{
if ( layout.GetLayer(i).GetName() == layoutCanvas->GetCurrentLayer() )
layersList->SetItemImage(layout.GetLayersCount()-i-1,1,1);
else
layersList->SetItemImage(layout.GetLayersCount()-i-1,-1,-1);
}
}
void LayersEditorPanel::OnAddSelected(wxCommandEvent& event)
{
wxString name = _("New layer");
bool alreadyExist = false;
int nb = 0;
for (unsigned int i = 0;i<layout.GetLayersCount();++i)
{
if ( layout.GetLayer(i).GetName() == name )
alreadyExist = true;
}
while ( alreadyExist )
{
++nb;
name = _("New layer ") + ToString(nb);
alreadyExist = false;
for (unsigned int i = 0;i<layout.GetLayersCount();++i)
{
if ( layout.GetLayer(i).GetName() == name )
alreadyExist = true;
}
}
layout.InsertNewLayer(ToString(name), layout.GetLayersCount()-1);
layout.GetLayer(ToString(name)).SetCameraCount(1);
Refresh();
}
/** Delete a layer
*/
void LayersEditorPanel::OnDelSelected(wxCommandEvent& event)
{
//Get selected layer
Layer * selectedLayer = GetSelectedLayer();
if ( !selectedLayer || selectedLayer->GetName().empty() ) return;
std::string name = selectedLayer->GetName();
for (unsigned int i = 0;i<layout.GetLayersCount();++i)
{
if ( &layout.GetLayer(i) == selectedLayer )
{
//Ask the user what he wants to do with the existing instances.
if ( layout.GetInitialInstances().SomeInstancesAreOnLayer(name) )
{
std::vector<std::string> availableLayers;
for (unsigned int j = 0;j<layout.GetLayersCount();++j)
{
if (i!=j) availableLayers.push_back(layout.GetLayer(j).GetName());
}
ObjectsOnBadLayerDialog dialog(this, availableLayers);
int choice = dialog.ShowModal();
if ( choice == 0 ) return; //Cancel
else if ( choice == 1 )
layout.GetInitialInstances().RemoveAllInstancesOnLayer(name);
else if ( choice == 2 )
layout.GetInitialInstances().MoveInstancesToLayer(name, dialog.moveOnLayerNamed);
}
//Delete the layer and select base layer
layout.RemoveLayer(name);
if ( layoutCanvas )
{
layoutCanvas->SetCurrentLayer("");
}
Refresh();
return;
}
}
gd::LogWarning(_("Can't find the layer to delete !"));
}
void LayersEditorPanel::OnUpSelected(wxCommandEvent& event)
{
//Get selected layer
Layer * selectedLayer = GetSelectedLayer();
if ( !selectedLayer ) return;
for (unsigned int i = 0;i<layout.GetLayersCount();++i)
{
if ( &layout.GetLayer(i) == selectedLayer )
{
if ( i <= layout.GetLayersCount()-1-1 )
{
//Move the layer
layout.SwapLayers(i,i+1);
Refresh();
//Focus it again
layersList->SetItemState(layout.GetLayersCount()-i-1-1, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
}
return;
}
}
gd::LogWarning(_("Can't find the layer to move !"));
}
void LayersEditorPanel::OnDownSelected(wxCommandEvent& event)
{
//Get selected layer
Layer * selectedLayer = GetSelectedLayer();
if ( !selectedLayer ) return;
for (unsigned int i = 0;i<layout.GetLayersCount();++i)
{
if ( &layout.GetLayer(i) == selectedLayer )
{
if ( i >= 1 )
{
//Move the layer
layout.SwapLayers(i,i-1);
Refresh();
//Focus it again
layersList->SetItemState(layout.GetLayersCount()-i, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
}
return;
}
}
gd::LogWarning(_("Can't find the layer to move !"));
}
void LayersEditorPanel::OnlayersListItemRClick(wxListEvent& event)
{
PopupMenu(&contextMenu);
}
Layer* LayersEditorPanel::GetSelectedLayer()
{
long itemIndex = -1;
for (;;)
{
itemIndex = layersList->GetNextItem(itemIndex,wxLIST_NEXT_ALL,wxLIST_STATE_SELECTED);
if (itemIndex == -1) break;
// Got the selected item index
unsigned int layerId = layout.GetLayersCount()-itemIndex-1;
if ( layerId < layout.GetLayersCount() )
{
return &layout.GetLayer(layerId);
}
}
return NULL;
}
/** Item double clicked: Toggle visibility or edit the layer
*/
void LayersEditorPanel::OnlayersListItemActivated(wxListEvent& event)
{
//Get selected layer
Layer * selectedLayer = GetSelectedLayer();
if ( !selectedLayer ) return;
//Get selected column
wxPoint click_point=::wxGetMousePosition();
wxPoint list_point=layersList->GetScreenPosition();
// delta x
int dx=click_point.x - list_point.x;
// work out the column
int ex=0; // cumulative sum of column widths
int column = -1;
for (column=0; column<layersList->GetColumnCount(); column++) {
ex+=layersList->GetColumnWidth(column);
if (ex > dx) break;
}
if ( column == 1 )
{
selectedLayer->SetVisibility(!selectedLayer->GetVisibility());
Refresh();
return;
}
else
{
EditSelectedLayer();
}
}
void LayersEditorPanel::EditSelectedLayer()
{
//Get selected layer
gd::Layer * layer = GetSelectedLayer();
if ( !layer ) return;
std::string oldName = layer->GetName();
layer->EditLayer();
//Be sure to update instances if the layer name has changed.
if ( layer->GetName() != oldName )
{
layout.GetInitialInstances().MoveInstancesToLayer(oldName, layer->GetName());
if ( layoutCanvas && layoutCanvas->GetCurrentLayer() == oldName ) layoutCanvas->SetCurrentLayer(layer->GetName());
}
Refresh();
}
void LayersEditorPanel::OnEditSelected1(wxCommandEvent& event)
{
EditSelectedLayer();
}
/** Item selected: Update the current layer
*/
void LayersEditorPanel::OnlayersListItemSelect1(wxListEvent& event)
{
//Get selected layer
Layer * layer = GetSelectedLayer();
if ( !layer ) return;
if ( layoutCanvas ) layoutCanvas->SetCurrentLayer(layer->GetName());
UpdateSelectedLayerIcon();
}
/** Item focused: Update the current layer
*/
void LayersEditorPanel::OnlayersListItemFocused(wxListEvent& event)
{
//Get selected layer
Layer * layer = GetSelectedLayer();
if ( !layer ) return;
if ( layoutCanvas ) layoutCanvas->SetCurrentLayer(layer->GetName());
UpdateSelectedLayerIcon();
}
}
#endif
/*
* GDevelop Core
* Copyright 2008-2014 Florian Rival (Florian.Rival@gmail.com). All rights reserved.
* Copyright 2014 Victor Levasseur (victorlevasseur52@gmail.com).
* This project is released under the GNU Lesser General Public License.
*/
#if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
#include "LayersEditorPanel.h"
#include <wx/config.h>
#include "GDCore/Tools/Log.h"
#include "GDCore/CommonTools.h"
#include "GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvas.h"
#include "GDCore/PlatformDefinition/InitialInstancesContainer.h"
#include "GDCore/PlatformDefinition/Project.h"
#include "GDCore/PlatformDefinition/Layout.h"
#include "GDCore/PlatformDefinition/Layer.h"
#include "GDCore/Tools/HelpFileAccess.h"
#include "GDCore/IDE/Dialogs/ObjectsOnBadLayerDialog.h"
#include "GDCore/IDE/SkinHelper.h"
namespace gd
{
const long LayersEditorPanel::idMenuEdit = wxNewId();
const long LayersEditorPanel::idMenuAdd = wxNewId();
const long LayersEditorPanel::idMenuDel = wxNewId();
const long LayersEditorPanel::idMenuUp = wxNewId();
const long LayersEditorPanel::idMenuDown = wxNewId();
LayersEditorPanel::LayersEditorPanel(wxWindow* parent, gd::Project & project, gd::Layout & layout, gd::MainFrameWrapper & mainFrameWrapper) :
LayersEditorPanelBase(parent),
gd::LayoutEditorCanvasAssociatedEditor(),
m_imageList(new wxImageList(16, 16, 1)),
m_project(project),
m_layout(layout),
m_layoutCanvas(NULL),
m_mainFrameWrapper(mainFrameWrapper)
{
//Connect the wxListCtrl to events
Connect(LayersEditorPanelBase::LAYERS_LIST_ID,wxEVT_COMMAND_LIST_ITEM_SELECTED,(wxObjectEventFunction)&LayersEditorPanel::OnlayersListItemSelect1);
Connect(LayersEditorPanelBase::LAYERS_LIST_ID,wxEVT_COMMAND_LIST_ITEM_ACTIVATED,(wxObjectEventFunction)&LayersEditorPanel::OnlayersListItemActivated);
Connect(LayersEditorPanelBase::LAYERS_LIST_ID,wxEVT_COMMAND_LIST_ITEM_FOCUSED,(wxObjectEventFunction)&LayersEditorPanel::OnlayersListItemFocused);
Connect(LayersEditorPanelBase::LAYERS_LIST_ID,wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK,(wxObjectEventFunction)&LayersEditorPanel::OnlayersListItemRClick);
//Create the context menu
MenuItem1 = new wxMenuItem((&contextMenu), idMenuEdit, _("Edit the layer properties"), wxEmptyString, wxITEM_NORMAL);
MenuItem1->SetBitmap(gd::SkinHelper::GetIcon("rename", 16));
contextMenu.Append(MenuItem1);
contextMenu.AppendSeparator();
MenuItem2 = new wxMenuItem((&contextMenu), idMenuAdd, _("Add a layer"), wxEmptyString, wxITEM_NORMAL);
MenuItem2->SetBitmap(gd::SkinHelper::GetIcon("add", 16));
contextMenu.Append(MenuItem2);
MenuItem3 = new wxMenuItem((&contextMenu), idMenuDel, _("Delete the layer"), wxEmptyString, wxITEM_NORMAL);
MenuItem3->SetBitmap(gd::SkinHelper::GetIcon("delete", 16));
contextMenu.Append(MenuItem3);
contextMenu.AppendSeparator();
MenuItem4 = new wxMenuItem((&contextMenu), idMenuUp, _("Move over"), wxEmptyString, wxITEM_NORMAL);
MenuItem4->SetBitmap(gd::SkinHelper::GetIcon("up", 16));
contextMenu.Append(MenuItem4);
MenuItem5 = new wxMenuItem((&contextMenu), idMenuDown, _("Move below"), wxEmptyString, wxITEM_NORMAL);
MenuItem5->SetBitmap(gd::SkinHelper::GetIcon("down", 16));
contextMenu.Append(MenuItem5);
//Connect menu's events
Connect(idMenuEdit,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&LayersEditorPanel::OnEditSelected1);
Connect(idMenuAdd,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&LayersEditorPanel::OnAddLayerClicked);
Connect(idMenuDel,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&LayersEditorPanel::OnDeleteLayerClicked);
Connect(idMenuUp,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&LayersEditorPanel::OnLayerUpClicked);
Connect(idMenuDown,wxEVT_COMMAND_MENU_SELECTED,(wxObjectEventFunction)&LayersEditorPanel::OnLayerDownClicked);
//Add images to the image list
m_imageList->Add(wxBitmap("res/rightArrowGrey.png", wxBITMAP_TYPE_ANY));
m_imageList->Add(wxBitmap("res/1rightarrow.png", wxBITMAP_TYPE_ANY));
m_imageList->Add(wxBitmap("res/eye.png", wxBITMAP_TYPE_ANY));
m_imageList->Add(wxBitmap("res/eyeGrey.png", wxBITMAP_TYPE_ANY));
m_layersList->AssignImageList(m_imageList, wxIMAGE_LIST_SMALL);
m_layersList->InsertColumn(1, _("Layer"));
m_layersList->InsertColumn(2, _("Visible"));
gd::SkinHelper::ApplyCurrentSkin(*m_toolbar);
m_toolbar->Realize(); //Force m_toolbar update to get a good size
Refresh();
}
LayersEditorPanel::~LayersEditorPanel()
{
}
void LayersEditorPanel::Refresh()
{
m_layersList->DeleteAllItems();
for (unsigned int i = 0; i < m_layout.GetLayersCount(); ++i)
{
std::string name = m_layout.GetLayer(i).GetName();
if ( name == "" ) name = _("Base layer");
m_layersList->InsertItem(0, name);
if ( m_layout.GetLayer(i).GetVisibility() )
m_layersList->SetItemColumnImage(0, 1, 2);
else
m_layersList->SetItemColumnImage(0, 1, 3);
m_layersList->SetItemImage(0,-1,0);
}
m_layersList->SetColumnWidth( 0, wxLIST_AUTOSIZE );
m_layersList->SetColumnWidth( 1, wxLIST_AUTOSIZE );
UpdateSelectedLayerIcon();
}
void LayersEditorPanel::UpdateSelectedLayerIcon()
{
if ( !m_layoutCanvas )
return;
for (unsigned int i = 0; i<m_layout.GetLayersCount(); ++i)
{
if ( m_layout.GetLayer(i).GetName() == m_layoutCanvas->GetCurrentLayer() )
m_layersList->SetItemImage(m_layout.GetLayersCount()-i-1,1,1);
else
m_layersList->SetItemImage(m_layout.GetLayersCount()-i-1,-1,-1);
}
}
Layer* LayersEditorPanel::GetSelectedLayer()
{
long itemIndex = -1;
for (;;)
{
itemIndex = m_layersList->GetNextItem(itemIndex,wxLIST_NEXT_ALL,wxLIST_STATE_SELECTED);
if (itemIndex == -1) break;
// Got the selected item index
unsigned int layerId = m_layout.GetLayersCount()-itemIndex-1;
if ( layerId < m_layout.GetLayersCount() )
{
return &m_layout.GetLayer(layerId);
}
}
return NULL;
}
void LayersEditorPanel::EditSelectedLayer()
{
//Get selected layer
gd::Layer * layer = GetSelectedLayer();
if ( !layer ) return;
std::string oldName = layer->GetName();
layer->EditLayer();
//Be sure to update instances if the layer name has changed.
if ( layer->GetName() != oldName )
{
m_layout.GetInitialInstances().MoveInstancesToLayer(oldName, layer->GetName());
if ( m_layoutCanvas && m_layoutCanvas->GetCurrentLayer() == oldName ) m_layoutCanvas->SetCurrentLayer(layer->GetName());
}
Refresh();
}
/** Item double clicked: Toggle visibility or edit the layer
*/
void LayersEditorPanel::OnlayersListItemActivated(wxListEvent& event)
{
//Get selected layer
Layer * selectedLayer = GetSelectedLayer();
if ( !selectedLayer ) return;
//Get selected column
wxPoint click_point = ::wxGetMousePosition();
wxPoint list_point = m_layersList->GetScreenPosition();
// delta x
int dx = click_point.x - list_point.x;
// work out the column
int ex = 0; // cumulative sum of column widths
int column = -1;
for (column = 0; column < m_layersList->GetColumnCount(); column++) {
ex += m_layersList->GetColumnWidth(column);
if (ex > dx) break;
}
if ( column == 1 )
{
selectedLayer->SetVisibility(!selectedLayer->GetVisibility());
Refresh();
return;
}
else
{
EditSelectedLayer();
}
}
void LayersEditorPanel::OnEditSelected1(wxCommandEvent& event)
{
EditSelectedLayer();
}
/** Item selected: Update the current layer
*/
void LayersEditorPanel::OnlayersListItemSelect1(wxListEvent& event)
{
//Get selected layer
Layer * layer = GetSelectedLayer();
if ( !layer ) return;
if ( m_layoutCanvas ) m_layoutCanvas->SetCurrentLayer(layer->GetName());
UpdateSelectedLayerIcon();
}
/** Item focused: Update the current layer
*/
void LayersEditorPanel::OnlayersListItemFocused(wxListEvent& event)
{
//Get selected layer
Layer * layer = GetSelectedLayer();
if ( !layer ) return;
if ( m_layoutCanvas ) m_layoutCanvas->SetCurrentLayer(layer->GetName());
UpdateSelectedLayerIcon();
}
void LayersEditorPanel::OnlayersListItemRClick(wxListEvent& event)
{
PopupMenu(&contextMenu);
}
void LayersEditorPanel::OnAddLayerClicked(wxCommandEvent& event)
{
wxString name = _("New layer");
bool alreadyExist = false;
int nb = 0;
for (unsigned int i = 0;i<m_layout.GetLayersCount();++i)
{
if ( m_layout.GetLayer(i).GetName() == name )
alreadyExist = true;
}
while ( alreadyExist )
{
++nb;
name = _("New layer ") + ToString(nb);
alreadyExist = false;
for (unsigned int i = 0;i<m_layout.GetLayersCount();++i)
{
if ( m_layout.GetLayer(i).GetName() == name )
alreadyExist = true;
}
}
m_layout.InsertNewLayer(ToString(name), m_layout.GetLayersCount()-1);
m_layout.GetLayer(ToString(name)).SetCameraCount(1);
Refresh();
}
void LayersEditorPanel::OnDeleteLayerClicked(wxCommandEvent& event)
{
//Get selected layer
Layer * selectedLayer = GetSelectedLayer();
if ( !selectedLayer || selectedLayer->GetName().empty() ) return;
std::string name = selectedLayer->GetName();
for (unsigned int i = 0;i<m_layout.GetLayersCount();++i)
{
if ( &m_layout.GetLayer(i) == selectedLayer )
{
//Ask the user what he wants to do with the existing instances.
if ( m_layout.GetInitialInstances().SomeInstancesAreOnLayer(name) )
{
std::vector<std::string> availableLayers;
for (unsigned int j = 0;j<m_layout.GetLayersCount();++j)
{
if (i!=j) availableLayers.push_back(m_layout.GetLayer(j).GetName());
}
ObjectsOnBadLayerDialog dialog(this, availableLayers);
int choice = dialog.ShowModal();
if ( choice == 0 ) return; //Cancel
else if ( choice == 1 )
m_layout.GetInitialInstances().RemoveAllInstancesOnLayer(name);
else if ( choice == 2 )
m_layout.GetInitialInstances().MoveInstancesToLayer(name, dialog.moveOnLayerNamed);
}
//Delete the layer and select base layer
m_layout.RemoveLayer(name);
if ( m_layoutCanvas )
{
m_layoutCanvas->SetCurrentLayer("");
}
Refresh();
return;
}
}
gd::LogWarning(_("Can't find the layer to delete !"));
}
void LayersEditorPanel::OnEditLayerClicked(wxCommandEvent& event)
{
EditSelectedLayer();
}
void LayersEditorPanel::OnHelpClicked(wxCommandEvent& event)
{
gd::HelpFileAccess::Get()->OpenURL(_("http://www.wiki.compilgames.net/doku.php/en/game_develop/documentation/manual/editors/scene_editor/edit_layer"));
}
void LayersEditorPanel::OnLayerDownClicked(wxCommandEvent& event)
{
//Get selected layer
Layer * selectedLayer = GetSelectedLayer();
if ( !selectedLayer ) return;
for (unsigned int i = 0;i<m_layout.GetLayersCount();++i)
{
if ( &m_layout.GetLayer(i) == selectedLayer )
{
if ( i >= 1 )
{
//Move the layer
m_layout.SwapLayers(i,i-1);
Refresh();
//Focus it again
m_layersList->SetItemState(m_layout.GetLayersCount()-i, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
}
return;
}
}
gd::LogWarning(_("Can't find the layer to move !"));
}
void LayersEditorPanel::OnLayerUpClicked(wxCommandEvent& event)
{
//Get selected layer
Layer * selectedLayer = GetSelectedLayer();
if ( !selectedLayer ) return;
for (unsigned int i = 0;i<m_layout.GetLayersCount();++i)
{
if ( &m_layout.GetLayer(i) == selectedLayer )
{
if ( i <= m_layout.GetLayersCount()-1-1 )
{
//Move the layer
m_layout.SwapLayers(i,i+1);
Refresh();
//Focus it again
m_layersList->SetItemState(m_layout.GetLayersCount()-i-1-1, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED);
}
return;
}
}
gd::LogWarning(_("Can't find the layer to move !"));
}
void LayersEditorPanel::OnRefreshClicked(wxCommandEvent& event)
{
Refresh();
}
}
#endif

View File

@@ -1,135 +1,100 @@
/*
* GDevelop Core
* Copyright 2008-2014 Florian Rival (Florian.Rival@gmail.com). All rights reserved.
* This project is released under the GNU Lesser General Public License.
*/
#if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
#ifndef EDITORLAYERS_H
#define EDITORLAYERS_H
//(*Headers(LayersEditorPanel)
#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 "GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvasAssociatedEditor.h"
namespace gd { class LayoutEditorCanvas; }
namespace gd { class Project; }
namespace gd { class Layout; }
namespace gd { class Layer; }
#include "GDCore/IDE/Dialogs/MainFrameWrapper.h"
namespace gd
{
/**
* \brief Panel showing the layers of a layout and allowing to edit them.
*
* \ingroup IDEdialogs
*/
class GD_CORE_API LayersEditorPanel: public wxPanel, public gd::LayoutEditorCanvasAssociatedEditor
{
public:
LayersEditorPanel(wxWindow* parent, gd::Project & project_, gd::Layout & layout_, gd::MainFrameWrapper & mainFrameWrapper_);
virtual ~LayersEditorPanel();
/**
* Refresh the layers list.
*/
void Refresh();
/**
* The editor can be linked to a layout editor canvas to update it according to the changes made in the editor.
*/
void SetAssociatedLayoutEditorCanvas(gd::LayoutEditorCanvas * layoutCanvas_) { layoutCanvas = layoutCanvas_; Refresh(); };
/**
* Return the associated layout editor canvas.
* \see LayersEditorPanel::SetAssociatedLayoutEditorCanvas
*/
gd::LayoutEditorCanvas * GetAssociatedLayoutEditorCanvas() { return layoutCanvas; };
/**
* Enable or disable the editor.
*/
virtual bool Enable(bool enable=true) { return wxWindow::Enable(enable); };
protected:
//(*Identifiers(LayersEditorPanel)
static const long ID_AUITOOLBARITEM1;
static const long ID_AUITOOLBARITEM4;
static const long ID_AUITOOLBARITEM5;
static const long ID_AUITOOLBARITEM3;
static const long ID_AUITOOLBARITEM2;
static const long ID_AUITOOLBARITEM6;
static const long ID_AUITOOLBARITEM7;
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(LayersEditorPanel)
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 OnRefreshClick(wxCommandEvent& event);
void OnHelpClick(wxCommandEvent& event);
//*)
void UpdateSelectedLayerIcon();
void OnRefresh(wxCommandEvent& event);
void OnMoreOptions(wxCommandEvent& event);
void EditSelectedLayer();
void OnHelp(wxCommandEvent& event);
gd::Layer * GetSelectedLayer();
//(*Declarations(LayersEditorPanel)
wxAuiManager* AuiManager1;
wxAuiToolBar* toolbar;
wxMenuItem* MenuItem2;
wxMenuItem* MenuItem1;
wxListCtrl* layersList;
wxMenu contextMenu;
wxPanel* toolBarPanel;
wxImageList* imageList;
//*)
gd::Project & project;
gd::Layout & layout;
gd::LayoutEditorCanvas * layoutCanvas;
gd::MainFrameWrapper & mainFrameWrapper;
std::string layerSelected;
void CreateToolbar();
DECLARE_EVENT_TABLE()
};
}
#endif
#endif
/*
* GDevelop Core
* Copyright 2008-2014 Florian Rival (Florian.Rival@gmail.com). All rights reserved.
* Copyright 2014 Victor Levasseur (victorlevasseur52@gmail.com).
* This project is released under the GNU Lesser General Public License.
*/
#if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
#ifndef LAYERSEDITORPANEL_H
#define LAYERSEDITORPANEL_H
#include "GDCoreDialogs.h"
#include "GDCore/IDE/Dialogs/LayoutEditorCanvas/LayoutEditorCanvasAssociatedEditor.h"
namespace gd { class LayoutEditorCanvas; }
namespace gd { class Project; }
namespace gd { class Layout; }
namespace gd { class Layer; }
#include "GDCore/IDE/Dialogs/MainFrameWrapper.h"
namespace gd
{
/**
* \brief Panel showing the layers of a layout and allowing to edit them.
*
* \ingroup IDEdialogs
*/
class GD_CORE_API LayersEditorPanel : public LayersEditorPanelBase, public gd::LayoutEditorCanvasAssociatedEditor
{
public:
LayersEditorPanel(wxWindow* parent, gd::Project & project, gd::Layout & layout, gd::MainFrameWrapper & mainFrameWrapper);
virtual ~LayersEditorPanel();
/**
* Refresh the layers list.
*/
void Refresh();
/**
* The editor can be linked to a layout editor canvas to update it according to the changes made in the editor.
*/
void SetAssociatedLayoutEditorCanvas(gd::LayoutEditorCanvas * layoutCanvas) { m_layoutCanvas = layoutCanvas; Refresh(); };
/**
* Return the associated layout editor canvas.
* \see LayersEditorPanel::SetAssociatedLayoutEditorCanvas
*/
gd::LayoutEditorCanvas * GetAssociatedLayoutEditorCanvas() { return m_layoutCanvas; };
/**
* Enable or disable the editor.
*/
virtual bool Enable(bool enable = true) { return wxWindow::Enable(enable); };
protected:
virtual void OnAddLayerClicked(wxCommandEvent& event);
virtual void OnDeleteLayerClicked(wxCommandEvent& event);
virtual void OnEditLayerClicked(wxCommandEvent& event);
virtual void OnHelpClicked(wxCommandEvent& event);
virtual void OnLayerDownClicked(wxCommandEvent& event);
virtual void OnLayerUpClicked(wxCommandEvent& event);
virtual void OnRefreshClicked(wxCommandEvent& event);
void OnEditSelected1(wxCommandEvent& event);
void OnlayersListItemRClick(wxListEvent& event);
void OnlayersListItemSelect(wxListEvent& event);
void OnlayersListItemActivated(wxListEvent& event);
void OnlayersListItemSelect1(wxListEvent& event);
void OnlayersListItemFocused(wxListEvent& event);
static const long idMenuEdit;
static const long idMenuAdd;
static const long idMenuDel;
static const long idMenuUp;
static const long idMenuDown;
private:
void UpdateSelectedLayerIcon();
void EditSelectedLayer();
gd::Layer * GetSelectedLayer();
wxImageList * m_imageList;
wxMenu contextMenu;
wxMenuItem* MenuItem1;
wxMenuItem* MenuItem2;
wxMenuItem* MenuItem3;
wxMenuItem* MenuItem4;
wxMenuItem* MenuItem5;
gd::Project & m_project;
gd::Layout & m_layout;
gd::LayoutEditorCanvas * m_layoutCanvas;
gd::MainFrameWrapper & m_mainFrameWrapper;
std::string m_layerSelected;
};
}
#endif // LAYERSEDITORPANEL_H
#endif

View File

@@ -26,12 +26,13 @@ DebuggerGUIBase::DebuggerGUIBase(wxWindow* parent, wxWindowID id, const wxPoint&
m_auimgr = new wxAuiManager;
m_auimgr->SetManagedWindow( this );
m_auimgr->SetFlags( wxAUI_MGR_LIVE_RESIZE|wxAUI_MGR_TRANSPARENT_HINT|wxAUI_MGR_TRANSPARENT_DRAG|wxAUI_MGR_ALLOW_ACTIVE_PANE|wxAUI_MGR_ALLOW_FLOATING);
m_auimgr->GetArtProvider()->SetMetric( wxAUI_DOCKART_PANE_BORDER_SIZE, 0);
m_auimgr->GetArtProvider()->SetMetric(wxAUI_DOCKART_GRADIENT_TYPE, wxAUI_GRADIENT_NONE);
m_toolbar = new wxAuiToolBar(this, wxID_ANY, wxDefaultPosition, wxSize(-1,-1), wxAUI_TB_PLAIN_BACKGROUND|wxAUI_TB_DEFAULT_STYLE);
m_toolbar->SetToolBitmapSize(wxSize(16,16));
m_auimgr->AddPane(m_toolbar, wxAuiPaneInfo().Direction(wxAUI_DOCK_TOP).Layer(0).Row(0).Position(0).Fixed().CaptionVisible(true).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false).ToolbarPane());
m_auimgr->AddPane(m_toolbar, wxAuiPaneInfo().Direction(wxAUI_DOCK_TOP).Layer(0).Row(0).Position(0).Fixed().CaptionVisible(false).MaximizeButton(false).CloseButton(false).MinimizeButton(false).PinButton(false));
m_toolbar->AddTool(ID_PLAY_TOOL, _("Play the scene"), wxXmlResource::Get()->LoadBitmap(wxT("starticon")), wxNullBitmap, wxITEM_NORMAL, _("Play the current scene"), wxT(""), NULL);

File diff suppressed because it is too large Load Diff

View File

@@ -1040,15 +1040,15 @@ void wxCCA21InitBitmapResources()
else wxFileSystem::AddHandler(new wxMemoryFSHandlerBase);
}
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_addobjet.png"), xml_res_file_0, xml_res_size_0, wxT("image/png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_addvargicon.png"), xml_res_file_1, xml_res_size_1, wxT("image/png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_addvaricon.png"), xml_res_file_2, xml_res_size_2, wxT("image/png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_debuggericon.png"), xml_res_file_3, xml_res_size_3, wxT("image/png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_deleteicon.png"), xml_res_file_4, xml_res_size_4, wxT("image/png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_conditions_objet.png"), xml_res_file_5, xml_res_size_5, wxT("image/png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_pauseicon.png"), xml_res_file_6, xml_res_size_6, wxT("image/png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_starticon.png"), xml_res_file_7, xml_res_size_7, wxT("image/png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_stepicon.png"), xml_res_file_8, xml_res_size_8, wxT("image/png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$E__Developpement_GD_GDCpp_GDCpp_IDE_Dialogs_GDCppDialogs_dialogs_bitmaps.xrc"), xml_res_file_9, xml_res_size_9, wxT("text/xml"));
wxXmlResource::Get()->Load(wxT("memory:XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$E__Developpement_GD_GDCpp_GDCpp_IDE_Dialogs_GDCppDialogs_dialogs_bitmaps.xrc"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_addobjet.png"), xml_res_file_0, xml_res_size_0, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_addvargicon.png"), xml_res_file_1, xml_res_size_1, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_addvaricon.png"), xml_res_file_2, xml_res_size_2, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_debuggericon.png"), xml_res_file_3, xml_res_size_3, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_deleteicon.png"), xml_res_file_4, xml_res_size_4, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_conditions_objet.png"), xml_res_file_5, xml_res_size_5, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_pauseicon.png"), xml_res_file_6, xml_res_size_6, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_starticon.png"), xml_res_file_7, xml_res_size_7, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$.._.._.._.._Binaries_Output_Release_Windows_res_stepicon.png"), xml_res_file_8, xml_res_size_8, wxT("image/x-apple-ios-png"));
XRC_ADD_FILE(wxT("XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$_home_victor_Developpement_GD_GDCpp_GDCpp_IDE_Dialogs_GDCppDialogs_dialogs_bitmaps.xrc"), xml_res_file_9, xml_res_size_9, wxT("text/xml"));
wxXmlResource::Get()->Load(wxT("memory:XRC_resource/GDCppDialogs_dialogs_bitmaps.cpp$_home_victor_Developpement_GD_GDCpp_GDCpp_IDE_Dialogs_GDCppDialogs_dialogs_bitmaps.xrc"));
}

View File

@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<resource xmlns="http://www.wxwindows.org/wxxrc" version="2.3.0.1">
<object class="wxBitmap" name="addobjet">..\..\..\..\Binaries\Output\Release_Windows\res\addobjet.png</object>
<object class="wxBitmap" name="addvargicon">..\..\..\..\Binaries\Output\Release_Windows\res\addvargicon.png</object>
<object class="wxBitmap" name="addvaricon">..\..\..\..\Binaries\Output\Release_Windows\res\addvaricon.png</object>
<object class="wxBitmap" name="debuggericon">..\..\..\..\Binaries\Output\Release_Windows\res\debuggericon.png</object>
<object class="wxBitmap" name="deleteicon">..\..\..\..\Binaries\Output\Release_Windows\res\deleteicon.png</object>
<object class="wxBitmap" name="objet">..\..\..\..\Binaries\Output\Release_Windows\res\conditions\objet.png</object>
<object class="wxBitmap" name="pauseicon">..\..\..\..\Binaries\Output\Release_Windows\res\pauseicon.png</object>
<object class="wxBitmap" name="starticon">..\..\..\..\Binaries\Output\Release_Windows\res\starticon.png</object>
<object class="wxBitmap" name="stepicon">..\..\..\..\Binaries\Output\Release_Windows\res\stepicon.png</object>
<object class="wxBitmap" name="addobjet">../../../../Binaries/Output/Release_Windows/res/addobjet.png</object>
<object class="wxBitmap" name="addvargicon">../../../../Binaries/Output/Release_Windows/res/addvargicon.png</object>
<object class="wxBitmap" name="addvaricon">../../../../Binaries/Output/Release_Windows/res/addvaricon.png</object>
<object class="wxBitmap" name="debuggericon">../../../../Binaries/Output/Release_Windows/res/debuggericon.png</object>
<object class="wxBitmap" name="deleteicon">../../../../Binaries/Output/Release_Windows/res/deleteicon.png</object>
<object class="wxBitmap" name="objet">../../../../Binaries/Output/Release_Windows/res/conditions/objet.png</object>
<object class="wxBitmap" name="pauseicon">../../../../Binaries/Output/Release_Windows/res/pauseicon.png</object>
<object class="wxBitmap" name="starticon">../../../../Binaries/Output/Release_Windows/res/starticon.png</object>
<object class="wxBitmap" name="stepicon">../../../../Binaries/Output/Release_Windows/res/stepicon.png</object>
</resource>