Skip to content
Snippets Groups Projects
Commit 6b6e30e0 authored by rds's avatar rds
Browse files

adding a focus column for trial of column highlighting.

This is not the best thing to do, but it's quick and if no-one likes it...
parent 62459dff
No related branches found
No related tags found
No related merge requests found
......@@ -27,9 +27,9 @@
*
* Exported functions:
* HISTORY:
* Last edited: Mar 7 14:49 2006 (rds)
* Last edited: Mar 9 13:47 2006 (rds)
* Created: Thu Jul 29 10:45:00 2004 (rnc)
* CVS info: $Id: zmapWindowDrawFeatures.c,v 1.117 2006-03-07 15:12:07 rds Exp $
* CVS info: $Id: zmapWindowDrawFeatures.c,v 1.118 2006-03-09 14:11:24 rds Exp $
*-------------------------------------------------------------------
*/
......@@ -985,6 +985,27 @@ static void positionColumnCB(gpointer data, gpointer user_data)
* Event handlers
*/
/* This should use the window->focusItemSet list.
* The items will have a TYPE which anything manipulating the items
* will filter on.
*/
static void hackAHighlightColumn(ZMapWindow window, FooCanvasItem *column)
{
GdkColor color;
if(window->focusColumn)
{
gdk_color_parse("white", &color);
foo_canvas_item_set(window->focusColumn,
"fill_color_gdk", &color,
NULL);
}
window->focusColumn = zmapWindowContainerGetBackground(FOO_CANVAS_GROUP(column)) ;
gdk_color_parse("grey", &color);
foo_canvas_item_set(window->focusColumn,
"fill_color_gdk", &color,
NULL);
return ;
}
static gboolean columnBoundingBoxEventCB(FooCanvasItem *item, GdkEvent *event, gpointer data)
{
......@@ -1005,6 +1026,8 @@ static gboolean columnBoundingBoxEventCB(FooCanvasItem *item, GdkEvent *event, g
style = g_object_get_data(G_OBJECT(item), "item_feature_style") ;
zMapAssert(feature_set || style) ;
hackAHighlightColumn(window, item);
/* Button 1 and 3 are handled, 2 is passed on to a general handler which could be
* the root handler. */
switch (but_event->button)
......
......@@ -26,9 +26,9 @@
* Description: Defines internal interfaces/data structures of zMapWindow.
*
* HISTORY:
* Last edited: Mar 8 10:28 2006 (edgrif)
* Last edited: Mar 9 13:48 2006 (rds)
* Created: Fri Aug 1 16:45:58 2003 (edgrif)
* CVS info: $Id: zmapWindow_P.h,v 1.98 2006-03-09 11:29:46 edgrif Exp $
* CVS info: $Id: zmapWindow_P.h,v 1.99 2006-03-09 14:11:12 rds Exp $
*-------------------------------------------------------------------
*/
#ifndef ZMAP_WINDOW_P_H
......@@ -327,7 +327,7 @@ typedef struct _ZMapWindowStruct
#endif /* RDS_DONT_INCLUDE */
GList *focusItemSet; /* the selected/focused items. Interesting operations on these should be possible... */
FooCanvasItem *focusColumn ; /* I wanted the focusItemSet to hold this, but that involves a lot of code, which I need to think about */
/* THIS FIELD IS TEMPORARY UNTIL ALL THE SCALE/RULER IS SORTED OUT, DO NOT USE... */
double alignment_start ;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment