HexDisplay

Name

HexDisplay -- A Display Widget for HexGrid

Synopsis


#include <hexmap.h>





Object Hierarchy


  GObject
   +----GtkObject
         +----GtkWidget
               +----GtkDrawingArea
                     +----HexDisplay

Signal Prototypes


"hex-event" gboolean    user_function      (HexDisplay *hexdisplay,
                                            GdkEvent *event,
                                            gint arg1,
                                            gint arg2,
                                            gpointer user_data);

Description

A HexDisplay is a GtkWidget which displays a HexGrid. Since most of what it does is react to changes in HexGrid, once you've set the grid there's not much hexmap-specific functionallity.

Details

Signals

The "hex-event" signal

gboolean    user_function                  (HexDisplay *hexdisplay,
                                            GdkEvent *event,
                                            gint arg1,
                                            gint arg2,
                                            gpointer user_data);

An event has occured in the hex at (x, y). This function is called after HexObject::event is called for any HexObject in the hex. The events sent are set by hex_display_set_hex_events(). The default is no events, and is in any case restricted to those in HEX_DISPLAY_HEX_EVENT_MASK. Known bugs: Since the hexes don't have their own windows, the GDK_ENTER_NOTIFY and GDK_LEAVE_NOTIFY events are synthetic. Therefore, GdkEventCrossing::subwindow is not what would be expected (and often NULL), and (FIXME) GdkEventCrossing::focus is probably incorrect in most cases.

hexdisplay :the object which received the signal.
event :a GdkEvent
arg1 :the x coordinate of the hex
arg2 :the y coordinate of the hex
user_data :user data set when the signal handler was connected.
Returns :TRUE to stop propagation of the event