Compare commits

..
Author SHA1 Message Date
Eberhard Graether 9550ea1fdc delta time for loader 2016-07-08 14:37:49 +02:00
Eberhard Graether cad473c097 started with delay 2016-07-08 14:37:49 +02:00
Eberhard Graether 89264d97bb in code view 2016-07-08 14:37:49 +02:00
Eberhard Graether 096291a6c4 fixed animation 2016-07-08 14:37:49 +02:00
Eberhard Graether 1fcb241189 View interface 2016-07-08 14:37:49 +02:00
Eberhard Graether 996b33b1fb overlay for code view 2016-07-08 14:37:49 +02:00
Eberhard Graether fea26bfc60 animated loader with circles 2016-07-08 14:37:49 +02:00
Eberhard Graether 6a3717b8c1 basic overlay for graph view 2016-07-08 14:37:49 +02:00
64 changed files with 522 additions and 854 deletions
@@ -30,7 +30,6 @@
<font_size_min><!-- INTEGER: minimum font size in pt --></font_size_min>
<font_size_std><!-- INTEGER: standard font size in pt --></font_size_std>
<indexer_thread_count><!-- INTEGER: number of threads indexing the source code --></indexer_thread_count>
<show_external_non_fatal_errors><!-- BOOL: show non-fatal errors in unindexed files --></show_external_non_fatal_errors>
<window_base_width><!-- INTEGER: initial width of an overlay window --></window_base_width>
<window_base_height><!-- INTEGER: initial height of an overlay window --></window_base_height>
</application>
+4
View File
@@ -38,6 +38,8 @@ ViewFactory* ComponentFactory::getViewFactory() const
std::shared_ptr<Component> ComponentFactory::createCodeComponent(ViewLayout* viewLayout)
{
std::shared_ptr<CodeView> view = m_viewFactory->createCodeView(viewLayout);
view->createOverlay();
std::shared_ptr<CodeController> controller = std::make_shared<CodeController>(m_storageAccess);
return std::make_shared<Component>(view, controller);
@@ -53,6 +55,8 @@ std::shared_ptr<Component> ComponentFactory::createFeatureComponent()
std::shared_ptr<Component> ComponentFactory::createGraphComponent(ViewLayout* viewLayout)
{
std::shared_ptr<View> view = m_viewFactory->createGraphView(viewLayout);
view->createOverlay();
std::shared_ptr<GraphController> controller = std::make_shared<GraphController>(m_storageAccess);
return std::make_shared<Component>(view, controller);
@@ -25,12 +25,13 @@ CodeController::~CodeController()
{
}
const uint CodeController::s_lineRadius = 2;
void CodeController::handleMessage(MessageActivateAll* message)
{
TRACE("code all");
CodeView* view = getView();
view->showOverlay();
std::vector<ErrorInfo> errors;
m_collection = m_storageAccess->getErrorTokenLocations(&errors);
std::vector<CodeSnippetParams> snippets = getSnippetsForCollection(m_collection);
@@ -82,7 +83,6 @@ void CodeController::handleMessage(MessageActivateAll* message)
snippets.insert(snippets.begin(), statsSnippet);
CodeView* view = getView();
view->clear();
view->setErrorInfos(errors);
view->showCodeSnippets(snippets, std::vector<Id>());
@@ -101,6 +101,7 @@ void CodeController::handleMessage(MessageActivateTokens* message)
TRACE("code activate");
CodeView* view = getView();
view->showOverlay();
if (!message->keepContent())
{
@@ -168,6 +169,7 @@ void CodeController::handleMessage(MessageChangeFileView* message)
case MessageChangeFileView::FILE_SNIPPETS:
if (message->needsData)
{
view->showOverlay();
view->addCodeSnippets(getSnippetsForFile(
m_collection->getTokenLocationFileByPath(message->filePath), !message->showErrors), false);
}
@@ -177,6 +179,8 @@ void CodeController::handleMessage(MessageChangeFileView* message)
case MessageChangeFileView::FILE_MAXIMIZED:
if (message->needsData)
{
view->showOverlay();
CodeSnippetParams params;
params.startLineNumber = 1;
params.refCount = -1;
@@ -246,11 +250,13 @@ void CodeController::handleMessage(MessageShowErrors* message)
{
TRACE("code errors");
CodeView* view = getView();
view->showOverlay();
std::vector<ErrorInfo> errors;
m_collection = m_storageAccess->getErrorTokenLocations(&errors);
std::vector<CodeSnippetParams> snippets = getSnippetsForCollection(m_collection);
CodeView* view = getView();
view->clear();
view->setErrorInfos(errors);
view->showCodeSnippets(snippets, std::vector<Id>());
@@ -263,6 +269,7 @@ void CodeController::handleMessage(MessageSearchFullText* message)
TRACE("code fulltext");
CodeView* view = getView();
view->showOverlay();
view->clear();
m_collection = m_storageAccess->getFullTextSearchLocations(message->searchTerm, message->caseSensitive);
@@ -46,8 +46,6 @@ public:
~CodeController();
private:
static const uint s_lineRadius;
virtual void handleMessage(MessageActivateAll* message);
virtual void handleMessage(MessageActivateLocalSymbols* message);
virtual void handleMessage(MessageActivateTokens* message);
@@ -131,7 +131,7 @@ void FeatureController::handleMessage(MessageSearch* message)
case SearchMatch::COMMAND_ERROR:
{
MessageShowErrors msg(m_storageAccess->getErrorCount());
MessageShowErrors msg(ErrorCountInfo(-1, 0));
msg.setIsReplayed(message->isReplayed());
msg.dispatchImmediately();
return;
@@ -26,6 +26,8 @@ void GraphController::handleMessage(MessageActivateAll* message)
{
TRACE("graph all");
getView()->showOverlay();
m_activeNodeIds.clear();
m_activeEdgeIds.clear();
@@ -43,6 +45,8 @@ void GraphController::handleMessage(MessageActivateTokens* message)
{
TRACE("graph activate");
getView()->showOverlay();
if (message->isEdge || message->keepContent())
{
m_activeEdgeIds = message->tokenIds;
@@ -43,14 +43,12 @@ void StatusBarController::handleMessage(MessageFinishedParsing* message)
MessageStatus(status, false).dispatch();
}
void StatusBarController::handleMessage(MessageRefresh* message)
{
getView()->setErrorCount(m_storageAccess->getErrorCount());
}
void StatusBarController::handleMessage(MessageShowErrors* message)
{
getView()->setErrorCount(message->errorCount);
if (message->errorCount.total >= 0)
{
getView()->setErrorCount(message->errorCount);
}
}
void StatusBarController::handleMessage(MessageStatus* message)
@@ -8,7 +8,6 @@
#include "utility/messaging/MessageListener.h"
#include "utility/messaging/type/MessageClearErrorCount.h"
#include "utility/messaging/type/MessageFinishedParsing.h"
#include "utility/messaging/type/MessageRefresh.h"
#include "utility/messaging/type/MessageShowErrors.h"
#include "utility/messaging/type/MessageStatus.h"
@@ -19,7 +18,6 @@ class StatusBarController
: public Controller
, public MessageListener<MessageClearErrorCount>
, public MessageListener<MessageFinishedParsing>
, public MessageListener<MessageRefresh>
, public MessageListener<MessageShowErrors>
, public MessageListener<MessageStatus>
{
@@ -34,7 +32,6 @@ public:
private:
virtual void handleMessage(MessageClearErrorCount* message);
virtual void handleMessage(MessageFinishedParsing* message);
virtual void handleMessage(MessageRefresh* message);
virtual void handleMessage(MessageShowErrors* message);
virtual void handleMessage(MessageStatus* message);
+17 -2
View File
@@ -25,14 +25,29 @@ void View::addToLayout()
m_viewLayout->addView(this);
}
void View::setComponent(Component* component)
{
m_component = component;
}
ViewWidgetWrapper* View::getWidgetWrapper() const
{
return m_widgetWrapper.get();
}
void View::setComponent(Component* component)
void View::createOverlay()
{
m_component = component;
getWidgetWrapper()->createOverlay();
}
void View::showOverlay()
{
getWidgetWrapper()->showOverlay();
}
void View::hideOverlay()
{
getWidgetWrapper()->hideOverlay();
}
ViewLayout* View::getViewLayout() const
+4
View File
@@ -35,6 +35,10 @@ public:
ViewWidgetWrapper* getWidgetWrapper() const;
void createOverlay();
void showOverlay();
void hideOverlay();
protected:
template <typename ControllerType>
ControllerType* getController();
@@ -6,6 +6,10 @@ class ViewWidgetWrapper
public:
ViewWidgetWrapper();
virtual ~ViewWidgetWrapper();
virtual void createOverlay() = 0;
virtual void showOverlay() = 0;
virtual void hideOverlay() = 0;
};
#endif // VIEW_WIDGET_WRAPPER_H
+2 -2
View File
@@ -8,12 +8,12 @@ struct ErrorCountInfo
, fatal(0)
{}
ErrorCountInfo(size_t total, size_t fatal)
ErrorCountInfo(int total, size_t fatal)
: total(total)
, fatal(fatal)
{}
size_t total;
int total;
size_t fatal;
};
+1 -2
View File
@@ -138,12 +138,11 @@ void IntermediateStorage::addCommentLocation(Id fileNodeId, uint startLine, uint
));
}
void IntermediateStorage::addError(const std::string& message, bool fatal, bool indexed, const std::string& filePath, uint startLine, uint startCol)
void IntermediateStorage::addError(const std::string& message, bool fatal, const std::string& filePath, uint startLine, uint startCol)
{
m_errors.push_back(StorageError(
message,
fatal,
indexed,
filePath,
startLine,
startCol
+1 -1
View File
@@ -21,7 +21,7 @@ public:
virtual void addSourceLocation(Id elementId, Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol, int type);
virtual void addComponentAccess(Id edgeId , int type);
virtual void addCommentLocation(Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol);
virtual void addError(const std::string& message, bool fatal, bool indexed, const std::string& filePath, uint startLine, uint startCol);
virtual void addError(const std::string& message, bool fatal, const std::string& filePath, uint startLine, uint startCol);
virtual void forEachFile(std::function<void(const Id /*id*/, const StorageFile& /*data*/)> callback) const;
virtual void forEachNode(std::function<void(const Id /*id*/, const StorageNode& /*data*/)> callback) const;
+9 -31
View File
@@ -136,12 +136,11 @@ void PersistentStorage::addCommentLocation(Id fileNodeId, uint startLine, uint s
}
void PersistentStorage::addError(
const std::string& message, bool fatal, bool indexed, const std::string& filePath, uint startLine, uint startCol)
const std::string& message, bool fatal, const std::string& filePath, uint startLine, uint startCol)
{
m_sqliteStorage.addError(
message,
fatal,
indexed,
filePath,
startLine,
startCol
@@ -225,12 +224,14 @@ void PersistentStorage::finishInjection()
m_sqliteStorage.commitTransaction();
ErrorCountInfo errorCount = getErrorCount();
if (m_preInjectionErrorCount != errorCount.total)
if (m_preInjectionErrorCount != -1 &&
m_preInjectionErrorCount != errorCount.total)
{
MessageShowErrors msg(errorCount);
msg.setSendAsTask(false);
msg.dispatchImmediately();
}
m_preInjectionErrorCount = -1;
}
FilePath PersistentStorage::getDbFilePath() const
@@ -987,19 +988,14 @@ std::shared_ptr<TokenLocationCollection> PersistentStorage::getErrorTokenLocatio
std::shared_ptr<TokenLocationCollection> errorCollection = std::make_shared<TokenLocationCollection>();
bool showExternalNonFatalErrors = ApplicationSettings::getInstance()->getShowExternalNonFatalErrors();
std::vector<StorageError> storageErrors = m_sqliteStorage.getAllErrors();
for (size_t i = 0; i < storageErrors.size(); i++)
{
const StorageError& error = storageErrors[i];
if (error.fatal || error.indexed || showExternalNonFatalErrors)
{
errorCollection->addTokenLocation(
i, i, error.filePath, error.lineNumber, error.columnNumber, error.lineNumber, error.columnNumber
)->setType(LOCATION_ERROR);
errors->push_back(ErrorInfo(error.message, error.filePath, i, error.fatal));
}
errorCollection->addTokenLocation(
i, i, error.filePath, error.lineNumber, error.columnNumber, error.lineNumber, error.columnNumber
)->setType(LOCATION_ERROR);
errors->push_back(ErrorInfo(error.message, error.filePath, i, error.fatal));
}
return errorCollection;
@@ -1052,25 +1048,7 @@ std::vector<FileInfo> PersistentStorage::getFileInfosForFilePaths(const std::vec
ErrorCountInfo PersistentStorage::getErrorCount() const
{
bool showExternalNonFatalErrors = ApplicationSettings::getInstance()->getShowExternalNonFatalErrors();
ErrorCountInfo info;
std::vector<StorageError> storageErrors = m_sqliteStorage.getAllErrors();
for (const StorageError& error : storageErrors)
{
if (error.fatal || error.indexed || showExternalNonFatalErrors)
{
info.total++;
}
if (error.fatal)
{
info.fatal++;
}
}
return info;
return ErrorCountInfo(m_sqliteStorage.getAllErrors().size(), m_sqliteStorage.getFatalErrors().size());
}
StorageStats PersistentStorage::getStorageStats() const
+2 -2
View File
@@ -34,7 +34,7 @@ public:
virtual void addSourceLocation(Id elementId, Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol, int type);
virtual void addComponentAccess(Id edgeId , int type);
virtual void addCommentLocation(Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol);
virtual void addError(const std::string& message, bool fatal, bool indexed, const std::string& filePath, uint startLine, uint startCol);
virtual void addError(const std::string& message, bool fatal, const std::string& filePath, uint startLine, uint startCol);
virtual void forEachFile(std::function<void(const Id /*id*/, const StorageFile& /*data*/)> callback) const;
virtual void forEachNode(std::function<void(const Id /*id*/, const StorageNode& /*data*/)> callback) const;
@@ -139,7 +139,7 @@ private:
void log(std::string type, std::string str, const ParseLocation& location) const;
size_t m_preInjectionErrorCount;
int m_preInjectionErrorCount;
SearchIndex m_commandIndex;
SearchIndex m_elementIndex;
+13 -10
View File
@@ -200,7 +200,7 @@ Id SqliteStorage::addCommentLocation(Id fileNodeId, uint startLine, uint startCo
return m_database.lastRowId();
}
Id SqliteStorage::addError(const std::string& message, bool fatal, bool indexed, const std::string& filePath, uint lineNumber, uint columnNumber)
Id SqliteStorage::addError(const std::string& message, bool fatal, const std::string& filePath, uint lineNumber, uint columnNumber)
{
std::string sanitizedMessage = utility::replace((fatal ? "Fatal: " : "Error: ") + message, "'", "''");
@@ -226,8 +226,8 @@ Id SqliteStorage::addError(const std::string& message, bool fatal, bool indexed,
stmt.finalize();
stmt = m_database.compileStatement((
"INSERT INTO error(message, fatal, indexed, file_path, line_number, column_number) "
"VALUES (?, " + std::to_string(fatal) + ", " + std::to_string(indexed) + ", '" + filePath +
"INSERT INTO error(message, fatal, file_path, line_number, column_number) "
"VALUES (?, " + std::to_string(fatal) + ", '" + filePath +
"', " + std::to_string(lineNumber) + ", " + std::to_string(columnNumber) + ");"
).c_str());
@@ -550,6 +550,11 @@ std::vector<StorageCommentLocation> SqliteStorage::getCommentLocationsInFile(con
return getAll<StorageCommentLocation>("WHERE file_node_id == " + std::to_string(fileNodeId));
}
std::vector<StorageError> SqliteStorage::getFatalErrors() const
{
return getAll<StorageError>("WHERE fatal == 1");
}
std::vector<StorageFile> SqliteStorage::getAllFiles() const
{
return getAll<StorageFile>("");
@@ -747,7 +752,6 @@ void SqliteStorage::setupTables()
"id INTEGER NOT NULL, "
"message TEXT, "
"fatal INTEGER NOT NULL, "
"indexed INTEGER NOT NULL, "
"file_path TEXT, "
"line_number INTEGER, "
"column_number INTEGER, "
@@ -986,7 +990,7 @@ template <>
std::vector<StorageError> SqliteStorage::getAll<StorageError>(const std::string& query) const
{
CppSQLite3Query q = m_database.execQuery((
"SELECT message, fatal, indexed, file_path, line_number, column_number FROM error " + query + ";"
"SELECT message, fatal, file_path, line_number, column_number FROM error " + query + ";"
).c_str());
std::vector<StorageError> errors;
@@ -994,14 +998,13 @@ std::vector<StorageError> SqliteStorage::getAll<StorageError>(const std::string&
{
const std::string message = q.getStringField(0, "");
const bool fatal = q.getIntField(1, 0);
const bool indexed = q.getIntField(2, 0);
const std::string filePath = q.getStringField(3, "");
const int lineNumber = q.getIntField(4, -1);
const int columnNumber = q.getIntField(5, -1);
const std::string filePath = q.getStringField(2, "");
const int lineNumber = q.getIntField(3, -1);
const int columnNumber = q.getIntField(4, -1);
if (lineNumber != -1 && columnNumber != -1)
{
errors.push_back(StorageError(message, fatal, indexed, filePath, lineNumber, columnNumber));
errors.push_back(StorageError(message, fatal, filePath, lineNumber, columnNumber));
}
q.nextRow();
+2 -1
View File
@@ -44,7 +44,7 @@ public:
Id addSourceLocation(Id elementId, Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol, int type);
Id addComponentAccess(Id memberEdgeId, int type);
Id addCommentLocation(Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol);
Id addError(const std::string& message, bool fatal, bool indexed, const std::string& filePath, uint lineNumber, uint columnNumber);
Id addError(const std::string& message, bool fatal, const std::string& filePath, uint lineNumber, uint columnNumber);
void removeElement(Id id);
void removeElements(const std::vector<Id>& ids);
@@ -101,6 +101,7 @@ public:
std::vector<ParseLocation> getFullTextSearch(const std::string& searchTerm) const;
std::vector<StorageCommentLocation> getCommentLocationsInFile(const FilePath& filePath) const;
std::vector<StorageError> getFatalErrors() const;
std::vector<StorageFile> getAllFiles() const;
std::vector<StorageNode> getAllNodes() const;
-1
View File
@@ -170,7 +170,6 @@ void Storage::inject(Storage* injected)
addError(
injectedData.message,
injectedData.fatal,
injectedData.indexed,
injectedData.filePath,
injectedData.lineNumber,
injectedData.columnNumber
+1 -1
View File
@@ -21,7 +21,7 @@ public:
virtual void addSourceLocation(Id elementId, Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol, int type) = 0;
virtual void addComponentAccess(Id edgeId , int type) = 0;
virtual void addCommentLocation(Id fileNodeId, uint startLine, uint startCol, uint endLine, uint endCol) = 0;
virtual void addError(const std::string& message, bool fatal, bool indexed, const std::string& filePath, uint startLine, uint startCol) = 0;
virtual void addError(const std::string& message, bool fatal, const std::string& filePath, uint startLine, uint startCol) = 0;
virtual void forEachFile(std::function<void(const Id /*id*/, const StorageFile& /*data*/)> callback) const = 0;
virtual void forEachNode(std::function<void(const Id /*id*/, const StorageNode& /*data*/)> callback) const = 0;
+1 -4
View File
@@ -171,16 +171,14 @@ struct StorageError
StorageError()
: message("")
, fatal(0)
, indexed(0)
, filePath("")
, lineNumber(-1)
, columnNumber(-1)
{}
StorageError(const std::string& message, bool fatal, bool indexed, const std::string& filePath, uint lineNumber, uint columnNumber)
StorageError(const std::string& message, bool fatal, const std::string& filePath, uint lineNumber, uint columnNumber)
: message(message)
, fatal(fatal)
, indexed(indexed)
, filePath(filePath)
, lineNumber(lineNumber)
, columnNumber(columnNumber)
@@ -188,7 +186,6 @@ struct StorageError
std::string message;
bool fatal;
bool indexed;
std::string filePath;
uint lineNumber;
uint columnNumber;
-2
View File
@@ -21,9 +21,7 @@ public:
std::vector<FilePath> systemHeaderSearchPaths;
std::vector<FilePath> frameworkSearchPaths;
std::vector<std::string> compilerFlags;
bool logErrors;
std::string language;
std::string languageStandard;
+1 -1
View File
@@ -42,7 +42,7 @@ public:
virtual void startParsingFile() = 0;
virtual void finishParsingFile() = 0;
virtual void onError(const ParseLocation& location, const std::string& message, bool fatal, bool indexed) = 0;
virtual void onError(const ParseLocation& location, const std::string& message, bool fatal) = 0;
virtual void onTypedefParsed(
const ParseLocation& location, const NameHierarchy& typedefName, AccessType access, bool isImplicit) = 0;
+4 -4
View File
@@ -34,7 +34,7 @@ void ParserClientImpl::finishParsingFile()
{
}
void ParserClientImpl::onError(const ParseLocation& location, const std::string& message, bool fatal, bool indexed)
void ParserClientImpl::onError(const ParseLocation& location, const std::string& message, bool fatal)
{
log(std::string(fatal ? "FATAL: " : "ERROR: "), message, location);
@@ -43,7 +43,7 @@ void ParserClientImpl::onError(const ParseLocation& location, const std::string&
return;
}
addError(message, fatal, indexed, location);
addError(message, fatal, location);
}
void ParserClientImpl::onTypedefParsed(
@@ -576,14 +576,14 @@ void ParserClientImpl::addCommentLocation(const ParseLocation& location)
);
}
void ParserClientImpl::addError(const std::string& message, bool fatal, bool indexed, const ParseLocation& location)
void ParserClientImpl::addError(const std::string& message, bool fatal, const ParseLocation& location)
{
if (!m_storage)
{
return;
}
m_storage->addError(message, fatal, indexed, location.filePath.str(), location.startLineNumber, location.startColumnNumber);
m_storage->addError(message, fatal, location.filePath.str(), location.startLineNumber, location.startColumnNumber);
}
void ParserClientImpl::log(std::string type, std::string str, const ParseLocation& location) const
+2 -2
View File
@@ -21,7 +21,7 @@ public:
virtual void startParsingFile();
virtual void finishParsingFile();
virtual void onError(const ParseLocation& location, const std::string& message, bool fatal, bool indexed);
virtual void onError(const ParseLocation& location, const std::string& message, bool fatal);
virtual void onTypedefParsed(
const ParseLocation& location, const NameHierarchy& typedefName, AccessType access, bool isImplicit);
@@ -97,7 +97,7 @@ private:
void addSourceLocation(Id elementId, const ParseLocation& location, int type);
void addComponentAccess(Id nodeId , int type);
void addCommentLocation(const ParseLocation& location);
void addError(const std::string& message, bool fatal, bool indexed, const ParseLocation& location);
void addError(const std::string& message, bool fatal, const ParseLocation& location);
void log(std::string type, std::string str, const ParseLocation& location) const;
-10
View File
@@ -153,16 +153,6 @@ void ApplicationSettings::setIndexerThreadCount(const int count)
setValue<int>("application/indexer_thread_count", count);
}
bool ApplicationSettings::getShowExternalNonFatalErrors() const
{
return getValue<bool>("application/show_external_non_fatal_errors", false);
}
void ApplicationSettings::setShowExternalNonFatalErrors(const bool show)
{
setValue<bool>("application/show_external_non_fatal_errors", show);
}
int ApplicationSettings::getWindowBaseWidth() const
{
return getValue<int>("application/window_base_width", 500);
-3
View File
@@ -50,9 +50,6 @@ public:
int getIndexerThreadCount() const;
void setIndexerThreadCount(const int count);
bool getShowExternalNonFatalErrors() const;
void setShowExternalNonFatalErrors(const bool show);
int getWindowBaseWidth() const;
int getWindowBaseHeight() const;
+7 -2
View File
@@ -24,9 +24,9 @@ TimePoint::TimePoint(std::string s)
}
}
bool TimePoint::isValid() const
TimePoint TimePoint::now()
{
return m_time != boost::posix_time::not_a_date_time;
return TimePoint(boost::posix_time::microsec_clock::local_time());
}
std::string TimePoint::toString() const
@@ -37,4 +37,9 @@ std::string TimePoint::toString() const
stream.imbue(std::locale(std::locale::classic(), facet));
stream << m_time;
return stream.str();
}
size_t TimePoint::deltaMS(const TimePoint& other) const
{
return (m_time - other.m_time).total_milliseconds();
}
+4 -2
View File
@@ -11,7 +11,7 @@ public:
//TimePoint(time_t t);
TimePoint(std::string s);
bool isValid() const;
static TimePoint now();
std::string toString() const;
@@ -22,7 +22,9 @@ public:
inline bool operator<=(const TimePoint& rhs){ return m_time <= rhs.m_time; }
inline bool operator>=(const TimePoint& rhs){ return m_time >= rhs.m_time; }
inline float operator-(const TimePoint& rhs){ return (m_time - rhs.m_time).total_milliseconds() / 1000.0f; }
inline float operator-(const TimePoint& rhs){ return deltaMS(rhs) / 1000.0f; }
size_t deltaMS(const TimePoint& other) const;
private:
boost::posix_time::ptime m_time;
+1 -1
View File
@@ -3,7 +3,7 @@
TimePoint utility::durationStart()
{
return TimePoint(boost::posix_time::microsec_clock::local_time());
return TimePoint::now();
}
float utility::duration(const TimePoint& start)
+2
View File
@@ -102,6 +102,8 @@ add_files(
qt/view/QtUndoRedoView.h
qt/view/QtViewFactory.cpp
qt/view/QtViewFactory.h
qt/view/QtViewOverlay.cpp
qt/view/QtViewOverlay.h
qt/view/QtViewWidgetWrapper.cpp
qt/view/QtViewWidgetWrapper.h
+2 -5
View File
@@ -111,11 +111,8 @@ QtCodeFile::~QtCodeFile()
void QtCodeFile::setModificationTime(TimePoint modificationTime)
{
if (modificationTime.isValid())
{
m_modificationTime = modificationTime;
updateTitleBar();
}
m_modificationTime = modificationTime;
updateTitleBar();
}
const FilePath& QtCodeFile::getFilePath() const
+8
View File
@@ -157,6 +157,8 @@ void QtCodeView::doShowCodeSnippets(const std::vector<CodeSnippetParams>& snippe
m_widget->updateFiles();
setStyleSheet(); // so property "isLast" of QtCodeSnippet is computed correctly
hideOverlay();
}
void QtCodeView::doAddCodeSnippets(const std::vector<CodeSnippetParams>& snippets, bool insert)
@@ -170,12 +172,16 @@ void QtCodeView::doAddCodeSnippets(const std::vector<CodeSnippetParams>& snippet
setStyleSheet(); // so property "isLast" of QtCodeSnippet is computed correctly
hideOverlay();
m_widget->scrollToActiveFileIfRequested();
}
void QtCodeView::doShowCodeFile(const CodeSnippetParams& params)
{
m_widget->addCodeSnippet(params);
hideOverlay();
}
void QtCodeView::doSetFileState(const FilePath filePath, FileState state)
@@ -192,6 +198,8 @@ void QtCodeView::doSetFileState(const FilePath filePath, FileState state)
m_widget->setFileMaximized(filePath);
break;
}
hideOverlay();
}
void QtCodeView::doShowFirstActiveSnippet(const std::vector<Id>& activeTokenIds, bool scrollTo)
+3 -1
View File
@@ -19,7 +19,6 @@
#include "qt/utility/utilityQt.h"
#include "qt/graphics/QtGraphicsView.h"
#include "qt/view/QtViewWidgetWrapper.h"
#include "qt/view/graphElements/nodeComponents/QtGraphNodeComponentClickable.h"
#include "qt/view/graphElements/nodeComponents/QtGraphNodeComponentMoveable.h"
#include "qt/view/graphElements/QtGraphEdge.h"
@@ -27,6 +26,7 @@
#include "qt/view/graphElements/QtGraphNodeBundle.h"
#include "qt/view/graphElements/QtGraphNodeData.h"
#include "qt/view/graphElements/QtGraphNodeExpandToggle.h"
#include "qt/view/QtViewWidgetWrapper.h"
#include "settings/ColorScheme.h"
QtGraphView::QtGraphView(ViewLayout* viewLayout)
@@ -251,6 +251,8 @@ void QtGraphView::doRebuildGraph(
m_graph = graph;
}
hideOverlay();
if (animated)
{
createTransition();
+138
View File
@@ -0,0 +1,138 @@
#include "qt/view/QtViewOverlay.h"
#include <cmath>
#include <QEvent>
#include <QPainter>
#include <QPaintEvent>
#include <QTimer>
ResizeFilter::ResizeFilter(QWidget* widget)
: m_widget(widget)
{
}
bool ResizeFilter::eventFilter(QObject* obj, QEvent* event)
{
if (event->type() == QEvent::Resize)
{
QWidget* parent = dynamic_cast<QWidget*>(obj);
m_widget->setGeometry(0, 0, parent->width(), parent->height());
}
return QObject::eventFilter(obj, event);
}
QtOverlay::QtOverlay(QWidget* parent)
: QWidget(parent)
, m_count(rand() % 1000000)
, m_size(40)
{
m_timer = new QTimer(this);
QObject::connect(m_timer, SIGNAL(timeout()), this, SLOT(animate()));
}
void QtOverlay::start()
{
m_timePoint = TimePoint::now();
m_timer->start(FRAME_DELAY_MS);
show();
}
void QtOverlay::stop()
{
m_timer->stop();
hide();
}
void QtOverlay::animate()
{
TimePoint t = TimePoint::now();
size_t dt = t.deltaMS(m_timePoint);
if (dt < 5)
{
return;
}
m_timePoint = t;
m_count += dt;
QPoint center = geometry().center();
update(QRect(center.x() - m_size / 2, center.y() - m_size / 2, m_size, m_size));
}
void QtOverlay::paintEvent(QPaintEvent *event)
{
QPainter painter(this);
painter.fillRect(geometry(), "#AAFFFFFF");
QPoint center = geometry().center();
size_t x = m_size / 2;
size_t y = m_size / 2;
size_t s = (m_count / 7) % 200;
if (s < 100)
{
x = std::cos(3.1415f * s / 100) * x;
}
else
{
y = std::cos(3.1415f * (s - 100) / 100) * y;
}
painter.translate(center.x(), center.y());
// painter.rotate(m_count / 8);
if (s > 50 && s < 150)
{
painter.setBrush(QBrush("#882E3C86"));
}
else
{
painter.setBrush(QBrush("#88007AC2"));
}
painter.setPen(QPen(Qt::transparent));
painter.drawEllipse(-x, -y, 2 * x, 2 * y);
}
QtViewOverlay::QtViewOverlay(QWidget* parent)
: m_parent(parent)
, m_showFunctor(std::bind(&QtViewOverlay::doShowOverlay, this))
, m_hideFunctor(std::bind(&QtViewOverlay::doHideOverlay, this))
{
m_overlay = new QtOverlay(m_parent);
m_overlay->hide();
m_parent->installEventFilter(new ResizeFilter(m_overlay));
m_delayTimer = new QTimer(m_overlay);
m_delayTimer->setSingleShot(true);
QObject::connect(m_delayTimer, SIGNAL(timeout()), m_overlay, SLOT(start()));
}
void QtViewOverlay::showOverlay()
{
m_showFunctor();
}
void QtViewOverlay::hideOverlay()
{
m_hideFunctor();
}
void QtViewOverlay::doShowOverlay()
{
m_delayTimer->start(500);
}
void QtViewOverlay::doHideOverlay()
{
m_delayTimer->stop();
m_overlay->stop();
}
+79
View File
@@ -0,0 +1,79 @@
#ifndef QT_VIEW_OVERLAY
#define QT_VIEW_OVERLAY
#include <QWidget>
#include "qt/utility/QtThreadedFunctor.h"
#include "utility/TimePoint.h"
class QTimer;
class ResizeFilter
: public QObject
{
Q_OBJECT
signals:
void triggered();
public:
ResizeFilter(QWidget* widget);
protected:
bool eventFilter(QObject* obj, QEvent* event);
private:
QWidget* m_widget;
};
class QtOverlay
: public QWidget
{
Q_OBJECT
public:
QtOverlay(QWidget* parent = nullptr);
static const size_t FRAME_DELAY_MS = 25;
public slots:
void start();
void stop();
void animate();
protected:
void paintEvent(QPaintEvent *event);
private:
QTimer* m_timer;
size_t m_count;
size_t m_size;
TimePoint m_timePoint;
};
class QtViewOverlay
{
public:
QtViewOverlay(QWidget* parent = 0);
void showOverlay();
void hideOverlay();
private:
void doShowOverlay();
void doHideOverlay();
QWidget* m_parent;
QtOverlay* m_overlay;
QTimer* m_delayTimer;
QtThreadedFunctor<void> m_showFunctor;
QtThreadedFunctor<void> m_hideFunctor;
};
#endif // QT_VIEW_OVERLAY
@@ -1,6 +1,7 @@
#include "qt/view/QtViewWidgetWrapper.h"
#include "component/view/View.h"
#include "qt/view/QtViewOverlay.h"
#include "utility/logging/logging.h"
QWidget* QtViewWidgetWrapper::getWidgetOfView(const View* view)
@@ -24,6 +25,7 @@ QWidget* QtViewWidgetWrapper::getWidgetOfView(const View* view)
QtViewWidgetWrapper::QtViewWidgetWrapper(QWidget* widget)
: m_widget(widget)
, m_overlay(nullptr)
{
}
@@ -31,6 +33,27 @@ QtViewWidgetWrapper::~QtViewWidgetWrapper()
{
}
void QtViewWidgetWrapper::createOverlay()
{
m_overlay = new QtViewOverlay(m_widget);
}
void QtViewWidgetWrapper::showOverlay()
{
if (m_overlay)
{
m_overlay->showOverlay();
}
}
void QtViewWidgetWrapper::hideOverlay()
{
if (m_overlay)
{
m_overlay->hideOverlay();
}
}
QWidget* QtViewWidgetWrapper::getWidget()
{
return m_widget;
+9 -1
View File
@@ -6,8 +6,10 @@
#include "component/view/ViewWidgetWrapper.h"
class View;
class QtViewOverlay;
class QtViewWidgetWrapper: public ViewWidgetWrapper
class QtViewWidgetWrapper
: public ViewWidgetWrapper
{
public:
static QWidget* getWidgetOfView(const View* view);
@@ -15,10 +17,16 @@ public:
QtViewWidgetWrapper(QWidget* widget);
virtual ~QtViewWidgetWrapper();
virtual void createOverlay() override;
virtual void showOverlay() override;
virtual void hideOverlay() override;
QWidget* getWidget();
private:
QWidget* m_widget;
QtViewOverlay* m_overlay;
};
#endif // QT_VIEW_WIDGET_WRAPPER_H
@@ -84,21 +84,6 @@ void QtProjectWizzardContentPreferences::populateForm(QGridLayout* layout, int&
);
row++;
// ignore non-fatal errors in non-indexed files
QLabel* errorsLabel = createFormLabel("Non-Fatal Errors");
m_fatalErrors = new QCheckBox("Display non-fatal errors in unindexed files", this);
layout->addWidget(errorsLabel, row, QtProjectWizzardWindow::FRONT_COL, Qt::AlignRight);
layout->addWidget(m_fatalErrors, row, QtProjectWizzardWindow::BACK_COL, Qt::AlignLeft);
addHelpButton(
"When checked non-fatal errors within included unindexed files are also shown."
, layout, row
);
row++;
}
void QtProjectWizzardContentPreferences::load()
@@ -111,7 +96,6 @@ void QtProjectWizzardContentPreferences::load()
m_tabWidth->setCurrentIndex(appSettings->getCodeTabWidth() - 1);
m_threads->setCurrentIndex(appSettings->getIndexerThreadCount() - 1);
m_fatalErrors->setChecked(appSettings->getShowExternalNonFatalErrors());
}
void QtProjectWizzardContentPreferences::save()
@@ -124,7 +108,6 @@ void QtProjectWizzardContentPreferences::save()
appSettings->setCodeTabWidth(m_tabWidth->currentIndex() + 1);
appSettings->setIndexerThreadCount(m_threads->currentIndex() + 1);
appSettings->setShowExternalNonFatalErrors(m_fatalErrors->isChecked());
}
bool QtProjectWizzardContentPreferences::check()
@@ -1,7 +1,6 @@
#ifndef QT_PROJECT_WIZZARD_CONTENT_PREFERENCES_H
#define QT_PROJECT_WIZZARD_CONTENT_PREFERENCES_H
#include <QCheckBox>
#include <QComboBox>
#include <QLineEdit>
@@ -28,7 +27,6 @@ private:
QComboBox* m_fontSize;
QComboBox* m_tabWidth;
QComboBox* m_threads;
QCheckBox* m_fatalErrors;
};
#endif // QT_PROJECT_WIZZARD_CONTENT_PREFERENCES_H
@@ -4,18 +4,15 @@
#include "data/parser/ParseLocation.h"
#include "data/parser/ParserClient.h"
#include "utility/file/FileRegister.h"
CxxDiagnosticConsumer::CxxDiagnosticConsumer(
clang::raw_ostream &os,
clang::DiagnosticOptions *diags,
ParserClient* client,
FileRegister* fileRegister,
bool useLogging
)
: clang::TextDiagnosticPrinter(os, diags)
, m_client(client)
, m_register(fileRegister)
, m_isParsingFile(false)
, m_useLogging(useLogging)
{
@@ -78,11 +75,6 @@ void CxxDiagnosticConsumer::HandleDiagnostic(clang::DiagnosticsEngine::Level lev
column = presumedLocation.getColumn();
}
m_client->onError(
ParseLocation(filePath, line, column),
message,
level == clang::DiagnosticsEngine::Fatal,
m_register->hasFilePath(filePath)
);
m_client->onError(ParseLocation(filePath, line, column), message, (level == clang::DiagnosticsEngine::Fatal));
}
}
@@ -3,7 +3,6 @@
#include "clang/Frontend/TextDiagnosticPrinter.h"
class FileRegister;
class ParserClient;
class CxxDiagnosticConsumer
@@ -14,7 +13,6 @@ public:
clang::raw_ostream &os,
clang::DiagnosticOptions *diags,
ParserClient* client,
FileRegister* fileRegister,
bool useLogging = true
);
@@ -25,8 +23,6 @@ public:
private:
ParserClient* m_client;
FileRegister* m_register;
bool m_isParsingFile;
bool m_useLogging;
};
+1 -1
View File
@@ -183,7 +183,7 @@ std::shared_ptr<CxxDiagnosticConsumer> CxxParser::getDiagnostics(const Arguments
{
llvm::IntrusiveRefCntPtr<clang::DiagnosticOptions> options = new clang::DiagnosticOptions();
return std::make_shared<CxxDiagnosticConsumer>(
llvm::errs(), &*options, m_client, m_fileRegister.get(), arguments.logErrors);
llvm::errs(), &*options, m_client, arguments.logErrors);
}
void CxxParser::setupParsing(const Arguments& arguments)
+1 -1
View File
@@ -2948,7 +2948,7 @@ private:
{
}
virtual void onError(const ParseLocation& location, const std::string& message, bool fatal, bool indexed)
virtual void onError(const ParseLocation& location, const std::string& message, bool fatal)
{
errors.push_back(addLocationSuffix(message, location));
}
+1 -1
View File
@@ -1 +1 @@
Blog powered by <a href="http://jekyllrb.com" rel="nofollow">Jekyll</a> using the <a href="https://mademistakes.com/work/hpstr-jekyll-theme/" rel="nofollow">HPSTR Theme</a>.</span>
<span>&copy; {{ site.time | date: '%Y' }} <a href="{{ site.owner.url }}/imprint">{{ site.owner.name }}</a>. Powered by <a href="http://jekyllrb.com" rel="nofollow">Jekyll</a> using the <a href="https://mademistakes.com/work/hpstr-jekyll-theme/" rel="nofollow">HPSTR Theme</a>.</span>
-71
View File
@@ -1,71 +0,0 @@
<div class="navigation">
<div class="nav-html nav-body">
<div class="layout">
<div class="layout-footer">
<div class="logo logo--with-slogan">
<svg class="logo__icon" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="164.597px" height="212.833px" viewBox="0 0 164.597 212.833">
<g>
<path d="M63.134,170.996c-11.508,0-20.883,9.374-20.883,20.938c0,11.508,9.375,20.826,20.883,20.826
c11.506,0,20.938-9.318,20.938-20.826C84.072,180.37,74.64,170.996,63.134,170.996z M63.134,207.819
c-8.757,0-15.831-7.185-15.831-15.885c0-8.758,7.074-16,15.831-16c8.757,0,15.829,7.242,15.829,16
C78.963,200.635,71.891,207.819,63.134,207.819z"></path>
<polygon points="121.276,176.833 131.362,176.833 131.362,211.862 136.414,211.862 136.414,176.833 146.5,176.833 146.5,171.894
121.276,171.894 "></polygon>
<rect x="153.771" y="171.894" width="5.052" height="39.969"></rect>
<path d="M25.511,207.849c-8.868,0-15.999-7.129-15.999-15.998c0-8.814,7.13-15.943,15.999-15.943
c3.792,0,7.363,1.298,10.19,3.676l3.484-3.484c-3.76-3.287-8.565-5.13-13.674-5.13c-11.563,0-20.938,9.373-20.938,20.882
c0,11.564,9.375,20.938,20.938,20.938c5.091,0,9.908-1.828,13.675-5.129l-3.487-3.489
C32.845,206.542,29.274,207.849,25.511,207.849z"></path>
<path d="M85.479,211.895h5.387l2.774-6.303h19.671l2.762,6.303h5.443l-18.019-40.97L85.479,211.895z M95.814,200.651
l7.684-17.467l7.65,17.467H95.814z"></path>
</g>
<g>
<path d="M20.875,158.837h14.671c-1.244-3.422-1.925-7.113-1.925-10.965c0-6.671,2.038-12.865,5.521-17.998
C28.339,135.038,20.875,146.064,20.875,158.837z"></path>
<path d="M135.894,82.173c2.562,0.386,5.215,0.404,7.897-0.008c5.634-0.866,10.583-3.48,14.428-7.23
c-5.265-3.29-11.598-4.779-18.102-3.779c-1.866,0.287-3.65,0.783-5.352,1.431c2.863-5.315,4.104-11.641,3.1-18.171
c-0.137-0.889-0.316-1.762-0.527-2.619c-7.72,4.323-12.963,12.39-13.916,21.567c-12.08-6.947-26.087-10.921-41.022-10.921
c-19.125,0-36.726,6.517-50.707,17.449c-6.814-2.953-12.294-8.831-14.478-16.545c-2.724-9.621,2.861-19.612,12.481-22.335
c11.114-3.146,17.565-14.688,14.419-25.801C40.969,4.097,29.425-2.349,18.312,0.797c-3.274,0.926-5.173,4.327-4.247,7.6
c0.926,3.274,4.329,5.174,7.602,4.248c4.563-1.292,9.538,1.357,10.831,5.921c1.292,4.563-1.593,9.302-6.158,10.594
C7.103,34.606-4.068,54.592,1.381,73.834C3.944,82.888,9.359,90.35,16.37,95.542C6.09,109.29,0,126.356,0,144.843
c0,4.771,0.412,9.444,1.189,13.993h13.575c0-17.719,14.366-32.083,32.086-32.083c17.719,0,32.083,14.364,32.085,32.083h16.739
c0.002-17.719,14.368-32.083,32.087-32.083c14.593,0,26.697,9.914,30.589,23.25c0.784,2.082,1.761,3.123,3.431,3.037
s2.79-1.309,2.869-3.189c0.101-1.652,0.149-3.33,0.149-5.008C164.799,119.753,153.583,97.286,135.894,82.173z M127.473,109.472
c-3.246,0-5.876-2.631-5.876-5.876c0-3.243,2.63-5.874,5.876-5.874c3.242,0,5.873,2.631,5.873,5.874
C133.346,106.841,130.715,109.472,127.473,109.472z"></path>
<path d="M101.855,158.837h14.671c-1.244-3.422-1.925-7.113-1.925-10.965c0-6.671,2.038-12.865,5.521-17.998
C109.319,135.038,101.855,146.064,101.855,158.837z"></path>
</g>
</svg>
<span>A crossplattform source explorer for <strong>C/C++</strong></span>
</div>
<div class="default-row">
<div class="layout-footer__main-navigation">
<a class="layout-footer__main-navigation__link" href="{{ site.owner.url }}">Home</a>
<a class="layout-footer__main-navigation__link layout-header__main-navigation__link--active" href="{{ site.owner.url }}/blog/">Blog</a>
<a class="layout-footer__main-navigation__link" href="{{ site.owner.url }}/documentation/">Documentation</a>
<a class="layout-footer__main-navigation__link" href="{{ site.owner.url }}/support">Support</a>
<a class="layout-footer__main-navigation__link" href="{{ site.owner.url }}/download-gate">Download</a>
<a class="layout-footer__main-navigation__link" href="{{ site.owner.url }}/trial">Get Trial</a>
<a class="layout-footer__main-navigation__link" href="http://sites.fastspring.com/coatisoftware/product/buy_0?action=adds">Buy now</a>
</div>
<div class="layout-footer__sub-navigation">
<a class="layout-footer__sub-navigation__link" href="{{ site.owner.url }}/press-kit">Press Kit</a>
<span class="layout-footer__sub-navigation__separator">|</span>
<a class="layout-footer__sub-navigation__link" href="{{ site.owner.url }}/terms-of-use">Terms of Use</a>
<span class="layout-footer__sub-navigation__separator">|</span>
<a class="layout-footer__sub-navigation__link" href="{{ site.owner.url }}/cancellation-policy">Cancellation Policy</a>
<span class="layout-footer__sub-navigation__separator">|</span>
<a class="layout-footer__sub-navigation__link" href="{{ site.owner.url }}/privacy-policy">Privacy Policy</a>
<span class="layout-footer__sub-navigation__separator">|</span>
<a class="layout-footer__sub-navigation__link" href="{{ site.owner.url }}/imprint">Imprint</a>
</div>
</div>
</div>
</div>
</div>
</div>
-118
View File
@@ -1,118 +0,0 @@
<div class="navigation">
<div class="nav-html nav-body">
<div class="layout">
<div class="layout-header layout-header--mobile-menu-closed">
<div class="layout-header__boundary">
<div class="layout-header__fixed-bar"></div>
<div class="logo logo--symbol-only layout-header__logo layout-header__logo--sm">
<svg class="logo__icon layout-header__logo__icon" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 38 37">
<g>
<path d="M30.747,24.133c0-0.757-0.605-1.368-1.354-1.368
c-0.749,0-1.355,0.611-1.355,1.368c0,0.756,0.606,1.368,1.355,1.368C30.142,25.501,30.747,24.889,30.747,24.133 M36.514,34.942
c-0.898-3.106-3.689-5.416-7.055-5.416c-4.085,0-7.397,3.346-7.397,7.474h-3.86c0-4.128-3.313-7.474-7.398-7.474
c-4.086,0-7.399,3.346-7.399,7.474h-3.13C0.095,35.94,0,34.853,0,33.74c0-4.306,1.404-8.282,3.774-11.483
c-1.616-1.21-2.865-2.948-3.456-5.058c-1.256-4.482,1.32-9.138,5.755-10.406c1.053-0.301,1.718-1.405,1.42-2.468
c-0.298-1.063-1.445-1.68-2.497-1.38C4.241,3.162,3.458,2.719,3.243,1.957C3.03,1.194,3.467,0.401,4.222,0.187
c2.563-0.733,5.225,0.768,5.95,3.357c0.726,2.589-0.762,5.278-3.325,6.01c-2.218,0.635-3.506,2.962-2.878,5.203
c0.504,1.797,1.767,3.166,3.339,3.854c3.223-2.546,7.282-4.064,11.692-4.064c3.444,0,6.673,0.925,9.459,2.544
c0.221-2.138,1.43-4.017,3.208-5.024c0.049,0.199,0.091,0.403,0.122,0.61c0.232,1.521-0.054,2.994-0.715,4.232
c0.394-0.151,0.804-0.266,1.235-0.333c1.499-0.233,2.959,0.114,4.173,0.88c-0.886,0.875-2.027,1.483-3.327,1.685
c-0.618,0.096-1.229,0.092-1.82,0.002C35.413,22.662,38,27.896,38,33.74c0,0.392-0.012,0.782-0.035,1.166
c-0.018,0.439-0.275,0.725-0.66,0.744C36.919,35.669,36.693,35.428,36.514,34.942 M26.869,37h-3.383
c0-2.975,1.721-5.544,4.212-6.747c-0.803,1.196-1.272,2.64-1.272,4.193C26.426,35.344,26.582,36.203,26.869,37 M8.196,37H4.813
c0-2.975,1.721-5.544,4.212-6.747c-0.803,1.196-1.273,2.64-1.273,4.193C7.752,35.344,7.909,36.203,8.196,37"></path>
</g>
</svg>
</div>
<div class="logo logo--circled logo--blue layout-header__logo layout-header__logo--md">
<svg class="logo__icon layout-header__logo__icon" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="164.597px" height="212.833px" viewBox="0 0 164.597 212.833">
<g>
<path d="M63.134,170.996c-11.508,0-20.883,9.374-20.883,20.938c0,11.508,9.375,20.826,20.883,20.826
c11.506,0,20.938-9.318,20.938-20.826C84.072,180.37,74.64,170.996,63.134,170.996z M63.134,207.819
c-8.757,0-15.831-7.185-15.831-15.885c0-8.758,7.074-16,15.831-16c8.757,0,15.829,7.242,15.829,16
C78.963,200.635,71.891,207.819,63.134,207.819z"></path>
<polygon points="121.276,176.833 131.362,176.833 131.362,211.862 136.414,211.862 136.414,176.833 146.5,176.833 146.5,171.894
121.276,171.894 "></polygon>
<rect x="153.771" y="171.894" width="5.052" height="39.969"></rect>
<path d="M25.511,207.849c-8.868,0-15.999-7.129-15.999-15.998c0-8.814,7.13-15.943,15.999-15.943
c3.792,0,7.363,1.298,10.19,3.676l3.484-3.484c-3.76-3.287-8.565-5.13-13.674-5.13c-11.563,0-20.938,9.373-20.938,20.882
c0,11.564,9.375,20.938,20.938,20.938c5.091,0,9.908-1.828,13.675-5.129l-3.487-3.489
C32.845,206.542,29.274,207.849,25.511,207.849z"></path>
<path d="M85.479,211.895h5.387l2.774-6.303h19.671l2.762,6.303h5.443l-18.019-40.97L85.479,211.895z M95.814,200.651
l7.684-17.467l7.65,17.467H95.814z"></path>
</g>
<g>
<path d="M20.875,158.837h14.671c-1.244-3.422-1.925-7.113-1.925-10.965c0-6.671,2.038-12.865,5.521-17.998
C28.339,135.038,20.875,146.064,20.875,158.837z"></path>
<path d="M135.894,82.173c2.562,0.386,5.215,0.404,7.897-0.008c5.634-0.866,10.583-3.48,14.428-7.23
c-5.265-3.29-11.598-4.779-18.102-3.779c-1.866,0.287-3.65,0.783-5.352,1.431c2.863-5.315,4.104-11.641,3.1-18.171
c-0.137-0.889-0.316-1.762-0.527-2.619c-7.72,4.323-12.963,12.39-13.916,21.567c-12.08-6.947-26.087-10.921-41.022-10.921
c-19.125,0-36.726,6.517-50.707,17.449c-6.814-2.953-12.294-8.831-14.478-16.545c-2.724-9.621,2.861-19.612,12.481-22.335
c11.114-3.146,17.565-14.688,14.419-25.801C40.969,4.097,29.425-2.349,18.312,0.797c-3.274,0.926-5.173,4.327-4.247,7.6
c0.926,3.274,4.329,5.174,7.602,4.248c4.563-1.292,9.538,1.357,10.831,5.921c1.292,4.563-1.593,9.302-6.158,10.594
C7.103,34.606-4.068,54.592,1.381,73.834C3.944,82.888,9.359,90.35,16.37,95.542C6.09,109.29,0,126.356,0,144.843
c0,4.771,0.412,9.444,1.189,13.993h13.575c0-17.719,14.366-32.083,32.086-32.083c17.719,0,32.083,14.364,32.085,32.083h16.739
c0.002-17.719,14.368-32.083,32.087-32.083c14.593,0,26.697,9.914,30.589,23.25c0.784,2.082,1.761,3.123,3.431,3.037
s2.79-1.309,2.869-3.189c0.101-1.652,0.149-3.33,0.149-5.008C164.799,119.753,153.583,97.286,135.894,82.173z M127.473,109.472
c-3.246,0-5.876-2.631-5.876-5.876c0-3.243,2.63-5.874,5.876-5.874c3.242,0,5.873,2.631,5.873,5.874
C133.346,106.841,130.715,109.472,127.473,109.472z"></path>
<path d="M101.855,158.837h14.671c-1.244-3.422-1.925-7.113-1.925-10.965c0-6.671,2.038-12.865,5.521-17.998
C109.319,135.038,101.855,146.064,101.855,158.837z"></path>
</g>
</svg>
</div>
<button class="layout-header__menu-toggle">
<svg class="layout-header__menu-toggle__hamburger-icon" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 40 30">
<g>
<path d="M3.282,24.552c-0.938,0-1.719,0.256-2.344,0.769
C0.312,25.834,0,26.475,0,27.244c0,0.769,0.313,1.42,0.938,1.954S2.344,30,3.282,30h33.359c0.937,0,1.731-0.268,2.383-0.802
C39.674,28.664,40,28.013,40,27.244c0-0.77-0.326-1.41-0.977-1.924c-0.651-0.513-1.446-0.769-2.383-0.769H3.282z M3.282,12.244
c-0.938,0-1.719,0.267-2.344,0.801C0.312,13.58,0,14.23,0,15c0,0.77,0.313,1.412,0.938,1.923c0.625,0.513,1.406,0.77,2.344,0.77
h33.359c0.937,0,1.731-0.257,2.383-0.77C39.674,16.411,40,15.77,40,15c0-0.769-0.326-1.42-0.977-1.955
c-0.651-0.534-1.446-0.801-2.383-0.801H3.282z M36.641,5.449c0.937,0,1.731-0.256,2.383-0.769C39.674,4.167,40,3.526,40,2.757
c0-0.77-0.326-1.421-0.977-1.955C38.372,0.268,37.577,0,36.641,0H3.282C2.344,0,1.562,0.268,0.938,0.802S0,1.987,0,2.757
c0,0.769,0.313,1.41,0.938,1.923s1.406,0.769,2.344,0.769H36.641z"></path>
</g>
</svg>
<svg class="layout-header__menu-toggle__cross-icon" version="1.1" xmlns="http://www.w3.org/2000/svg" xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30">
<g>
<path d="M29.99,2.782c0.063-0.827-0.178-1.515-0.727-2.064
c-0.549-0.549-1.229-0.783-2.042-0.703c-0.812,0.08-1.552,0.455-2.221,1.123l-9.987,9.985L5.027,1.138
C4.358,0.47,3.61,0.104,2.783,0.039C1.955-0.025,1.268,0.215,0.719,0.764C0.17,1.313-0.065,1.993,0.015,2.805
c0.08,0.812,0.455,1.552,1.124,2.221l9.987,9.984l-9.931,9.929c-0.669,0.669-1.053,1.418-1.152,2.249
c-0.098,0.83,0.127,1.519,0.676,2.068c0.549,0.549,1.246,0.78,2.092,0.698c0.846-0.085,1.603-0.46,2.272-1.129l9.931-9.928
l9.932,9.928c0.669,0.669,1.418,1.052,2.25,1.151c0.829,0.099,1.52-0.126,2.068-0.675c0.549-0.55,0.781-1.246,0.698-2.093
c-0.084-0.845-0.459-1.602-1.128-2.271l-9.932-9.929l9.986-9.984C29.558,4.357,29.925,3.609,29.99,2.782"></path>
</g>
</svg>
</button>
<div class="layout-header__navigation-layer">
<nav class="layout-header__main-navigation">
<a class="layout-header__main-navigation__link" href="{{ site.owner.url }}">Home</a>
<a class="layout-header__main-navigation__link layout-header__main-navigation__link--active" href="{{ site.owner.url }}/blog/">Blog</a>
<a class="layout-header__main-navigation__link" href="{{ site.owner.url }}/documentation/">Documentation</a>
<a class="layout-header__main-navigation__link" href="{{ site.owner.url }}/support">Support</a>
<a class="layout-header__main-navigation__link" href="{{ site.owner.url }}/download-gate">Download</a>
<a class="layout-header__main-navigation__link" href="{{ site.owner.url }}/trial">Get Trial</a>
<a class="layout-header__main-navigation__link layout-header__main-navigation__link--as-button" href="http://sites.fastspring.com/coatisoftware/product/buy_0?action=adds">Buy now</a>
</nav>
<nav class="layout-header__sub-navigation">
<a class="layout-header__sub-navigation__link" href="{{ site.owner.url }}/press-kit">Press Kit</a>
<a class="layout-header__sub-navigation__link" href="{{ site.owner.url }}/terms-of-use">Terms of Use</a>
<a class="layout-header__sub-navigation__link" href="{{ site.owner.url }}/cancellation-policy">Cancellation Policy</a>
<a class="layout-header__sub-navigation__link" href="{{ site.owner.url }}/privacy-policy">Privacy Policy</a>
<a class="layout-header__sub-navigation__link" href="{{ site.owner.url }}/imprint">Imprint</a>
</nav>
</div>
</div>
</div>
</div>
</div>
</div>
+47
View File
@@ -0,0 +1,47 @@
<nav id="dl-menu" class="dl-menuwrapper" role="navigation">
<button class="dl-trigger">Open Menu</button>
<ul class="dl-menu">
<li><a href="{{ site.url }}/">All Posts</a></li>
<li><a href="{{ site.owner.url }}/">coati.io</a></li>
<li>
<a href="#">About</a>
<ul class="dl-submenu">
<li>
<img src="{{ site.url }}/images/{{ site.owner.avatar }}" alt="{{ site.owner.name }} photo" class="author-photo">
<p>{{ site.owner.bio }}</p>
</li>
<li><a href="{{ site.owner.url }}"><span class="btn btn-inverse">Webpage</span></a></li>
{% if site.owner.email %}<li>
<a href="mailto:{{ site.owner.email }}"><i class="fa fa-fw fa-envelope"></i> Email</a>
</li>{% endif %}
{% if site.owner.twitter %}<li>
<a href="https://twitter.com/{{ site.owner.twitter }}"><i class="fa fa-fw fa-twitter"></i> Twitter</a>
</li>{% endif %}
{% if site.owner.facebook %}<li>
<a href="https://facebook.com/{{ site.owner.facebook }}"><i class="fa fa-fw fa-facebook"></i> Facebook</a>
</li>{% endif %}
{% if site.owner.google_plus %}<li>
<a href="{{ site.owner.google_plus }}"><i class="fa fa-fw fa-google-plus"></i> Google+</a>
</li>{% endif %}
{% if site.owner.linkedin %}<li>
<a href="https://linkedin.com/in/{{ site.owner.linkedin }}"><i class="fa fa-fw fa-linkedin"></i> LinkedIn</a>
</li>{% endif %}
{% if site.owner.github %}<li>
<a href="https://github.com/{{ site.owner.github }}"><i class="fa fa-fw fa-github"></i> GitHub</a>
</li>{% endif %}
{% if site.owner.stackexchange %}<li>
<a href="{{ site.owner.stackexchange }}"><i class="fa fa-fw fa-stack-exchange"></i> Stackexchange</a>
</li>{% endif %}
{% if site.owner.instagram %}<li>
<a href="https://instagram.com/{{ site.owner.instagram }}"><i class="fa fa-fw fa-instagram"></i> Instagram</a>
</li>{% endif %}
{% if site.owner.flickr %}<li>
<a href="https://www.flickr.com/photos/{{ site.owner.flickr }}"><i class="fa fa-fw fa-flickr"></i> Flickr</a>
</li>{% endif %}
{% if site.owner.tumblr %}<li>
<a href="http://{{ site.owner.tumblr }}.tumblr.com"><i class="fa fa-fw fa-tumblr"></i> Tumblr</a>
</li>{% endif %}
</ul><!-- /.dl-submenu
</li> -->
</ul><!-- /.dl-menu -->
</nav><!-- /.dl-menuwrapper -->
+5 -6
View File
@@ -1,15 +1,14 @@
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="{{ site.url }}/assets/js/vendor/jquery-1.9.1.min.js"><\/script>')</script>
<script src="{{ site.url }}/assets/js/scripts.min.js"></script>
<script src="{{ site.url }}/assets/js/navigation.js"></script>
<script>
$(".content-toggle").each(function(index) {
var that = $(this);
var children = that.children();
for (i = 0; i < children.length; i++) {
for (i = 0; i < children.length; i++) {
if (i != 0) {
$(children[i]).hide();
}
@@ -18,10 +17,10 @@ $(".content-toggle").each(function(index) {
if (i == children.length - 1) {
nextId = 0;
}
$(children[i]).attr('nextId', nextId);
$(children[i]).click(function(event)
$(children[i]).click(function(event)
{
content = $(this);
content.hide();
+25 -30
View File
@@ -7,42 +7,37 @@
{% include head.html %}
</head>
<body>
<body id="post-index" {% if page.image.feature %}class="feature"{% endif %}>
{% include browser-upgrade.html %}
{% include navigation-top.html %}
{% include navigation.html %}
<div id="post-index" class="hpstr{% if page.image.feature %} feature{% endif %}">
<div class="entry-header">
{% if page.image.credit %}<div class="image-credit">Image source: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></div><!-- /.image-credit -->{% endif %}
{% if page.image.feature %}
<div class="entry-image">
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }}">
</div><!-- /.entry-image -->
{% endif %}
<div class="header-title">
<div class="header-title-wrap">
<h1>{{ site.title }}</h1>
<h2>{{ page.title }}</h2>
</div><!-- /.header-title-wrap -->
</div><!-- /.header-title -->
</div><!-- /.entry-header -->
<div class="entry-header">
{% if page.image.credit %}<div class="image-credit">Image source: <a href="{{ page.image.creditlink }}">{{ page.image.credit }}</a></div><!-- /.image-credit -->{% endif %}
{% if page.image.feature %}
<div class="entry-image">
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }}">
</div><!-- /.entry-image -->
{% endif %}
<div class="header-title">
<div class="header-title-wrap">
<h1>{{ site.title }}</h1>
<h2>{{ page.title }}</h2>
</div><!-- /.header-title-wrap -->
</div><!-- /.header-title -->
</div><!-- /.entry-header -->
<div id="main" role="main">
{{ content }}
</div><!-- /#main -->
<div id="main" role="main">
{{ content }}
</div><!-- /#main -->
<div class="footer-wrapper">
<footer role="contentinfo">
{% include footer.html %}
</footer>
</div><!-- /.footer-wrapper -->
<div class="footer-wrapper">
<footer role="contentinfo">
{% include footer.html %}
</footer>
</div><!-- /.footer-wrapper -->
</div>
{% include navigation-bottom.html %}
{% include scripts.html %}
{% include scripts.html %}
</body>
</html>
+50 -55
View File
@@ -7,67 +7,62 @@
{% include head.html %}
</head>
<body>
<body id="post" {% if page.image.feature %}class="feature"{% endif %}>
{% include browser-upgrade.html %}
{% include navigation-top.html %}
{% include navigation.html %}
<div id="post" class="hpstr{% if page.image.feature %} feature{% endif %}">
{% if page.image.feature %}
<div class="entry-header">
{% if page.image.credit %}<div class="image-credit">Image source: {% if page.image.creditlink %}<a href="{{ page.image.creditlink }}">{% endif %}{{ page.image.credit }}{% if page.image.creditlink %}</a>{% endif %}</div><!-- /.image-credit -->{% endif %}
<div class="entry-image">
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }}">
</div><!-- /.entry-image -->
</div><!-- /.entry-header -->
{% endif %}
{% if page.image.feature %}
<div class="entry-header">
{% if page.image.credit %}<div class="image-credit">Image source: {% if page.image.creditlink %}<a href="{{ page.image.creditlink }}">{% endif %}{{ page.image.credit }}{% if page.image.creditlink %}</a>{% endif %}</div><!-- /.image-credit -->{% endif %}
<div class="entry-image">
<img src="{{ site.url }}/images/{{ page.image.feature }}" alt="{{ page.title }}">
</div><!-- /.entry-image -->
</div><!-- /.entry-header -->
{% endif %}
<div id="main" role="main">
<article class="hentry">
<header class="header-title">
<div class="header-title-wrap">
{% if page.link %}
<h1 class="entry-title"><i class="fa fa-bookmark permalink"></i> <a href="{{ page.link }}">{{ page.title }}</a></h1>
{% else %}
<h1 class="entry-title"><a href="{{ site.url }}{{ page.url }}" rel="bookmark" title="{{ page.title }}">{{ page.title }}</a></h1>
{% endif %}
<h2><span class="entry-date date published"><time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %d, %Y" }}</time></span></h2>
{% if site.reading_time %}
<p class="entry-reading-time">
<i class="fa fa-clock-o"></i>
{% include read-time.html %}
</p><!-- /.entry-reading-time -->
{% else %}
<p class="entry-reading-time">
<i class="fa fa-pencil"></i>
Author: <a class="author" href="{{ page.author-link }}">{{ page.author }}</a>
</p><!-- /.entry-reading-time -->
{% endif %}
</div><!-- /.header-title-wrap -->
</header>
<div class="entry-content">
{{ content }}
<footer class="entry-meta">
{% if page.modified %}<span>Updated on <span class="entry-date date updated"><time datetime="{{ page.modified }}">{{ page.modified | date: "%B %d, %Y" }}</time></span></span>
<span class="author vcard"><span class="fn">{{ site.owner.name }}</span></span>{% endif %}
{% if page.share != false %}{% include social-share.html %}{% endif %}
</footer>
</div><!-- /.entry-content -->
{% if page.comments != false and site.disqus_shortname %}<section id="disqus_thread"></section><!-- /#disqus_thread -->{% endif %}
{% if site.related_posts.size > 0 %}{% include read-more.html %}{% endif %}
</article>
</div><!-- /#main -->
<div id="main" role="main">
<article class="hentry">
<header class="header-title">
<div class="header-title-wrap">
{% if page.link %}
<h1 class="entry-title"><i class="fa fa-bookmark permalink"></i> <a href="{{ page.link }}">{{ page.title }}</a></h1>
{% else %}
<h1 class="entry-title"><a href="{{ site.url }}{{ page.url }}" rel="bookmark" title="{{ page.title }}">{{ page.title }}</a></h1>
{% endif %}
<h2><span class="entry-date date published"><time datetime="{{ page.date | date_to_xmlschema }}">{{ page.date | date: "%B %d, %Y" }}</time></span></h2>
{% if site.reading_time %}
<p class="entry-reading-time">
<i class="fa fa-clock-o"></i>
{% include read-time.html %}
</p><!-- /.entry-reading-time -->
{% else %}
<p class="entry-reading-time">
<i class="fa fa-pencil"></i>
Author: <a class="author" href="{{ page.author-link }}">{{ page.author }}</a>
</p><!-- /.entry-reading-time -->
{% endif %}
</div><!-- /.header-title-wrap -->
</header>
<div class="entry-content">
{{ content }}
<footer class="entry-meta">
{% if page.modified %}<span>Updated on <span class="entry-date date updated"><time datetime="{{ page.modified }}">{{ page.modified | date: "%B %d, %Y" }}</time></span></span>
<span class="author vcard"><span class="fn">{{ site.owner.name }}</span></span>{% endif %}
{% if page.share != false %}{% include social-share.html %}{% endif %}
</footer>
</div><!-- /.entry-content -->
{% if page.comments != false and site.disqus_shortname %}<section id="disqus_thread"></section><!-- /#disqus_thread -->{% endif %}
{% if site.related_posts.size > 0 %}{% include read-more.html %}{% endif %}
</article>
</div><!-- /#main -->
<div class="footer-wrapper">
<footer role="contentinfo">
{% include footer.html %}
</footer>
</div><!-- /.footer-wrapper -->
<div class="footer-wrapper">
<footer role="contentinfo">
{% include footer.html %}
</footer>
</div><!-- /.footer-wrapper -->
</div>
{% include navigation-bottom.html %}
{% include scripts.html %}
</body>
@@ -1,58 +0,0 @@
---
layout: post
title: "Parameter or Argument?"
description: "What's the difference between a parameter and an argument? And how do I remember which one is what?"
modified: 2016-07-14
author: Malte Langkabel
author-link: http://www.maltelangkabel.com/
image:
feature: post_background.png
---
I often hear people getting confused when talking about parameters and arguments. That confusion grows even stronger when one of them knows the difference but the other one doesn't. So let's shed some light on this issue and spread the knowledge! Programming involves talking to each other but that doesn't have to be more painful than it already is ;)
A [**Parameter**](http://eel.is/c++draft/defns.argument) is a variable in the signature of a function declaration or definition:
```plaintext
void function(int parameter) {
// do something
}
```
An [**Argument**](http://eel.is/c++draft/defns.parameter) is the value that gets passed to the function when calling it:
```plaintext
function(argument);
```
Before knowing that difference I just used each of these terms when talking about any of these concepts. But now that each concept has its own term, talking about programming makes a lot more sense: When someone writes about a function argument I immediately know that code gets executed, but when someone talks about a parameter I know that he's looking at some declaration or definition!
And here's the 2nd best part: **Its quite simple to remember which one is what.** Just keep in mind that there is something called a **default argument** which is used when no real argument is specified.
The 1st best part is that this concept doesn't only apply to functions and methods! In C++ it also applies to templates! Don't worry, we won't be digging deeply into templates here.
A **Template Parameter** is a placeholder in declaration of a template:
```plaintext
template <typename TemplateParameter>
class TemplateClass
{
};
```
A **Template Argument** is the actual value or type that is used to instantiate that template:
```plaintext
TemplateClass<TemplateArgument> templateClass;
```
Following the example set by functions and methods one can also provide a **Template Default Argument** that specifies which value or type should be used when instantiating the template with no argument provided!
Even though these terms apply for C and C like languages, please note that other programming languages may have other terms to differentiate between these concepts.
<br />
___
**Edit:** Added links to the definition of the terms Parameter and Argument in the latest C++ draft. Added the above note regarding other languages. Added a semicolon to complete the syntax of the template class example ;)
-4
View File
@@ -1,5 +1,3 @@
.hpstr {
hr {
display: block;
margin: 1em 0;
@@ -10,8 +8,6 @@ hr {
border-bottom: 1px solid #fff;
}
}
// Figures and images
// --------------------------------------------------
figure {
-120
View File
@@ -1,120 +0,0 @@
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 300;
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGCD5K6T8I4oZ1X3Xvlj_UeP3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 300;
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGDOFnJNygIkrHciC8BWzbCz3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 300;
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGCP2LEk6lMzYsRqr3dHFImA.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/ODelI1aHBYDBqgeIAH2zlCxe5Tewm2_XWfbGchcXw4g.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/ODelI1aHBYDBqgeIAH2zlIa1YDtoarzwSXxTHggEXMw.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/ODelI1aHBYDBqgeIAH2zlJbPFduIYtoLzwST68uhz_Y.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGMms7UHsIbjUxEJqIwog-i_3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGO4s1Ux4PuImWPk5fSr6HPL3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGJkF8H8ye47wsfpWywda8og.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 300;
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightIt'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/fpTVHK8qsXbIeTHTrnQH6B_gmbEOuTnFVLOcZ03JXzUU24FapfJwyacJ6xNu5rm9.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 300;
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightIt'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/fpTVHK8qsXbIeTHTrnQH6I592LlB3Spcld5cOzjZxycU24FapfJwyacJ6xNu5rm9.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 300;
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightIt'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/fpTVHK8qsXbIeTHTrnQH6KWfmYpLTwMIZXVESxMi2BP3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 400;
src: local('Source Sans Pro Italic'), local('SourceSansPro-It'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/M2Jd71oPJhLKp0zdtTvoM-hx0s8EczIZ6Z1k6LZjTLo.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 400;
src: local('Source Sans Pro Italic'), local('SourceSansPro-It'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/M2Jd71oPJhLKp0zdtTvoMyVjDpjOAxwEYJFCET2nD1s.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 400;
src: local('Source Sans Pro Italic'), local('SourceSansPro-It'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/M2Jd71oPJhLKp0zdtTvoM2Sl3jWJ3D9poyJPMfASioc.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
File diff suppressed because one or more lines are too long
+1 -6
View File
@@ -61,18 +61,13 @@ body {
color: lighten($base-color,20);
}
.author {
color: $white !important;
color: $white;
text-decoration: none;
&:hover {
text-decoration: underline;
}
}
}
.feature {
position: relative;
}
.feature .header-title {
position: absolute;
top: 0;
+9 -13
View File
@@ -1,14 +1,14 @@
// Selection
// --------------------------------------------------
::-moz-selection {
background-color: lighten($base-color, 65%);
color: $base-color;
text-shadow: none;
}
::selection {
background-color: lighten($base-color, 65%);
color: $base-color;
text-shadow: none;
::-moz-selection {
background-color: lighten($base-color, 65%);
color: $base-color;
text-shadow: none;
}
::selection {
background-color: lighten($base-color, 65%);
color: $base-color;
text-shadow: none;
}
// Global Classes
@@ -49,12 +49,8 @@
}
}
.hpstr {
// Global Transition
// ---------------------------------------------------
b, i, strong, em, blockquote, p, q, span, figure, img, h1, h2, header, input, a {
@include transition(all .2s ease);
}
}
+15 -16
View File
@@ -1,8 +1,9 @@
// Body
// --------------------------------------------------
.hpstr {
body {
font-family: $base-font;
color: $text-color;
}
// Headings
// --------------------------------------------------
@@ -18,22 +19,22 @@ h1 {
// Links
// --------------------------------------------------
a {
a {
text-decoration: none;
color: $link-color;
&:visited {
color: lighten($link-color, 20);
color: $link-color;
&:visited {
color: lighten($link-color, 20);
}
&:hover {
&:hover {
color: darken($link-color, 20);
}
&:focus {
outline: thin dotted;
color: darken($link-color, 20);
}
&:focus {
outline: thin dotted;
color: darken($link-color, 20);
}
&:hover,
&:active {
outline: 0;
&:hover,
&:active {
outline: 0;
}
}
@@ -96,7 +97,7 @@ tt, code, kbd, samp, pre {
font-family: $code-font;
}
p,
li {
li {
code {
@include font-rem(12);
line-height: 1.5;
@@ -122,5 +123,3 @@ pre {
@include rounded(4px);
}
}
}
+1 -3
View File
@@ -26,6 +26,4 @@ sitemap: false
@import "elements";
@import "animations";
@import "dl-menu";
@import "page";
@import "navigation-font";
@import "navigation";
@import "page";
File diff suppressed because one or more lines are too long
-120
View File
@@ -1,120 +0,0 @@
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 300;
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGCD5K6T8I4oZ1X3Xvlj_UeP3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 300;
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGDOFnJNygIkrHciC8BWzbCz3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 300;
src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGCP2LEk6lMzYsRqr3dHFImA.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/ODelI1aHBYDBqgeIAH2zlCxe5Tewm2_XWfbGchcXw4g.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/ODelI1aHBYDBqgeIAH2zlIa1YDtoarzwSXxTHggEXMw.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 400;
src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/ODelI1aHBYDBqgeIAH2zlJbPFduIYtoLzwST68uhz_Y.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGMms7UHsIbjUxEJqIwog-i_3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGO4s1Ux4PuImWPk5fSr6HPL3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: normal;
font-weight: 700;
src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/toadOcfmlt9b38dHJxOBGJkF8H8ye47wsfpWywda8og.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 300;
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightIt'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/fpTVHK8qsXbIeTHTrnQH6B_gmbEOuTnFVLOcZ03JXzUU24FapfJwyacJ6xNu5rm9.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 300;
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightIt'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/fpTVHK8qsXbIeTHTrnQH6I592LlB3Spcld5cOzjZxycU24FapfJwyacJ6xNu5rm9.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 300;
src: local('Source Sans Pro Light Italic'), local('SourceSansPro-LightIt'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/fpTVHK8qsXbIeTHTrnQH6KWfmYpLTwMIZXVESxMi2BP3rGVtsTkPsbDajuO5ueQw.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
/* vietnamese */
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 400;
src: local('Source Sans Pro Italic'), local('SourceSansPro-It'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/M2Jd71oPJhLKp0zdtTvoM-hx0s8EczIZ6Z1k6LZjTLo.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
/* latin-ext */
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 400;
src: local('Source Sans Pro Italic'), local('SourceSansPro-It'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/M2Jd71oPJhLKp0zdtTvoMyVjDpjOAxwEYJFCET2nD1s.woff2) format('woff2');
unicode-range: U+0100-024F, U+1E00-1EFF, U+20A0-20AB, U+20AD-20CF, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
font-family: 'Source Sans Pro';
font-style: italic;
font-weight: 400;
src: local('Source Sans Pro Italic'), local('SourceSansPro-It'), url(https://fonts.gstatic.com/s/sourcesanspro/v9/M2Jd71oPJhLKp0zdtTvoM2Sl3jWJ3D9poyJPMfASioc.woff2) format('woff2');
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2212, U+2215, U+E0FF, U+EFFD, U+F000;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

+1 -45
View File
@@ -438,9 +438,7 @@
</div>
<h2>On Linux</h2>
<p>Download Coati.tar.gz file and extract it. To start Coati run the Coati.sh script. Coati creates a folder ~/.config/coati at the first run, this is the folder for Coati settings.
To Install Coati run the setup/install.sh Script with sudo, it will install Coati to /opt/coati and
create /usr/bin/coati symlink.</p>
<p>Download Coati.tar.gz file and extract it. To start Coati run the Coati.sh script. Coati creates a folder ~/.config/coati at the first run, this is the folder for Coati settings.</p>
<h2>Data folder</h2>
<p>The data folder holds certain files that are used by Coati to run the program. After following the <a href="#INSTALLATION">installation instructions</a> the data folder should be located in the following locations on your platform.</p>
@@ -1417,48 +1415,6 @@
<h3>Vim</h3>
<p>Please visit the <a href="https://github.com/CoatiSoftware/vim-coati">vim-coati</a> repository on Github for details.</p>
<h3>Eclipse</h3>
<strong>Installation</strong>
<p>
<ol>
<li>In Eclipse go in the menu to <code>Help -&gt; Install new Software...</code></li>
<li>Add the Coati Updatesite</li>
<ul>
<li>type <a
href="https://CoatiSoftware.github.io/eCoati/updatesite">https://CoatiSoftware.github.io/eCoati/updatesite</a>
into the <code>Work with:</code> field</li>
<li>or press <code>Add...</code> and add the address above</li>
</ul>
<li>Select all and finish the next step.</li>
<li>Eclipse needs to restart and can now communicate with Eclipse.</li>
</ol>
</p>
<strong>Use</strong>
<p>If you want Eclipse to activate a certain element in Coati, right-click that element to bring up the context menu and choose the “Set active Token” option.</p>
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<img src="img/plugin_use_in_eclipse.png" style="width:100%;">
</div>
</div>
<h3>Clion/IntelliJ</h3>
<strong>Installation</strong>
<p>
<ol>
<li>Go to File -&gt; Settings</li>
<li>Plugins -&gt; Browser Repositories</li>
<li>Search for coati</li>
<li>Install idea-coati</li>
</p>
<strong>Use</strong>
<p>If you want IntelliJ/CLion to activate a certain element in Coati, right-click that element to
bring up the context menu and choose the “Sent Location” option.</p>
<div class="row">
<div class="col-sm-8 col-sm-offset-2">
<img src="img/plugin_use_in_clion.png" style="width:100%;">
</div>
</div>
<h3>Visual Studio</h3>
<strong>Installation</strong>
<p>To install the Coati plugin for any version of Visual Studio, just execute the corresponding vsix file located in your <code>ide_plugins/visual_studio</code>.</p>