示例#1
0
void roadmap_splash_display (void) {
#if !defined(ANDROID) && !defined(IPHONE) && !defined(GTK2_OGL)
   int height, width;
   RoadMapImage image;
   RoadMapGuiPoint pos;

   height = roadmap_canvas_height ();
   width = roadmap_canvas_width ();


   if (height > width)
      image = (RoadMapImage) roadmap_res_get(RES_BITMAP, RES_SKIN|RES_NOCACHE, "welcome");
   else
      image = (RoadMapImage) roadmap_res_get(RES_BITMAP, RES_SKIN|RES_NOCACHE, "welcome_wide");

   if( !image)
      return;

   pos.x = (width - roadmap_canvas_image_width(image)) / 2;
   pos.y = (height - roadmap_canvas_image_height(image)) / 2;
   roadmap_canvas_draw_image (image, &pos, 0, IMAGE_NORMAL);
   roadmap_canvas_free_image (image);
   roadmap_canvas_refresh ();
#endif
}
示例#2
0
// Tab-Order:  Force a re-sort, even if was already sorted
void ssd_dialog_resort_tab_order()
{
   SsdDialog dialog = RoadMapDialogCurrent;
   SsdWidget in_focus;
   SsdWidget in_focus_def;
   BOOL      focus_set = FALSE;

   if( !dialog)
      return;

   in_focus    = dialog->in_focus;
   in_focus_def= dialog->in_focus_default;

   ssd_dialog_invalidate_tab_order();
   draw_dialog(RoadMapDialogCurrent);

   if( in_focus_def && ssd_dialog_set_focus( in_focus_def))
   {
      dialog->in_focus_default= in_focus_def;
      dialog->in_focus        = in_focus_def;
      focus_set               = TRUE;
   }

   if( in_focus && ssd_dialog_set_focus( in_focus))
      focus_set = TRUE;

   if( focus_set)
      draw_dialog(RoadMapDialogCurrent);

   roadmap_canvas_refresh ();
}
示例#3
0
// -----------------------------------------------------------------------------
// CFreeMapAppView::Draw()
// Draws the display.
// -----------------------------------------------------------------------------
//
void CFreeMapAppView::Draw( const TRect& /*aRect*/ ) const
	{
#ifdef _USE_GC
  // Get the standard graphics context
	CWindowGc& gc = SystemGc();

	if (iOffScreenBitmap) {
		gc.BitBlt(TPoint(0, 0), iOffScreenBitmap);
	} else {
		// Gets the control's extent
		TRect drawRect( Rect());
	
		// Clears the screen
		gc.Clear( drawRect );	
	}
#else
	roadmap_canvas_refresh();
#endif
	}
static int roadmap_screen_obj_pressed (RoadMapGuiPoint *point) {
   int state = 0;

   RoadMapScreenObjSelected = roadmap_screen_obj_by_pos (point);

   if (!RoadMapScreenObjSelected) return 0;

   /* There is no draggable objects on the screen. In the future if there will be such an
    * objects the short/long click handling for the small drag has to be in the drag_end event
    * like in the ssd_dialog
    */
   roadmap_pointer_cancel_dragging();


   if (RoadMapScreenObjSelected->state_fn) {
      state = (*RoadMapScreenObjSelected->state_fn) ();
      if ((state < 0) || (state >= MAX_STATES)) return 1;
   }

   if (RoadMapScreenObjSelected->images[state]) {
      RoadMapGuiPoint pos;
      roadmap_screen_obj_pos (RoadMapScreenObjSelected, &pos);

      roadmap_canvas_draw_image (RoadMapScreenObjSelected->images[state], &pos,
                           RoadMapScreenObjSelected->opacity, IMAGE_SELECTED);
   }

   roadmap_canvas_refresh ();

   if (RoadMapScreenObjSelected->flags & OBJ_FLAG_REPEAT) {
      if (RoadMapScreenObjSelected->action) {
         (*(RoadMapScreenObjSelected->action->callback)) ();
      }

      roadmap_main_set_periodic (OBJ_REPEAT_TIMEOUT,
            roadmap_screen_obj_repeat);
   }

   return 1;
}
示例#5
0
void ssd_dialog_draw (void) {

   draw_dialog(RoadMapDialogCurrent);
   roadmap_canvas_refresh ();
}