Beispiel #1
0
static int ssd_dialog_long_click (RoadMapGuiPoint *point) {

   if (!LastPointerPoint.x < 0) {
      SsdWidget container = RoadMapDialogCurrent->container;
      if (ssd_widget_find_by_pos (container, point, TRUE )) {
         return 1;
      } else {
         return 0;
      }
   }
   ssd_widget_long_click (RoadMapDialogCurrent->container, &LastPointerPoint);
   roadmap_screen_redraw ();

   return 1;
}
Beispiel #2
0
int ssd_widget_long_click (SsdWidget widget, const RoadMapGuiPoint *point) {

   SsdWidget widget_next = widget;

   if (!widget) return 0;

   /* Check all the overlapping ( in terms of click area ) widgets
   * First widget, that it or its children handle the event - wins
   */
   while ( widget_next != NULL )
   {
	   if ( ssd_widget_contains_point( widget_next, point, TRUE ) )
	   {
		   if ( ( widget_next->long_click && widget_next->long_click( widget_next, point ) ) ||
				   ( widget_next->children && ssd_widget_long_click( widget_next->children, point ) ) )
		   {
			  return 1;
		   }
	   }
	   widget_next = widget_next->next;
   }
   return 0;
}