Commit a2951281 authored by Lars Hamann's avatar Lars Hamann Committed by Lars Hamann

new signal GtkCList::resize_column. don't draw invisible columns

Wed Oct  7 00:59:46 1998  Lars Hamann  <lars@gtk.org>

        * gtk/gtkclist.h: new signal GtkCList::resize_column.
        * gtk/gtkclist.c (draw_row): don't draw invisible columns
        (size_allocate_title_buttons) (size_allocate_columns):
        skip invisible columns
        (new_column_width): take min/max_width into account
        (gtk_clist_button_release) (gtk_clist_motion):
        changes due to changed new_column_width function
        (LIST_WIDTH): changed define to inline function.
        (real_resize_column): class function for resize_column signal
        (gtk_clist_motion): fixed autoscrolling for column resizes
        (gtk_clist_set_column_visibility): don't hide last visible column,
        changed visible arg to gboolean
        (gtk_clist_set_column_min_width)(gtk_clist_set_column_max_width):
        new functions : set min/max width of a column
        (gtk_clist_set_column_resizeable): new function : enable/disable
        column resize operations by mouse

        * gtk/gtkctree.c (draw_row): don't draw invisible columns
        (ctree_is_hot_spot): return FALSE if tree_column is invisible
        (draw_xor_line)  (draw_xor_rect): draw full rectangle/line if
        tree_column is invisible
        (gtk_ctree_find_all_by_row_data)
        (gtk_ctree_find_all_by_row_data_custom):  new function from
        Ronan Bourlier <ronan@radioss.com>. Returns a GList of all
        GtkCTreeNodes with row->data == data.
