#ifndef GRID_H
#define GRID_H
#include "container.h"
#include <stdbool.h>
#include <cx/array_list.h>
typedef struct GridElm {
W32Widget *widget;
short x;
short y;
GridLayoutInfo layout;
} GridElm;
typedef struct GridLayoutInfo {
short margin_left;
short margin_right;
short margin_top;
short margin_bottom;
short colspan;
short rowspan;
short preferred_width;
short preferred_height;
bool hexpand;
bool vexpand;
bool hfill;
bool vfill;
} GridLayoutInfo;
typedef struct UiGridLayout {
HWND hwnd;
short padding;
short columnspacing;
short rowspacing;
CxList *widgets;
} UiGridLayout;
UiGridLayout* ui_grid_container(UiObject *obj,
HWND control,
short padding,
short columnspacing,
short rowspacing);
void ui_grid_add_widget(
UiGridLayout *grid,
short x,
short y,
W32Widget *widget,
GridLayoutInfo *layout);
void ui_grid_layout(UiGridLayout *grid);
#endif