Author Topic: Copy/Cut including line copy/cut  (Read 4439 times)

Offline IvanBatrakov

  • Single posting newcomer
  • *
  • Posts: 9
Copy/Cut including line copy/cut
« 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);
« Last Edit: September 23, 2011, 12:41:05 pm by IvanBatrakov »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Copy/Cut including line copy/cut
« Reply #1 on: September 23, 2011, 11:06:37 am »
Same request here.
But please put some text, too.
What is this topic about?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
Re: Copy/Cut including line copy/cut
« Reply #2 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.)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Copy/Cut including line copy/cut
« Reply #3 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.