--- /dev/null
+/*
+ * creaDevManagerIds.h
+ *
+ * Created on: 19/10/2012
+ * Author: Daniel Gonzalez
+ */
+
+#ifndef CREADEVMANAGERIDS_H_
+#define CREADEVMANAGERIDS_H_
+
+#define ID_MENU_NEW_PROJECT 10201
+#define ID_MENU_OPEN_PROJECT 10202
+#define ID_MENU_OPEN_RECENT 10203
+#define ID_MENU_CLOSE_PROJECT 10204
+#define ID_MENU_CLOSE_ALL_PROJECTS 10205
+#define ID_MENU_EXPORT_HIERARCHY 10206
+#define ID_MENU_EXIT 10207
+
+#define ID_MENU_REFRESH_PROJECT 10208
+#define ID_MENU_CUT 10209
+#define ID_MENU_COPY 10210
+#define ID_MENU_PASTE 10211
+#define ID_MENU_DELETE 10212
+#define ID_MENU_SELECT_ALL 10213
+#define ID_MENU_SELECT_NONE 10214
+
+#define ID_MENU_EVENT_LOG 10215
+#define ID_MENU_BBTK_GRAPHICAL_EDITOR 10216
+#define ID_MENU_MINITOOLS 10217
+#define ID_MENU_CODE_EDITOR 10218
+#define ID_MENU_COMMAND_LINE 10219
+
+#define ID_MENU_HELP 10220
+#define ID_MENU_REPORT_BUG 10221
+#define ID_MENU_ABOUT_CREADEVMANAGER 10222
+#define ID_MENU_ABOUT_CREATIS 10223
+
+#define ID_TREE_PROJECTS 10224
+#define ID_WINDOW_PROPERTIES 10225
+#define ID_WINDOW_PROJ_ACTIONS 10226
+
+#endif /* CREADEVMANAGERIDS_H_ */
-#include <creaWx.h>
#include "wxCreaDevManagerMainFrame.h"
+#include "creaDevManagerIds.h"
+#include "wxCreaDevManagerTreeCtrl.h"
wxCreaDevManagerMainFrame::wxCreaDevManagerMainFrame(
wxWindow* parent,
wxCreaDevManagerMainFrame::~wxCreaDevManagerMainFrame()
{
+ auiManager.UnInit();
}
bool wxCreaDevManagerMainFrame::Create(
- wxWindow* parent,
- wxWindowID id,
- const wxString& caption,
- const wxPoint& pos,
- const wxSize& size,
- long style
+ wxWindow* parent,
+ wxWindowID id,
+ const wxString& caption,
+ const wxPoint& pos,
+ const wxSize& size,
+ long style
)
{
- wxFrame::Create(parent, id, caption, pos, size, style);
- return true;
+ wxFrame::Create(parent, id, caption, pos, size, style);
+ CreateMenus();
+ CreateControls();
+ return TRUE;
+}
+
+void wxCreaDevManagerMainFrame::CreateMenus()
+{
+ wxMenuBar* menuBar = new wxMenuBar;
+
+ //FileMenu
+ menu_File = new wxMenu();
+ menu_File->Append(ID_MENU_NEW_PROJECT, _("&New Project..."));
+ menu_File->Append(ID_MENU_OPEN_PROJECT, _("&Open Project..."));
+ menu_File->Append(ID_MENU_OPEN_RECENT, _("Open &Recent"));
+ menu_File->AppendSeparator();
+ menu_File->Append(ID_MENU_CLOSE_PROJECT, _("&Close Project"));
+ menu_File->Append(ID_MENU_CLOSE_ALL_PROJECTS, _("C&lose All Projects"));
+ menu_File->AppendSeparator();
+ menu_File->Append(ID_MENU_EXPORT_HIERARCHY, _("&Export Project Hierarchy..."));
+ menu_File->AppendSeparator();
+ menu_File->Append(ID_MENU_EXIT, _("E&xit"));
+
+ menuBar->Append(menu_File, _("&File"));
+
+ //EditMenu
+ menu_Edit = new wxMenu();
+ menu_Edit->Append(ID_MENU_REFRESH_PROJECT, _("&Refresh Project"));
+ menu_Edit->AppendSeparator();
+ menu_Edit->Append(ID_MENU_CUT, _("Cu&t"));
+ menu_Edit->Append(ID_MENU_COPY, _("&Copy"));
+ menu_Edit->Append(ID_MENU_PASTE, _("&Paste"));
+ menu_Edit->AppendSeparator();
+ menu_Edit->Append(ID_MENU_DELETE, _("&Delete"));
+ menu_Edit->Append(ID_MENU_SELECT_ALL, _("Select &All"));
+ menu_Edit->Append(ID_MENU_SELECT_NONE, _("Ca&ncel Selection"));
+
+ menuBar->Append(menu_Edit, _("&Edit"));
+
+ //ToolsMenu
+ menu_Tools = new wxMenu();
+ menu_Tools->Append(ID_MENU_EVENT_LOG, _("Event &Log"));
+ menu_Tools->Append(ID_MENU_BBTK_GRAPHICAL_EDITOR, _("BBTK &Graphical Editor"));
+ menu_Tools->Append(ID_MENU_MINITOOLS, _("&MiniTools"));
+ menu_Tools->Append(ID_MENU_CODE_EDITOR, _("&Code Editor"));
+ menu_Tools->Append(ID_MENU_COMMAND_LINE, _("&Command Line"));
+
+ menuBar->Append(menu_Tools, _("&Tools"));
+
+ //HelpMenu
+ menu_Help = new wxMenu();
+ menu_Help->Append(ID_MENU_HELP, _("&Help"));
+ menu_Help->Append(ID_MENU_REPORT_BUG, _("Report &Bug"));
+ menu_Help->Append(ID_MENU_ABOUT_CREADEVMANAGER, _("&About CreaDevManager"));
+ menu_Help->Append(ID_MENU_ABOUT_CREATIS, _("A&bout CREATIS"));
+
+ menuBar->Append(menu_Help, _("&Help"));
+
+ //Set Bar
+ SetMenuBar(menuBar);
}
+void wxCreaDevManagerMainFrame::CreateControls()
+{
+ auiManager.SetManagedWindow(this);
+
+ tree_Projects = new wxCreaDevManagerTreeCtrl(
+ this,
+ ID_TREE_PROJECTS,
+ wxDefaultPosition,
+ wxDefaultSize,
+ wxTR_HAS_BUTTONS | wxTR_ROW_LINES | wxTR_SINGLE
+ );
+ tree_Projects->SetSize(400,100);
+ tree_Projects->SetMinSize(wxSize(300,100));
+
+ window_Properties = new wxWindow(
+ this,
+ ID_WINDOW_PROPERTIES
+ );
+
+
+ window_ProjectActions = new wxWindow(
+ this,
+ ID_WINDOW_PROJ_ACTIONS
+ );
+ window_ProjectActions->SetSize(300,200);
+ window_ProjectActions->SetMinSize(wxSize(300,100));
+
+ auiManager.AddPane(tree_Projects, wxLEFT, wxT("Projects Tree"));
+ auiManager.AddPane(window_ProjectActions, wxBOTTOM, wxT("Project Actions"));
+ auiManager.AddPane(window_Properties, wxCENTER, wxT("Properties"));
+
+ auiManager.GetPane(tree_Projects).BestSize(500,500);
+ auiManager.GetPane(window_Properties).BestSize(400,200);
+
+
+ auiManager.Update();
+}
--- /dev/null
+/*
+ * wxCreaDevManagerTreeCtrl.cpp
+ *
+ * Created on: 19/10/2012
+ * Author: daniel
+ */
+
+#include "wxCreaDevManagerTreeCtrl.h"
+#include "creaDevManagerIds.h"
+
+wxCreaDevManagerTreeCtrl::wxCreaDevManagerTreeCtrl(
+ wxWindow *parent,
+ wxWindowID id,
+ const wxPoint &pos,
+ const wxSize &size,
+ long style,
+ const wxValidator &validator,
+ const wxString &name
+)
+{
+ Create(parent, id, pos, size, style, validator, name);
+}
+
+wxCreaDevManagerTreeCtrl::~wxCreaDevManagerTreeCtrl()
+{
+}
+
+bool wxCreaDevManagerTreeCtrl::Create(
+ wxWindow* parent,
+ wxWindowID id,
+ const wxPoint &pos,
+ const wxSize &size,
+ long style,
+ const wxValidator &validator,
+ const wxString &name
+)
+{
+ wxTreeCtrl::Create (parent, id, pos, size, style, validator, name);
+ return TRUE;
+}
+
--- /dev/null
+/*
+ * wxCreaDevManagerTreeCtrl.h
+ *
+ * Created on: 19/10/2012
+ * Author: daniel
+ */
+
+#ifndef WXCREADEVMANAGERTREECTRL_H_
+#define WXCREADEVMANAGERTREECTRL_H_
+
+#include <creaWx.h>
+#include <wx/treectrl.h>
+
+
+class wxCreaDevManagerTreeCtrl: public wxTreeCtrl
+{
+public:
+ wxCreaDevManagerTreeCtrl(
+ wxWindow *parent,
+ wxWindowID id=wxID_ANY,
+ const wxPoint &pos=wxDefaultPosition,
+ const wxSize &size=wxDefaultSize,
+ long style=wxTR_DEFAULT_STYLE,
+ const wxValidator &validator=wxDefaultValidator,
+ const wxString &name=_("Projects tree")
+ );
+ ~wxCreaDevManagerTreeCtrl();
+ bool Create(
+ wxWindow *parent,
+ wxWindowID id=wxID_ANY,
+ const wxPoint &pos=wxDefaultPosition,
+ const wxSize &size=wxDefaultSize,
+ long style=wxTR_DEFAULT_STYLE,
+ const wxValidator &validator=wxDefaultValidator,
+ const wxString &name=_("Projects tree")
+ );
+};
+
+#endif /* WXCREADEVMANAGERTREECTRL_H_ */