[Padre-dev] inserting a string at the current position
Gabor Szabo
szabgab at gmail.com
Sat Mar 7 10:32:39 PST 2009
I have a sub like this in My plugin that allows me to insert arbitrary text
at the current position of the current page.
sub insert {
my $text = shift;
my $main = Padre->ide->wx->main;
my $doc = $main->current->document;
my $editor = $doc->editor;
$editor->InsertText($editor->GetCurrentPos(), $text);
return;
}
1) how could I simplify this?
2) I'd like to offer this as a simple method for the plugin writers
where shall I put it and how shall I call it?
Gabor
More information about the Padre-dev
mailing list