diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2018-12-21 14:58:27 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2018-12-21 14:58:27 (GMT) |
commit | 223c2d906ccdb1ae680a474884448c799878a06f (patch) | |
tree | 7da08923299dfd950e34f4041e6967d1000c8f99 /src/gtkext/gtkdisplaypanel.c | |
parent | 6a444b273cf812c080c57d36a43436bf4aa4d55e (diff) |
Updated the graph view when updating the current location.
Diffstat (limited to 'src/gtkext/gtkdisplaypanel.c')
-rw-r--r-- | src/gtkext/gtkdisplaypanel.c | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/src/gtkext/gtkdisplaypanel.c b/src/gtkext/gtkdisplaypanel.c index b937e2e..e548bf7 100644 --- a/src/gtkext/gtkdisplaypanel.c +++ b/src/gtkext/gtkdisplaypanel.c @@ -108,9 +108,6 @@ static GLoadedContent *gtk_display_panel_get_content(const GtkDisplayPanel *); /* Fournit le position courante dans un panneau de chargement. */ static GLineCursor *gtk_display_panel_get_cursor(const GtkDisplayPanel *); -/* Définit le position courante dans un panneau de chargement. */ -static void gtk_display_panel_set_cursor(GtkDisplayPanel *, const GLineCursor *); - /* S'assure qu'un emplacement donné est visible à l'écran. */ static void gtk_display_panel_scroll_to_cursor(GtkDisplayPanel *, const GLineCursor *, ScrollPositionTweak, bool); @@ -209,7 +206,6 @@ static void gtk_display_panel_loaded_interface_init(GLoadedPanelInterface *iface iface->get_content = (get_loaded_panel_content_fc)gtk_display_panel_get_content; iface->get_cursor = (get_loaded_cursor_fc)gtk_display_panel_get_cursor; - iface->set_cursor = (set_loaded_cursor_fc)gtk_display_panel_set_cursor; iface->scroll = (scroll_loaded_to_cursor_fc)gtk_display_panel_scroll_to_cursor; iface->cache_glance = (cache_loaded_glance_fc)gtk_display_panel_cache_glance; @@ -1126,26 +1122,6 @@ static GLineCursor *gtk_display_panel_get_cursor(const GtkDisplayPanel *panel) /****************************************************************************** * * -* Paramètres : panel = composant GTK à mettre à jour. * -* cursor = informations relatives à la position du curseur. * -* * -* Description : Définit le position courante dans un panneau de chargement. * -* * -* Retour : - * -* * -* Remarques : - * -* * -******************************************************************************/ - -static void gtk_display_panel_set_cursor(GtkDisplayPanel *panel, const GLineCursor *cursor) -{ - GTK_DISPLAY_PANEL_GET_CLASS(panel)->set_cursor(panel, cursor); - -} - - -/****************************************************************************** -* * * Paramètres : panel = composant GTK à manipuler. * * cursor = emplacement à présenter à l'écran. * * tweak = adaptation finale à effectuer. * @@ -1162,6 +1138,7 @@ static void gtk_display_panel_set_cursor(GtkDisplayPanel *panel, const GLineCurs static void gtk_display_panel_scroll_to_cursor(GtkDisplayPanel *panel, const GLineCursor *cursor, ScrollPositionTweak tweak, bool move) { GtkWidget *parent; /* Support parent à valider */ + GtkDisplayPanelClass *class; /* Classe de l'instance */ gint x; /* Abscisse à garantir */ gint y; /* Ordonnée à garantir */ GtkWidget *viewport; /* Parent avec défilement */ @@ -1181,10 +1158,10 @@ static void gtk_display_panel_scroll_to_cursor(GtkDisplayPanel *panel, const GLi if (GTK_IS_DISPLAY_PANEL(parent)) panel = GTK_DISPLAY_PANEL(parent); - /* - if (GTK_DISPLAY_PANEL_GET_CLASS(panel)->define != NULL) - GTK_DISPLAY_PANEL_GET_CLASS(panel)->define(panel, addr); - */ + class = GTK_DISPLAY_PANEL_GET_CLASS(panel); + + if (class->prepare != NULL) + class->prepare(panel, cursor); if (gtk_display_panel_get_cursor_coordinates(panel, cursor, &x, &y, tweak)) { @@ -1221,7 +1198,7 @@ static void gtk_display_panel_scroll_to_cursor(GtkDisplayPanel *panel, const GLi /* Déplacement du curseur */ if (move && gtk_display_panel_get_cursor_coordinates(panel, cursor, &x, &y, SPT_RAW)) - GTK_DISPLAY_PANEL_GET_CLASS(panel)->move_caret_to(panel, x, y); + class->move_caret_to(panel, x, y); } |