You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1020 B
33 lines
1020 B
#ifndef __SDL_CORE_WIDGET_HEADER__
|
|
#define __SDL_CORE_WIDGET_HEADER__
|
|
|
|
#include "../gui_sdl.h"
|
|
#include "coreStyleTemplate.h"
|
|
|
|
class sdlCoreWidget{
|
|
protected:
|
|
sdlCoreWidget * m_pParent;
|
|
classGUI_SDL * m_pGUI;
|
|
SDL_Rect m_sRect;
|
|
sdlColorStyle m_sColorStyle;
|
|
pWidgetVector m_vWidgets;
|
|
SDL_Texture * m_pWidgetTexture;
|
|
bool m_bNoDecoration;
|
|
bool m_bRedraw;
|
|
void requerstUpdate(void);
|
|
virtual void draw(SDL_Renderer *pRenderer){};
|
|
SDL_Texture * getWidgetTexture(void){ return m_pWidgetTexture; };
|
|
public:
|
|
explicit sdlCoreWidget(int x, int y, int width, int height, sdlCoreWidget * pParent = NULL);
|
|
virtual ~sdlCoreWidget();
|
|
void render(SDL_Renderer *pRenderer);
|
|
SDL_Rect * getBoundRect(void){ return &m_sRect; };
|
|
virtual void dispatch(SDL_Event *pEvt){};
|
|
void setColorStyle(sdlColorStyle style);
|
|
virtual void hide(){};
|
|
void addWidget(sdlCoreWidget *tPtr);
|
|
void setDecoraion(bool A){ m_bNoDecoration = !A; };
|
|
};
|
|
|
|
|
|
#endif
|