Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: IvanBatrakov on September 23, 2011, 10:44:38 am

Title: Copy/Cut including line copy/cut
Post by: IvanBatrakov on September 23, 2011, 10:44:38 am
to copy/cut entire string if no selection

void cbStyledTextCtrl::Copy()
{
   if(true == GetSelectedText().IsEmpty())
   {
      wxScintilla::LineCopy();
   }
   else
   {
      wxScintilla::Copy();
   }
}

//cbstyledtextctrl.cpp

void cbStyledTextCtrl::Cut()
{
   if(true == GetSelectedText().IsEmpty())
   {
      wxScintilla::LineCut();
   }
   else
   {
      wxScintilla::Cut();
   }
}


// main.cpp

        canCut = !eb->IsReadOnly();// && hasSel;
        canSelAll = eb->CanSelectAll();
...

mbar->Enable(idEditCopy, true);//hasSel);

...

m_pToolbar->EnableTool(idEditCopy, true);//hasSel);
        m_pToolbar->EnableTool(idEditPaste, canPaste);
Title: Re: Copy/Cut including line copy/cut
Post by: oBFusCATed on September 23, 2011, 11:06:37 am
Same request here.
But please put some text, too.
What is this topic about?
Title: Re: Copy/Cut including line copy/cut
Post by: MortenMacFly on September 23, 2011, 01:19:09 pm
Another thing: Such a change in the behaviour should be configurable. (...as it changes the workflow for users.)
Title: Re: Copy/Cut including line copy/cut
Post by: Jenna on September 23, 2011, 01:29:59 pm
Same request here.
But please put some text, too.
What is this topic about?
And as in the other thread:

Please post patches, instead of code-snippets, so it is clear which parts of the code are new.
Makes it also easier to test.