- llist->SetFont(-1,-1,wxSLANT);
- llist->Insert("Slanted");
- llist->SetFont(-1,-1,wxNORMAL);
- llist->Insert(" and normal text and ");
- llist->SetFont(-1,-1,wxSLANT);
- llist->Insert("slanted");
- llist->SetFont(-1,-1,wxNORMAL);
- llist->Insert(" again.");
- llist->LineBreak();
-
- // add some more text for testing:
- llist->Insert("And here the source for the test program:");
- llist->LineBreak();
- llist->SetFont(wxTELETYPE,16);
- llist->Insert("And here the source for the test program:");
- llist->LineBreak();
- llist->Insert("And here the source for the test program:");
- llist->LineBreak();
- llist->Insert("And here the source for the test program:");
-
- char buffer[1024];
- FILE *in = fopen("wxLayout.cpp","r");
- if(in)
- {
- for(;;)
- {
- fgets(buffer,1024,in);
- if(feof(in))
- break;
- wxLayoutImportText(llist, buffer);
- }
- }
+ ;
+
+ llist->Insert(new wxLayoutObjectIcon(icon));
+ llist->SetFontWeight(wxBOLD);
+ llist->Insert(_T("World! "));
+ llist->SetFontWeight(wxNORMAL);
+ llist->Insert(_T("The quick brown fox jumps..."));
+ llist->LineBreak();
+
+ llist->Insert(_T("over the lazy dog."));
+ llist->SetFont(-1,-1,-1,-1,true);
+ llist->Insert(_T("underlined"));
+ llist->SetFont(-1,-1,-1,-1,false);
+ llist->SetFont(wxROMAN);
+ llist->Insert(_T("This is "));
+ llist->SetFont(-1,-1,-1,wxBOLD);
+ llist->Insert(_T("BOLD "));
+ llist->SetFont(-1,-1,-1,wxNORMAL);
+ llist->Insert(_T("and "));
+ llist->SetFont(-1,-1,wxITALIC);
+ llist->Insert(_T("italics "));
+ llist->SetFont(-1,-1,wxNORMAL);
+ llist->LineBreak();
+
+ llist->Insert(_T("and "));
+ llist->SetFont(-1,-1,wxSLANT);
+ llist->Insert(_T("slanted"));
+ llist->SetFont(-1,-1,wxNORMAL);
+ llist->Insert(_T(" text."));
+ llist->LineBreak();
+
+ llist->Insert(_T("and "));
+ llist->SetFont(-1,-1,-1,-1,-1,_T("blue"));
+ llist->Insert(_T("blue"));
+ llist->SetFont(-1,-1,-1,-1,-1,_T("black"));
+ llist->Insert(_T(" and "));
+ llist->SetFont(-1,-1,-1,-1,-1,_T("green"),_T("black"));
+ llist->Insert(_T("green on black"));
+ llist->SetFont(-1,-1,-1,-1,-1,_T("black"),_T("white"));
+ llist->Insert(_T(" text."));
+ llist->LineBreak();
+
+ llist->SetFont(-1,-1,wxSLANT);
+ llist->Insert(_T("Slanted"));
+ llist->SetFont(-1,-1,wxNORMAL);
+ llist->Insert(_T(" and normal text and "));
+ llist->SetFont(-1,-1,wxSLANT);
+ llist->Insert(_T("slanted"));
+ llist->SetFont(-1,-1,wxNORMAL);
+ llist->Insert(_T(" again."));
+ llist->LineBreak();
+
+ // add some more text for testing:
+ llist->Insert(_T("And here the source for the test program:"));
+ llist->LineBreak();
+
+ llist->SetFont(wxTELETYPE,16);
+ llist->Insert(_T("And here the source for the test program:"));
+ llist->LineBreak();
+
+ wxTextFile file(_T("wxLayout.cpp"));
+ if ( file.Open() )
+ {
+ for ( wxString s = file.GetFirstLine(); !file.Eof(); s = file.GetNextLine() )
+ {
+ wxString line;
+ llist->Insert(line.Format(_T("%6u: %s"),file.GetCurrentLine()+1,s.c_str()));
+ llist->LineBreak();
+ }
+ }