forked from sumatrapdfreader/sumatrapdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDisplayMode.h
37 lines (31 loc) · 1.13 KB
/
DisplayMode.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* Copyright 2021 the SumatraPDF project authors (see AUTHORS file).
License: Simplified BSD (see COPYING.BSD) */
struct FileState;
enum class DisplayMode {
// automatic means: the continuous form of single page, facing or
// book view - depending on the document's desired PageLayout
Automatic = 0,
SinglePage,
Facing,
BookView,
Continuous,
ContinuousFacing,
ContinuousBookView,
};
#define ZOOM_FIT_PAGE -1.f
#define ZOOM_FIT_WIDTH -2.f
#define ZOOM_FIT_CONTENT -3.f
#define ZOOM_ACTUAL_SIZE 100.0f
#define ZOOM_MAX 6400.f /* max zoom in % */
#define ZOOM_MIN 8.33f /* min zoom in % */
#define INVALID_ZOOM -99.0f
constexpr int INVALID_PAGE_NO = -1;
bool IsSingle(DisplayMode mode);
bool IsContinuous(DisplayMode mode);
bool IsFacing(DisplayMode mode);
bool IsBookView(DisplayMode mode);
bool IsValidZoom(float zoomLevel);
const char* DisplayModeToString(DisplayMode mode);
DisplayMode DisplayModeFromString(const char* s, DisplayMode defVal);
float ZoomFromString(const char* s, float defVal);
void ZoomToString(char** dst, float zoom, FileState* stateForIssue2140);