Function to paste_active, autoscrolling_active and create_con_active added

parent f03e0414
......@@ -771,6 +771,16 @@ int flow_PasteStop( flow_tCtx ctx)
return ctx->paste_stop();
}
int flow_GetPasteActive( flow_tCtx ctx)
{
return ctx->get_paste_active();
}
int flow_GetAutoscrollingActive( flow_tCtx ctx)
{
return ctx->get_autoscrolling_active();
}
int flow_PendingPaste( flow_tCtx ctx)
{
return ctx->pending_paste();
......@@ -781,4 +791,14 @@ int flow_PendingPasteStop( flow_tCtx ctx)
return ctx->pending_paste_stop();
}
int flow_GetConCreateActive( flow_tCtx ctx)
{
return ctx->get_con_create_active();
}
int flow_ConCreateStop( flow_tCtx ctx)
{
return ctx->con_create_stop();
}
......@@ -251,8 +251,12 @@ int flow_LoadNodeClass( flow_tCtx ctx, char *fname, flow_tNodeClass *nodeclass);
void flow_SetTipText( flow_tCtx ctx, flow_tObject object, char *text, int x, int y);
void flow_RemoveTipText( flow_tCtx ctx);
int flow_PasteStop( flow_tCtx ctx);
int flow_GetPasteActive( flow_tCtx ctx);
int flow_GetAutoscrollingActive( flow_tCtx ctx);
int flow_PendingPaste( flow_tCtx ctx);
int flow_PendingPasteStop( flow_tCtx ctx);
int flow_GetConCreateActive( flow_tCtx ctx);
int flow_ConCreateStop( flow_tCtx ctx);
#if defined __cplusplus
......
......@@ -979,6 +979,9 @@ int FlowCtx::event_handler( flow_eEvent event, int x, int y, int w, int h)
if ( window_width != width || window_height != height) {
window_width = width;
window_height = height;
if ( type() == flow_eCtxType_Brow)
// Get FlowFrame borders
((BrowCtx *)ctx)->frame_x_right = MAX( x_right, 1.0 * (window_width + offset_x) / zoom_factor);
size_changed = 1;
if ( event_callback[flow_eEvent_Resized]) {
......@@ -2339,3 +2342,15 @@ int FlowCtx::pending_paste_stop()
node_movement_paste_pending = 0;
return 1;
}
int FlowCtx::con_create_stop()
{
if ( !con_create_active)
return 0;
if ( auto_scrolling_active)
auto_scrolling_stop();
con_create_active = 0;
return 1;
}
......@@ -320,8 +320,12 @@ class FlowCtx {
int is_visible( FlowArrayElem *element, flow_eVisible type);
void move_selected_nodes( double delta_x, double delta_y, int grid);
int paste_stop();
int get_paste_active() { return node_movement_paste_active;}
int get_autoscrolling_active() { return auto_scrolling_active;}
int pending_paste() { return node_movement_paste_pending;}
int pending_paste_stop();
int get_con_create_active() { return con_create_active;}
int con_create_stop();
void set_inverse_color( flow_eDrawType color) { inverse_color = color; redraw();}
~FlowCtx();
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment