6 #include "passthrough.h" 10 #include <sigc++/connection.h> 22 static const int EXPAND=0x1, SHRINK=0x2, FILL=0x4;
23 static const int ALIGN_LEFT=0x8, ALIGN_RIGHT=0x10;
24 static const int ALIGN_CENTER=ALIGN_LEFT|ALIGN_RIGHT;
25 static const int IGNORE_SIZE_REQUEST=0x20;
33 int row_start, col_start;
36 int row_span, col_span;
46 int request_w, request_h;
48 sigc::connection shown_conn, hidden_conn;
51 bool expand_x:1, expand_y:1;
56 bool fill_x:1, fill_y:1;
59 bool shrink_x:1, shrink_y:1;
64 bool align_left_x:1, align_left_y:1, align_right_x:1, align_right_y:1;
69 bool ignore_size_x:1, ignore_size_y:1;
71 child_info(
const widget_ref &_w,
int _row_start,
int _col_start,
72 int _row_span,
int _col_span,
int xopts,
int yopts,
73 sigc::connection &_shown_conn, sigc::connection &_hidden_conn);
76 bool lies_on_axis(
const child_info &base,
83 typedef std::list<child_info> childlist;
91 childlist::iterator focus;
97 void calc_dimensions();
110 void hide_widget_bare(
widget &w);
112 void show_widget_bare(
widget &w);
119 void get_row_contents(std::vector<std::vector<child_info *> > row_contents);
126 void get_col_contents(std::vector<std::vector<child_info *> > col_contents);
128 void alloc_ideal_widths(std::vector<int> &col_sizes);
129 void expand_widths(std::vector<int> &col_sizes,
int target_w);
130 void shrink_widths(std::vector<int> &col_sizes,
int target_w);
131 void alloc_ideal_heights(std::vector<int> &row_sizes,
132 const std::vector<int> &col_sizes);
133 void expand_heights(std::vector<int> &row_sizes,
int target_h);
134 void shrink_heights(std::vector<int> &row_sizes,
int target_h);
135 void alloc_child_sizes(
const std::vector<int> &col_sizes,
136 const std::vector<int> &row_sizes);
144 childlist::iterator find_best_focus(childlist::iterator start,
164 void add_widget_opts(
const widget_ref &w,
int row_start,
int col_start,
int row_span,
int col_span,
int xopts,
int yopts);
165 void add_widget_opts_bare(
widget &w,
int row_start,
int col_start,
int row_span,
int col_span,
int xopts,
int yopts);
167 void add_widget(
const widget_ref &w,
int row_start,
int col_start,
int row_span=1,
int col_span=1,
bool expand=
true,
bool shrink=
true);
168 void add_widget_bare(
widget &w,
int row_start,
int col_start,
int row_span=1,
int col_span=1,
bool expand=
true,
bool shrink=
true);
175 void focus_widget_bare(
widget &w);
205 void dispatch_mouse(
short id,
int x,
int y,
int z, mmask_t bstate);
208 static void init_bindings();