-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5b8438
commit cd5a32a
Showing
7 changed files
with
471 additions
and
10 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
#pragma once | ||
|
||
#include <karm-base/opt.h> | ||
|
||
namespace Vaev { | ||
|
||
// https://drafts.csswg.org/css-page/#marks | ||
enum struct PageMarks { | ||
NONE, | ||
CROSS, | ||
BOX, | ||
|
||
_LEN, | ||
}; | ||
|
||
// https://drafts.csswg.org/css-page/#margin-boxes | ||
#define FOREACH_PAGE_MARGIN(ITER) \ | ||
ITER(TOP, "top") \ | ||
ITER(TOP_LEFT_CORNER, "top-left-corner") \ | ||
ITER(TOP_LEFT, "top-left") \ | ||
ITER(TOP_CENTER, "top-center") \ | ||
ITER(TOP_RIGHT, "top-right") \ | ||
ITER(TOP_RIGHT_CORNER, "top-right-corner") \ | ||
ITER(RIGHT, "right") \ | ||
ITER(RIGHT_TOP, "right-top") \ | ||
ITER(RIGHT_MIDDLE, "right-middle") \ | ||
ITER(RIGHT_BOTTOM, "right-bottom") \ | ||
ITER(BOTTOM, "bottom") \ | ||
ITER(BOTTOM_RIGHT_CORNER, "bottom-right-corner") \ | ||
ITER(BOTTOM_RIGHT, "bottom-right") \ | ||
ITER(BOTTOM_CENTER, "bottom-center") \ | ||
ITER(BOTTOM_LEFT, "bottom-left") \ | ||
ITER(BOTTOM_LEFT_CORNER, "bottom-left-corner") \ | ||
ITER(LEFT, "left") \ | ||
ITER(LEFT_BOTTOM, "left-bottom") \ | ||
ITER(LEFT_MIDDLE, "left-middle") \ | ||
ITER(LEFT_TOP, "left-top") | ||
|
||
enum struct PageMargin { | ||
#define ITER(ID, ...) ID, | ||
FOREACH_PAGE_MARGIN(ITER) | ||
#undef ITER | ||
_LEN, | ||
}; | ||
|
||
// https://drafts.csswg.org/css-page/#page-orientation-prop | ||
enum struct PageOrientation { | ||
UPRIGHT, | ||
ROTATE_LEFT, | ||
ROTATE_RIGHT, | ||
|
||
_LEN | ||
}; | ||
|
||
struct Page { | ||
Opt<PageMargin> margin; | ||
}; | ||
|
||
} // namespace Vaev |
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
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
Oops, something went wrong.