justify/src/justify.h

41 lines
1.1 KiB
C++

/*
Copyright© 2022 John Sennesael
This file is part of justify.
Justify is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
Justify is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with Justify. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <string>
#include <vector>
using StrVector = std::vector<std::string>;
enum class Justification { CENTER, FILL, LEFT, RIGHT };
struct Settings
{
size_t cols{};
bool error{false};
size_t hspacing{2};
std::string inFile;
Justification justify{Justification::FILL};
size_t maxColHeight{};
std::string outFile;
wchar_t pageSepChar{0};
bool shouldExit{false};
size_t vspacing{1};
size_t width{};
};