1998-01-03 03:31:03 +00:00
|
|
|
/* GTK - The GIMP Toolkit
|
|
|
|
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball, Josh MacDonald
|
|
|
|
* Copyright (C) 1997-1998 Jay Painter <jpaint@serv.net><jpaint@gimp.org>
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
1998-04-13 02:02:47 +00:00
|
|
|
* License along with this library; if not, write to the
|
|
|
|
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
* Boston, MA 02111-1307, USA.
|
1998-01-03 03:31:03 +00:00
|
|
|
*/
|
1999-02-24 07:37:18 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Modified by the GTK+ Team and others 1997-1999. See the AUTHORS
|
|
|
|
* file for a list of people on the GTK+ Team. See the ChangeLog
|
|
|
|
* files for a list of changes. These files are distributed with
|
|
|
|
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
|
|
|
*/
|
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
#ifndef __GTK_CLIST_H__
|
|
|
|
#define __GTK_CLIST_H__
|
|
|
|
|
|
|
|
#include <gdk/gdk.h>
|
|
|
|
#include <gtk/gtksignal.h>
|
|
|
|
#include <gtk/gtkalignment.h>
|
|
|
|
#include <gtk/gtklabel.h>
|
|
|
|
#include <gtk/gtkbutton.h>
|
|
|
|
#include <gtk/gtkhscrollbar.h>
|
|
|
|
#include <gtk/gtkvscrollbar.h>
|
1998-07-15 23:40:00 +00:00
|
|
|
#include <gtk/gtkenums.h>
|
1998-01-03 03:31:03 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
1998-09-03 07:28:37 +00:00
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
1998-01-03 03:31:03 +00:00
|
|
|
|
|
|
|
/* clist flags */
|
|
|
|
enum
|
|
|
|
{
|
removed clist flag : GTK_CLIST_DRAG_SELECTION added flags :
Tue Dec 15 22:30:44 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h :
removed clist flag : GTK_CLIST_DRAG_SELECTION
added flags : GTK_CLIST_REORDERABLE, GTK_CLIST_USE_DRAG_ICONS,
GTK_CLIST_DRAW_DRAG_LINE, GTK_CLIST_DRAW_DRAG_RECT
(GtkCListDragPos) : new enum for DND
(GtkButtonAction) : new enum of possible mouse button actions
(struct _GtkCList): added button_actions array.
Added drag_button and click_cell struct, to store cell and
mouse button of last button_press_event
(struct _GtkCListClass): new class method draw_drag_highlight.
(gtk_clist_set_reorderable) (gtk_clist_set_use_drag_icons) :
new functions. Moved from gtkctree.h. Now clist is reorderable
as well.
(gtk_clist_set_button_actions) new function to customize mouse
button actions.
* gtk/gtkclist.c:
(gtk_clist_drag_begin)
(gtk_clist_drag_motion)
(gtk_clist_drag_leave)
(gtk_clist_drag_end)
(gtk_clist_drag_drop)
(gtk_clist_drag_data_get)
(gtk_clist_drag_data_received) : new dnd widget methods to
implement clists reorderability via DND
(remove_grab) : new function. remove mouse grab if necessary.
(draw_drag_highlight) : new method. Draw dnd highlight depending
on clist flags GTK_CLIST_DRAW_DRAG_LINE and GTK_CLIST_DRAW_DRAG_RECT
(gtk_clist_class_init): added object args "reorderable" and
"use_drag_icons"
(gtk_clist_button_press) (gtk_clist_button_release) :
use button_actions array to decide which action to perform.
(gtk_clist_motion) : start reorder operation if necessary.
* gtk/gtkctree.h :
(struct _GtkCTree): removed drag_icon, icon_widht, icon_height,
drag_row, drag_source, drag_target, reorderable, use_icons,
in_drag, drag_rect
(gtk_ctree_set_reorderable) : deprecated function.
use gtk_clist_set_reorderable instead.
(gtk_ctree_set_use_drag_icons) : deprecated function.
use gtk_clist_set_use_drag_icons instead.
* gtk/gtkctree.c :
(gtk_ctree_class_init): removed object args "reorderable" and
and "use_drag_icons"
(draw_xor_line) (draw_xor_rect) (create_drag_icon) (check_cursor)
(tree_toggle_selection) (set_mouse_cursor) : removed
(draw_drag_highlight) : new clist method. replacement for
draw_xor_line and draw_xor_rect functions
(check_drag) renamed check_cursor function
(gtk_ctree_drag_begin)
(gtk_ctree_drag_motion)
(gtk_ctree_drag_data_received) : new dnd methods to implement ctrees
reorderability via DND
(gtk_ctree_button_release)
(gtk_ctree_button_motion) : removed.
* gtk/testgtk.c:
(create_clist) : added new reorderable toggle button
1998-12-16 01:28:31 +00:00
|
|
|
GTK_CLIST_IN_DRAG = 1 << 0,
|
|
|
|
GTK_CLIST_ROW_HEIGHT_SET = 1 << 1,
|
|
|
|
GTK_CLIST_SHOW_TITLES = 1 << 2,
|
|
|
|
GTK_CLIST_CHILD_HAS_FOCUS = 1 << 3,
|
|
|
|
GTK_CLIST_ADD_MODE = 1 << 4,
|
|
|
|
GTK_CLIST_AUTO_SORT = 1 << 5,
|
|
|
|
GTK_CLIST_AUTO_RESIZE_BLOCKED = 1 << 6,
|
|
|
|
GTK_CLIST_REORDERABLE = 1 << 7,
|
|
|
|
GTK_CLIST_USE_DRAG_ICONS = 1 << 8,
|
|
|
|
GTK_CLIST_DRAW_DRAG_LINE = 1 << 9,
|
|
|
|
GTK_CLIST_DRAW_DRAG_RECT = 1 << 10
|
1998-01-03 03:31:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* cell types */
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GTK_CELL_EMPTY,
|
|
|
|
GTK_CELL_TEXT,
|
|
|
|
GTK_CELL_PIXMAP,
|
|
|
|
GTK_CELL_PIXTEXT,
|
|
|
|
GTK_CELL_WIDGET
|
|
|
|
} GtkCellType;
|
|
|
|
|
removed clist flag : GTK_CLIST_DRAG_SELECTION added flags :
Tue Dec 15 22:30:44 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h :
removed clist flag : GTK_CLIST_DRAG_SELECTION
added flags : GTK_CLIST_REORDERABLE, GTK_CLIST_USE_DRAG_ICONS,
GTK_CLIST_DRAW_DRAG_LINE, GTK_CLIST_DRAW_DRAG_RECT
(GtkCListDragPos) : new enum for DND
(GtkButtonAction) : new enum of possible mouse button actions
(struct _GtkCList): added button_actions array.
Added drag_button and click_cell struct, to store cell and
mouse button of last button_press_event
(struct _GtkCListClass): new class method draw_drag_highlight.
(gtk_clist_set_reorderable) (gtk_clist_set_use_drag_icons) :
new functions. Moved from gtkctree.h. Now clist is reorderable
as well.
(gtk_clist_set_button_actions) new function to customize mouse
button actions.
* gtk/gtkclist.c:
(gtk_clist_drag_begin)
(gtk_clist_drag_motion)
(gtk_clist_drag_leave)
(gtk_clist_drag_end)
(gtk_clist_drag_drop)
(gtk_clist_drag_data_get)
(gtk_clist_drag_data_received) : new dnd widget methods to
implement clists reorderability via DND
(remove_grab) : new function. remove mouse grab if necessary.
(draw_drag_highlight) : new method. Draw dnd highlight depending
on clist flags GTK_CLIST_DRAW_DRAG_LINE and GTK_CLIST_DRAW_DRAG_RECT
(gtk_clist_class_init): added object args "reorderable" and
"use_drag_icons"
(gtk_clist_button_press) (gtk_clist_button_release) :
use button_actions array to decide which action to perform.
(gtk_clist_motion) : start reorder operation if necessary.
* gtk/gtkctree.h :
(struct _GtkCTree): removed drag_icon, icon_widht, icon_height,
drag_row, drag_source, drag_target, reorderable, use_icons,
in_drag, drag_rect
(gtk_ctree_set_reorderable) : deprecated function.
use gtk_clist_set_reorderable instead.
(gtk_ctree_set_use_drag_icons) : deprecated function.
use gtk_clist_set_use_drag_icons instead.
* gtk/gtkctree.c :
(gtk_ctree_class_init): removed object args "reorderable" and
and "use_drag_icons"
(draw_xor_line) (draw_xor_rect) (create_drag_icon) (check_cursor)
(tree_toggle_selection) (set_mouse_cursor) : removed
(draw_drag_highlight) : new clist method. replacement for
draw_xor_line and draw_xor_rect functions
(check_drag) renamed check_cursor function
(gtk_ctree_drag_begin)
(gtk_ctree_drag_motion)
(gtk_ctree_drag_data_received) : new dnd methods to implement ctrees
reorderability via DND
(gtk_ctree_button_release)
(gtk_ctree_button_motion) : removed.
* gtk/testgtk.c:
(create_clist) : added new reorderable toggle button
1998-12-16 01:28:31 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GTK_CLIST_DRAG_NONE,
|
|
|
|
GTK_CLIST_DRAG_BEFORE,
|
|
|
|
GTK_CLIST_DRAG_INTO,
|
|
|
|
GTK_CLIST_DRAG_AFTER
|
|
|
|
} GtkCListDragPos;
|
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
GTK_BUTTON_IGNORED = 0,
|
|
|
|
GTK_BUTTON_SELECTS = 1 << 0,
|
|
|
|
GTK_BUTTON_DRAGS = 1 << 1,
|
|
|
|
GTK_BUTTON_EXPANDS = 1 << 2
|
|
|
|
} GtkButtonAction;
|
|
|
|
|
1998-07-16 02:47:15 +00:00
|
|
|
#define GTK_TYPE_CLIST (gtk_clist_get_type ())
|
|
|
|
#define GTK_CLIST(obj) (GTK_CHECK_CAST ((obj), GTK_TYPE_CLIST, GtkCList))
|
|
|
|
#define GTK_CLIST_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), GTK_TYPE_CLIST, GtkCListClass))
|
|
|
|
#define GTK_IS_CLIST(obj) (GTK_CHECK_TYPE ((obj), GTK_TYPE_CLIST))
|
|
|
|
#define GTK_IS_CLIST_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), GTK_TYPE_CLIST))
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-07-16 02:47:15 +00:00
|
|
|
#define GTK_CLIST_FLAGS(clist) (GTK_CLIST (clist)->flags)
|
|
|
|
#define GTK_CLIST_SET_FLAG(clist,flag) (GTK_CLIST_FLAGS (clist) |= (GTK_ ## flag))
|
|
|
|
#define GTK_CLIST_UNSET_FLAG(clist,flag) (GTK_CLIST_FLAGS (clist) &= ~(GTK_ ## flag))
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-05-01 13:16:49 +00:00
|
|
|
#define GTK_CLIST_IN_DRAG(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_IN_DRAG)
|
|
|
|
#define GTK_CLIST_ROW_HEIGHT_SET(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_ROW_HEIGHT_SET)
|
|
|
|
#define GTK_CLIST_SHOW_TITLES(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_SHOW_TITLES)
|
1998-07-15 23:40:00 +00:00
|
|
|
#define GTK_CLIST_CHILD_HAS_FOCUS(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_CHILD_HAS_FOCUS)
|
|
|
|
#define GTK_CLIST_ADD_MODE(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_ADD_MODE)
|
1998-08-05 20:02:32 +00:00
|
|
|
#define GTK_CLIST_AUTO_SORT(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_AUTO_SORT)
|
1998-10-19 22:46:38 +00:00
|
|
|
#define GTK_CLIST_AUTO_RESIZE_BLOCKED(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_AUTO_RESIZE_BLOCKED)
|
removed clist flag : GTK_CLIST_DRAG_SELECTION added flags :
Tue Dec 15 22:30:44 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h :
removed clist flag : GTK_CLIST_DRAG_SELECTION
added flags : GTK_CLIST_REORDERABLE, GTK_CLIST_USE_DRAG_ICONS,
GTK_CLIST_DRAW_DRAG_LINE, GTK_CLIST_DRAW_DRAG_RECT
(GtkCListDragPos) : new enum for DND
(GtkButtonAction) : new enum of possible mouse button actions
(struct _GtkCList): added button_actions array.
Added drag_button and click_cell struct, to store cell and
mouse button of last button_press_event
(struct _GtkCListClass): new class method draw_drag_highlight.
(gtk_clist_set_reorderable) (gtk_clist_set_use_drag_icons) :
new functions. Moved from gtkctree.h. Now clist is reorderable
as well.
(gtk_clist_set_button_actions) new function to customize mouse
button actions.
* gtk/gtkclist.c:
(gtk_clist_drag_begin)
(gtk_clist_drag_motion)
(gtk_clist_drag_leave)
(gtk_clist_drag_end)
(gtk_clist_drag_drop)
(gtk_clist_drag_data_get)
(gtk_clist_drag_data_received) : new dnd widget methods to
implement clists reorderability via DND
(remove_grab) : new function. remove mouse grab if necessary.
(draw_drag_highlight) : new method. Draw dnd highlight depending
on clist flags GTK_CLIST_DRAW_DRAG_LINE and GTK_CLIST_DRAW_DRAG_RECT
(gtk_clist_class_init): added object args "reorderable" and
"use_drag_icons"
(gtk_clist_button_press) (gtk_clist_button_release) :
use button_actions array to decide which action to perform.
(gtk_clist_motion) : start reorder operation if necessary.
* gtk/gtkctree.h :
(struct _GtkCTree): removed drag_icon, icon_widht, icon_height,
drag_row, drag_source, drag_target, reorderable, use_icons,
in_drag, drag_rect
(gtk_ctree_set_reorderable) : deprecated function.
use gtk_clist_set_reorderable instead.
(gtk_ctree_set_use_drag_icons) : deprecated function.
use gtk_clist_set_use_drag_icons instead.
* gtk/gtkctree.c :
(gtk_ctree_class_init): removed object args "reorderable" and
and "use_drag_icons"
(draw_xor_line) (draw_xor_rect) (create_drag_icon) (check_cursor)
(tree_toggle_selection) (set_mouse_cursor) : removed
(draw_drag_highlight) : new clist method. replacement for
draw_xor_line and draw_xor_rect functions
(check_drag) renamed check_cursor function
(gtk_ctree_drag_begin)
(gtk_ctree_drag_motion)
(gtk_ctree_drag_data_received) : new dnd methods to implement ctrees
reorderability via DND
(gtk_ctree_button_release)
(gtk_ctree_button_motion) : removed.
* gtk/testgtk.c:
(create_clist) : added new reorderable toggle button
1998-12-16 01:28:31 +00:00
|
|
|
#define GTK_CLIST_REORDERABLE(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_REORDERABLE)
|
|
|
|
#define GTK_CLIST_USE_DRAG_ICONS(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_USE_DRAG_ICONS)
|
|
|
|
#define GTK_CLIST_DRAW_DRAG_LINE(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_DRAW_DRAG_LINE)
|
|
|
|
#define GTK_CLIST_DRAW_DRAG_RECT(clist) (GTK_CLIST_FLAGS (clist) & GTK_CLIST_DRAW_DRAG_RECT)
|
1998-07-15 23:40:00 +00:00
|
|
|
|
|
|
|
#define GTK_CLIST_ROW(_glist_) ((GtkCListRow *)((_glist_)->data))
|
1998-01-03 03:31:03 +00:00
|
|
|
|
|
|
|
/* pointer casting for cells */
|
|
|
|
#define GTK_CELL_TEXT(cell) (((GtkCellText *) &(cell)))
|
|
|
|
#define GTK_CELL_PIXMAP(cell) (((GtkCellPixmap *) &(cell)))
|
|
|
|
#define GTK_CELL_PIXTEXT(cell) (((GtkCellPixText *) &(cell)))
|
|
|
|
#define GTK_CELL_WIDGET(cell) (((GtkCellWidget *) &(cell)))
|
|
|
|
|
|
|
|
typedef struct _GtkCList GtkCList;
|
|
|
|
typedef struct _GtkCListClass GtkCListClass;
|
|
|
|
typedef struct _GtkCListColumn GtkCListColumn;
|
|
|
|
typedef struct _GtkCListRow GtkCListRow;
|
|
|
|
|
|
|
|
typedef struct _GtkCell GtkCell;
|
|
|
|
typedef struct _GtkCellText GtkCellText;
|
|
|
|
typedef struct _GtkCellPixmap GtkCellPixmap;
|
|
|
|
typedef struct _GtkCellPixText GtkCellPixText;
|
|
|
|
typedef struct _GtkCellWidget GtkCellWidget;
|
|
|
|
|
1998-08-05 20:02:32 +00:00
|
|
|
typedef gint (*GtkCListCompareFunc) (GtkCList *clist,
|
|
|
|
gconstpointer ptr1,
|
|
|
|
gconstpointer ptr2);
|
|
|
|
|
removed clist flag : GTK_CLIST_DRAG_SELECTION added flags :
Tue Dec 15 22:30:44 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h :
removed clist flag : GTK_CLIST_DRAG_SELECTION
added flags : GTK_CLIST_REORDERABLE, GTK_CLIST_USE_DRAG_ICONS,
GTK_CLIST_DRAW_DRAG_LINE, GTK_CLIST_DRAW_DRAG_RECT
(GtkCListDragPos) : new enum for DND
(GtkButtonAction) : new enum of possible mouse button actions
(struct _GtkCList): added button_actions array.
Added drag_button and click_cell struct, to store cell and
mouse button of last button_press_event
(struct _GtkCListClass): new class method draw_drag_highlight.
(gtk_clist_set_reorderable) (gtk_clist_set_use_drag_icons) :
new functions. Moved from gtkctree.h. Now clist is reorderable
as well.
(gtk_clist_set_button_actions) new function to customize mouse
button actions.
* gtk/gtkclist.c:
(gtk_clist_drag_begin)
(gtk_clist_drag_motion)
(gtk_clist_drag_leave)
(gtk_clist_drag_end)
(gtk_clist_drag_drop)
(gtk_clist_drag_data_get)
(gtk_clist_drag_data_received) : new dnd widget methods to
implement clists reorderability via DND
(remove_grab) : new function. remove mouse grab if necessary.
(draw_drag_highlight) : new method. Draw dnd highlight depending
on clist flags GTK_CLIST_DRAW_DRAG_LINE and GTK_CLIST_DRAW_DRAG_RECT
(gtk_clist_class_init): added object args "reorderable" and
"use_drag_icons"
(gtk_clist_button_press) (gtk_clist_button_release) :
use button_actions array to decide which action to perform.
(gtk_clist_motion) : start reorder operation if necessary.
* gtk/gtkctree.h :
(struct _GtkCTree): removed drag_icon, icon_widht, icon_height,
drag_row, drag_source, drag_target, reorderable, use_icons,
in_drag, drag_rect
(gtk_ctree_set_reorderable) : deprecated function.
use gtk_clist_set_reorderable instead.
(gtk_ctree_set_use_drag_icons) : deprecated function.
use gtk_clist_set_use_drag_icons instead.
* gtk/gtkctree.c :
(gtk_ctree_class_init): removed object args "reorderable" and
and "use_drag_icons"
(draw_xor_line) (draw_xor_rect) (create_drag_icon) (check_cursor)
(tree_toggle_selection) (set_mouse_cursor) : removed
(draw_drag_highlight) : new clist method. replacement for
draw_xor_line and draw_xor_rect functions
(check_drag) renamed check_cursor function
(gtk_ctree_drag_begin)
(gtk_ctree_drag_motion)
(gtk_ctree_drag_data_received) : new dnd methods to implement ctrees
reorderability via DND
(gtk_ctree_button_release)
(gtk_ctree_button_motion) : removed.
* gtk/testgtk.c:
(create_clist) : added new reorderable toggle button
1998-12-16 01:28:31 +00:00
|
|
|
typedef struct _GtkCListCellInfo GtkCListCellInfo;
|
|
|
|
typedef struct _GtkCListDestInfo GtkCListDestInfo;
|
|
|
|
|
|
|
|
struct _GtkCListCellInfo
|
|
|
|
{
|
|
|
|
gint row;
|
|
|
|
gint column;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkCListDestInfo
|
|
|
|
{
|
|
|
|
GtkCListCellInfo cell;
|
|
|
|
GtkCListDragPos insert_pos;
|
|
|
|
};
|
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
struct _GtkCList
|
|
|
|
{
|
|
|
|
GtkContainer container;
|
|
|
|
|
1998-07-15 23:40:00 +00:00
|
|
|
guint16 flags;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-01-24 19:14:42 +00:00
|
|
|
/* mem chunks */
|
|
|
|
GMemChunk *row_mem_chunk;
|
|
|
|
GMemChunk *cell_mem_chunk;
|
1998-11-28 01:56:09 +00:00
|
|
|
|
|
|
|
guint freeze_count;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* allocation rectangle after the conatiner_border_width
|
|
|
|
* and the width of the shadow border */
|
|
|
|
GdkRectangle internal_allocation;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* rows */
|
|
|
|
gint rows;
|
|
|
|
gint row_center_offset;
|
|
|
|
gint row_height;
|
|
|
|
GList *row_list;
|
|
|
|
GList *row_list_end;
|
|
|
|
|
|
|
|
/* columns */
|
|
|
|
gint columns;
|
|
|
|
GdkRectangle column_title_area;
|
|
|
|
GdkWindow *title_window;
|
|
|
|
|
|
|
|
/* dynamicly allocated array of column structures */
|
|
|
|
GtkCListColumn *column;
|
|
|
|
|
1998-02-19 02:59:55 +00:00
|
|
|
/*the scrolling window and it's height and width to
|
1998-01-03 03:31:03 +00:00
|
|
|
* make things a little speedier */
|
|
|
|
GdkWindow *clist_window;
|
|
|
|
gint clist_window_width;
|
|
|
|
gint clist_window_height;
|
|
|
|
|
|
|
|
/* offsets for scrolling */
|
|
|
|
gint hoffset;
|
|
|
|
gint voffset;
|
|
|
|
|
|
|
|
/* border shadow style */
|
|
|
|
GtkShadowType shadow_type;
|
|
|
|
|
|
|
|
/* the list's selection mode (gtkenums.h) */
|
|
|
|
GtkSelectionMode selection_mode;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-01-06 06:48:48 +00:00
|
|
|
/* list of selected rows */
|
|
|
|
GList *selection;
|
1998-07-15 23:40:00 +00:00
|
|
|
GList *selection_end;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-07-15 23:40:00 +00:00
|
|
|
GList *undo_selection;
|
|
|
|
GList *undo_unselection;
|
|
|
|
gint undo_anchor;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
removed clist flag : GTK_CLIST_DRAG_SELECTION added flags :
Tue Dec 15 22:30:44 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h :
removed clist flag : GTK_CLIST_DRAG_SELECTION
added flags : GTK_CLIST_REORDERABLE, GTK_CLIST_USE_DRAG_ICONS,
GTK_CLIST_DRAW_DRAG_LINE, GTK_CLIST_DRAW_DRAG_RECT
(GtkCListDragPos) : new enum for DND
(GtkButtonAction) : new enum of possible mouse button actions
(struct _GtkCList): added button_actions array.
Added drag_button and click_cell struct, to store cell and
mouse button of last button_press_event
(struct _GtkCListClass): new class method draw_drag_highlight.
(gtk_clist_set_reorderable) (gtk_clist_set_use_drag_icons) :
new functions. Moved from gtkctree.h. Now clist is reorderable
as well.
(gtk_clist_set_button_actions) new function to customize mouse
button actions.
* gtk/gtkclist.c:
(gtk_clist_drag_begin)
(gtk_clist_drag_motion)
(gtk_clist_drag_leave)
(gtk_clist_drag_end)
(gtk_clist_drag_drop)
(gtk_clist_drag_data_get)
(gtk_clist_drag_data_received) : new dnd widget methods to
implement clists reorderability via DND
(remove_grab) : new function. remove mouse grab if necessary.
(draw_drag_highlight) : new method. Draw dnd highlight depending
on clist flags GTK_CLIST_DRAW_DRAG_LINE and GTK_CLIST_DRAW_DRAG_RECT
(gtk_clist_class_init): added object args "reorderable" and
"use_drag_icons"
(gtk_clist_button_press) (gtk_clist_button_release) :
use button_actions array to decide which action to perform.
(gtk_clist_motion) : start reorder operation if necessary.
* gtk/gtkctree.h :
(struct _GtkCTree): removed drag_icon, icon_widht, icon_height,
drag_row, drag_source, drag_target, reorderable, use_icons,
in_drag, drag_rect
(gtk_ctree_set_reorderable) : deprecated function.
use gtk_clist_set_reorderable instead.
(gtk_ctree_set_use_drag_icons) : deprecated function.
use gtk_clist_set_use_drag_icons instead.
* gtk/gtkctree.c :
(gtk_ctree_class_init): removed object args "reorderable" and
and "use_drag_icons"
(draw_xor_line) (draw_xor_rect) (create_drag_icon) (check_cursor)
(tree_toggle_selection) (set_mouse_cursor) : removed
(draw_drag_highlight) : new clist method. replacement for
draw_xor_line and draw_xor_rect functions
(check_drag) renamed check_cursor function
(gtk_ctree_drag_begin)
(gtk_ctree_drag_motion)
(gtk_ctree_drag_data_received) : new dnd methods to implement ctrees
reorderability via DND
(gtk_ctree_button_release)
(gtk_ctree_button_motion) : removed.
* gtk/testgtk.c:
(create_clist) : added new reorderable toggle button
1998-12-16 01:28:31 +00:00
|
|
|
/* mouse buttons */
|
|
|
|
guint8 button_actions[5];
|
|
|
|
|
|
|
|
guint8 drag_button;
|
|
|
|
|
|
|
|
/* dnd */
|
|
|
|
GtkCListCellInfo click_cell;
|
|
|
|
|
1998-11-07 14:29:22 +00:00
|
|
|
/* scroll adjustments */
|
1998-11-05 15:44:22 +00:00
|
|
|
GtkAdjustment *hadjustment;
|
|
|
|
GtkAdjustment *vadjustment;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-01-31 03:33:02 +00:00
|
|
|
/* xor GC for the vertical drag line */
|
1998-01-03 03:31:03 +00:00
|
|
|
GdkGC *xor_gc;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* gc for drawing unselected cells */
|
|
|
|
GdkGC *fg_gc;
|
|
|
|
GdkGC *bg_gc;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* cursor used to indicate dragging */
|
|
|
|
GdkCursor *cursor_drag;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* the current x-pixel location of the xor-drag line */
|
|
|
|
gint x_drag;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-07-15 23:40:00 +00:00
|
|
|
/* focus handling */
|
|
|
|
gint focus_row;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-07-15 23:40:00 +00:00
|
|
|
/* dragging the selection */
|
|
|
|
gint anchor;
|
|
|
|
GtkStateType anchor_state;
|
|
|
|
gint drag_pos;
|
|
|
|
gint htimer;
|
|
|
|
gint vtimer;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-08-05 20:02:32 +00:00
|
|
|
GtkSortType sort_type;
|
|
|
|
GtkCListCompareFunc compare;
|
|
|
|
gint sort_column;
|
1998-01-03 03:31:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkCListClass
|
|
|
|
{
|
|
|
|
GtkContainerClass parent_class;
|
|
|
|
|
1998-12-02 03:40:03 +00:00
|
|
|
void (*set_scroll_adjustments) (GtkCList *clist,
|
|
|
|
GtkAdjustment *hadjustment,
|
|
|
|
GtkAdjustment *vadjustment);
|
1998-11-28 01:56:09 +00:00
|
|
|
void (*refresh) (GtkCList *clist);
|
1998-10-19 22:46:38 +00:00
|
|
|
void (*select_row) (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gint column,
|
|
|
|
GdkEvent *event);
|
|
|
|
void (*unselect_row) (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gint column,
|
|
|
|
GdkEvent *event);
|
1998-12-02 00:52:14 +00:00
|
|
|
void (*row_move) (GtkCList *clist,
|
|
|
|
gint source_row,
|
|
|
|
gint dest_row);
|
1998-10-19 22:46:38 +00:00
|
|
|
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);
|
removed clist flag : GTK_CLIST_DRAG_SELECTION added flags :
Tue Dec 15 22:30:44 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h :
removed clist flag : GTK_CLIST_DRAG_SELECTION
added flags : GTK_CLIST_REORDERABLE, GTK_CLIST_USE_DRAG_ICONS,
GTK_CLIST_DRAW_DRAG_LINE, GTK_CLIST_DRAW_DRAG_RECT
(GtkCListDragPos) : new enum for DND
(GtkButtonAction) : new enum of possible mouse button actions
(struct _GtkCList): added button_actions array.
Added drag_button and click_cell struct, to store cell and
mouse button of last button_press_event
(struct _GtkCListClass): new class method draw_drag_highlight.
(gtk_clist_set_reorderable) (gtk_clist_set_use_drag_icons) :
new functions. Moved from gtkctree.h. Now clist is reorderable
as well.
(gtk_clist_set_button_actions) new function to customize mouse
button actions.
* gtk/gtkclist.c:
(gtk_clist_drag_begin)
(gtk_clist_drag_motion)
(gtk_clist_drag_leave)
(gtk_clist_drag_end)
(gtk_clist_drag_drop)
(gtk_clist_drag_data_get)
(gtk_clist_drag_data_received) : new dnd widget methods to
implement clists reorderability via DND
(remove_grab) : new function. remove mouse grab if necessary.
(draw_drag_highlight) : new method. Draw dnd highlight depending
on clist flags GTK_CLIST_DRAW_DRAG_LINE and GTK_CLIST_DRAW_DRAG_RECT
(gtk_clist_class_init): added object args "reorderable" and
"use_drag_icons"
(gtk_clist_button_press) (gtk_clist_button_release) :
use button_actions array to decide which action to perform.
(gtk_clist_motion) : start reorder operation if necessary.
* gtk/gtkctree.h :
(struct _GtkCTree): removed drag_icon, icon_widht, icon_height,
drag_row, drag_source, drag_target, reorderable, use_icons,
in_drag, drag_rect
(gtk_ctree_set_reorderable) : deprecated function.
use gtk_clist_set_reorderable instead.
(gtk_ctree_set_use_drag_icons) : deprecated function.
use gtk_clist_set_use_drag_icons instead.
* gtk/gtkctree.c :
(gtk_ctree_class_init): removed object args "reorderable" and
and "use_drag_icons"
(draw_xor_line) (draw_xor_rect) (create_drag_icon) (check_cursor)
(tree_toggle_selection) (set_mouse_cursor) : removed
(draw_drag_highlight) : new clist method. replacement for
draw_xor_line and draw_xor_rect functions
(check_drag) renamed check_cursor function
(gtk_ctree_drag_begin)
(gtk_ctree_drag_motion)
(gtk_ctree_drag_data_received) : new dnd methods to implement ctrees
reorderability via DND
(gtk_ctree_button_release)
(gtk_ctree_button_motion) : removed.
* gtk/testgtk.c:
(create_clist) : added new reorderable toggle button
1998-12-16 01:28:31 +00:00
|
|
|
void (*draw_drag_highlight) (GtkCList *clist,
|
|
|
|
GtkCListRow *target_row,
|
|
|
|
gint target_row_number,
|
|
|
|
GtkCListDragPos drag_pos);
|
1998-10-19 22:46:38 +00:00
|
|
|
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 (*cell_size_request) (GtkCList *clist,
|
|
|
|
GtkCListRow *clist_row,
|
|
|
|
gint column,
|
|
|
|
GtkRequisition *requisition);
|
removed clist flag : GTK_CLIST_DRAG_SELECTION added flags :
Tue Dec 15 22:30:44 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h :
removed clist flag : GTK_CLIST_DRAG_SELECTION
added flags : GTK_CLIST_REORDERABLE, GTK_CLIST_USE_DRAG_ICONS,
GTK_CLIST_DRAW_DRAG_LINE, GTK_CLIST_DRAW_DRAG_RECT
(GtkCListDragPos) : new enum for DND
(GtkButtonAction) : new enum of possible mouse button actions
(struct _GtkCList): added button_actions array.
Added drag_button and click_cell struct, to store cell and
mouse button of last button_press_event
(struct _GtkCListClass): new class method draw_drag_highlight.
(gtk_clist_set_reorderable) (gtk_clist_set_use_drag_icons) :
new functions. Moved from gtkctree.h. Now clist is reorderable
as well.
(gtk_clist_set_button_actions) new function to customize mouse
button actions.
* gtk/gtkclist.c:
(gtk_clist_drag_begin)
(gtk_clist_drag_motion)
(gtk_clist_drag_leave)
(gtk_clist_drag_end)
(gtk_clist_drag_drop)
(gtk_clist_drag_data_get)
(gtk_clist_drag_data_received) : new dnd widget methods to
implement clists reorderability via DND
(remove_grab) : new function. remove mouse grab if necessary.
(draw_drag_highlight) : new method. Draw dnd highlight depending
on clist flags GTK_CLIST_DRAW_DRAG_LINE and GTK_CLIST_DRAW_DRAG_RECT
(gtk_clist_class_init): added object args "reorderable" and
"use_drag_icons"
(gtk_clist_button_press) (gtk_clist_button_release) :
use button_actions array to decide which action to perform.
(gtk_clist_motion) : start reorder operation if necessary.
* gtk/gtkctree.h :
(struct _GtkCTree): removed drag_icon, icon_widht, icon_height,
drag_row, drag_source, drag_target, reorderable, use_icons,
in_drag, drag_rect
(gtk_ctree_set_reorderable) : deprecated function.
use gtk_clist_set_reorderable instead.
(gtk_ctree_set_use_drag_icons) : deprecated function.
use gtk_clist_set_use_drag_icons instead.
* gtk/gtkctree.c :
(gtk_ctree_class_init): removed object args "reorderable" and
and "use_drag_icons"
(draw_xor_line) (draw_xor_rect) (create_drag_icon) (check_cursor)
(tree_toggle_selection) (set_mouse_cursor) : removed
(draw_drag_highlight) : new clist method. replacement for
draw_xor_line and draw_xor_rect functions
(check_drag) renamed check_cursor function
(gtk_ctree_drag_begin)
(gtk_ctree_drag_motion)
(gtk_ctree_drag_data_received) : new dnd methods to implement ctrees
reorderability via DND
(gtk_ctree_button_release)
(gtk_ctree_button_motion) : removed.
* gtk/testgtk.c:
(create_clist) : added new reorderable toggle button
1998-12-16 01:28:31 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkCListColumn
|
|
|
|
{
|
|
|
|
gchar *title;
|
|
|
|
GdkRectangle area;
|
|
|
|
|
|
|
|
GtkWidget *button;
|
1998-01-19 09:59:20 +00:00
|
|
|
GdkWindow *window;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
gint width;
|
1998-10-07 00:03:24 +00:00
|
|
|
gint min_width;
|
|
|
|
gint max_width;
|
1998-01-03 03:31:03 +00:00
|
|
|
GtkJustification justification;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
Wed Mar 17 01:46:28 1999 Tim Janik <timj@gtk.org>
* merges from gtk-1-2:
Tue Mar 16 17:43:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.c (gtk_item_factory_parse_rc_string): ensure the
item factory class has been created.
(gtk_item_factory_parse_rc): likewise.
* gtk/gtkmenu.c:
keep proper references for old_active_menu_item.
(gtk_menu_reparent): unset the usize of the new parent,
so the menu can sanely be size requested and we don't get nasty screen
artefacts upon next reparentation.
(gtk_menu_motion_notify): set send_event to TRUE if we synthesize an
enter notify. only synthesize enter notifies if the pointer really is
inside the event window.
(gtk_menu_popdown): use gtk_menu_shell_deselect().
(gtk_menu_popup): move the background setting stuff into
gtk_menu_tearoff_bg_copy() so it can be called from other places as well.
* gtk/gtkmenushell.c (gtk_menu_shell_button_press): use
gtk_menu_shell_select_item() to select the new item.
(gtk_menu_shell_deselect): export this function, so gtkmenu.c can
do the right thing for deselection as well.
Sat Mar 15 20:10:33 1999 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.[hc]:
(gtk_widget_accelerators_locked): return whether a widget's accelerators
are locked.
* gtk/gtkmenu.c (gtk_menu_key_press): don't remove or install new or
existing accelerators if the widget's accelerators are locked.
Sat Mar 14 19:44:05 1999 Tim Janik <timj@gtk.org>
* gtk/gtkitemfactory.[hc]: allow managing of foreign menu items.
* gtk/gtkmenu.c: truely forward key press and key release events to
the menu widget from the toplevel or tearoff window. we can't simply
connect to that, we need to stop further processing of the events as
well.
Sat Mar 13 13:14:17 1999 Tim Janik <timj@gtk.org>
* gtk/gtkmenu.c:
(gtk_menu_key_press): pass event->keyval, event->state to
gtk_accelerator_valid, instead of event->keyval twice.
refuse to install single letter accelerators for menus that use
single letter shortcuts.
* gtk/gtkitemfactory.c (gtk_item_factory_create_item): use
gtk_menu_ensure_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_ensure_uline_accel_group()
which will always return an uline accel group, made
gtk_menu_get_uline_accel_group() return NULL if the group isn't
yet created.
Mon Mar 15 01:03:27 1999 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h (struct _GtkCListColumn): added button_passive flag.
* gtk/gtkclist.c (gtk_clist_column_title_passive):
Leave button sensitive, trap button_press, button_release,
motion_notify, enter_notify and leave_notify events instead.
(gtk_clist_column_title_active): disconnect event handler.
(gtk_clist_drag_data_get): fixed memory leak. Reported by
Guillaume Laurent <glaurent@worldnet.fr>
Wed Mar 10 23:49:55 1999 Lars Hamann <lars@gtk.org>
* gtk/gtklayout.c (gtk_layout_adjustment_changed): fixed a few
width/height mixups.
* gtk/gtkctree.c (tree_delete): emit an tree_unselect_row signal
if needed.
Wed Mar 10 00:11:32 1999 Tim Janik <timj@gtk.org>
* gtk/testgtk.c (create_item_factory): unref the item factory after
window's destruction.
* gtk/gtkmenushell.c (gtk_menu_shell_activate_item): keep a reference
count on the menu shell around the menu item's activation, since the
signal emission may cause menu shell destruction.
* gtk/gtkitemfactory.c:
the previous code leaked one accel group per menu. we use
gtk_menu_get_uline_accel_group() now to fix that, and with that
also create the underline accelerator group of the menus only if
required (i.e. an underline accelerator has been specified).
(gtk_item_factory_construct):
(gtk_item_factory_create_item): removed code that would create an
extra accel group for the menu (and leak references).
(gtk_item_factory_create_item): adapted the underline accelerator
installation code to properly feature gtk_menu_get_uline_accel_group().
* gtk/gtkmenu.[hc]: added gtk_menu_get_accel_group() to retrive
menu->accel_group, this may return NULL if the accelerator group
hasn't been set yet.
added gtk_menu_get_uline_accel_group() to retrive the underline
accelerator group of the menu, this will be created on demand
and proper care is taken about its reference count.
* gtk/gtkitemfactory.h:
* gtk/gtkitemfactory.c:
dumped the approach of keeping a widgets by action list on the
factory since the factory<->widget destroy negotiation didn't work
and would be hard to get going at all. instead we keep a list of
GtkItemFactoryItem items on the factory (GtkItemFactoryItems are
persistant throughout a program's life time).
also, i removed the static const gchar *key_* variables, and made
them inline strings (they weren't actually used anyways).
(gtk_item_factory_add_item): update ifactory->items.
(gtk_item_factory_destroy): destroy ifactory->items (and remove
the item factory pointer from the remaining ifactory widgets).
(gtk_item_factory_get_widget_by_action): walk the GtkItemFactoryItem
list to find the widget.
(gtk_item_factory_get_item): new function that works around
gtk_item_factory_get_widget() limitations, this function will only
return menu items, even for <Branch> entries.
Tue Mar 9 01:01:28 1999 Tim Janik <timj@gtk.org>
* gdk/gdkfont.c (gdk_font_load): first lookup the xfont ID in our
font hash table, if we have a GdkFontPrivate entry for this font
already, simply increment its reference count, provided by Olaf Dietsche
<olaf.dietsche+list.gtk@netcologne.de>.
* gtk/gtkstyle.c (gtk_style_copy): plug a GdkFont reference leak, fix
provided by Olaf Dietsche <olaf.dietsche+list.gtk@netcologne.de>.
Sun Mar 7 06:13:29 1999 Tim Janik <timj@gtk.org>
* gtk/gtkcontainer.c:
(gtk_container_add_with_args):
(gtk_container_addv):
(gtk_container_add): before adding a child to a conatiner, make sure
it is (default) constructed, this is neccessary because under certain
circumstances the child will get relized and mapped immediatedly, in
which case it has to be constructed already.
Mon Mar 1 17:58:21 1999 Tim Janik <timj@gtk.org>
* gtk/gtksignal.c (gtk_signal_connect_by_type): count object_signal
values > 1 as TRUE also.
1999-03-17 01:39:42 +00:00
|
|
|
guint visible : 1;
|
|
|
|
guint width_set : 1;
|
|
|
|
guint resizeable : 1;
|
|
|
|
guint auto_resize : 1;
|
|
|
|
guint button_passive : 1;
|
1998-01-03 03:31:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkCListRow
|
|
|
|
{
|
|
|
|
GtkCell *cell;
|
|
|
|
GtkStateType state;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
GdkColor foreground;
|
|
|
|
GdkColor background;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-10-16 15:00:05 +00:00
|
|
|
GtkStyle *style;
|
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
gpointer data;
|
1998-03-08 03:32:05 +00:00
|
|
|
GtkDestroyNotify destroy;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-10-19 22:46:38 +00:00
|
|
|
guint fg_set : 1;
|
|
|
|
guint bg_set : 1;
|
|
|
|
guint selectable : 1;
|
1998-01-03 03:31:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Cell Structures */
|
|
|
|
struct _GtkCellText
|
|
|
|
{
|
|
|
|
GtkCellType type;
|
|
|
|
|
1998-10-16 15:00:05 +00:00
|
|
|
gint16 vertical;
|
|
|
|
gint16 horizontal;
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-10-16 15:00:05 +00:00
|
|
|
GtkStyle *style;
|
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
gchar *text;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkCellPixmap
|
|
|
|
{
|
|
|
|
GtkCellType type;
|
|
|
|
|
1998-10-16 15:00:05 +00:00
|
|
|
gint16 vertical;
|
|
|
|
gint16 horizontal;
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-10-16 15:00:05 +00:00
|
|
|
GtkStyle *style;
|
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
GdkPixmap *pixmap;
|
|
|
|
GdkBitmap *mask;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkCellPixText
|
|
|
|
{
|
|
|
|
GtkCellType type;
|
|
|
|
|
1998-10-16 15:00:05 +00:00
|
|
|
gint16 vertical;
|
|
|
|
gint16 horizontal;
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-10-16 15:00:05 +00:00
|
|
|
GtkStyle *style;
|
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
gchar *text;
|
|
|
|
guint8 spacing;
|
|
|
|
GdkPixmap *pixmap;
|
|
|
|
GdkBitmap *mask;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkCellWidget
|
|
|
|
{
|
|
|
|
GtkCellType type;
|
|
|
|
|
1998-10-16 15:00:05 +00:00
|
|
|
gint16 vertical;
|
|
|
|
gint16 horizontal;
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-10-16 15:00:05 +00:00
|
|
|
GtkStyle *style;
|
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
GtkWidget *widget;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GtkCell
|
|
|
|
{
|
|
|
|
GtkCellType type;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-10-16 15:00:05 +00:00
|
|
|
gint16 vertical;
|
|
|
|
gint16 horizontal;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-10-16 15:00:05 +00:00
|
|
|
GtkStyle *style;
|
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
union {
|
|
|
|
gchar *text;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
struct {
|
|
|
|
GdkPixmap *pixmap;
|
|
|
|
GdkBitmap *mask;
|
|
|
|
} pm;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
struct {
|
|
|
|
gchar *text;
|
|
|
|
guint8 spacing;
|
|
|
|
GdkPixmap *pixmap;
|
|
|
|
GdkBitmap *mask;
|
|
|
|
} pt;
|
1998-09-03 07:28:37 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
GtkWidget *widget;
|
|
|
|
} u;
|
|
|
|
};
|
|
|
|
|
1998-05-01 13:16:49 +00:00
|
|
|
GtkType gtk_clist_get_type (void);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
added args ::show_text, ::text_xalign, ::text_yalign, ::activity_mode.
Sun Nov 22 16:21:28 1998 Tim Janik <timj@gtk.org>
* gtk/gtkprogress.c: added args ::show_text, ::text_xalign,
::text_yalign, ::activity_mode.
* gtk/gtkprogressbar.c: added construct arg ::adjustment. added args
::bar_style, ::orientation, ::discrete_blocks, ::activity_step,
::activity_blocks.
(gtk_progress_bar_new):
(gtk_progress_bar_new_with_adjustment): use gtk_widget_new().
(gtk_progress_bar_construct): deprecated.
* gtk/gtkvscrollbar.c:
(gtk_vscrollbar_draw_step_back):
(gtk_vscrollbar_draw_step_forw): use "vscrollbar" as detail for
gtk_paint_arrow, to be consistent with hscrollbar.
* gtk/gtktext.c
added construct args ::hadjustment, ::vadjustment.
added args ::line_wrap, ::word_wrap.
(gtk_text_class_init): added scroll_adjustments signal.
(gtk_text_new): use gtk_widget_new.
(gtk_text_disconnect): remove adjustement with gtk_text_set_adjustments,
so we don't screw the reference counts and don't leave signals connected.
(gtk_text_destroy): disconnect adjustments signals.
(gtk_text_finalize): unref adjustments.
* gtk/gtkctree.c: added construct args ::n_columns and ::tree_column.
added args ::indent, ::spacing, ::show_stub, ::reorderable,
::use_drag_icons, ::line_style and ::expander_style.
(gtk_ctree_set_show_stub): renamed from gtk_ctree_show_stub, which is
deprecated now.
* gtk/gtkclist.h: remove GTK_CLIST_CONSTRUCT flag.
* gtk/gtkclist.c:
removed ::vadjustment and ::hadjustment args, introduced
::scroll_adjustments signal.
added ::shadow_type, ::selection_mode and ::row_height args.
added n_columns construct arg.
(gtk_clist_construct): call gtk_object_constructed().
(gtk_clist_set_row_height): if height is passed as 0,
revert to automatic height calculation.
(gtk_clist_destroy): before unrefing the adjustments, disconnect our
signal handlers.
Fri Nov 21 22:34:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_new): call gtk_object_default_construct
like gtk_object_new.
(gtk_widget_destroy): assert that we only destroy constructed widgets.
* gtk/gtkobject.h (enum GtkArgFlags): new flag GTK_ARG_CONSTRUCT_ONLY
to identify args that may only be used for construction.
GTK_ARG_CONSTRUCT maybe used as normal arguments besides construction
time.
* gtk/gtkobject.c (gtk_object_new): invoke gtk_object_default_construct
at the end if the object is not fully constructed.
(gtk_object_newv): likewise.
(gtk_object_destroy): assert that we only destroy constructed objects.
(gtk_object_init): setup GTK_CONSTRUCTED from the
objects real klass.
(gtk_object_default_construct): new function to complete default
construction of an object by applying missing construtor args with
default values of 0, 0.0 or NULL.
(gtk_object_constructed): new function to mark an object as being
constructed (used from within constructors).
* gtk/gtkarg.c (gtk_arg_type_new_static): return the args info pointer
so it is immediatedly available for the caller.
* gtk/gtktypeutils.c (gtk_type_new): pass an object's real class to
the object initilizer (GtkObjectInitFunc takes a second arg now, the
real klass), and asure that object initializers may temporarily alter
the class pointer.
Fri Nov 20 08:00:30 1998 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: change all occourances of gtk_container_add (
scrolled_window, widget) to gtk_scrolled_window_add_with_viewport (...)
for widget!=(clist, ctree, text, viewport).
* gtk/gtkcombo.c:
(gtk_combo_init): use gtk_scrolled_window_add_with_viewport()
to add children to the scrolled window.
* gtk/gtkscrolledwindow.h:
* gtk/gtkscrolledwindow.c:
changed scrolled_window->viewport to scrolled_window->child, and use
gtk_widget_scroll_adjustements() to set the scroll adjustments for the
widget, we do not create an additional viewport anymore.
added ::hadjustment and ::vadjustment constructor args.
(gtk_scrolled_window_new): use gtk_widget_new() to create the widget.
(gtk_scrolled_window_set_hadjustment):
(gtk_scrolled_window_set_vadjustment): new functions that superceed
gtk_scrolled_window_construct.
(gtk_scrolled_window_construct): deprecated this function.
* gtk/gtkhscrollbar.c:
* gtk/gtkvscrollbar.c:
* gtk/gtkhscale.c:
* gtk/gtkvscale.c:
support a constructor arg "::adjustment", and use gtk_widget_new() for
the widget creation.
* gtk/gtkrange.c: added ::update_policy arg.
(gtk_range_set_adjustment): if adjustment is passed in as NULL, create
a default adjustment so this function can be used for derived widgets
that depend on the adjustment's existance.
(gtk_range_destroy): disconnect the adjustment signal, so we don't
get called after we got destroyed, we don't destroy the adjustment
in here, because it might have been provided from another widget.
* gtk/gtkviewport.c: introduced ::scroll_adjustments signal.
(gtk_viewport_destroy): same as gtk_range_destroy.
* gtk/gtkprogress.c (gtk_progress_destroy): same as gtk_range_destroy.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: changed gtk_widget_activate() to return a
gboolean, indicating whether this widget supports activation.
added gtk_widget_scroll_adjustements() to set the scrolling
adjustments of a widget.
Wed Nov 19 01:22:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkoptionmenu.c:
(gtk_option_menu_remove_contents):
(gtk_option_menu_update_contents): removed
gtk_container_[un]block_resize() pairs.
* gtk/gtknotebook.h:
* gtk/gtknotebook.c: removed the tab_border field, since it shouldn't
be used outside of gtknotebook.c anyways. made ARG_TAB_BORDER a
wrtie-only argument.
* *.c: made deprecated functions issue a message:
gtk_clist_set_border, gtk_container_block_resize,
gtk_container_unblock_resize, gtk_container_need_resize,
gtk_object_class_add_user_signal, gtk_spin_button_construct,
gtk_scrolled_window_construct.
removed non-functional functions:
gtk_container_disable_resize, gtk_container_enable_resize,
gtk_clist_set_policy.
Wed Nov 18 22:54:36 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbox.c (gtk_box_init):
* gtk/gtkdrawingarea.c (gtk_drawing_area_init):
* gtk/gtkeventbox.c (gtk_event_box_init):
* gtk/gtkfixed.c (gtk_fixed_init):
* gtk/gtkframe.c (gtk_frame_init):
* gtk/gtkhandlebox.c (gtk_handle_box_init):
* gtk/gtkpacker.c (gtk_packer_init):
* gtk/gtkmisc.c (gtk_misc_init):
* gtk/gtkpreview.c (gtk_preview_init):
* gtk/gtkprogress.c (gtk_progress_init):
* gtk/gtkprogressbar.c (gtk_progress_bar_init):
* gtk/gtkseparator.c (gtk_separator_init):
* gtk/gtktable.c (gtk_table_init):
* gtk/gtkviewport.c (gtk_viewport_init):
* gtk/gtkalignment.c (gtk_alignment_init):
removed setting of the GTK_BASIC flag.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c:
removed GTK_BASIC, GTK_WIDGET_BASIC and gtk_widget_basic.
* miscellaneous GtkType and macro fixups.
1998-11-23 01:54:45 +00:00
|
|
|
/* constructors useful for gtk-- wrappers */
|
1998-09-03 07:28:37 +00:00
|
|
|
void gtk_clist_construct (GtkCList *clist,
|
|
|
|
gint columns,
|
1998-11-26 03:43:24 +00:00
|
|
|
gchar *titles[]);
|
1998-02-20 05:29:03 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* create a new GtkCList */
|
1998-11-05 15:44:22 +00:00
|
|
|
GtkWidget* gtk_clist_new (gint columns);
|
|
|
|
GtkWidget* gtk_clist_new_with_titles (gint columns,
|
1998-11-26 03:43:24 +00:00
|
|
|
gchar *titles[]);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-11-05 15:44:22 +00:00
|
|
|
/* set adjustments of clist */
|
|
|
|
void gtk_clist_set_hadjustment (GtkCList *clist,
|
|
|
|
GtkAdjustment *adjustment);
|
|
|
|
void gtk_clist_set_vadjustment (GtkCList *clist,
|
|
|
|
GtkAdjustment *adjustment);
|
|
|
|
|
|
|
|
/* get adjustments of clist */
|
|
|
|
GtkAdjustment* gtk_clist_get_hadjustment (GtkCList *clist);
|
|
|
|
GtkAdjustment* gtk_clist_get_vadjustment (GtkCList *clist);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-10-19 22:46:38 +00:00
|
|
|
/* set the border style of the clist */
|
|
|
|
void gtk_clist_set_shadow_type (GtkCList *clist,
|
|
|
|
GtkShadowType type);
|
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* set the clist's selection mode */
|
1998-10-07 00:03:24 +00:00
|
|
|
void gtk_clist_set_selection_mode (GtkCList *clist,
|
|
|
|
GtkSelectionMode mode);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
removed clist flag : GTK_CLIST_DRAG_SELECTION added flags :
Tue Dec 15 22:30:44 1998 Lars Hamann <lars@gtk.org>
* gtk/gtkclist.h :
removed clist flag : GTK_CLIST_DRAG_SELECTION
added flags : GTK_CLIST_REORDERABLE, GTK_CLIST_USE_DRAG_ICONS,
GTK_CLIST_DRAW_DRAG_LINE, GTK_CLIST_DRAW_DRAG_RECT
(GtkCListDragPos) : new enum for DND
(GtkButtonAction) : new enum of possible mouse button actions
(struct _GtkCList): added button_actions array.
Added drag_button and click_cell struct, to store cell and
mouse button of last button_press_event
(struct _GtkCListClass): new class method draw_drag_highlight.
(gtk_clist_set_reorderable) (gtk_clist_set_use_drag_icons) :
new functions. Moved from gtkctree.h. Now clist is reorderable
as well.
(gtk_clist_set_button_actions) new function to customize mouse
button actions.
* gtk/gtkclist.c:
(gtk_clist_drag_begin)
(gtk_clist_drag_motion)
(gtk_clist_drag_leave)
(gtk_clist_drag_end)
(gtk_clist_drag_drop)
(gtk_clist_drag_data_get)
(gtk_clist_drag_data_received) : new dnd widget methods to
implement clists reorderability via DND
(remove_grab) : new function. remove mouse grab if necessary.
(draw_drag_highlight) : new method. Draw dnd highlight depending
on clist flags GTK_CLIST_DRAW_DRAG_LINE and GTK_CLIST_DRAW_DRAG_RECT
(gtk_clist_class_init): added object args "reorderable" and
"use_drag_icons"
(gtk_clist_button_press) (gtk_clist_button_release) :
use button_actions array to decide which action to perform.
(gtk_clist_motion) : start reorder operation if necessary.
* gtk/gtkctree.h :
(struct _GtkCTree): removed drag_icon, icon_widht, icon_height,
drag_row, drag_source, drag_target, reorderable, use_icons,
in_drag, drag_rect
(gtk_ctree_set_reorderable) : deprecated function.
use gtk_clist_set_reorderable instead.
(gtk_ctree_set_use_drag_icons) : deprecated function.
use gtk_clist_set_use_drag_icons instead.
* gtk/gtkctree.c :
(gtk_ctree_class_init): removed object args "reorderable" and
and "use_drag_icons"
(draw_xor_line) (draw_xor_rect) (create_drag_icon) (check_cursor)
(tree_toggle_selection) (set_mouse_cursor) : removed
(draw_drag_highlight) : new clist method. replacement for
draw_xor_line and draw_xor_rect functions
(check_drag) renamed check_cursor function
(gtk_ctree_drag_begin)
(gtk_ctree_drag_motion)
(gtk_ctree_drag_data_received) : new dnd methods to implement ctrees
reorderability via DND
(gtk_ctree_button_release)
(gtk_ctree_button_motion) : removed.
* gtk/testgtk.c:
(create_clist) : added new reorderable toggle button
1998-12-16 01:28:31 +00:00
|
|
|
/* enable clists reorder ability */
|
|
|
|
void gtk_clist_set_reorderable (GtkCList *clist,
|
|
|
|
gboolean reorderable);
|
|
|
|
void gtk_clist_set_use_drag_icons (GtkCList *clist,
|
|
|
|
gboolean use_icons);
|
|
|
|
void gtk_clist_set_button_actions (GtkCList *clist,
|
|
|
|
guint button,
|
|
|
|
guint8 button_actions);
|
|
|
|
|
1998-10-07 00:03:24 +00:00
|
|
|
/* 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
|
1998-09-03 07:28:37 +00:00
|
|
|
*/
|
|
|
|
void gtk_clist_freeze (GtkCList *clist);
|
|
|
|
void gtk_clist_thaw (GtkCList *clist);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-01-19 09:59:20 +00:00
|
|
|
/* show and hide the column title buttons */
|
1998-09-03 07:28:37 +00:00
|
|
|
void gtk_clist_column_titles_show (GtkCList *clist);
|
|
|
|
void gtk_clist_column_titles_hide (GtkCList *clist);
|
1998-01-19 09:59:20 +00:00
|
|
|
|
1998-01-21 08:56:52 +00:00
|
|
|
/* set the column title to be a active title (responds to button presses,
|
|
|
|
* prelights, and grabs keyboard focus), or passive where it acts as just
|
1998-09-03 07:28:37 +00:00
|
|
|
* a title
|
|
|
|
*/
|
|
|
|
void gtk_clist_column_title_active (GtkCList *clist,
|
|
|
|
gint column);
|
|
|
|
void gtk_clist_column_title_passive (GtkCList *clist,
|
|
|
|
gint column);
|
|
|
|
void gtk_clist_column_titles_active (GtkCList *clist);
|
|
|
|
void gtk_clist_column_titles_passive (GtkCList *clist);
|
1998-01-21 08:56:52 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* set the title in the column title button */
|
1998-09-03 07:28:37 +00:00
|
|
|
void gtk_clist_set_column_title (GtkCList *clist,
|
|
|
|
gint column,
|
|
|
|
const gchar *title);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-11-18 23:55:10 +00:00
|
|
|
/* returns the title of column. Returns NULL if title is not set */
|
|
|
|
gchar * gtk_clist_get_column_title (GtkCList *clist,
|
|
|
|
gint column);
|
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* set a widget instead of a title for the column title button */
|
1998-09-03 07:28:37 +00:00
|
|
|
void gtk_clist_set_column_widget (GtkCList *clist,
|
|
|
|
gint column,
|
|
|
|
GtkWidget *widget);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-11-18 23:55:10 +00:00
|
|
|
/* returns the column widget */
|
|
|
|
GtkWidget * gtk_clist_get_column_widget (GtkCList *clist,
|
|
|
|
gint column);
|
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* set the justification on a column */
|
1998-10-07 00:03:24 +00:00
|
|
|
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);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-10-19 22:46:38 +00:00
|
|
|
/* resize column automatically to its optimal width */
|
|
|
|
void gtk_clist_set_column_auto_resize (GtkCList *clist,
|
|
|
|
gint column,
|
|
|
|
gboolean auto_resize);
|
|
|
|
|
1998-12-02 00:52:14 +00:00
|
|
|
gint gtk_clist_columns_autosize (GtkCList *clist);
|
|
|
|
|
1998-10-19 22:46:38 +00:00
|
|
|
/* return the optimal column width, i.e. maximum of all cell widths */
|
|
|
|
gint gtk_clist_optimal_column_width (GtkCList *clist,
|
|
|
|
gint column);
|
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* set the pixel width of a column; this is a necessary step in
|
|
|
|
* creating a CList because otherwise the column width is chozen from
|
1998-09-03 07:28:37 +00:00
|
|
|
* the width of the column title, which will never be right
|
|
|
|
*/
|
|
|
|
void gtk_clist_set_column_width (GtkCList *clist,
|
|
|
|
gint column,
|
|
|
|
gint width);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-10-07 00:03:24 +00:00
|
|
|
/* 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);
|
|
|
|
|
added args ::show_text, ::text_xalign, ::text_yalign, ::activity_mode.
Sun Nov 22 16:21:28 1998 Tim Janik <timj@gtk.org>
* gtk/gtkprogress.c: added args ::show_text, ::text_xalign,
::text_yalign, ::activity_mode.
* gtk/gtkprogressbar.c: added construct arg ::adjustment. added args
::bar_style, ::orientation, ::discrete_blocks, ::activity_step,
::activity_blocks.
(gtk_progress_bar_new):
(gtk_progress_bar_new_with_adjustment): use gtk_widget_new().
(gtk_progress_bar_construct): deprecated.
* gtk/gtkvscrollbar.c:
(gtk_vscrollbar_draw_step_back):
(gtk_vscrollbar_draw_step_forw): use "vscrollbar" as detail for
gtk_paint_arrow, to be consistent with hscrollbar.
* gtk/gtktext.c
added construct args ::hadjustment, ::vadjustment.
added args ::line_wrap, ::word_wrap.
(gtk_text_class_init): added scroll_adjustments signal.
(gtk_text_new): use gtk_widget_new.
(gtk_text_disconnect): remove adjustement with gtk_text_set_adjustments,
so we don't screw the reference counts and don't leave signals connected.
(gtk_text_destroy): disconnect adjustments signals.
(gtk_text_finalize): unref adjustments.
* gtk/gtkctree.c: added construct args ::n_columns and ::tree_column.
added args ::indent, ::spacing, ::show_stub, ::reorderable,
::use_drag_icons, ::line_style and ::expander_style.
(gtk_ctree_set_show_stub): renamed from gtk_ctree_show_stub, which is
deprecated now.
* gtk/gtkclist.h: remove GTK_CLIST_CONSTRUCT flag.
* gtk/gtkclist.c:
removed ::vadjustment and ::hadjustment args, introduced
::scroll_adjustments signal.
added ::shadow_type, ::selection_mode and ::row_height args.
added n_columns construct arg.
(gtk_clist_construct): call gtk_object_constructed().
(gtk_clist_set_row_height): if height is passed as 0,
revert to automatic height calculation.
(gtk_clist_destroy): before unrefing the adjustments, disconnect our
signal handlers.
Fri Nov 21 22:34:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_new): call gtk_object_default_construct
like gtk_object_new.
(gtk_widget_destroy): assert that we only destroy constructed widgets.
* gtk/gtkobject.h (enum GtkArgFlags): new flag GTK_ARG_CONSTRUCT_ONLY
to identify args that may only be used for construction.
GTK_ARG_CONSTRUCT maybe used as normal arguments besides construction
time.
* gtk/gtkobject.c (gtk_object_new): invoke gtk_object_default_construct
at the end if the object is not fully constructed.
(gtk_object_newv): likewise.
(gtk_object_destroy): assert that we only destroy constructed objects.
(gtk_object_init): setup GTK_CONSTRUCTED from the
objects real klass.
(gtk_object_default_construct): new function to complete default
construction of an object by applying missing construtor args with
default values of 0, 0.0 or NULL.
(gtk_object_constructed): new function to mark an object as being
constructed (used from within constructors).
* gtk/gtkarg.c (gtk_arg_type_new_static): return the args info pointer
so it is immediatedly available for the caller.
* gtk/gtktypeutils.c (gtk_type_new): pass an object's real class to
the object initilizer (GtkObjectInitFunc takes a second arg now, the
real klass), and asure that object initializers may temporarily alter
the class pointer.
Fri Nov 20 08:00:30 1998 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: change all occourances of gtk_container_add (
scrolled_window, widget) to gtk_scrolled_window_add_with_viewport (...)
for widget!=(clist, ctree, text, viewport).
* gtk/gtkcombo.c:
(gtk_combo_init): use gtk_scrolled_window_add_with_viewport()
to add children to the scrolled window.
* gtk/gtkscrolledwindow.h:
* gtk/gtkscrolledwindow.c:
changed scrolled_window->viewport to scrolled_window->child, and use
gtk_widget_scroll_adjustements() to set the scroll adjustments for the
widget, we do not create an additional viewport anymore.
added ::hadjustment and ::vadjustment constructor args.
(gtk_scrolled_window_new): use gtk_widget_new() to create the widget.
(gtk_scrolled_window_set_hadjustment):
(gtk_scrolled_window_set_vadjustment): new functions that superceed
gtk_scrolled_window_construct.
(gtk_scrolled_window_construct): deprecated this function.
* gtk/gtkhscrollbar.c:
* gtk/gtkvscrollbar.c:
* gtk/gtkhscale.c:
* gtk/gtkvscale.c:
support a constructor arg "::adjustment", and use gtk_widget_new() for
the widget creation.
* gtk/gtkrange.c: added ::update_policy arg.
(gtk_range_set_adjustment): if adjustment is passed in as NULL, create
a default adjustment so this function can be used for derived widgets
that depend on the adjustment's existance.
(gtk_range_destroy): disconnect the adjustment signal, so we don't
get called after we got destroyed, we don't destroy the adjustment
in here, because it might have been provided from another widget.
* gtk/gtkviewport.c: introduced ::scroll_adjustments signal.
(gtk_viewport_destroy): same as gtk_range_destroy.
* gtk/gtkprogress.c (gtk_progress_destroy): same as gtk_range_destroy.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: changed gtk_widget_activate() to return a
gboolean, indicating whether this widget supports activation.
added gtk_widget_scroll_adjustements() to set the scrolling
adjustments of a widget.
Wed Nov 19 01:22:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkoptionmenu.c:
(gtk_option_menu_remove_contents):
(gtk_option_menu_update_contents): removed
gtk_container_[un]block_resize() pairs.
* gtk/gtknotebook.h:
* gtk/gtknotebook.c: removed the tab_border field, since it shouldn't
be used outside of gtknotebook.c anyways. made ARG_TAB_BORDER a
wrtie-only argument.
* *.c: made deprecated functions issue a message:
gtk_clist_set_border, gtk_container_block_resize,
gtk_container_unblock_resize, gtk_container_need_resize,
gtk_object_class_add_user_signal, gtk_spin_button_construct,
gtk_scrolled_window_construct.
removed non-functional functions:
gtk_container_disable_resize, gtk_container_enable_resize,
gtk_clist_set_policy.
Wed Nov 18 22:54:36 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbox.c (gtk_box_init):
* gtk/gtkdrawingarea.c (gtk_drawing_area_init):
* gtk/gtkeventbox.c (gtk_event_box_init):
* gtk/gtkfixed.c (gtk_fixed_init):
* gtk/gtkframe.c (gtk_frame_init):
* gtk/gtkhandlebox.c (gtk_handle_box_init):
* gtk/gtkpacker.c (gtk_packer_init):
* gtk/gtkmisc.c (gtk_misc_init):
* gtk/gtkpreview.c (gtk_preview_init):
* gtk/gtkprogress.c (gtk_progress_init):
* gtk/gtkprogressbar.c (gtk_progress_bar_init):
* gtk/gtkseparator.c (gtk_separator_init):
* gtk/gtktable.c (gtk_table_init):
* gtk/gtkviewport.c (gtk_viewport_init):
* gtk/gtkalignment.c (gtk_alignment_init):
removed setting of the GTK_BASIC flag.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c:
removed GTK_BASIC, GTK_WIDGET_BASIC and gtk_widget_basic.
* miscellaneous GtkType and macro fixups.
1998-11-23 01:54:45 +00:00
|
|
|
/* change the height of the rows, the default (height=0) is
|
|
|
|
* the hight of the current font.
|
1998-09-03 07:28:37 +00:00
|
|
|
*/
|
|
|
|
void gtk_clist_set_row_height (GtkCList *clist,
|
added args ::show_text, ::text_xalign, ::text_yalign, ::activity_mode.
Sun Nov 22 16:21:28 1998 Tim Janik <timj@gtk.org>
* gtk/gtkprogress.c: added args ::show_text, ::text_xalign,
::text_yalign, ::activity_mode.
* gtk/gtkprogressbar.c: added construct arg ::adjustment. added args
::bar_style, ::orientation, ::discrete_blocks, ::activity_step,
::activity_blocks.
(gtk_progress_bar_new):
(gtk_progress_bar_new_with_adjustment): use gtk_widget_new().
(gtk_progress_bar_construct): deprecated.
* gtk/gtkvscrollbar.c:
(gtk_vscrollbar_draw_step_back):
(gtk_vscrollbar_draw_step_forw): use "vscrollbar" as detail for
gtk_paint_arrow, to be consistent with hscrollbar.
* gtk/gtktext.c
added construct args ::hadjustment, ::vadjustment.
added args ::line_wrap, ::word_wrap.
(gtk_text_class_init): added scroll_adjustments signal.
(gtk_text_new): use gtk_widget_new.
(gtk_text_disconnect): remove adjustement with gtk_text_set_adjustments,
so we don't screw the reference counts and don't leave signals connected.
(gtk_text_destroy): disconnect adjustments signals.
(gtk_text_finalize): unref adjustments.
* gtk/gtkctree.c: added construct args ::n_columns and ::tree_column.
added args ::indent, ::spacing, ::show_stub, ::reorderable,
::use_drag_icons, ::line_style and ::expander_style.
(gtk_ctree_set_show_stub): renamed from gtk_ctree_show_stub, which is
deprecated now.
* gtk/gtkclist.h: remove GTK_CLIST_CONSTRUCT flag.
* gtk/gtkclist.c:
removed ::vadjustment and ::hadjustment args, introduced
::scroll_adjustments signal.
added ::shadow_type, ::selection_mode and ::row_height args.
added n_columns construct arg.
(gtk_clist_construct): call gtk_object_constructed().
(gtk_clist_set_row_height): if height is passed as 0,
revert to automatic height calculation.
(gtk_clist_destroy): before unrefing the adjustments, disconnect our
signal handlers.
Fri Nov 21 22:34:58 1998 Tim Janik <timj@gtk.org>
* gtk/gtkwidget.c (gtk_widget_new): call gtk_object_default_construct
like gtk_object_new.
(gtk_widget_destroy): assert that we only destroy constructed widgets.
* gtk/gtkobject.h (enum GtkArgFlags): new flag GTK_ARG_CONSTRUCT_ONLY
to identify args that may only be used for construction.
GTK_ARG_CONSTRUCT maybe used as normal arguments besides construction
time.
* gtk/gtkobject.c (gtk_object_new): invoke gtk_object_default_construct
at the end if the object is not fully constructed.
(gtk_object_newv): likewise.
(gtk_object_destroy): assert that we only destroy constructed objects.
(gtk_object_init): setup GTK_CONSTRUCTED from the
objects real klass.
(gtk_object_default_construct): new function to complete default
construction of an object by applying missing construtor args with
default values of 0, 0.0 or NULL.
(gtk_object_constructed): new function to mark an object as being
constructed (used from within constructors).
* gtk/gtkarg.c (gtk_arg_type_new_static): return the args info pointer
so it is immediatedly available for the caller.
* gtk/gtktypeutils.c (gtk_type_new): pass an object's real class to
the object initilizer (GtkObjectInitFunc takes a second arg now, the
real klass), and asure that object initializers may temporarily alter
the class pointer.
Fri Nov 20 08:00:30 1998 Tim Janik <timj@gtk.org>
* gtk/testgtk.c: change all occourances of gtk_container_add (
scrolled_window, widget) to gtk_scrolled_window_add_with_viewport (...)
for widget!=(clist, ctree, text, viewport).
* gtk/gtkcombo.c:
(gtk_combo_init): use gtk_scrolled_window_add_with_viewport()
to add children to the scrolled window.
* gtk/gtkscrolledwindow.h:
* gtk/gtkscrolledwindow.c:
changed scrolled_window->viewport to scrolled_window->child, and use
gtk_widget_scroll_adjustements() to set the scroll adjustments for the
widget, we do not create an additional viewport anymore.
added ::hadjustment and ::vadjustment constructor args.
(gtk_scrolled_window_new): use gtk_widget_new() to create the widget.
(gtk_scrolled_window_set_hadjustment):
(gtk_scrolled_window_set_vadjustment): new functions that superceed
gtk_scrolled_window_construct.
(gtk_scrolled_window_construct): deprecated this function.
* gtk/gtkhscrollbar.c:
* gtk/gtkvscrollbar.c:
* gtk/gtkhscale.c:
* gtk/gtkvscale.c:
support a constructor arg "::adjustment", and use gtk_widget_new() for
the widget creation.
* gtk/gtkrange.c: added ::update_policy arg.
(gtk_range_set_adjustment): if adjustment is passed in as NULL, create
a default adjustment so this function can be used for derived widgets
that depend on the adjustment's existance.
(gtk_range_destroy): disconnect the adjustment signal, so we don't
get called after we got destroyed, we don't destroy the adjustment
in here, because it might have been provided from another widget.
* gtk/gtkviewport.c: introduced ::scroll_adjustments signal.
(gtk_viewport_destroy): same as gtk_range_destroy.
* gtk/gtkprogress.c (gtk_progress_destroy): same as gtk_range_destroy.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c: changed gtk_widget_activate() to return a
gboolean, indicating whether this widget supports activation.
added gtk_widget_scroll_adjustements() to set the scrolling
adjustments of a widget.
Wed Nov 19 01:22:42 1998 Tim Janik <timj@gtk.org>
* gtk/gtkoptionmenu.c:
(gtk_option_menu_remove_contents):
(gtk_option_menu_update_contents): removed
gtk_container_[un]block_resize() pairs.
* gtk/gtknotebook.h:
* gtk/gtknotebook.c: removed the tab_border field, since it shouldn't
be used outside of gtknotebook.c anyways. made ARG_TAB_BORDER a
wrtie-only argument.
* *.c: made deprecated functions issue a message:
gtk_clist_set_border, gtk_container_block_resize,
gtk_container_unblock_resize, gtk_container_need_resize,
gtk_object_class_add_user_signal, gtk_spin_button_construct,
gtk_scrolled_window_construct.
removed non-functional functions:
gtk_container_disable_resize, gtk_container_enable_resize,
gtk_clist_set_policy.
Wed Nov 18 22:54:36 1998 Tim Janik <timj@gtk.org>
* gtk/gtkbox.c (gtk_box_init):
* gtk/gtkdrawingarea.c (gtk_drawing_area_init):
* gtk/gtkeventbox.c (gtk_event_box_init):
* gtk/gtkfixed.c (gtk_fixed_init):
* gtk/gtkframe.c (gtk_frame_init):
* gtk/gtkhandlebox.c (gtk_handle_box_init):
* gtk/gtkpacker.c (gtk_packer_init):
* gtk/gtkmisc.c (gtk_misc_init):
* gtk/gtkpreview.c (gtk_preview_init):
* gtk/gtkprogress.c (gtk_progress_init):
* gtk/gtkprogressbar.c (gtk_progress_bar_init):
* gtk/gtkseparator.c (gtk_separator_init):
* gtk/gtktable.c (gtk_table_init):
* gtk/gtkviewport.c (gtk_viewport_init):
* gtk/gtkalignment.c (gtk_alignment_init):
removed setting of the GTK_BASIC flag.
* gtk/gtkwidget.h:
* gtk/gtkwidget.c:
removed GTK_BASIC, GTK_WIDGET_BASIC and gtk_widget_basic.
* miscellaneous GtkType and macro fixups.
1998-11-23 01:54:45 +00:00
|
|
|
guint height);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-10-07 00:03:24 +00:00
|
|
|
/* 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
|
1998-09-03 07:28:37 +00:00
|
|
|
*/
|
|
|
|
void gtk_clist_moveto (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gint column,
|
|
|
|
gfloat row_align,
|
|
|
|
gfloat col_align);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-03-14 00:07:36 +00:00
|
|
|
/* returns whether the row is visible */
|
1998-09-03 07:28:37 +00:00
|
|
|
GtkVisibility gtk_clist_row_is_visible (GtkCList *clist,
|
|
|
|
gint row);
|
1998-01-24 19:14:42 +00:00
|
|
|
|
1998-02-08 07:55:11 +00:00
|
|
|
/* returns the cell type */
|
1998-09-03 07:28:37 +00:00
|
|
|
GtkCellType gtk_clist_get_cell_type (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gint column);
|
1998-02-08 07:55:11 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* sets a given cell's text, replacing it's current contents */
|
1998-09-03 07:28:37 +00:00
|
|
|
void gtk_clist_set_text (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gint column,
|
|
|
|
const gchar *text);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-02-08 07:55:11 +00:00
|
|
|
/* for the "get" functions, any of the return pointer can be
|
1998-09-03 07:28:37 +00:00
|
|
|
* NULL if you are not interested
|
|
|
|
*/
|
1998-10-07 00:03:24 +00:00
|
|
|
gint gtk_clist_get_text (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gint column,
|
|
|
|
gchar **text);
|
1998-02-08 07:55:11 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* sets a given cell's pixmap, replacing it's current contents */
|
1998-09-03 07:28:37 +00:00
|
|
|
void gtk_clist_set_pixmap (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gint column,
|
|
|
|
GdkPixmap *pixmap,
|
|
|
|
GdkBitmap *mask);
|
|
|
|
|
|
|
|
gint gtk_clist_get_pixmap (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gint column,
|
|
|
|
GdkPixmap **pixmap,
|
|
|
|
GdkBitmap **mask);
|
1998-02-08 07:55:11 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* sets a given cell's pixmap and text, replacing it's current contents */
|
1998-09-03 07:28:37 +00:00
|
|
|
void gtk_clist_set_pixtext (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gint column,
|
|
|
|
const gchar *text,
|
|
|
|
guint8 spacing,
|
|
|
|
GdkPixmap *pixmap,
|
|
|
|
GdkBitmap *mask);
|
|
|
|
|
1998-10-07 00:03:24 +00:00
|
|
|
gint gtk_clist_get_pixtext (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gint column,
|
|
|
|
gchar **text,
|
|
|
|
guint8 *spacing,
|
|
|
|
GdkPixmap **pixmap,
|
|
|
|
GdkBitmap **mask);
|
1998-02-08 07:55:11 +00:00
|
|
|
|
1999-02-04 02:35:32 +00:00
|
|
|
/* sets the foreground color of a row, the color must already
|
1998-09-03 07:28:37 +00:00
|
|
|
* be allocated
|
|
|
|
*/
|
|
|
|
void gtk_clist_set_foreground (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
GdkColor *color);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1999-02-04 02:35:32 +00:00
|
|
|
/* sets the background color of a row, the color must already
|
1998-09-03 07:28:37 +00:00
|
|
|
* be allocated
|
|
|
|
*/
|
|
|
|
void gtk_clist_set_background (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
GdkColor *color);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-10-16 15:00:05 +00:00
|
|
|
/* set / get cell styles */
|
|
|
|
void gtk_clist_set_cell_style (GtkCList *clist,
|
1998-10-19 22:46:38 +00:00
|
|
|
gint row,
|
|
|
|
gint column,
|
1998-10-16 15:00:05 +00:00
|
|
|
GtkStyle *style);
|
|
|
|
|
|
|
|
GtkStyle *gtk_clist_get_cell_style (GtkCList *clist,
|
1998-10-19 22:46:38 +00:00
|
|
|
gint row,
|
|
|
|
gint column);
|
1998-10-16 15:00:05 +00:00
|
|
|
|
|
|
|
void gtk_clist_set_row_style (GtkCList *clist,
|
1998-10-19 22:46:38 +00:00
|
|
|
gint row,
|
1998-10-16 15:00:05 +00:00
|
|
|
GtkStyle *style);
|
|
|
|
|
|
|
|
GtkStyle *gtk_clist_get_row_style (GtkCList *clist,
|
1998-10-19 22:46:38 +00:00
|
|
|
gint row);
|
1998-10-16 15:00:05 +00:00
|
|
|
|
1998-01-31 03:33:02 +00:00
|
|
|
/* this sets a horizontal and vertical shift for drawing
|
1998-10-07 00:03:24 +00:00
|
|
|
* the contents of a cell; it can be positive or negitive;
|
|
|
|
* this is particulary useful for indenting items in a column
|
1998-09-03 07:28:37 +00:00
|
|
|
*/
|
|
|
|
void gtk_clist_set_shift (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gint column,
|
|
|
|
gint vertical,
|
|
|
|
gint horizontal);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-09-11 13:52:42 +00:00
|
|
|
/* set/get selectable flag of a single row */
|
|
|
|
void gtk_clist_set_selectable (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gboolean selectable);
|
|
|
|
gboolean gtk_clist_get_selectable (GtkCList *clist,
|
|
|
|
gint row);
|
|
|
|
|
1998-10-01 13:24:42 +00:00
|
|
|
/* prepend/append returns the index of the row you just added,
|
|
|
|
* making it easier to append and modify a row
|
1998-09-03 07:28:37 +00:00
|
|
|
*/
|
1998-11-23 13:53:25 +00:00
|
|
|
gint gtk_clist_prepend (GtkCList *clist,
|
1998-11-26 03:43:24 +00:00
|
|
|
gchar *text[]);
|
1998-11-23 13:53:25 +00:00
|
|
|
gint gtk_clist_append (GtkCList *clist,
|
1998-11-26 03:43:24 +00:00
|
|
|
gchar *text[]);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-10-07 00:03:24 +00:00
|
|
|
/* inserts a row at index row and returns the row where it was
|
|
|
|
* actually inserted (may be different from "row" in auto_sort mode)
|
1998-09-03 07:28:37 +00:00
|
|
|
*/
|
1998-11-23 13:53:25 +00:00
|
|
|
gint gtk_clist_insert (GtkCList *clist,
|
|
|
|
gint row,
|
1998-11-26 03:43:24 +00:00
|
|
|
gchar *text[]);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
|
|
|
/* removes row at index row */
|
1998-09-03 07:28:37 +00:00
|
|
|
void gtk_clist_remove (GtkCList *clist,
|
|
|
|
gint row);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
|
|
|
/* sets a arbitrary data pointer for a given row */
|
1998-09-03 07:28:37 +00:00
|
|
|
void gtk_clist_set_row_data (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gpointer data);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-03-08 03:32:05 +00:00
|
|
|
/* sets a data pointer for a given row with destroy notification */
|
1998-10-07 00:03:24 +00:00
|
|
|
void gtk_clist_set_row_data_full (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gpointer data,
|
|
|
|
GtkDestroyNotify destroy);
|
1998-03-08 03:32:05 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* returns the data set for a row */
|
1998-09-03 07:28:37 +00:00
|
|
|
gpointer gtk_clist_get_row_data (GtkCList *clist,
|
|
|
|
gint row);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-02-08 07:55:11 +00:00
|
|
|
/* givin a data pointer, find the first (and hopefully only!)
|
1998-09-03 07:28:37 +00:00
|
|
|
* row that points to that data, or -1 if none do
|
|
|
|
*/
|
|
|
|
gint gtk_clist_find_row_from_data (GtkCList *clist,
|
|
|
|
gpointer data);
|
1998-02-08 07:55:11 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
/* force selection of a row */
|
1998-09-03 07:28:37 +00:00
|
|
|
void gtk_clist_select_row (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gint column);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
|
|
|
/* force unselection of a row */
|
1998-09-03 07:28:37 +00:00
|
|
|
void gtk_clist_unselect_row (GtkCList *clist,
|
|
|
|
gint row,
|
|
|
|
gint column);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-07-15 23:40:00 +00:00
|
|
|
/* undo the last select/unselect operation */
|
|
|
|
void gtk_clist_undo_selection (GtkCList *clist);
|
|
|
|
|
1998-10-07 00:03:24 +00:00
|
|
|
/* clear the entire list -- this is much faster than removing
|
|
|
|
* each item with gtk_clist_remove
|
1998-09-03 07:28:37 +00:00
|
|
|
*/
|
|
|
|
void gtk_clist_clear (GtkCList *clist);
|
1998-01-03 03:31:03 +00:00
|
|
|
|
1998-10-12 11:24:29 +00:00
|
|
|
/* return the row column corresponding to the x and y coordinates,
|
|
|
|
* the returned values are only valid if the x and y coordinates
|
|
|
|
* are respectively to a window == clist->clist_window
|
|
|
|
*/
|
1998-09-03 07:28:37 +00:00
|
|
|
gint gtk_clist_get_selection_info (GtkCList *clist,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint *row,
|
|
|
|
gint *column);
|
1998-03-10 05:47:09 +00:00
|
|
|
|
1998-07-15 23:40:00 +00:00
|
|
|
/* in multiple or extended mode, select all rows */
|
|
|
|
void gtk_clist_select_all (GtkCList *clist);
|
1998-06-02 02:51:46 +00:00
|
|
|
|
1998-07-15 23:40:00 +00:00
|
|
|
/* in all modes except browse mode, deselect all rows */
|
|
|
|
void gtk_clist_unselect_all (GtkCList *clist);
|
1998-06-02 02:51:46 +00:00
|
|
|
|
1998-07-15 23:40:00 +00:00
|
|
|
/* swap the position of two rows */
|
1998-09-03 07:28:37 +00:00
|
|
|
void gtk_clist_swap_rows (GtkCList *clist,
|
|
|
|
gint row1,
|
|
|
|
gint row2);
|
1998-06-02 02:51:46 +00:00
|
|
|
|
1998-12-02 00:52:14 +00:00
|
|
|
/* move row from source_row position to dest_row position */
|
|
|
|
void gtk_clist_row_move (GtkCList *clist,
|
|
|
|
gint source_row,
|
|
|
|
gint dest_row);
|
|
|
|
|
1998-08-05 20:02:32 +00:00
|
|
|
/* sets a compare function different to the default */
|
|
|
|
void gtk_clist_set_compare_func (GtkCList *clist,
|
|
|
|
GtkCListCompareFunc cmp_func);
|
|
|
|
|
|
|
|
/* the column to sort by */
|
|
|
|
void gtk_clist_set_sort_column (GtkCList *clist,
|
|
|
|
gint column);
|
|
|
|
|
|
|
|
/* how to sort : ascending or descending */
|
1998-10-07 00:03:24 +00:00
|
|
|
void gtk_clist_set_sort_type (GtkCList *clist,
|
|
|
|
GtkSortType sort_type);
|
1998-08-05 20:02:32 +00:00
|
|
|
|
|
|
|
/* sort the list with the current compare function */
|
|
|
|
void gtk_clist_sort (GtkCList *clist);
|
|
|
|
|
|
|
|
/* Automatically sort upon insertion */
|
|
|
|
void gtk_clist_set_auto_sort (GtkCList *clist,
|
|
|
|
gboolean auto_sort);
|
|
|
|
|
1998-11-05 15:44:22 +00:00
|
|
|
|
1998-01-03 03:31:03 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#endif /* __GTK_CLIST_H__ */
|