Switch to gitea
This commit is contained in:
29
include/TessesFramework/SDL2/Views/VStackView.hpp
Normal file
29
include/TessesFramework/SDL2/Views/VStackView.hpp
Normal file
@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
#if defined(TESSESFRAMEWORK_ENABLE_SDL2)
|
||||
#include "../GUI.hpp"
|
||||
|
||||
namespace Tesses::Framework::SDL2::Views
|
||||
{
|
||||
class VStackView : public ContainerView {
|
||||
|
||||
std::vector<std::pair<int,std::pair<View*,bool>>> items;
|
||||
protected:
|
||||
virtual void OnDraw(SDL_Renderer* renderer, SDL_Rect& r);
|
||||
virtual bool OnEvent(SDL_Event& event, SDL_Rect& myBounds, SDL_Rect& visibleBounds);
|
||||
public:
|
||||
VStackView();
|
||||
int spacing=0;
|
||||
|
||||
void Add(int sz, View* view, bool owns=true);
|
||||
void Remove(View* view);
|
||||
void Clear();
|
||||
|
||||
virtual size_t ViewCount();
|
||||
virtual View* GetViewAt(size_t index);
|
||||
|
||||
virtual ~VStackView();
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user