]> Shamusworld >> Repos - apple2/blobdiff - src/gui/gui.h
Docs were missing GPLv3. Thanks to schampailler for the heads up. :-)
[apple2] / src / gui / gui.h
index 8b8b9dfb565e78ef6b93117ac782612b0318984b..0dbf0dfffb8089e4ef544e4c15186fab63b241f4 100644 (file)
@@ -8,60 +8,51 @@
 #define __GUI_H__
 
 #include <SDL2/SDL.h>
-#include <list>
-
-class Menu;                                                                            // Now *this* should work, since we've got pointers...
-class MenuItems;
-class Element;
 
+enum { SBS_SHOWING, SBS_HIDING, SBS_SHOWN, SBS_HIDDEN };
 
 class GUI
 {
        public:
-               GUI(SDL_Surface *);
+               GUI();
                ~GUI();
-               void AddMenuTitle(const char *);
-               void AddMenuItem(const char *, Element * (* a)(void) = NULL, SDL_Scancode k = SDL_SCANCODE_UNKNOWN);
-               void CommitItemsToMenu(void);
-               void Run(void);
-               void Stop(void);
-
-       private:
-//             Menu * mainMenu;
-               MenuItems * menuItem;
-               std::list<Element *> windowList;
-               bool exitGUI;
-               bool showMouse;
-               SDL_Rect mouse, oldMouse;
-};
-
-
-class GUI2
-{
-       public:
-               GUI2();
-               ~GUI2();
 
                // Everything else is a class method...
                static void Init(SDL_Renderer *);
+               static SDL_Texture * CreateTexture(SDL_Renderer *, const void *);
                static void MouseDown(int32_t, int32_t, uint32_t);
                static void MouseUp(int32_t, int32_t, uint32_t);
                static void MouseMove(int32_t, int32_t, uint32_t);
+               static bool KeyDown(uint32_t);
                static void HandleIconSelection(SDL_Renderer *);
+               static void AssembleDriveIcon(SDL_Renderer *, int);
+               static void DrawEjectButton(SDL_Renderer *, int);
+               static void DrawNewDiskButton(SDL_Renderer *, int);
+               static void DrawDriveLight(SDL_Renderer *, int);
+               static void DrawCharArray(SDL_Renderer *, const char *, int x,
+                       int y, int w, int h, int r, int g, int b);
+               static void DrawCharacter(SDL_Renderer *, int, int, uint8_t, bool inv = false);
+               static void DrawCharacterVert(SDL_Renderer *, int, int, uint8_t, bool inv = false);
+               static void DrawString(SDL_Renderer *, int, int, const char *, bool inv = false);
+               static void DrawStringVert(SDL_Renderer *, int, int, const char *, bool inv = false);
+               static void DrawBox(SDL_Renderer *, int, int, int, int, int r = 0x00, int g = 0xAA, int b = 0x00);
                static void HandleGUIState(void);
                static void DrawSidebarIcons(SDL_Renderer *);
                static void Render(SDL_Renderer *);
 
                // Class variables...
                static SDL_Texture * overlay;
-//             static SDL_Rect olSrc;
                static SDL_Rect olDst;
-//             static bool sidebarOut;
                static int sidebarState;
                static int32_t dx;
                static int32_t iconSelected;
-};
+               static bool hasKeyboardFocus;
+               static bool powerOnState;
 
+       private:
+               static SDL_Texture * charStamp;
+               static uint32_t stamp[];
+};
 
 #endif // __GUI_H__