summaryrefslogtreecommitdiff
path: root/CodeLite/cl_command_event.cpp
diff options
context:
space:
mode:
authorJames Cowgill <james410@cowgill.org.uk>2014-08-29 12:01:12 +0100
committerJames Cowgill <james410@cowgill.org.uk>2014-08-29 12:01:12 +0100
commit517e089547f0b721a104ad2fabc6881d2fe2fff0 (patch)
tree65e15229c45ed375b5e381c46ed016d0cc670ae2 /CodeLite/cl_command_event.cpp
parent9535c6126d9ed34e0fdf40cc0bdd2dc01159644d (diff)
Imported Upstream version 6.1.1+dfsg
Diffstat (limited to 'CodeLite/cl_command_event.cpp')
-rw-r--r--CodeLite/cl_command_event.cpp168
1 files changed, 99 insertions, 69 deletions
diff --git a/CodeLite/cl_command_event.cpp b/CodeLite/cl_command_event.cpp
index 67b653ac..9da1e281 100644
--- a/CodeLite/cl_command_event.cpp
+++ b/CodeLite/cl_command_event.cpp
@@ -1,3 +1,28 @@
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+//
+// copyright : (C) 2014 The CodeLite Team
+// file name : cl_command_event.cpp
+//
+// -------------------------------------------------------------------------
+// A
+// _____ _ _ _ _
+// / __ \ | | | | (_) |
+// | / \/ ___ __| | ___| | _| |_ ___
+// | | / _ \ / _ |/ _ \ | | | __/ _ )
+// | \__/\ (_) | (_| | __/ |___| | || __/
+// \____/\___/ \__,_|\___\_____/_|\__\___|
+//
+// F i l e
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+//////////////////////////////////////////////////////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+
#include "cl_command_event.h"
clCommandEvent::clCommandEvent(wxEventType commandType, int winid)
@@ -20,43 +45,34 @@ clCommandEvent& clCommandEvent::operator=(const clCommandEvent& src)
m_strings.insert(m_strings.end(), src.m_strings.begin(), src.m_strings.end());
m_fileName = src.m_fileName;
m_answer = src.m_answer;
-
+
// Copy wxCommandEvent members here
- m_eventType = src.m_eventType;
- m_id = src.m_id;
- m_cmdString = src.m_cmdString;
+ m_eventType = src.m_eventType;
+ m_id = src.m_id;
+ m_cmdString = src.m_cmdString;
m_commandInt = src.m_commandInt;
- m_extraLong = src.m_extraLong;
+ m_extraLong = src.m_extraLong;
return *this;
}
-clCommandEvent::~clCommandEvent()
-{
- m_ptr.reset();
-}
+clCommandEvent::~clCommandEvent() { m_ptr.reset(); }
wxEvent* clCommandEvent::Clone() const
{
- clCommandEvent *new_event = new clCommandEvent(*this);
+ clCommandEvent* new_event = new clCommandEvent(*this);
return new_event;
}
-void clCommandEvent::SetClientObject(wxClientData* clientObject)
-{
- m_ptr = clientObject;
-}
+void clCommandEvent::SetClientObject(wxClientData* clientObject) { m_ptr = clientObject; }
-wxClientData* clCommandEvent::GetClientObject() const
-{
- return m_ptr.get();
-}
+wxClientData* clCommandEvent::GetClientObject() const { return m_ptr.get(); }
// ---------------------------------
// Code Completion event
// ---------------------------------
wxEvent* clCodeCompletionEvent::Clone() const
{
- clCodeCompletionEvent *new_event = new clCodeCompletionEvent(*this);
+ clCodeCompletionEvent* new_event = new clCodeCompletionEvent(*this);
return new_event;
}
@@ -77,9 +93,7 @@ clCodeCompletionEvent::clCodeCompletionEvent(wxEventType commandType, int winid)
{
}
-clCodeCompletionEvent::~clCodeCompletionEvent()
-{
-}
+clCodeCompletionEvent::~clCodeCompletionEvent() {}
clCodeCompletionEvent& clCodeCompletionEvent::operator=(const clCodeCompletionEvent& src)
{
@@ -100,10 +114,7 @@ clCodeCompletionEvent& clCodeCompletionEvent::operator=(const clCodeCompletionEv
// clColourEvent
// ------------------------------------------------
-clColourEvent::clColourEvent(const clColourEvent& event)
-{
- *this = event;
-}
+clColourEvent::clColourEvent(const clColourEvent& event) { *this = event; }
clColourEvent::clColourEvent(wxEventType commandType, int winid)
: clCommandEvent(commandType, winid)
@@ -112,18 +123,16 @@ clColourEvent::clColourEvent(wxEventType commandType, int winid)
{
}
-clColourEvent::~clColourEvent()
-{
-}
+clColourEvent::~clColourEvent() {}
clColourEvent& clColourEvent::operator=(const clColourEvent& src)
{
// Call parent operator =
clCommandEvent::operator=(src);
- m_bgColour = src.m_bgColour;
- m_fgColour = src.m_fgColour;
- m_page = src.m_page;
- m_isActiveTab = src.m_isActiveTab;
+ m_bgColour = src.m_bgColour;
+ m_fgColour = src.m_fgColour;
+ m_page = src.m_page;
+ m_isActiveTab = src.m_isActiveTab;
m_borderColour = src.m_borderColour;
return *this;
}
@@ -132,10 +141,7 @@ clColourEvent& clColourEvent::operator=(const clColourEvent& src)
// clBuildEvent
// ------------------------------------------------
-clBuildEvent::clBuildEvent(const clBuildEvent& event)
-{
- *this = event;
-}
+clBuildEvent::clBuildEvent(const clBuildEvent& event) { *this = event; }
clBuildEvent::clBuildEvent(wxEventType commandType, int winid)
: clCommandEvent(commandType, winid)
@@ -143,9 +149,7 @@ clBuildEvent::clBuildEvent(wxEventType commandType, int winid)
{
}
-clBuildEvent::~clBuildEvent()
-{
-}
+clBuildEvent::~clBuildEvent() {}
clBuildEvent& clBuildEvent::operator=(const clBuildEvent& src)
{
@@ -166,26 +170,22 @@ clDebugEvent::clDebugEvent(wxEventType commandType, int winid)
{
}
-clDebugEvent::~clDebugEvent()
-{
-}
+clDebugEvent::~clDebugEvent() {}
-clDebugEvent::clDebugEvent(const clDebugEvent& event)
-{
- *this = event;
-}
+clDebugEvent::clDebugEvent(const clDebugEvent& event) { *this = event; }
clDebugEvent& clDebugEvent::operator=(const clDebugEvent& other)
{
- clCommandEvent::operator =(other);
- m_debuggerName = other.m_debuggerName;
- m_projectName = other.m_projectName;
+ clCommandEvent::operator=(other);
+ m_debuggerName = other.m_debuggerName;
+ m_projectName = other.m_projectName;
m_configurationName = other.m_configurationName;
- m_executableName = other.m_executableName; // This will be set for wxEVT_DBG_UI_QUICK_DEBUG and wxEVT_DBG_UI_CORE_FILE
- m_coreFile = other.m_coreFile; // wxEVT_DBG_UI_CORE_FILE
- m_workingDirectory = other.m_workingDirectory; // wxEVT_DBG_UI_CORE_FILE, wxEVT_DBG_UI_QUICK_DEBUG
- m_arguments = other.m_arguments; // wxEVT_DBG_UI_QUICK_DEBUG
- m_startupCommands = other.m_startupCommands; // wxEVT_DBG_UI_QUICK_DEBUG
+ m_executableName =
+ other.m_executableName; // This will be set for wxEVT_DBG_UI_QUICK_DEBUG and wxEVT_DBG_UI_CORE_FILE
+ m_coreFile = other.m_coreFile; // wxEVT_DBG_UI_CORE_FILE
+ m_workingDirectory = other.m_workingDirectory; // wxEVT_DBG_UI_CORE_FILE, wxEVT_DBG_UI_QUICK_DEBUG
+ m_arguments = other.m_arguments; // wxEVT_DBG_UI_QUICK_DEBUG
+ m_startupCommands = other.m_startupCommands; // wxEVT_DBG_UI_QUICK_DEBUG
return *this;
}
@@ -198,18 +198,13 @@ clNewProjectEvent::clNewProjectEvent(wxEventType commandType, int winid)
{
}
-clNewProjectEvent::clNewProjectEvent(const clNewProjectEvent& event)
-{
- *this = event;
-}
+clNewProjectEvent::clNewProjectEvent(const clNewProjectEvent& event) { *this = event; }
-clNewProjectEvent::~clNewProjectEvent()
-{
-}
+clNewProjectEvent::~clNewProjectEvent() {}
clNewProjectEvent& clNewProjectEvent::operator=(const clNewProjectEvent& other)
{
- clCommandEvent::operator =(other);
+ clCommandEvent::operator=(other);
m_templates = other.m_templates;
m_toolchain = other.m_toolchain;
m_debugger = other.m_debugger;
@@ -222,22 +217,57 @@ clNewProjectEvent& clNewProjectEvent::operator=(const clNewProjectEvent& other)
// --------------------------------------------------------------
// Compiler event
// --------------------------------------------------------------
-clCompilerEvent::~clCompilerEvent()
+clCompilerEvent::~clCompilerEvent() {}
+
+clCompilerEvent::clCompilerEvent(const clCompilerEvent& event) { *this = event; }
+
+clCompilerEvent::clCompilerEvent(wxEventType commandType, int winid)
+ : clCommandEvent(commandType, winid)
{
}
-clCompilerEvent::clCompilerEvent(const clCompilerEvent& event)
+clCompilerEvent& clCompilerEvent::operator=(const clCompilerEvent& src)
{
- *this = event;
+ clCommandEvent::operator=(src);
+ return *this;
}
-clCompilerEvent::clCompilerEvent(wxEventType commandType, int winid)
+// --------------------------------------------------------------
+// Source formatting event
+// --------------------------------------------------------------
+
+clSourceFormatEvent::clSourceFormatEvent(const clSourceFormatEvent& event) { *this = event; }
+
+clSourceFormatEvent::clSourceFormatEvent(wxEventType commandType, int winid)
: clCommandEvent(commandType, winid)
{
}
-clCompilerEvent& clCompilerEvent::operator=(const clCompilerEvent& src)
+clSourceFormatEvent::~clSourceFormatEvent() {}
+
+clSourceFormatEvent& clSourceFormatEvent::operator=(const clSourceFormatEvent& src)
{
- clCommandEvent::operator =(src);
+ clCommandEvent::operator=(src);
+ m_formattedString = src.m_formattedString;
+ m_inputString = src.m_inputString;
return *this;
}
+
+//-------------------------------------------------------------------------
+// clContextMenuEvent
+//-------------------------------------------------------------------------
+
+clContextMenuEvent::clContextMenuEvent(wxEventType commandType, int winid)
+ : clCommandEvent(commandType, winid)
+{
+}
+clContextMenuEvent::clContextMenuEvent(const clContextMenuEvent& event) { *this = event; }
+clContextMenuEvent& clContextMenuEvent::operator=(const clContextMenuEvent& src)
+{
+ clCommandEvent::operator=(src);
+ m_editor = src.m_editor;
+ m_menu = src.m_menu;
+ return *this;
+}
+
+clContextMenuEvent::~clContextMenuEvent() {}