-
Notifications
You must be signed in to change notification settings - Fork 772
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add and use constexpr attribute names
- Loading branch information
1 parent
9ac958b
commit a374154
Showing
6 changed files
with
172 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
/* | ||
* Xournal++ | ||
* | ||
* contexpr names of the attributes used in .xoj and .xopp files | ||
* | ||
* @author Xournal++ Team | ||
* https://github.com/xournalpp/xournalpp | ||
* | ||
* @license GNU GPLv2 or later | ||
*/ | ||
|
||
#pragma once | ||
|
||
|
||
// Names of attributes | ||
namespace XmlAttrs { | ||
|
||
// xournal | ||
constexpr auto CREATOR = "creator"; | ||
constexpr auto VERSION = "version"; // also in MrWriter | ||
constexpr auto FILEVERSION = "fileversion"; | ||
|
||
// page | ||
constexpr auto WIDTH = "width"; // also in stroke | ||
constexpr auto HEIGHT = "height"; | ||
|
||
// background | ||
constexpr auto NAME = "name"; // also in layer | ||
constexpr auto TYPE = "type"; | ||
constexpr auto STYLE = "style"; // also in stroke | ||
constexpr auto CONFIG = "config"; | ||
constexpr auto COLOR = "color"; // also in stroke and text | ||
constexpr auto DOMAIN = "domain"; | ||
constexpr auto FILENAME = "filename"; | ||
constexpr auto PAGENO = "pageno"; | ||
|
||
// timestamp | ||
constexpr auto FN = "fn"; // also in stroke, text and audio | ||
constexpr auto TS = "ts"; // also in stroke and text | ||
|
||
// stroke | ||
constexpr auto TOOL = "tool"; | ||
constexpr auto PRESSURES = "pressures"; | ||
constexpr auto FILL = "fill"; | ||
constexpr auto CAPSTYLE = "capStyle"; | ||
|
||
// text | ||
constexpr auto FONT = "font"; | ||
constexpr auto SIZE = "size"; | ||
constexpr auto X = "x"; | ||
constexpr auto Y = "y"; | ||
|
||
// image | ||
constexpr auto LEFT = "left"; // also in teximage | ||
constexpr auto TOP = "top"; // also in teximage | ||
constexpr auto RIGHT = "right"; // also in teximage | ||
constexpr auto BOTTOM = "bottom"; // also in teximage | ||
|
||
// teximage | ||
constexpr auto TEXT = "text"; | ||
|
||
// attachment | ||
constexpr auto PATH = "path"; | ||
|
||
} // namespace XmlAttrs |
Oops, something went wrong.