Example #1
0
static void
e_reflow_init (EReflow *reflow)
{
	reflow->model                     = NULL;
	reflow->items                     = NULL;
	reflow->heights                   = NULL;
	reflow->count                     = 0;

	reflow->columns                   = NULL;
	reflow->column_count              = 0;

	reflow->empty_text                = NULL;
	reflow->empty_message             = NULL;

	reflow->minimum_width             = 10;
	reflow->width                     = 10;
	reflow->height                    = 10;

	reflow->column_width              = 150;

	reflow->column_drag               = FALSE;

	reflow->need_height_update        = FALSE;
	reflow->need_column_resize        = FALSE;
	reflow->need_reflow_columns       = FALSE;

	reflow->maybe_did_something       = FALSE;
	reflow->maybe_in_drag             = FALSE;

	reflow->default_cursor_shown      = TRUE;
	reflow->arrow_cursor              = NULL;
	reflow->default_cursor            = NULL;

	reflow->cursor_row                = -1;

	reflow->incarnate_idle_id         = 0;
	reflow->do_adjustment_idle_id     = 0;
	reflow->set_scroll_adjustments_id = 0;

	reflow->selection                 = E_SELECTION_MODEL (e_selection_model_simple_new());
	reflow->sorter                    = e_sorter_array_new (er_compare, reflow);

	g_object_set (reflow->selection,
		      "sorter", reflow->sorter,
		      NULL);

	reflow->selection_changed_id =
		g_signal_connect(reflow->selection, "selection_changed",
				 G_CALLBACK (selection_changed), reflow);
	reflow->selection_row_changed_id =
		g_signal_connect(reflow->selection, "selection_row_changed",
				 G_CALLBACK (selection_row_changed), reflow);
	reflow->cursor_changed_id =
		g_signal_connect(reflow->selection, "cursor_changed",
				 G_CALLBACK (cursor_changed), reflow);

	e_canvas_item_set_reflow_callback(GNOME_CANVAS_ITEM(reflow), e_reflow_reflow);
}
Example #2
0
static void
e_minicard_label_init (EMinicardLabel *minicard_label)
{
  minicard_label->width = 10;
  minicard_label->height = 10;
  minicard_label->rect = NULL;
  minicard_label->fieldname = NULL;
  minicard_label->field = NULL;

  minicard_label->max_field_name_length = -1;

  e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM (minicard_label), e_minicard_label_reflow);
}
static void
etgc_init (ETableGroupContainer *container)
{
	container->children = NULL;

	e_canvas_item_set_reflow_callback (GNOME_CANVAS_ITEM(container), etgc_reflow);

	container->alternating_row_colors = 1;
	container->horizontal_draw_grid = 1;
	container->vertical_draw_grid = 1;
	container->draw_focus = 1;
	container->cursor_mode = E_CURSOR_SIMPLE;
	container->length_threshold = -1;
	container->selection_model = NULL;
	container->uniform_row_height = FALSE;
}