Commit 2248990d authored by claes's avatar claes

Open annotation without selecting the text

parent a5acb119
......@@ -272,6 +272,12 @@ void grow_OpenAnnotationInput( grow_tNode node, int number)
((GrowNode *)node)->open_annotation_input( number);
}
void grow_SetAnnotationSelection( grow_tNode node, int selection)
{
if ( ((GlowArrayElem *)node)->type() == glow_eObjectType_GrowNode)
((GrowNode *)node)->set_annotation_selection( selection);
}
void grow_CloseAnnotationInput( grow_tNode node, int number)
{
if ( ((GlowArrayElem *)node)->type() == glow_eObjectType_GrowNode)
......
......@@ -363,6 +363,13 @@ typedef GlowTraceData glow_sTraceData;
*/
void grow_OpenAnnotationInput( grow_tNode node, int number);
//! Set text selection of annotation.
/*!
\param node Node object.
\param selection 1 selected, 0 not selected.
*/
void grow_SetAnnotationSelection( grow_tNode node, int selection);
//! Check if an annotation is open for input.
/*!
\param node Node object.
......
......@@ -2031,6 +2031,21 @@ void GrowNode::close_annotation_input()
}
}
void GrowNode::set_annotation_selection( int selection)
{
if ( !input_active)
return;
if ( selection && !input_selected) {
input_selected = 1;
draw();
}
else if ( !selection && input_selected) {
input_selected = 0;
draw();
}
}
void GrowNode::annot_input_event( glow_eEvent event, int keycode)
{
int i;
......
......@@ -883,6 +883,10 @@ class GrowNode : public GlowNode {
//! Close any annotation for input.
void close_annotation_input();
//! Set text selection of open annotation
/*! \param selection 1 selected, 0 not selected. */
void set_annotation_selection( int selection);
//! Handle an annotation input event.
/*!
\param event Key event.
......
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