return 1;
}
+
+void DragCheckBox::bound()
+{
+ Track *track = get_drag_track();
+ int trk_w = track->track_w, trk_h = track->track_h;
+ float x1 = drag_x, x2 = x1 + drag_w;
+ float y1 = drag_y, y2 = y1 + drag_h;
+ bclamp(x1, 0, trk_w); bclamp(x2, 0, trk_w);
+ bclamp(y1, 0, trk_h); bclamp(y2, 0, trk_h);
+ if( x1 >= x2 ) { if( x2 > 0 ) x1 = x2-1; else x2 = (x1=0)+1; }
+ if( y1 >= y2 ) { if( x2 > 0 ) y1 = y2-1; else y2 = (y1=0)+1; }
+ drag_x = x1; drag_y = y1; drag_w = x2-x1; drag_h = y2-y1;
+}
+
void DragCheckBox::draw_boundary(VFrame *out,
int x, int y, int w, int h)
{
virtual int64_t get_drag_position() = 0;
virtual void update_gui() { return; };
void create_objects();
+ void bound();
static void draw_boundary(VFrame *out, int x, int y, int w, int h);
int check_pending();
}
void FindObjDragScene::update_gui()
{
+ bound();
Track *track = get_drag_track();
int trk_w = track->track_w, trk_h = track->track_h;
float ctr_x = drag_x + drag_w/2, ctr_y = drag_y + drag_h/2;
}
void FindObjDragObject::update_gui()
{
+ bound();
Track *track = get_drag_track();
int trk_w = track->track_w, trk_h = track->track_h;
float ctr_x = drag_x + drag_w/2, ctr_y = drag_y + drag_h/2;
}
void FindObjDragReplace::update_gui()
{
+ bound();
Track *track = get_drag_track();
int trk_w = track->track_w, trk_h = track->track_h;
float ctr_x = drag_x + drag_w/2, ctr_y = drag_y + drag_h/2;