]> git.saurik.com Git - wxWidgets.git/blobdiff - user/wxLayout/wxLayout.cpp
find position bug fixed
[wxWidgets.git] / user / wxLayout / wxLayout.cpp
index 4d8d9baf90b32017722f30c0e7ba55ccab473a46..ae08a6ce9b83d28659edf7de400093bf0dad3c62 100644 (file)
@@ -36,7 +36,7 @@ IMPLEMENT_APP(MyApp)
    enum ids{ ID_ADD_SAMPLE = 1, ID_CLEAR, ID_PRINT,
              ID_PRINT_SETUP, ID_PAGE_SETUP, ID_PREVIEW, ID_PRINT_PS,
              ID_PRINT_SETUP_PS, ID_PAGE_SETUP_PS,ID_PREVIEW_PS,
-             ID_WRAP, ID_NOWRAP, ID_PASTE, ID_COPY,
+             ID_WRAP, ID_NOWRAP, ID_PASTE, ID_COPY, ID_CUT, ID_FIND,
              ID_WXLAYOUT_DEBUG, ID_QUIT, ID_CLICK, ID_HTML, ID_TEXT,
              ID_TEST, ID_LONG_TEST };
 
@@ -94,7 +94,9 @@ MyFrame::MyFrame(void) :
    edit_menu->Append(ID_NOWRAP, "No-wrap mode", "Deactivate wrapping.");
    edit_menu->AppendSeparator();
    edit_menu->Append(ID_COPY, "Copy", "Copy text to clipboard.");
+   edit_menu->Append(ID_CUT, "Cut", "Cut text to clipboard.");
    edit_menu->Append(ID_PASTE,"Paste", "Paste text from clipboard.");
+   edit_menu->Append(ID_FIND, "Find", "Find text.");
    menu_bar->Append(edit_menu, "Edit" );
 
 #ifndef __WXMSW__
@@ -231,9 +233,19 @@ void MyFrame::OnCommand( wxCommandEvent &event )
       break;
    case ID_PASTE:
       m_lwin->Paste();
+      m_lwin->Refresh(FALSE);
       break;
    case ID_COPY:
       m_lwin->Copy();
+      m_lwin->Refresh(FALSE);
+      break;
+   case ID_CUT:
+      m_lwin->Cut();
+      m_lwin->Refresh(FALSE);
+      break;
+   case ID_FIND:
+      m_lwin->Find("void");
+      m_lwin->Refresh(FALSE);
       break;
    case ID_HTML:
    {