parent c3a163b0
Wed Oct 7 00:59:46 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h: new signal GtkCList::resize_column.
* gtk/gtkclist.c (draw_row): don't draw invisible columns
(size_allocate_title_buttons) (size_allocate_columns):
skip invisible columns
(new_column_width): take min/max_width into account
(gtk_clist_button_release) (gtk_clist_motion):
changes due to changed new_column_width function
(LIST_WIDTH): changed define to inline function.
(real_resize_column): class function for resize_column signal
(gtk_clist_motion): fixed autoscrolling for column resizes
(gtk_clist_set_column_visibility): don't hide last visible column,
changed visible arg to gboolean
(gtk_clist_set_column_min_width)(gtk_clist_set_column_max_width):
new functions : set min/max width of a column
(gtk_clist_set_column_resizeable): new function : enable/disable
column resize operations by mouse
* gtk/gtkctree.c (draw_row): don't draw invisible columns
(ctree_is_hot_spot): return FALSE if tree_column is invisible
(draw_xor_line) (draw_xor_rect): draw full rectangle/line if
tree_column is invisible
(gtk_ctree_find_all_by_row_data)
(gtk_ctree_find_all_by_row_data_custom): new function from
Ronan Bourlier <ronan@radioss.com>. Returns a GList of all
GtkCTreeNodes with row->data == data.
Tue Oct 6 14:05:00 1998 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (cb_tree_destroy_event): use g_free to free g_malloced
......
Wed Oct 7 00:59:46 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h: new signal GtkCList::resize_column.
* gtk/gtkclist.c (draw_row): don't draw invisible columns
(size_allocate_title_buttons) (size_allocate_columns):
skip invisible columns
(new_column_width): take min/max_width into account
(gtk_clist_button_release) (gtk_clist_motion):
changes due to changed new_column_width function
(LIST_WIDTH): changed define to inline function.
(real_resize_column): class function for resize_column signal
(gtk_clist_motion): fixed autoscrolling for column resizes
(gtk_clist_set_column_visibility): don't hide last visible column,
changed visible arg to gboolean
(gtk_clist_set_column_min_width)(gtk_clist_set_column_max_width):
new functions : set min/max width of a column
(gtk_clist_set_column_resizeable): new function : enable/disable
column resize operations by mouse
* gtk/gtkctree.c (draw_row): don't draw invisible columns
(ctree_is_hot_spot): return FALSE if tree_column is invisible
(draw_xor_line) (draw_xor_rect): draw full rectangle/line if
tree_column is invisible
(gtk_ctree_find_all_by_row_data)
(gtk_ctree_find_all_by_row_data_custom): new function from
Ronan Bourlier <ronan@radioss.com>. Returns a GList of all
GtkCTreeNodes with row->data == data.
Tue Oct 6 14:05:00 1998 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (cb_tree_destroy_event): use g_free to free g_malloced
......
Wed Oct 7 00:59:46 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h: new signal GtkCList::resize_column.
* gtk/gtkclist.c (draw_row): don't draw invisible columns
(size_allocate_title_buttons) (size_allocate_columns):
skip invisible columns
(new_column_width): take min/max_width into account
(gtk_clist_button_release) (gtk_clist_motion):
changes due to changed new_column_width function
(LIST_WIDTH): changed define to inline function.
(real_resize_column): class function for resize_column signal
(gtk_clist_motion): fixed autoscrolling for column resizes
(gtk_clist_set_column_visibility): don't hide last visible column,
changed visible arg to gboolean
(gtk_clist_set_column_min_width)(gtk_clist_set_column_max_width):
new functions : set min/max width of a column
(gtk_clist_set_column_resizeable): new function : enable/disable
column resize operations by mouse
* gtk/gtkctree.c (draw_row): don't draw invisible columns
(ctree_is_hot_spot): return FALSE if tree_column is invisible
(draw_xor_line) (draw_xor_rect): draw full rectangle/line if
tree_column is invisible
(gtk_ctree_find_all_by_row_data)
(gtk_ctree_find_all_by_row_data_custom): new function from
Ronan Bourlier <ronan@radioss.com>. Returns a GList of all
GtkCTreeNodes with row->data == data.
Tue Oct 6 14:05:00 1998 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (cb_tree_destroy_event): use g_free to free g_malloced
......
Wed Oct 7 00:59:46 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h: new signal GtkCList::resize_column.
* gtk/gtkclist.c (draw_row): don't draw invisible columns
(size_allocate_title_buttons) (size_allocate_columns):
skip invisible columns
(new_column_width): take min/max_width into account
(gtk_clist_button_release) (gtk_clist_motion):
changes due to changed new_column_width function
(LIST_WIDTH): changed define to inline function.
(real_resize_column): class function for resize_column signal
(gtk_clist_motion): fixed autoscrolling for column resizes
(gtk_clist_set_column_visibility): don't hide last visible column,
changed visible arg to gboolean
(gtk_clist_set_column_min_width)(gtk_clist_set_column_max_width):
new functions : set min/max width of a column
(gtk_clist_set_column_resizeable): new function : enable/disable
column resize operations by mouse
* gtk/gtkctree.c (draw_row): don't draw invisible columns
(ctree_is_hot_spot): return FALSE if tree_column is invisible
(draw_xor_line) (draw_xor_rect): draw full rectangle/line if
tree_column is invisible
(gtk_ctree_find_all_by_row_data)
(gtk_ctree_find_all_by_row_data_custom): new function from
Ronan Bourlier <ronan@radioss.com>. Returns a GList of all
GtkCTreeNodes with row->data == data.
Tue Oct 6 14:05:00 1998 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (cb_tree_destroy_event): use g_free to free g_malloced
......
Wed Oct 7 00:59:46 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h: new signal GtkCList::resize_column.
* gtk/gtkclist.c (draw_row): don't draw invisible columns
(size_allocate_title_buttons) (size_allocate_columns):
skip invisible columns
(new_column_width): take min/max_width into account
(gtk_clist_button_release) (gtk_clist_motion):
changes due to changed new_column_width function
(LIST_WIDTH): changed define to inline function.
(real_resize_column): class function for resize_column signal
(gtk_clist_motion): fixed autoscrolling for column resizes
(gtk_clist_set_column_visibility): don't hide last visible column,
changed visible arg to gboolean
(gtk_clist_set_column_min_width)(gtk_clist_set_column_max_width):
new functions : set min/max width of a column
(gtk_clist_set_column_resizeable): new function : enable/disable
column resize operations by mouse
* gtk/gtkctree.c (draw_row): don't draw invisible columns
(ctree_is_hot_spot): return FALSE if tree_column is invisible
(draw_xor_line) (draw_xor_rect): draw full rectangle/line if
tree_column is invisible
(gtk_ctree_find_all_by_row_data)
(gtk_ctree_find_all_by_row_data_custom): new function from
Ronan Bourlier <ronan@radioss.com>. Returns a GList of all
GtkCTreeNodes with row->data == data.
Tue Oct 6 14:05:00 1998 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (cb_tree_destroy_event): use g_free to free g_malloced
......
Wed Oct 7 00:59:46 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h: new signal GtkCList::resize_column.
* gtk/gtkclist.c (draw_row): don't draw invisible columns
(size_allocate_title_buttons) (size_allocate_columns):
skip invisible columns
(new_column_width): take min/max_width into account
(gtk_clist_button_release) (gtk_clist_motion):
changes due to changed new_column_width function
(LIST_WIDTH): changed define to inline function.
(real_resize_column): class function for resize_column signal
(gtk_clist_motion): fixed autoscrolling for column resizes
(gtk_clist_set_column_visibility): don't hide last visible column,
changed visible arg to gboolean
(gtk_clist_set_column_min_width)(gtk_clist_set_column_max_width):
new functions : set min/max width of a column
(gtk_clist_set_column_resizeable): new function : enable/disable
column resize operations by mouse
* gtk/gtkctree.c (draw_row): don't draw invisible columns
(ctree_is_hot_spot): return FALSE if tree_column is invisible
(draw_xor_line) (draw_xor_rect): draw full rectangle/line if
tree_column is invisible
(gtk_ctree_find_all_by_row_data)
(gtk_ctree_find_all_by_row_data_custom): new function from
Ronan Bourlier <ronan@radioss.com>. Returns a GList of all
GtkCTreeNodes with row->data == data.
Tue Oct 6 14:05:00 1998 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (cb_tree_destroy_event): use g_free to free g_malloced
......
Wed Oct 7 00:59:46 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h: new signal GtkCList::resize_column.
* gtk/gtkclist.c (draw_row): don't draw invisible columns
(size_allocate_title_buttons) (size_allocate_columns):
skip invisible columns
(new_column_width): take min/max_width into account
(gtk_clist_button_release) (gtk_clist_motion):
changes due to changed new_column_width function
(LIST_WIDTH): changed define to inline function.
(real_resize_column): class function for resize_column signal
(gtk_clist_motion): fixed autoscrolling for column resizes
(gtk_clist_set_column_visibility): don't hide last visible column,
changed visible arg to gboolean
(gtk_clist_set_column_min_width)(gtk_clist_set_column_max_width):
new functions : set min/max width of a column
(gtk_clist_set_column_resizeable): new function : enable/disable
column resize operations by mouse
* gtk/gtkctree.c (draw_row): don't draw invisible columns
(ctree_is_hot_spot): return FALSE if tree_column is invisible
(draw_xor_line) (draw_xor_rect): draw full rectangle/line if
tree_column is invisible
(gtk_ctree_find_all_by_row_data)
(gtk_ctree_find_all_by_row_data_custom): new function from
Ronan Bourlier <ronan@radioss.com>. Returns a GList of all
GtkCTreeNodes with row->data == data.
Tue Oct 6 14:05:00 1998 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (cb_tree_destroy_event): use g_free to free g_malloced
......
This diff is collapsed.
......@@ -192,60 +192,63 @@ struct _GtkCListClass
{
GtkContainerClass parent_class;
void (*select_row) (GtkCList *clist,
gint row,
gint column,
GdkEvent *event);
void (*unselect_row) (GtkCList *clist,
gint row,
gint column,
GdkEvent *event);
void (*click_column) (GtkCList *clist,
gint column);
void (*toggle_focus_row) (GtkCList *clist);
void (*select_all) (GtkCList *clist);
void (*unselect_all) (GtkCList *clist);
void (*undo_selection) (GtkCList *clist);
void (*start_selection) (GtkCList *clist);
void (*end_selection) (GtkCList *clist);
void (*extend_selection) (GtkCList *clist,
GtkScrollType scroll_type,
gfloat position,
gboolean auto_start_selection);
void (*scroll_horizontal) (GtkCList *clist,
GtkScrollType scroll_type,
gfloat position);
void (*scroll_vertical) (GtkCList *clist,
GtkScrollType scroll_type,
gfloat position);
void (*toggle_add_mode) (GtkCList *clist);
void (*abort_column_resize) (GtkCList *clist);
void (*resync_selection) (GtkCList *clist,
GdkEvent *event);
GList* (*selection_find) (GtkCList *clist,
gint row_number,
GList *row_list_element);
void (*draw_row) (GtkCList *clist,
GdkRectangle *area,
gint row,
GtkCListRow *clist_row);
void (*clear) (GtkCList *clist);
void (*fake_unselect_all) (GtkCList *clist,
gint row);
void (*sort_list) (GtkCList *clist);
gint (*insert_row) (GtkCList *clist,
gint row,
gchar *text[]);
void (*remove_row) (GtkCList *clist,
gint row);
void (*set_cell_contents) (GtkCList *clist,
GtkCListRow *clist_row,
gint column,
GtkCellType type,
const gchar *text,
guint8 spacing,
GdkPixmap *pixmap,
GdkBitmap *mask);
void (*select_row) (GtkCList *clist,
gint row,
gint column,
GdkEvent *event);
void (*unselect_row) (GtkCList *clist,
gint row,
gint column,
GdkEvent *event);
void (*click_column) (GtkCList *clist,
gint column);
void (*resize_column) (GtkCList *clist,
gint column,
gint width);
void (*toggle_focus_row) (GtkCList *clist);
void (*select_all) (GtkCList *clist);
void (*unselect_all) (GtkCList *clist);
void (*undo_selection) (GtkCList *clist);
void (*start_selection) (GtkCList *clist);
void (*end_selection) (GtkCList *clist);
void (*extend_selection) (GtkCList *clist,
GtkScrollType scroll_type,
gfloat position,
gboolean auto_start_selection);
void (*scroll_horizontal) (GtkCList *clist,
GtkScrollType scroll_type,
gfloat position);
void (*scroll_vertical) (GtkCList *clist,
GtkScrollType scroll_type,
gfloat position);
void (*toggle_add_mode) (GtkCList *clist);
void (*abort_column_resize) (GtkCList *clist);
void (*resync_selection) (GtkCList *clist,
GdkEvent *event);
GList* (*selection_find) (GtkCList *clist,
gint row_number,
GList *row_list_element);
void (*draw_row) (GtkCList *clist,
GdkRectangle *area,
gint row,
GtkCListRow *clist_row);
void (*clear) (GtkCList *clist);
void (*fake_unselect_all) (GtkCList *clist,
gint row);
void (*sort_list) (GtkCList *clist);
gint (*insert_row) (GtkCList *clist,
gint row,
gchar *text[]);
void (*remove_row) (GtkCList *clist,
gint row);
void (*set_cell_contents) (GtkCList *clist,
GtkCListRow *clist_row,
gint column,
GtkCellType type,
const gchar *text,
guint8 spacing,
GdkPixmap *pixmap,
GdkBitmap *mask);
gint scrollbar_spacing;
};
......@@ -259,10 +262,13 @@ struct _GtkCListColumn
GdkWindow *window;
gint width;
gint min_width;
gint max_width;
GtkJustification justification;
gint visible : 1;
gint width_set : 1;
gint visible : 1;
gint width_set : 1;
gint resizeable : 1;
};
struct _GtkCListRow
......@@ -357,7 +363,7 @@ GtkType gtk_clist_get_type (void);
/* constructers useful for gtk-- wrappers */
void gtk_clist_construct (GtkCList *clist,
gint columns,
gchar *titles[]);
gchar *titles[]);
/* create a new GtkCList */
GtkWidget *gtk_clist_new (gint columns);
......@@ -365,24 +371,24 @@ GtkWidget *gtk_clist_new_with_titles (gint columns,
gchar *titles[]);
/* set the border style of the clist */
void gtk_clist_set_border (GtkCList *clist,
GtkShadowType border);
void gtk_clist_set_border (GtkCList *clist,
GtkShadowType border);
/* set the clist's selection mode */
void gtk_clist_set_selection_mode (GtkCList *clist,
GtkSelectionMode mode);
void gtk_clist_set_selection_mode (GtkCList *clist,
GtkSelectionMode mode);
/* set policy on the scrollbar, to either show them all the time
* or show them only when they are needed, ie., when there is more than one page
* of information
* or show them only when they are needed, ie., when there is more
* than one page of information
*/
void gtk_clist_set_policy (GtkCList *clist,
GtkPolicyType vscrollbar_policy,
GtkPolicyType hscrollbar_policy);
void gtk_clist_set_policy (GtkCList *clist,
GtkPolicyType vscrollbar_policy,
GtkPolicyType hscrollbar_policy);
/* freeze all visual updates of the list, and then thaw the list after you have made
* a number of changes and the updates wil occure in a more efficent mannor than if
* you made them on a unfrozen list
/* freeze all visual updates of the list, and then thaw the list after
* you have made a number of changes and the updates wil occure in a
* more efficent mannor than if you made them on a unfrozen list
*/
void gtk_clist_freeze (GtkCList *clist);
void gtk_clist_thaw (GtkCList *clist);
......@@ -402,11 +408,6 @@ void gtk_clist_column_title_passive (GtkCList *clist,
void gtk_clist_column_titles_active (GtkCList *clist);
void gtk_clist_column_titles_passive (GtkCList *clist);
/* set visibility of a column */
void gtk_clist_set_column_visibility (GtkCList *clist,
gint column,
gint visible);
/* set the title in the column title button */
void gtk_clist_set_column_title (GtkCList *clist,
gint column,
......@@ -418,9 +419,19 @@ void gtk_clist_set_column_widget (GtkCList *clist,
GtkWidget *widget);
/* set the justification on a column */
void gtk_clist_set_column_justification (GtkCList *clist,
gint column,
GtkJustification justification);
void gtk_clist_set_column_justification (GtkCList *clist,
gint column,
GtkJustification justification);
/* set visibility of a column */
void gtk_clist_set_column_visibility (GtkCList *clist,
gint column,
gboolean visible);
/* enable/disable column resize operations by mouse */
void gtk_clist_set_column_resizeable (GtkCList *clist,
gint column,
gboolean resizeable);
/* set the pixel width of a column; this is a necessary step in
* creating a CList because otherwise the column width is chozen from
......@@ -430,17 +441,24 @@ void gtk_clist_set_column_width (GtkCList *clist,
gint column,
gint width);
/* set column minimum/maximum width. min/max_width < 0 => no restriction */
void gtk_clist_set_column_min_width (GtkCList *clist,
gint column,
gint min_width);
void gtk_clist_set_column_max_width (GtkCList *clist,
gint column,
gint max_width);
/* change the height of the rows, the default is the hight
* of the current font
*/
void gtk_clist_set_row_height (GtkCList *clist,
gint height);
/* scroll the viewing area of the list to the given column
* and row; row_align and col_align are between 0-1 representing the
* location the row should appear on the screnn, 0.0 being top or left,
* 1.0 being bottom or right; if row or column is -1 then then there
* is no change
/* scroll the viewing area of the list to the given column and row;
* row_align and col_align are between 0-1 representing the location the
* row should appear on the screnn, 0.0 being top or left, 1.0 being
* bottom or right; if row or column is -1 then then there is no change
*/
void gtk_clist_moveto (GtkCList *clist,
gint row,
......@@ -466,10 +484,10 @@ void gtk_clist_set_text (GtkCList *clist,
/* for the "get" functions, any of the return pointer can be
* NULL if you are not interested
*/
gint gtk_clist_get_text (GtkCList *clist,
gint row,
gint column,
gchar **text);
gint gtk_clist_get_text (GtkCList *clist,
gint row,
gint column,
gchar **text);
/* sets a given cell's pixmap, replacing it's current contents */
void gtk_clist_set_pixmap (GtkCList *clist,
......@@ -493,13 +511,13 @@ void gtk_clist_set_pixtext (GtkCList *clist,
GdkPixmap *pixmap,
GdkBitmap *mask);
gint gtk_clist_get_pixtext (GtkCList *clist,
gint row,
gint column,
gchar **text,
guint8 *spacing,
GdkPixmap **pixmap,
GdkBitmap **mask);
gint gtk_clist_get_pixtext (GtkCList *clist,
gint row,
gint column,
gchar **text,
guint8 *spacing,
GdkPixmap **pixmap,
GdkBitmap **mask);
/* sets the foreground color of a row, the colar must already
* be allocated
......@@ -516,8 +534,8 @@ void gtk_clist_set_background (GtkCList *clist,
GdkColor *color);
/* this sets a horizontal and vertical shift for drawing
* the contents of a cell; it can be positive or negitive; this is
* particulary useful for indenting items in a column
* the contents of a cell; it can be positive or negitive;
* this is particulary useful for indenting items in a column
*/
void gtk_clist_set_shift (GtkCList *clist,
gint row,
......@@ -540,8 +558,8 @@ gint gtk_clist_prepend (GtkCList *clist,
gint gtk_clist_append (GtkCList *clist,
gchar *text[]);
/* inserts a row at index row and returns the row where it was actually
* inserted (may be different from "row" in auto_sort mode)
/* inserts a row at index row and returns the row where it was
* actually inserted (may be different from "row" in auto_sort mode)
*/
gint gtk_clist_insert (GtkCList *clist,
gint row,
......@@ -557,10 +575,10 @@ void gtk_clist_set_row_data (GtkCList *clist,
gpointer data);
/* sets a data pointer for a given row with destroy notification */
void gtk_clist_set_row_data_full (GtkCList *clist,
gint row,
gpointer data,
GtkDestroyNotify destroy);
void gtk_clist_set_row_data_full (GtkCList *clist,
gint row,
gpointer data,
GtkDestroyNotify destroy);
/* returns the data set for a row */
gpointer gtk_clist_get_row_data (GtkCList *clist,
......@@ -585,8 +603,8 @@ void gtk_clist_unselect_row (GtkCList *clist,
/* undo the last select/unselect operation */
void gtk_clist_undo_selection (GtkCList *clist);
/* clear the entire list -- this is much faster than removing each item
* with gtk_clist_remove
/* clear the entire list -- this is much faster than removing
* each item with gtk_clist_remove
*/
void gtk_clist_clear (GtkCList *clist);
......@@ -617,8 +635,8 @@ void gtk_clist_set_sort_column (GtkCList *clist,
gint column);
/* how to sort : ascending or descending */
void gtk_clist_set_sort_type (GtkCList *clist,
GtkSortType sort_type);
void gtk_clist_set_sort_type (GtkCList *clist,
GtkSortType sort_type);
/* sort the list with the current compare function */
void gtk_clist_sort (GtkCList *clist);
......
......@@ -969,37 +969,41 @@ draw_xor_line (GtkCTree *ctree)
else
y = ROW_TOP_YPIXEL (clist, ctree->drag_row) - 1;
switch (clist->column[ctree->tree_column].justification)
{
case GTK_JUSTIFY_CENTER:
case GTK_JUSTIFY_FILL:
case GTK_JUSTIFY_LEFT:
if (ctree->tree_column > 0)
gdk_draw_line (clist->clist_window, ctree->xor_gc,
COLUMN_LEFT_XPIXEL(clist, 0), y,
COLUMN_LEFT_XPIXEL(clist, ctree->tree_column - 1) +
clist->column[ctree->tree_column - 1].area.width, y);
if (clist->column[ctree->tree_column].visible)
switch (clist->column[ctree->tree_column].justification)
{
case GTK_JUSTIFY_CENTER:
case GTK_JUSTIFY_FILL:
case GTK_JUSTIFY_LEFT:
if (ctree->tree_column > 0)
gdk_draw_line (clist->clist_window, ctree->xor_gc,
COLUMN_LEFT_XPIXEL(clist, 0), y,
COLUMN_LEFT_XPIXEL(clist, ctree->tree_column - 1) +
clist->column[ctree->tree_column - 1].area.width, y);
gdk_draw_line (clist->clist_window, ctree->xor_gc,
COLUMN_LEFT_XPIXEL(clist, ctree->tree_column) +
ctree->tree_indent * level -
(ctree->tree_indent - PM_SIZE) / 2, y,
GTK_WIDGET (ctree)->allocation.width, y);
break;
case GTK_JUSTIFY_RIGHT:
if (ctree->tree_column < clist->columns - 1)
gdk_draw_line (clist->clist_window, ctree->xor_gc,
COLUMN_LEFT_XPIXEL(clist, ctree->tree_column + 1), y,
COLUMN_LEFT_XPIXEL(clist, clist->columns - 1) +
clist->column[clist->columns - 1].area.width, y);
COLUMN_LEFT_XPIXEL(clist, ctree->tree_column) +
ctree->tree_indent * level -
(ctree->tree_indent - PM_SIZE) / 2, y,
GTK_WIDGET (ctree)->allocation.width, y);
break;
case GTK_JUSTIFY_RIGHT:
if (ctree->tree_column < clist->columns - 1)
gdk_draw_line (clist->clist_window, ctree->xor_gc,
COLUMN_LEFT_XPIXEL(clist, ctree->tree_column + 1), y,
COLUMN_LEFT_XPIXEL(clist, clist->columns - 1) +
clist->column[clist->columns - 1].area.width, y);
gdk_draw_line (clist->clist_window, ctree->xor_gc,
0, y, COLUMN_LEFT_XPIXEL(clist, ctree->tree_column)
+ clist->column[ctree->tree_column].area.width
- ctree->tree_indent * level +
(ctree->tree_indent - PM_SIZE) / 2, y);
break;
}
gdk_draw_line (clist->clist_window, ctree->xor_gc,
0, y, COLUMN_LEFT_XPIXEL(clist, ctree->tree_column)
+ clist->column[ctree->tree_column].area.width -
ctree->tree_indent * level +
(ctree->tree_indent - PM_SIZE) / 2, y);
break;
}
else
gdk_draw_line (clist->clist_window, ctree->xor_gc,
0, y, clist->clist_window_width, y);
}
static void
......@@ -1017,77 +1021,84 @@ draw_xor_rect (GtkCTree *ctree)
y = ROW_TOP_YPIXEL (clist, ctree->drag_row) + clist->row_height;
switch (clist->column[ctree->tree_column].justification)
{
case GTK_JUSTIFY_CENTER:
case GTK_JUSTIFY_FILL:
case GTK_JUSTIFY_LEFT:
points[0].x = COLUMN_LEFT_XPIXEL(clist, ctree->tree_column) +
ctree->tree_indent * level - (ctree->tree_indent - PM_SIZE) / 2;
points[0].y = y;
points[3].x = points[0].x;
points[3].y = y - clist->row_height - 1;
points[1].x = clist->clist_window_width - 1;
points[1].y = points[0].y;
points[2].x = points[1].x;
points[2].y = points[3].y;
for (i = 0; i < 3; i++)
gdk_draw_line (clist->clist_window, ctree->xor_gc,
points[i].x, points[i].y, points[i+1].x, points[i+1].y);
if (ctree->tree_column > 0)
{
points[0].x = COLUMN_LEFT_XPIXEL(clist, ctree->tree_column - 1) +
clist->column[ctree->tree_column - 1].area.width ;
points[0].y = y;
points[3].x = points[0].x;
points[3].y = y - clist->row_height - 1;
points[1].x = 0;
points[1].y = points[0].y;
points[2].x = 0;
points[2].y = points[3].y;
for (i = 0; i < 3; i++)
gdk_draw_line (clist->clist_window, ctree->xor_gc,
points[i].x, points[i].y, points[i+1].x,
points[i+1].y);
}
break;
case GTK_JUSTIFY_RIGHT:
points[0].x = COLUMN_LEFT_XPIXEL(clist, ctree->tree_column) -
ctree->tree_indent * level + (ctree->tree_indent - PM_SIZE) / 2 +
clist->column[ctree->tree_column].area.width;
points[0].y = y;
points[3].x = points[0].x;
points[3].y = y - clist->row_height - 1;
points[1].x = 0;
points[1].y = points[0].y;
points[2].x = 0;
points[2].y = points[3].y;
for (i = 0; i < 3; i++)
gdk_draw_line (clist->clist_window, ctree->xor_gc,
points[i].x, points[i].y, points[i+1].x, points[i+1].y);
if (ctree->tree_column < clist->columns - 1)
{
points[0].x = COLUMN_LEFT_XPIXEL(clist, ctree->tree_column + 1);
points[0].y = y;
points[3].x = points[0].x;
points[3].y = y - clist->row_height - 1;
points[1].x = clist->clist_window_width - 1;
points[1].y = points[0].y;
points[2].x = points[1].x;
points[2].y = points[3].y;
for (i = 0; i < 3; i++)
gdk_draw_line (clist->clist_window, ctree->xor_gc,
points[i].x, points[i].y, points[i+1].x,
points[i+1].y);
}
break;
}
if (clist->column[ctree->tree_column].visible)
switch (clist->column[ctree->tree_column].justification)
{
case GTK_JUSTIFY_CENTER:
case GTK_JUSTIFY_FILL:
case GTK_JUSTIFY_LEFT:
points[0].x = COLUMN_LEFT_XPIXEL(clist, ctree->tree_column) +
ctree->tree_indent * level - (ctree->tree_indent - PM_SIZE) / 2;
points[0].y = y;
points[3].x = points[0].x;
points[3].y = y - clist->row_height - 1;
points[1].x = clist->clist_window_width - 1;
points[1].y = points[0].y;
points[2].x = points[1].x;
points[2].y = points[3].y;
for (i = 0; i < 3; i++)
gdk_draw_line (clist->clist_window, ctree->xor_gc,
points[i].x, points[i].y,
points[i+1].x, points[i+1].y);
if (ctree->tree_column > 0)
{
points[0].x = COLUMN_LEFT_XPIXEL(clist, ctree->tree_column - 1) +
clist->column[ctree->tree_column - 1].area.width ;
points[0].y = y;
points[3].x = points[0].x;
points[3].y = y - clist->row_height - 1;
points[1].x = 0;
points[1].y = points[0].y;
points[2].x = 0;
points[2].y = points[3].y;
for (i = 0; i < 3; i++)
gdk_draw_line (clist->clist_window, ctree->xor_gc,