Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Copy/Cut including line copy/cut

(1/1)

IvanBatrakov:
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);

oBFusCATed:
Same request here.
But please put some text, too.
What is this topic about?

MortenMacFly:
Another thing: Such a change in the behaviour should be configurable. (...as it changes the workflow for users.)

Jenna:

--- Quote from: oBFusCATed on September 23, 2011, 11:06:37 am ---Same request here.
But please put some text, too.
What is this topic about?

--- End quote ---
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.

Navigation

[0] Message Index

Go to full version