How to retrieve category ID’s from widget settings?

$wg_class = new Widget_Toggle_Title();
$settings = $wg_class->get_settings();

print_r($settings);

Replace Widget_Toggle_Title class with yours.