]> git.saurik.com Git - wxWidgets.git/blobdiff - user/wxLayout/wxLayout.cpp
new location for setup.h.in file
[wxWidgets.git] / user / wxLayout / wxLayout.cpp
index 7a0e4e3436adfa7426f526f42a7fd8e68c55770e..b7df97f28afc35e1f3dd68b91ad4f65c68ee10af 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_CUT,
+             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 };
 
@@ -96,6 +96,7 @@ MyFrame::MyFrame(void) :
    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__
@@ -115,10 +116,17 @@ MyFrame::MyFrame(void) :
 void
 MyFrame::AddSampleText(wxLayoutList *llist)
 {
+   llist->Clear(wxSWISS,16,wxNORMAL,wxNORMAL, false);
+   llist->SetFont(-1,-1,-1,-1,-1,"blue");
+   llist->Insert("blue");
+   llist->SetFont(-1,-1,-1,-1,-1,"black");
+   llist->Insert("The quick brown fox jumps over the lazy dog.");
+   llist->LineBreak();
+   
    llist->SetFont(wxROMAN,16,wxNORMAL,wxNORMAL, false);
    llist->Insert("--");
    llist->LineBreak();
-
+   
    llist->SetFont(wxROMAN);
    llist->Insert("The quick brown fox jumps over the lazy dog.");
    llist->LineBreak();
@@ -129,7 +137,6 @@ MyFrame::AddSampleText(wxLayoutList *llist)
    llist->SetFontWeight(wxNORMAL);
    llist->Insert("The quick brown fox jumps...");
    llist->LineBreak();
-
    llist->Insert("over the lazy dog.");
    llist->SetFont(-1,-1,-1,-1,true);
    llist->Insert("underlined");
@@ -142,7 +149,7 @@ MyFrame::AddSampleText(wxLayoutList *llist)
    llist->Insert("italics ");
    llist->SetFont(-1,-1,wxNORMAL);
    llist->LineBreak();
-   
+
    llist->Insert("and ");
    llist->SetFont(-1,-1,wxSLANT);
    llist->Insert("slanted");
@@ -242,6 +249,10 @@ void MyFrame::OnCommand( wxCommandEvent &event )
       m_lwin->Cut();
       m_lwin->Refresh(FALSE);
       break;
+   case ID_FIND:
+      m_lwin->Find("void");
+      m_lwin->Refresh(FALSE);
+      break;
    case ID_HTML:
    {
       wxLayoutExportObject *export;