Commit ce4a46b6 authored by claes's avatar claes

New scale cursors, and status row in ge editor

parent 298e7e68
This diff is collapsed.
......@@ -513,6 +513,16 @@ void Graph::open( char *filename)
// Needs to be converted
message( 'E', "Old version, graph needs conversion");
}
// Update grid
grow_sAttributes grow_attr;
unsigned long mask;
mask = grow_eAttr_grid_size_x | grow_eAttr_grid_size_y | grow_eAttr_grid_on;
grow_GetAttributes( grow->ctx, &grow_attr, mask);
grid_size_y = grow_attr.grid_size_y;
grid_size_x = grow_attr.grid_size_x;
grid = grow_attr.grid_on;
}
//
......@@ -1008,6 +1018,11 @@ void Graph::set_show_grid( int show)
grow_SetShowGrid( grow->ctx, show);
}
int Graph::get_show_grid()
{
return grow_GetShowGrid( grow->ctx);
}
glow_eDrawType Graph::get_border_drawtype()
{
glow_eDrawType fill_color, border_color, text_color;
......@@ -1929,6 +1944,9 @@ static int graph_grow_cb( GlowCtx *ctx, glow_tEvent event)
grow_SetMoveRestrictions( graph->grow->ctx, glow_eMoveRestriction_No, 0, 0, NULL);
grow_SetScaleEqual( graph->grow->ctx, 0);
graph->keep_mode = false;
if ( graph->cursor_motion_cb)
(graph->cursor_motion_cb) (graph->parent_ctx, event->any.x,
event->any.y);
break;
case glow_eEvent_MB1DoubleClick:
if ( event->object.object_type != glow_eObjectType_NoObject &&
......@@ -2174,7 +2192,12 @@ static int graph_grow_cb( GlowCtx *ctx, glow_tEvent event)
grow_SelectInsert( graph->grow->ctx, event->object.object);
}
}
break;
}
case grow_eMode_Scale:
grow_SetMode( graph->grow->ctx, grow_eMode_Edit);
grow_SelectClear( graph->grow->ctx);
break;
default:
;
}
......
......@@ -465,6 +465,13 @@ class Graph {
*/
void set_mode( grow_eMode mode, bool keep);
//! Get edit mode.
/*!
\return Edit mode.
*/
grow_eMode get_mode()
{ return grow->ctx->mode();}
//! Print a message
/*!
\param sev Severity. 'E' for error, 'I' for information, 'W' for warning.
......@@ -594,6 +601,9 @@ class Graph {
/*! \param show 1 gridpoints are displayed, 0 gridpoints are hidden. */
void set_show_grid( int show);
//! Checi if gridpoints are displayed.
/*! \return 1 gridpoints are displayed, 0 gridpoints are hidden. */
int get_show_grid();
//! Set backgound color in the navigation window.
/*! Background color is set to the currently selected fill color. */
......@@ -792,6 +802,11 @@ class Graph {
/*! \param restriction Type of restriction. */
void set_move_restriction( glow_eMoveRestriction restriction);
//! Get current movement restrictions.
/*! \return Type of restriction. */
glow_eMoveRestriction get_move_restriction()
{ return grow_GetMoveRestrictions( grow->ctx);}
//! Set or reset scaletype to equal scale.
/*!
......@@ -802,6 +817,13 @@ class Graph {
*/
void set_scale_equal( int equal);
//! Get current scaletype.
/*!
\return If 1, scaleing of objects are equal in x and y direction.
*/
int get_scale_equal()
{ return grow_GetScaleEqual( grow->ctx);}
//! Check if object is a subgraph.
/*! \return Returns 1 if object is a subgraph, else 0. */
int is_subgraph();
......
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