robmcmullen-apple2/src/gui/gui.h

59 lines
1.8 KiB
C
Raw Normal View History

2007-05-29 02:37:11 +00:00
//
// GUI.H
//
// Graphical User Interface support
//
#ifndef __GUI_H__
#define __GUI_H__
#include <SDL2/SDL.h>
enum { SBS_SHOWING, SBS_HIDING, SBS_SHOWN, SBS_HIDDEN };
2007-05-29 02:37:11 +00:00
class GUI
{
public:
GUI();
2007-05-29 02:37:11 +00:00
~GUI();
// Everything else is a class method...
static void Init(SDL_Renderer *);
2013-10-11 20:10:47 +00:00
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);
2013-10-10 03:21:44 +00:00
static void HandleIconSelection(SDL_Renderer *);
2013-10-12 03:13:08 +00:00
static void AssembleDriveIcon(SDL_Renderer *, int);
static void DrawEjectButton(SDL_Renderer *, int);
static void DrawNewDiskButton(SDL_Renderer *, int);
2013-10-12 03:13:08 +00:00
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);
2013-10-10 03:21:44 +00:00
static void DrawSidebarIcons(SDL_Renderer *);
static void Render(SDL_Renderer *);
// Class variables...
static SDL_Texture * overlay;
static SDL_Rect olDst;
static int sidebarState;
static int32_t dx;
2013-10-10 03:21:44 +00:00
static int32_t iconSelected;
2013-10-13 20:22:19 +00:00
static bool hasKeyboardFocus;
2014-03-27 17:46:00 +00:00
static bool powerOnState;
private:
static SDL_Texture * charStamp;
static uint32_t stamp[];
};
2007-05-29 02:37:11 +00:00
#endif // __GUI_H__