Store project style settings in VCS.
I'm sick of getting my settings stomped on every god damn time I open CLion.
This commit is contained in:
parent
187ff6cb01
commit
fd6e0c6899
|
@ -1,7 +1,7 @@
|
||||||
.cmake
|
.cmake
|
||||||
.idea
|
|
||||||
.trunk
|
.trunk
|
||||||
.vc
|
.vc
|
||||||
|
.vs
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
*.a
|
*.a
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
|
@ -0,0 +1,29 @@
|
||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<code_scheme name="Project" version="173">
|
||||||
|
<Objective-C>
|
||||||
|
<option name="FUNCTION_BRACE_PLACEMENT" value="2" />
|
||||||
|
</Objective-C>
|
||||||
|
<files>
|
||||||
|
<extensions>
|
||||||
|
<pair source="cc" header="h" fileNamingConvention="PASCAL_CASE" />
|
||||||
|
<pair source="c" header="h" fileNamingConvention="NONE" />
|
||||||
|
<pair source="cu" header="cuh" fileNamingConvention="NONE" />
|
||||||
|
<pair source="ixx" header="" fileNamingConvention="NONE" />
|
||||||
|
<pair source="mxx" header="" fileNamingConvention="NONE" />
|
||||||
|
<pair source="cppm" header="" fileNamingConvention="NONE" />
|
||||||
|
<pair source="ccm" header="" fileNamingConvention="NONE" />
|
||||||
|
<pair source="cxxm" header="" fileNamingConvention="NONE" />
|
||||||
|
<pair source="c++m" header="" fileNamingConvention="NONE" />
|
||||||
|
</extensions>
|
||||||
|
</files>
|
||||||
|
<codeStyleSettings language="ObjectiveC">
|
||||||
|
<option name="ALIGN_GROUP_FIELD_DECLARATIONS" value="true" />
|
||||||
|
<indentOptions>
|
||||||
|
<option name="INDENT_SIZE" value="8" />
|
||||||
|
<option name="CONTINUATION_INDENT_SIZE" value="4" />
|
||||||
|
<option name="TAB_SIZE" value="8" />
|
||||||
|
<option name="USE_TAB_CHARACTER" value="true" />
|
||||||
|
</indentOptions>
|
||||||
|
</codeStyleSettings>
|
||||||
|
</code_scheme>
|
||||||
|
</component>
|
|
@ -0,0 +1,5 @@
|
||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
|
||||||
|
</state>
|
||||||
|
</component>
|
|
@ -0,0 +1,2 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module classpath="CMake" type="CPP_MODULE" version="4" />
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
|
||||||
|
<component name="CidrRootsConfiguration">
|
||||||
|
<libraryRoots>
|
||||||
|
<file path="$PROJECT_DIR$/ext" />
|
||||||
|
</libraryRoots>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/kge.iml" filepath="$PROJECT_DIR$/.idea/kge.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -44,20 +44,20 @@ anonymousName()
|
||||||
|
|
||||||
|
|
||||||
Buffer::Buffer()
|
Buffer::Buffer()
|
||||||
: name(anonymousName()), path(std::nullopt), file(std::nullopt)
|
: name(anonymousName())
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Buffer::Buffer(std::string fName)
|
Buffer::Buffer(std::string fName)
|
||||||
: name(std::move(fName)), path(std::nullopt), file(std::nullopt)
|
: name(std::move(fName))
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Buffer::Buffer(std::string fName, std::string fPath)
|
Buffer::Buffer(std::string fName, std::string fPath)
|
||||||
: name(std::move(fName)), path(std::move(fPath)), file(std::nullopt)
|
: name(std::move(fName)), path(std::move(fPath))
|
||||||
{
|
{
|
||||||
if (this->path) {
|
if (this->path) {
|
||||||
this->file = OptFile(File(this->path.value()));
|
this->file = OptFile(File(this->path.value()));
|
||||||
|
|
3
Buffer.h
3
Buffer.h
|
@ -9,10 +9,12 @@
|
||||||
#define KEPP_FRAME_H
|
#define KEPP_FRAME_H
|
||||||
|
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "Defs.h"
|
#include "Defs.h"
|
||||||
#include "File.h"
|
#include "File.h"
|
||||||
|
#include "Cursor.h"
|
||||||
|
|
||||||
|
|
||||||
typedef std::vector<std::vector<uint8_t>> BufferContents;
|
typedef std::vector<std::vector<uint8_t>> BufferContents;
|
||||||
|
@ -50,6 +52,7 @@ private:
|
||||||
std::string name;
|
std::string name;
|
||||||
OptString path;
|
OptString path;
|
||||||
OptFile file;
|
OptFile file;
|
||||||
|
Cursor cursor;
|
||||||
BufferContents contents;
|
BufferContents contents;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,8 @@ set(BUILD_GUI OFF CACHE BOOL "Disable building the graphical version.")
|
||||||
|
|
||||||
if (CMAKE_HOST_UNIX)
|
if (CMAKE_HOST_UNIX)
|
||||||
message(STATUS "Build system is POSIX.")
|
message(STATUS "Build system is POSIX.")
|
||||||
|
else ()
|
||||||
|
message(STATUS "Build system is NOT POSIX.")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
|
@ -67,11 +69,13 @@ set(SOURCE_FILES
|
||||||
|
|
||||||
add_executable(ke main.cc ${SOURCE_FILES} ${HEADER_FILES})
|
add_executable(ke main.cc ${SOURCE_FILES} ${HEADER_FILES})
|
||||||
|
|
||||||
|
if (CMAKE_HOST_UNIX)
|
||||||
add_custom_target(manpages)
|
add_custom_target(manpages)
|
||||||
configure_file(docs/ke.md ke.1.scdoc @ONLY)
|
configure_file(docs/ke.md ke.1.scdoc @ONLY)
|
||||||
add_custom_command(TARGET manpages COMMAND scdoc < ke.1.scdoc > ke.1
|
add_custom_command(TARGET manpages COMMAND scdoc < ke.1.scdoc > ke.1
|
||||||
OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/ke.1)
|
OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/ke.1)
|
||||||
add_dependencies(ke manpages)
|
add_dependencies(ke manpages)
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (${BUILD_GUI})
|
if (${BUILD_GUI})
|
||||||
configure_file(resources/kge.desktop.in kge.desktop @ONLY)
|
configure_file(resources/kge.desktop.in kge.desktop @ONLY)
|
||||||
|
@ -79,12 +83,14 @@ if(${BUILD_GUI})
|
||||||
target_link_libraries(kge imgui)
|
target_link_libraries(kge imgui)
|
||||||
add_dependencies(kge ke)
|
add_dependencies(kge ke)
|
||||||
|
|
||||||
|
if (CMAKE_HOST_UNIX)
|
||||||
configure_file(docs/kge.md kge.1.scdoc @ONLY)
|
configure_file(docs/kge.md kge.1.scdoc @ONLY)
|
||||||
add_custom_command(TARGET manpages COMMAND scdoc < kge.1.scdoc > kge.1
|
add_custom_command(TARGET manpages COMMAND scdoc < kge.1.scdoc > kge.1
|
||||||
OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/kge.1)
|
OUTPUTS ${CMAKE_CURRENT_BINARY_DIR}/kge.1)
|
||||||
|
|
||||||
add_dependencies(kge manpages)
|
add_dependencies(kge manpages)
|
||||||
endif ()
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
#######################
|
#######################
|
||||||
### INSTALL TARGETS ###
|
### INSTALL TARGETS ###
|
||||||
|
|
3
Cursor.h
3
Cursor.h
|
@ -32,7 +32,8 @@
|
||||||
/// Cursors represent a position in a Buffer.
|
/// Cursors represent a position in a Buffer.
|
||||||
class Cursor {
|
class Cursor {
|
||||||
public:
|
public:
|
||||||
Cursor(size_t _x, size_t _y) : x(_x), y(_y) {};
|
Cursor() : x(0), y(0) {}
|
||||||
|
Cursor(size_t _x, size_t _y) : x(_x), y(_y) {}
|
||||||
|
|
||||||
size_t X() const { return this->x; }
|
size_t X() const { return this->x; }
|
||||||
size_t Y() const { return this->y; }
|
size_t Y() const { return this->y; }
|
||||||
|
|
Loading…
Reference in New Issue