robmcmullen-apple2/src/gui/gui.h

68 lines
1.3 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>
#include <list>
2007-05-29 02:37:11 +00:00
class Menu; // Now *this* should work, since we've got pointers...
class MenuItems;
class Element;
2007-05-29 02:37:11 +00:00
class GUI
{
public:
GUI(SDL_Surface *);
~GUI();
void AddMenuTitle(const char *);
void AddMenuItem(const char *, Element * (* a)(void) = NULL, SDL_Scancode k = SDL_SCANCODE_UNKNOWN);
2007-05-29 02:37:11 +00:00
void CommitItemsToMenu(void);
void Run(void);
void Stop(void);
private:
// Menu * mainMenu;
2007-05-29 02:37:11 +00:00
MenuItems * menuItem;
std::list<Element *> windowList;
2007-05-29 02:37:11 +00:00
bool exitGUI;
bool showMouse;
SDL_Rect mouse, oldMouse;
2007-05-29 02:37:11 +00:00
};
class GUI2
{
public:
GUI2();
~GUI2();
// Everything else is a class method...
static void Init(SDL_Renderer *);
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);
2013-10-10 03:21:44 +00:00
static void HandleIconSelection(SDL_Renderer *);
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;
2013-10-10 03:21:44 +00:00
// static SDL_Rect olSrc;
static SDL_Rect olDst;
2013-10-10 03:21:44 +00:00
// static bool sidebarOut;
static int sidebarState;
static int32_t dx;
2013-10-10 03:21:44 +00:00
static int32_t iconSelected;
};
2007-05-29 02:37:11 +00:00
#endif // __GUI_H__