#ifndef __CURSES_FORM_H
#define __CURSES_FORM_H
#include <ncurses.h>
#include <panel.h>
#include "curses_widget.h"
struct curses_form {
struct curses_widget *widget_head;
struct curses_widget *widget_tail;
struct curses_widget *widget_focus;
PANEL *pan;
WINDOW *win;
unsigned int left;
unsigned int top;
unsigned int height;
unsigned int width;
unsigned int x_offset;
unsigned int y_offset;
unsigned int int_width;
unsigned int int_height;
unsigned int want_x;
unsigned int want_y;
char *title;
void *userdata;
int cleanup;
char *help_text;
};
struct dfui_connection;
struct curses_form *curses_form_new(const char *);
void curses_form_free(struct curses_form *);
struct curses_widget *curses_form_widget_add(struct curses_form *,
unsigned int, unsigned int,
unsigned int, widget_t,
const char *,
unsigned int, unsigned int);
struct curses_widget *curses_form_widget_insert_after(struct curses_widget *,
unsigned int, unsigned int,
unsigned int, widget_t,
const char *,
unsigned int, unsigned int);
void curses_form_widget_remove(struct curses_widget *);
struct curses_widget *curses_form_widget_at(struct curses_form *,
unsigned int, unsigned int);
int curses_form_widget_first_row(struct curses_form *);
int curses_form_widget_last_row(struct curses_form *);
struct curses_widget *curses_form_widget_first_on_row(struct curses_form *,
unsigned int);
struct curses_widget *curses_form_widget_closest_on_row(struct curses_form *,
unsigned int, unsigned int);
int curses_form_widget_count_above(struct curses_form *,
struct curses_widget *);
int curses_form_widget_count_below(struct curses_form *,
struct curses_widget *);
int curses_form_descriptive_labels_add(struct curses_form *,
const char *, unsigned int, unsigned int, unsigned int);
void curses_form_finalize(struct curses_form *);
void curses_form_draw(struct curses_form *);
void curses_form_refresh(struct curses_form *);
void curses_form_focus_skip_forward(struct curses_form *);
void curses_form_focus_skip_backward(struct curses_form *);
void curses_form_advance(struct curses_form *);
void curses_form_retreat(struct curses_form *);
void curses_form_advance_row(struct curses_form *);
void curses_form_retreat_row(struct curses_form *);
void curses_form_scroll_to(struct curses_form *, unsigned int, unsigned int);
void curses_form_scroll_delta(struct curses_form *, int, int);
int curses_form_widget_is_visible(struct curses_widget *);
void curses_form_widget_ensure_visible(struct curses_widget *);
struct curses_widget *curses_form_frob(struct curses_form *);
struct curses_widget *curses_form_frob_with_callbacks(struct curses_form *, struct dfui_connection *);
int cb_click_close_form(struct curses_widget *);
#endif