Skip to content

Commit

Permalink
Fix endlines: Source and header files should stick to DOS (CR/LF)
Browse files Browse the repository at this point in the history
  • Loading branch information
neomilium committed Jun 26, 2014
1 parent 4e5b3ba commit 6bdbfba
Show file tree
Hide file tree
Showing 16 changed files with 658 additions and 658 deletions.
778 changes: 389 additions & 389 deletions contrib/MIDI to GCode/main.cpp

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Drilling.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class CDrilling: public CDepthOp {
bool CanAddTo(HeeksObj* owner);
bool CanAdd(HeeksObj* object);
void GetTools(std::list<Tool*>* t_list, const wxPoint* p);
void GetOnEdit(bool(**callback)(HeeksObj*));
void GetOnEdit(bool(**callback)(HeeksObj*));

// This is the method that gets called when the operator hits the 'Python' button. It generates a Python
// program whose job is to generate RS-274 GCode.
Expand Down
2 changes: 1 addition & 1 deletion src/DrillingDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "interface/PictureFrame.h"
#include "interface/NiceTextCtrl.h"
#include "Drilling.h"
#include "CTool.h"
#include "CTool.h"

enum
{
Expand Down
12 changes: 6 additions & 6 deletions src/HeeksCNCTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ enum{
TagsType,
TagType,
ScriptOpType,
PatternType,
PatternsType,
SurfaceType,
SurfacesType,
StockType,
StocksType,
PatternType,
PatternsType,
SurfaceType,
SurfacesType,
StockType,
StocksType,
HeeksCNCMaximumType
};
4 changes: 2 additions & 2 deletions src/Interface.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// defines all the exported functions for HeeksCAD
// Copyright (c) 2009, Dan Heeks
// This program is released under the BSD license. See the file COPYING for details.
// Copyright (c) 2009, Dan Heeks
// This program is released under the BSD license. See the file COPYING for details.

#include "stdafx.h"
#include "Interface.h"
Expand Down
12 changes: 6 additions & 6 deletions src/OpDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
#include "interface/PictureFrame.h"
#include "interface/NiceTextCtrl.h"
#include "Profile.h"
#include "CTool.h"
#include "Program.h"
#include "Tools.h"
#include "Patterns.h"
#include "Surfaces.h"
#include "PatternDlg.h"
#include "CTool.h"
#include "Program.h"
#include "Tools.h"
#include "Patterns.h"
#include "Surfaces.h"
#include "PatternDlg.h"

BEGIN_EVENT_TABLE(OpDlg, HeeksObjDlg)
EVT_COMBOBOX(ID_TOOL,HeeksObjDlg::OnComboOrCheck)
Expand Down
296 changes: 148 additions & 148 deletions src/Operations.cpp
Original file line number Diff line number Diff line change
@@ -1,148 +1,148 @@
// Operations.cpp
// Copyright (c) 2009, Dan Heeks
// This program is released under the BSD license. See the file COPYING for details.

#include "stdafx.h"
#include "Operations.h"
#include "Op.h"
#include "interface/Tool.h"
#include "tinyxml/tinyxml.h"
#include "Excellon.h"

#include <wx/progdlg.h>

bool COperations::CanAdd(HeeksObj* object)
{
return ((object != NULL) && (IsAnOperation(object->GetType())));
}

COperations & COperations::operator= ( const COperations & rhs )
{
if (this != &rhs)
{
ObjList::operator=( rhs );
}

return(*this);
}

COperations::COperations( const COperations & rhs ) : ObjList(rhs)
{
}

const wxBitmap &COperations::GetIcon()
{
static wxBitmap* icon = NULL;
if(icon == NULL)icon = new wxBitmap(wxImage(theApp.GetResFolder() + _T("/icons/operations.png")));
return *icon;
}

/**
This is ALMOST the same as the assignment operator. The difference is that
this method augments its local list of operations with those passed in rather
than replacing them.
*/
void COperations::CopyFrom(const HeeksObj *object)
{
if (object->GetType() == GetType())
{
COperations *rhs = (COperations*)object;
for (HeeksObj *child = rhs->GetFirstChild(); child != NULL; child = rhs->GetNextChild())
{
child->SetID( heeksCAD->GetNextID(child->GetType()) );
Add(child, NULL);
} // End for
}
}

void COperations::ReloadPointers()
{
ObjList::ReloadPointers();
}

void COperations::glCommands(bool select, bool marked, bool no_color)
{
ObjList::glCommands(select, marked, no_color);
}

void COperations::WriteXML(TiXmlNode *root)
{
TiXmlElement * element;
element = heeksCAD->NewXMLElement( "Operations" );
heeksCAD->LinkXMLEndChild( root, element );
WriteBaseXML(element);
}

//static
HeeksObj* COperations::ReadFromXMLElement(TiXmlElement* pElem)
{
COperations* new_object = new COperations;
new_object->ReadBaseXML(pElem);
return new_object;
}

static COperations* object_for_tools = NULL;

class SetAllActive: public Tool{
// Tool's virtual functions
const wxChar* GetTitle(){return _("Set All Operations Active");}
void Run()
{
for(HeeksObj* object = object_for_tools->GetFirstChild(); object; object = object_for_tools->GetNextChild())
{
if(COperations::IsAnOperation(object->GetType()))
{
((COp*)object)->m_active = true;
// to do, make undoable properties
}
}
}
wxString BitmapPath(){ return _T("setactive");}
};

static SetAllActive set_all_active;

class SetAllInactive: public Tool{
// Tool's virtual functions
const wxChar* GetTitle(){return _("Set All Operations Inactive");}
void Run()
{
for(HeeksObj* object = object_for_tools->GetFirstChild(); object; object = object_for_tools->GetNextChild())
{
if(COperations::IsAnOperation(object->GetType()))
{
((COp*)object)->m_active = false;
// to do, make undoable properties
}
}
}
wxString BitmapPath(){ return _T("setinactive");}
};

static SetAllInactive set_all_inactive;

void COperations::GetTools(std::list<Tool*>* t_list, const wxPoint* p)
{
object_for_tools = this;

t_list->push_back(&set_all_active);
t_list->push_back(&set_all_inactive);

ObjList::GetTools(t_list, p);
}

//static
bool COperations::IsAnOperation(int object_type)
{
switch(object_type)
{
case ProfileType:
case PocketType:
case DrillingType:
case ScriptOpType:
return true;
default:
return theApp.m_external_op_types.find(object_type) != theApp.m_external_op_types.end();
}
}

// Operations.cpp
// Copyright (c) 2009, Dan Heeks
// This program is released under the BSD license. See the file COPYING for details.

#include "stdafx.h"
#include "Operations.h"
#include "Op.h"
#include "interface/Tool.h"
#include "tinyxml/tinyxml.h"
#include "Excellon.h"

#include <wx/progdlg.h>

bool COperations::CanAdd(HeeksObj* object)
{
return ((object != NULL) && (IsAnOperation(object->GetType())));
}

COperations & COperations::operator= ( const COperations & rhs )
{
if (this != &rhs)
{
ObjList::operator=( rhs );
}

return(*this);
}

COperations::COperations( const COperations & rhs ) : ObjList(rhs)
{
}

const wxBitmap &COperations::GetIcon()
{
static wxBitmap* icon = NULL;
if(icon == NULL)icon = new wxBitmap(wxImage(theApp.GetResFolder() + _T("/icons/operations.png")));
return *icon;
}

/**
This is ALMOST the same as the assignment operator. The difference is that
this method augments its local list of operations with those passed in rather
than replacing them.
*/
void COperations::CopyFrom(const HeeksObj *object)
{
if (object->GetType() == GetType())
{
COperations *rhs = (COperations*)object;
for (HeeksObj *child = rhs->GetFirstChild(); child != NULL; child = rhs->GetNextChild())
{
child->SetID( heeksCAD->GetNextID(child->GetType()) );
Add(child, NULL);
} // End for
}
}

void COperations::ReloadPointers()
{
ObjList::ReloadPointers();
}

void COperations::glCommands(bool select, bool marked, bool no_color)
{
ObjList::glCommands(select, marked, no_color);
}

void COperations::WriteXML(TiXmlNode *root)
{
TiXmlElement * element;
element = heeksCAD->NewXMLElement( "Operations" );
heeksCAD->LinkXMLEndChild( root, element );
WriteBaseXML(element);
}

//static
HeeksObj* COperations::ReadFromXMLElement(TiXmlElement* pElem)
{
COperations* new_object = new COperations;
new_object->ReadBaseXML(pElem);
return new_object;
}

static COperations* object_for_tools = NULL;

class SetAllActive: public Tool{
// Tool's virtual functions
const wxChar* GetTitle(){return _("Set All Operations Active");}
void Run()
{
for(HeeksObj* object = object_for_tools->GetFirstChild(); object; object = object_for_tools->GetNextChild())
{
if(COperations::IsAnOperation(object->GetType()))
{
((COp*)object)->m_active = true;
// to do, make undoable properties
}
}
}
wxString BitmapPath(){ return _T("setactive");}
};

static SetAllActive set_all_active;

class SetAllInactive: public Tool{
// Tool's virtual functions
const wxChar* GetTitle(){return _("Set All Operations Inactive");}
void Run()
{
for(HeeksObj* object = object_for_tools->GetFirstChild(); object; object = object_for_tools->GetNextChild())
{
if(COperations::IsAnOperation(object->GetType()))
{
((COp*)object)->m_active = false;
// to do, make undoable properties
}
}
}
wxString BitmapPath(){ return _T("setinactive");}
};

static SetAllInactive set_all_inactive;

void COperations::GetTools(std::list<Tool*>* t_list, const wxPoint* p)
{
object_for_tools = this;

t_list->push_back(&set_all_active);
t_list->push_back(&set_all_inactive);

ObjList::GetTools(t_list, p);
}

//static
bool COperations::IsAnOperation(int object_type)
{
switch(object_type)
{
case ProfileType:
case PocketType:
case DrillingType:
case ScriptOpType:
return true;
default:
return theApp.m_external_op_types.find(object_type) != theApp.m_external_op_types.end();
}
}

Loading

0 comments on commit 6bdbfba

Please sign in to comment.