Move handling of buttons fully in gtktreeviewcolumn. This code is less

Thu Mar  1 19:50:56 2001  Jonathan Blandford  <jrb@redhat.com>

	* gtk/gtktreeviewcolumn.c (_gtk_tree_view_column_realize_button):
	Move handling of buttons fully in gtktreeviewcolumn.  This code is
	less interrelated then it was, but it still requires the
	GtkTreeView to map it.

	* test/testtreecolumn.c: Now I can add a column to one view,
	remove it, add it to the another view, remove it, then re-add it
	to the first.  Nifty.
This commit is contained in:
Jonathan Blandford
2001-03-02 00:49:32 +00:00
committed by Jonathan Blandford
parent addeb140ec
commit 193bed1896
16 changed files with 570 additions and 228 deletions

View File

@ -29,6 +29,25 @@ extern "C" {
#include <gtk/gtktreeselection.h>
#include <gtk/gtkrbtree.h>
/* the width of the column resize windows */
#define TREE_VIEW_EXPANDER_WIDTH 14
#define TREE_VIEW_EXPANDER_HEIGHT 14
/* The TREE_VIEW_VERTICAL_SEPARATOR is the space between rows. The
* GTK_RBNODE_GET_HEIGHT() value includes the separators; the offset
* of each row points to the center of the inter-row space. For an odd
* separator, the extra pixel by convention goes _below_ the row. So
* a node in the rbtree owns TREE_VIEW_VERTICAL_SEPARATOR/2 pixels
* above the row, and TREE_VIEW_VERTICAL_SEPARATOR/2 +
* TREE_VIEW_VERTICAL_SEPARATOR%2 pixels below the row.
*/
#define TREE_VIEW_VERTICAL_SEPARATOR 2
#define TREE_VIEW_HORIZONTAL_SEPARATOR 0
#define TREE_VIEW_DRAG_WIDTH 6
typedef enum
{
GTK_TREE_VIEW_IS_LIST = 1 << 0,
@ -202,8 +221,13 @@ GtkTreePath *_gtk_tree_view_find_path (GtkTreeView *tree_v
void _gtk_tree_view_update_size (GtkTreeView *tree_view);
void _gtk_tree_view_column_set_tree_view (GtkTreeViewColumn *column,
GtkTreeView *tree_view);
void _gtk_tree_view_column_create_button (GtkTreeViewColumn *column);
void _gtk_tree_view_column_realize_button (GtkTreeViewColumn *column);
void _gtk_tree_view_column_unrealize_button (GtkTreeViewColumn *column);
void _gtk_tree_view_column_set_tree_view (GtkTreeViewColumn *column,
GtkTreeView *tree_view);
void _gtk_tree_view_column_unset_tree_view (GtkTreeViewColumn *column);
GtkTreeSelection* _gtk_tree_selection_new (void);
GtkTreeSelection* _gtk_tree_selection_new_with_tree_view (GtkTreeView *tree_view);