20class API_AUI_VIEWS AGridLayout:
public ALayout
23 int mCurrentIndex = 0;
39 int& indexAt(
int x,
int y);
44 AGridLayout(
int cellsX,
int cellsY);
45 virtual ~AGridLayout() =
default;
48 return mCells.at(index).view;
51 void setViewAt(
size_t index,
_<AView> view) {
52 mCells.at(index).view = view;
55 void onResize(
int x,
int y,
int width,
int height)
override;
59 int getMinimumWidth()
override;
60 int getMinimumHeight()
override;
virtual void addView(const _< AView > &view, AOptional< size_t > index=std::nullopt)=0
Attaches view to the layout.
virtual void removeView(aui::no_escape< AView > view, size_t index)=0
Detaches view from the layout.
virtual AVector< _< AView > > getAllViews()=0
Visits all views in the layout.
Utility wrapper implementing the stack-allocated (fast) optional idiom.
Definition AOptional.h:32
A std::vector with AUI extensions.
Definition AVector.h:39
An std::weak_ptr with AUI extensions.
Definition SharedPtrTypes.h:178
Does not allow escaping, allowing to accept lvalue ref, rvalue ref, shared_ptr and etc without overhe...
Definition values.h:127