def refresh(self, simp=None, isauto=0):
        """ 
        Manually refreshes a widget.
        
        Note that this function can also be called using the wrapper function of
        the Simulation object: sim.refreshWidgets(). 
        """

        if simp==None:
            simp = self.simp
        if self.autorefresh==0 and isauto==1:
            return
        sim = simp.contents
        size_changed = clibrebound.reb_display_copy_data(simp)
        clibrebound.reb_display_prepare_data(simp,c_int(self.orbits))
        if sim.N>0:
            self.particle_data = (c_char * (4*7*sim.N)).from_address(sim.display_data.contents.particle_data).raw
            if self.orbits:
                self.orbit_data = (c_char * (4*9*(sim.N-1))).from_address(sim.display_data.contents.orbit_data).raw
        if size_changed:
            #TODO: Implement better GPU size change
            pass
        if self.useroverlay==True:
            self.overlay = "REBOUND (%s), N=%d, t=%g"%(sim.integrator,sim.N,sim.t)
        elif self.useroverlay==None or self.useroverlay==False:
            self.overlay = ""
        else:
            self.overlay = self.useroverlay + ", N=%d, t=%g"%(sim.N,sim.t)
        self.N = sim.N
        self.t = sim.t
        self.count += 1
Manually refreshes a widget.
        
        Note that this function can also be called using the wrapper function of
        the Simulation object: sim.refreshWidgets().