]> Shamusworld >> Repos - apple2/blob - src/gui/gui.h
625b20c9ee0e536b54a5fb6d62444704e7ec0ecb
[apple2] / src / gui / gui.h
1 //
2 // GUI.H
3 //
4 // Graphical User Interface support
5 //
6
7 #ifndef __GUI_H__
8 #define __GUI_H__
9
10 #include <SDL2/SDL.h>
11
12 enum { SBS_SHOWING, SBS_HIDING, SBS_SHOWN, SBS_HIDDEN };
13
14 class GUI
15 {
16         public:
17                 GUI();
18                 ~GUI();
19
20                 // Everything else is a class method...
21                 static void Init(SDL_Renderer *);
22                 static SDL_Texture * CreateTexture(SDL_Renderer *, const void *);
23                 static void MouseDown(int32_t, int32_t, uint32_t);
24                 static void MouseUp(int32_t, int32_t, uint32_t);
25                 static void MouseMove(int32_t, int32_t, uint32_t);
26                 static void HandleIconSelection(SDL_Renderer *);
27                 static void AssembleDriveIcon(SDL_Renderer *, int);
28                 static void DrawEjectButton(SDL_Renderer *, int);
29                 static void DrawDriveLight(SDL_Renderer *, int);
30                 static void DrawCharArray(SDL_Renderer *, const char *, int x,
31                         int y, int w, int h, int r, int g, int b);
32                 static void HandleGUIState(void);
33                 static void DrawSidebarIcons(SDL_Renderer *);
34                 static void Render(SDL_Renderer *);
35
36                 // Class variables...
37                 static SDL_Texture * overlay;
38                 static SDL_Rect olDst;
39                 static int sidebarState;
40                 static int32_t dx;
41                 static int32_t iconSelected;
42                 static bool hasKeyboardFocus;
43                 static bool powerOnState;
44 };
45
46 #endif  // __GUI_H__
47