Sophie

Sophie

distrib > PLD > ra > i686 > by-pkgid > dcddc2498c6090d6324872243a403571 > files > 28

ToutDoux-devel-1.2.6-7.i686.rpm

/*****************************************************************************/
/* td_mod_canvas.h : Objet Gtk+
 * td_mod_canvas.h : Gtk+ object
 *
 *
 * ToutDoux : Chtit gestionnaire de projet - A littl' project manager
 * Copyright (c) 2001 Philippe Roy
 * Auteur - Author : Philippe Roy <ph_roy@toutdoux.org>
 *
 *
 * Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier
 * sous les termes de la licence publique générale GNU telle qu'elle est publiée par
 * la Free Software Foundation ; soit la version 2 de la licence, ou
 * (comme vous voulez) toute version ultérieure.
 *
 * Ce programme est distribué dans l'espoir qu'il sera utile,
 * mais SANS AUCUNE GARANTIE ; même sans la garantie de
 * COMMERCIALITÉ ou d'ADÉQUATION A UN BUT PARTICULIER. Voir la
 * licence publique générale GNU pour plus de détails.
 *
 * Vous devriez avoir reçu une copie de la licence publique générale GNU
 * avec ce programme ; si ce n'est pas le cas, écrivez à la Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/*****************************************************************************/
#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <gnome.h>

/*****************************************************************************/
/*** Macros */
/*****************************************************************************/
#define TD_TYPE_MOD_CANVAS (td_mod_canvas_get_type ())
#define TD_MOD_CANVAS(obj) (GTK_CHECK_CAST ((obj), TD_TYPE_MOD_CANVAS, TdModCanvas))
#define TD_MOD_CANVAS_CLASS(klass) (GTK_CHECK_CLASS_CASTS ((klass), TD_TYPE_MOD_CANVAS, TdModCanvasClass))
#define TD_IS_MOD_CANVAS(obj) (GTK_CHECK_TYPE ((obj), TD_TYPE_MOD_CANVAS))
#define TD_IS_MOD_CANVAS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TD_TYPE_MOD_CANVAS))

/*****************************************************************************/
/*** Structure */
/*****************************************************************************/
typedef struct _TdModCanvas TdModCanvas;
typedef struct _TdModCanvasClass TdModCanvasClass;

struct _TdModCanvas
{
  /*< public >*/
  GtkObject object;
  gchar *name; /*** Nom - Name */
  gchar *name_intl; /*** Nom international - International name */
  int id; /*** Identificateur - Identifier */
  GtkWidget *label; /*** Etiquette - Label */
  gboolean customize; /*** Personnalisable - Customizable */
  gboolean reorderable; /*** Réarrangeable - Reorderable */
  GList *field; /*** Champs - Fields */
  GList *symbol; /*** Symboles - Symbols */
  gchar *symbol_file; /*** Localisation du fichier des symboles - File location of symbols */
  int column_oid; /*** Localisation du champs des idendificateurs - Location of identifiers field */
  gchar *table; /*** Nom de la table - Table name */
  gchar *table_net; /*** Nom de la table du reseau - Network table name */

  GtkWidget *widget; /*** Widget */
  GtkWidget *widget_data; /*** Widget de données - Widget with data */
  GtkWidget *vruler; /*** Règle verticale - Vertical ruler */
  GtkWidget *hruler; /*** Règle horizontale - Horizontal ruler */
  GtkWidget *menu_widget; /*** Menu */
  GtkWidget *menu_link_widget; /*** Menu des liens - Links menu */
  GnomeCanvasGroup *selected; /*** Item selectionné - Selected item */
  GList *selected_child; /*** Items enfant selectionnés- Selected child items */
  GList *selected_link_in; /*** Liens entrants selectionnés- Selected input links */
  GList *selected_link_out; /*** Liens sortants selectionnés- Selected output links */
  GList *selected_link_arrow_in; /*** Flèches entrantes selectionnées - Selected input arrows */
  GList *selected_link_arrow_out; /*** Flèches sortantes selectionnées - Selected output arrows */
  GnomeCanvasItem *link; /*** Lien - Link */
  int dragging; /*** Drapeau du tirer - Dragging flag */
  double dragging_x; /*** Coordonnée x du tirer - x coordinate of dragging */
  double dragging_y; /*** Coordonnée y du tirer - y coordinate of dragging */
  double init_x; /*** Coordonnée x initiale du tirer - Initial x coordinate of dragging */
  double init_y; /*** Coordonnée y initiale du tirer - Initial y coordinate of dragging */
  GtkObject *panwindow; /*** Fenêtre pan - Pan window */
  GtkWidget *zoom_label; /*** Etiquette du zoom - Zoom label */
};

struct _TdModCanvasClass
{
  GtkObjectClass parent_class;
};

/*****************************************************************************/
/*** Arguments */
/*****************************************************************************/
static void td_mod_canvas_set_name (TdModCanvas *mod_canvas, gchar *name);
static void td_mod_canvas_set_name_intl (TdModCanvas *mod_canvas, gchar *name_intl);
static void td_mod_canvas_set_customize (TdModCanvas *mod_canvas, gboolean customize);
static void td_mod_canvas_set_reorderable (TdModCanvas *mod_canvas, gboolean reorderable);
static void td_mod_canvas_set_symbol_file (TdModCanvas *mod_canvas, gchar *symbol_file);
static void td_mod_canvas_set_column_oid (TdModCanvas *mod_canvas, int column_oid);
static void td_mod_canvas_set_table (TdModCanvas *mod_canvas, gchar *table);
static void td_mod_canvas_set_table_net (TdModCanvas *mod_canvas, gchar *table_net);
static void td_mod_canvas_set_arg (GtkObject *object, GtkArg *arg, guint arg_id);
static void td_mod_canvas_get_arg (GtkObject *object, GtkArg *arg, guint arg_id);

/*****************************************************************************/
/*** Initialisation */
/*****************************************************************************/
static void td_mod_canvas_init (TdModCanvas *mod_canvas);
static void td_mod_canvas_class_init (TdModCanvasClass *klass);
GtkType td_mod_canvas_get_type (void);
GtkObject *td_mod_canvas_new (void);
void td_mod_canvas_destroy (TdModCanvas *mod_canvas);
void td_mod_canvas_show (TdModCanvas *mod_canvas);
void td_mod_canvas_hide (TdModCanvas *mod_canvas);

/*****************************************************************************/
/*** Affectations - Allocations */
/*****************************************************************************/
void td_mod_canvas_add_symbol (TdModCanvas *mod_canvas, GtkObject *symbol);

/*****************************************************************************/
/*** Commandes - Commands */
/*****************************************************************************/
void td_mod_canvas_create (TdModCanvas *mod_canvas, TdMod *mod);
gboolean td_mod_canvas_button_press (GtkWidget *widget, GdkEventButton *event, TdModCanvas *mod_canvas);
void td_mod_canvas_zoom_changed (GtkAdjustment *adj, TdModCanvas *mod_canvas);
void td_mod_canvas_scrollbar_changed (GtkAdjustment *adj, TdModCanvas *mod_canvas);