bool get_constrain_flag()const { return checkbutton_constrain.get_active(); }
void set_constrain_flag(bool x) { checkbutton_constrain.set_active(x); refresh_constrain_flag(); }
void refresh_constrain_flag() { if(duck_dragger_)duck_dragger_->constrain=get_constrain_flag(); }
+ void refresh_cursor();
StateNormal_Context(CanvasView* canvas_view);
{
}
+void StateNormal_Context::refresh_cursor()
+{
+ if(get_rotate_flag() && !get_scale_flag())
+ {
+ get_work_area()->set_cursor(Gdk::EXCHANGE);
+ return;
+ }
+ if(!get_rotate_flag() && get_scale_flag())
+ {
+ get_work_area()->set_cursor(Gdk::SIZING);
+ return;
+ }
+ if(get_rotate_flag() && get_scale_flag())
+ {
+ get_work_area()->set_cursor(Gdk::CROSSHAIR);
+ return;
+ }
+ get_work_area()->set_cursor(Gdk::ARROW);
+
+}
+
void
StateNormal_Context::load_settings()
{
default:
break;
}
+ refresh_cursor();
return false; //Pass on the event to other handlers, just in case
}
default:
break;
}
+ refresh_cursor();
return false; //Pass on the event to other handlers
}