diff options
Diffstat (limited to 'src/ui/window.h')
-rw-r--r-- | src/ui/window.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/ui/window.h b/src/ui/window.h index b2b22e90..ad577ce4 100644 --- a/src/ui/window.h +++ b/src/ui/window.h | |||
@@ -56,6 +56,17 @@ struct Impl_WindowPlacement { | |||
56 | int lastHit; | 56 | int lastHit; |
57 | }; | 57 | }; |
58 | 58 | ||
59 | enum iWindowSplit { | ||
60 | vertical_WindowSplit = iBit(1), | ||
61 | oneToTwo_WindowSplit = iBit(2), | ||
62 | twoToOne_WindowSplit = iBit(3), | ||
63 | equal_WindowSplit = oneToTwo_WindowSplit | twoToOne_WindowSplit, | ||
64 | /* meta */ | ||
65 | mode_WindowSplit = vertical_WindowSplit | equal_WindowSplit, | ||
66 | mask_WindowSplit = equal_WindowSplit, | ||
67 | merge_WindowSplit = iBit(10), | ||
68 | }; | ||
69 | |||
59 | struct Impl_Window { | 70 | struct Impl_Window { |
60 | SDL_Window * win; | 71 | SDL_Window * win; |
61 | iWindowPlacement place; | 72 | iWindowPlacement place; |
@@ -67,6 +78,8 @@ struct Impl_Window { | |||
67 | uint32_t focusGainedAt; | 78 | uint32_t focusGainedAt; |
68 | SDL_Renderer *render; | 79 | SDL_Renderer *render; |
69 | iInt2 size; | 80 | iInt2 size; |
81 | int splitMode; | ||
82 | int pendingSplitMode; | ||
70 | iRoot * roots[2]; /* root widget and UI state; second one is for split mode */ | 83 | iRoot * roots[2]; /* root widget and UI state; second one is for split mode */ |
71 | iRoot * keyRoot; /* root that has the current keyboard input focus */ | 84 | iRoot * keyRoot; /* root that has the current keyboard input focus */ |
72 | iWidget * hover; | 85 | iWidget * hover; |
@@ -98,6 +111,7 @@ iBool setKeyRoot_Window (iWindow *, iRoot *root); | |||
98 | void setCursor_Window (iWindow *, int cursor); | 111 | void setCursor_Window (iWindow *, int cursor); |
99 | void setSnap_Window (iWindow *, int snapMode); | 112 | void setSnap_Window (iWindow *, int snapMode); |
100 | void setKeyboardHeight_Window(iWindow *, int height); | 113 | void setKeyboardHeight_Window(iWindow *, int height); |
114 | void setSplitMode_Window (iWindow *, int splitMode); | ||
101 | void showToolbars_Window (iWindow *, iBool show); | 115 | void showToolbars_Window (iWindow *, iBool show); |
102 | iBool postContextClick_Window (iWindow *, const SDL_MouseButtonEvent *); | 116 | iBool postContextClick_Window (iWindow *, const SDL_MouseButtonEvent *); |
103 | 117 | ||
@@ -112,6 +126,7 @@ uint32_t frameTime_Window (const iWindow *); | |||
112 | SDL_Renderer *renderer_Window (const iWindow *); | 126 | SDL_Renderer *renderer_Window (const iWindow *); |
113 | int snap_Window (const iWindow *); | 127 | int snap_Window (const iWindow *); |
114 | iBool isFullscreen_Window (const iWindow *); | 128 | iBool isFullscreen_Window (const iWindow *); |
129 | int numRoots_Window (const iWindow *); | ||
115 | iRoot * findRoot_Window (const iWindow *, const iWidget *widget); | 130 | iRoot * findRoot_Window (const iWindow *, const iWidget *widget); |
116 | iRoot * otherRoot_Window (const iWindow *, iRoot *root); | 131 | iRoot * otherRoot_Window (const iWindow *, iRoot *root); |
117 | 132 | ||