Fixes and more functionality.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1999-03-14 21:22:10 +00:00
parent 77c630ca85
commit 6ba4e8aceb
8 changed files with 200 additions and 48 deletions

View File

@@ -33,7 +33,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_WRAP, ID_NOWRAP, ID_PASTE,
ID_WXLAYOUT_DEBUG, ID_QUIT, ID_CLICK, ID_HTML, ID_TEXT, ID_TEST };
@@ -63,10 +63,9 @@ MyFrame::MyFrame(void) :
SetStatusText( "wxLayout by Karsten Ball<6C>der." );
wxMenuBar *menu_bar = new wxMenuBar();
wxMenu *file_menu = new wxMenu;
file_menu->Append( ID_CLEAR, "Clear");
file_menu->Append( ID_ADD_SAMPLE, "Example");
file_menu->Append(ID_PRINT, "&Print...", "Print");
file_menu->Append(ID_PRINT_SETUP, "Print &Setup...","Setup printer properties");
file_menu->Append(ID_PAGE_SETUP, "Page Set&up...", "Page setup");
@@ -78,18 +77,22 @@ MyFrame::MyFrame(void) :
file_menu->Append(ID_PAGE_SETUP_PS, "Page Setup PostScript...", "Page setup (PostScript)");
file_menu->Append(ID_PREVIEW_PS, "Print Preview PostScript", "Preview (PostScript)");
#endif
file_menu->AppendSeparator();
file_menu->Append(ID_WRAP, "Wrap mode", "Activate wrapping at pixel 200.");
file_menu->Append(ID_NOWRAP, "No-wrap mode", "Deactivate wrapping.");
file_menu->AppendSeparator();
file_menu->Append( ID_TEXT, "Export Text");
file_menu->Append( ID_HTML, "Export HTML");
file_menu->Append( ID_QUIT, "Exit");
wxMenuBar *menu_bar = new wxMenuBar();
menu_bar->Append(file_menu, "File" );
wxMenu *edit_menu = new wxMenu;
edit_menu->Append( ID_CLEAR, "Clear");
edit_menu->Append( ID_ADD_SAMPLE, "Example");
edit_menu->AppendSeparator();
edit_menu->Append(ID_WRAP, "Wrap mode", "Activate wrapping at pixel 200.");
edit_menu->Append(ID_NOWRAP, "No-wrap mode", "Deactivate wrapping.");
edit_menu->AppendSeparator();
edit_menu->Append(ID_PASTE, "Paste", "Paste text from clipboard.");
menu_bar->Append(edit_menu, "Edit" );
#ifndef __WXMSW__
menu_bar->Show( TRUE );
#endif // MSW
@@ -222,6 +225,9 @@ void MyFrame::OnCommand( wxCommandEvent &event )
case ID_CLICK:
cerr << "Received click event." << endl;
break;
case ID_PASTE:
m_lwin->Paste();
break;
case ID_HTML:
{
wxLayoutExportObject *export;