mrg_ui/src/mtktextbuffer.cxx
//============================================================================
// Set GUI focus to the given region, including keyboard focus, setting the
// selection to the start of the region, and scrolling to put it in view.
//
Set GUI focus to the given region, including keyboard focus, setting the
selection to the start of the region, and scrolling to put it in view.
Set GUI focus to the given region including keyboard focus setting the selection to the start of the region and scrolling to put it in view .
void textBuffer::FocusOnRegion(Region *region)
{
    int offset = region->GetOffset();
    framework.Tcl("focus %s", tk_name.str());
    framework.Tcl("%s mark set insert \"1.0 + %d chars\"",
		   tk_name.str(), offset);
    framework.Tcl("%s see \"1.0 + %d chars\"",
		   tk_name.str(), offset);
}
void textBuffer :: FocusOnRegion ( Region * region ) { int offset = region -> GetOffset ( ) ; framework . Tcl ( " " , tk_name . str ( ) ) ; framework . Tcl ( " \" \" " , tk_name . str ( ) , offset ) ; framework . Tcl ( " \" \" " , tk_name . str ( ) , offset ) ; }
Set GUI focus to the given region, including keyboard focus, setting the
selection to the start of the region, and scrolling to put it in view.
Set GUI focus to the given region including keyboard focus setting the selection to the start of the region and scrolling to put it in view .