char wxDummyChar;
-IMPLEMENT_APP (MyApp)
+IMPLEMENT_APP (MyApp)
bool MyApp::OnInit(void)
{
wxMenu *file_menu = new wxMenu;
- file_menu->Append( NEW_TEST_LOAD, "&Load layouts" );
- file_menu->Append( NEW_TEST_SAVE, "&Store layouts" );
- file_menu->Append( NEW_TEST_EXIT, "E&xit" );
+ file_menu->Append( NEW_TEST_LOAD, _("&Load layouts") );
+ file_menu->Append( NEW_TEST_SAVE, _("&Store layouts") );
+ file_menu->Append( NEW_TEST_EXIT, _("E&xit") );
wxMenuBar *menu_bar = new wxMenuBar;
- menu_bar->Append(file_menu, "&File");
+ menu_bar->Append(file_menu, _("&File"));
frame->SetMenuBar(menu_bar);
+#if wxUSE_STATUSBAR
frame->CreateStatusBar(3);
+#endif // wxUSE_STATUSBAR
- frame->Show(TRUE);
+ frame->Show(true);
frame->mpClientWnd->Refresh();
SetTopWindow(frame);
- wxMessageBox("Hello, this demo has a bunch of yet-not-fixed-bugs and missing functionality\n" \
- "The ONLY purpose is to demonstrate self-layouting toolbars,\nflat-bitmapped-buttons and 2-new FL-plugins" \
- "(cbRowDragPlugin & cbBarHintsPlugin)\n\n" \
- "BTW, disabled images and label-text are rendered at run-time" );
+ wxMessageBox(_("Hello, this demo has a bunch of yet-not-fixed-bugs and missing functionality\n\
+The ONLY purpose is to demonstrate self-layouting toolbars,\nflat-bitmapped-buttons and 2-new FL-plugins \
+(cbRowDragPlugin & cbBarHintsPlugin)\n\n\
+BTW, disabled images and label-text are rendered at run-time") );
- return TRUE;
+ return true;
}
/***** Implementation for class MyFrame *****/
EVT_MENU( NEW_TEST_EXIT, MyFrame::OnExit )
END_EVENT_TABLE()
-void MyFrame::OnLoad( wxCommandEvent& event )
-{
- wxMessageBox("Hey - you found a BIG question-mark !!");
+void MyFrame::OnLoad( wxCommandEvent& WXUNUSED(event) )
+{
+ wxMessageBox(_T("Hey - you found a BIG question-mark !!"));
}
-void MyFrame::OnSave( wxCommandEvent& event )
+void MyFrame::OnSave( wxCommandEvent& WXUNUSED(event) )
{
- wxMessageBox("Hey - you found another BIG question-mark !!");
+ wxMessageBox(_("Hey - you found another BIG question-mark !!"));
}
-void MyFrame::OnExit( wxCommandEvent& event )
+void MyFrame::OnExit( wxCommandEvent& WXUNUSED(event) )
{
Destroy();
}
{
wxTextCtrl* pCtrl =
- new wxTextCtrl( this, -1, value,
+ new wxTextCtrl( this, wxID_ANY, value,
wxDefaultPosition, wxSize(0,0), wxTE_MULTILINE );
pCtrl->SetBackgroundColour( wxColour( 255,255,255 ) );
}
MyFrame::MyFrame(wxFrame *frame)
- : wxFrame( frame, -1, "wxWindows 2.0 wxFrameLayout Test Application", wxDefaultPosition,
+ : wxFrame( frame, wxID_ANY, _("wxWidgets 2.0 wxFrameLayout Test Application"), wxDefaultPosition,
wxSize( 700, 500 ),
wxCLIP_CHILDREN | wxMINIMIZE_BOX | wxMAXIMIZE_BOX |
wxTHICK_FRAME | wxSYSTEM_MENU | wxCAPTION,
- "freimas" )
+ wxT("freimas") )
{
- mpClientWnd = CreateTextCtrl( "Client window" );
+ mpClientWnd = CreateTextCtrl( _("Client window") );
mpLayout = new wxFrameLayout( this, mpClientWnd );
cbCommonPaneProperties props;
mpLayout->GetPaneProperties( props );
- props.mRealTimeUpdatesOn = FALSE; // real-time OFF!!!
+ props.mRealTimeUpdatesOn = false; // real-time OFF!!!
mpLayout->SetPaneProperties( props, wxALL_PANES );
#endif
cbDimInfo sizes0( 200,45, // when docked horizontally
200,85, // when docked vertically
175,35, // when floated
- FALSE, // the bar is not fixed-size
+ false, // the bar is not fixed-size
4, // vertical gap (bar border)
4 // horizontal gap (bar border)
);
cbDimInfo sizes1( 150,35, // when docked horizontally
150,85, // when docked vertically
175,35, // when floated
- TRUE, // the bar is not fixed-size
+ true, // the bar is not fixed-size
4, // vertical gap (bar border)
4 // horizontal gap (bar border)
);
cbDimInfo sizes2( 195,35, // when docked horizontally
185,37, // when docked vertically
195,35, // when floated
- TRUE, // the bar is not fixed-size
+ true, // the bar is not fixed-size
4, // vertical gap (bar border)
4, // horizontal gap (bar border)
new cbDynToolBarDimHandler()
);
- mpLayout->AddBar( CreateTextCtrl("Hello"), // bar window
+ mpLayout->AddBar( CreateTextCtrl(_("Hello")), // bar window
sizes0, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
0, // insert into 0th row (vert. position)
0, // offset from the start of row (in pixels)
- "InfoViewer1", // name to refer in customization pop-ups
- TRUE
+ _("InfoViewer1"), // name to refer in customization pop-ups
+ true
);
- mpLayout->AddBar( CreateTextCtrl("Bye"), // bar window
+ mpLayout->AddBar( CreateTextCtrl(_("Bye")), // bar window
sizes0, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
1, // insert into 0th row (vert. position)
0, // offset from the start of row (in pixels)
- "InfoViewer2", // name to refer in customization pop-ups
- TRUE
+ _("InfoViewer2"), // name to refer in customization pop-ups
+ true
);
- mpLayout->AddBar( CreateTextCtrl("Fixed0"), // bar window
+ mpLayout->AddBar( CreateTextCtrl(_("Fixed0")), // bar window
sizes1, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
0, // insert into 0th row (vert. position)
0, // offset from the start of row (in pixels)
- "ToolBar1", // name to refer in customization pop-ups
- TRUE
+ _("ToolBar1"), // name to refer in customization pop-ups
+ true
);
wxDynamicToolBar* pToolBar = new wxDynamicToolBar();
- pToolBar->Create( this, -1 );
+ pToolBar->Create( this, wxID_ANY );
// 1001-1006 ids of command events fired by added tool-buttons
- pToolBar->AddTool( 1001, BMP_DIR "new.bmp" );
+ pToolBar->AddTool( 1001, wxString(wxT(BMP_DIR)) + wxT("new.bmp") );
pToolBar->AddSeparator();
- pToolBar->AddTool( 1002, BMP_DIR "open.bmp" );
- pToolBar->AddTool( 1003, BMP_DIR "save.bmp" );
- pToolBar->AddSeparator(new wxMySeparatorLine(pToolBar, -1));
- pToolBar->AddTool( 1004, BMP_DIR "cut.bmp" );
- pToolBar->AddTool( 1005, BMP_DIR "copy.bmp" );
- pToolBar->AddTool( 1006, BMP_DIR "paste.bmp" );
+ pToolBar->AddTool( 1002, wxString(wxT(BMP_DIR)) + wxT("open.bmp") );
+ pToolBar->AddTool( 1003, wxString(wxT(BMP_DIR)) + wxT("save.bmp") );
+#if wxUSE_STATLINE
+ pToolBar->AddSeparator(new wxMySeparatorLine(pToolBar, wxID_ANY));
+#endif // wxUSE_STATLINE
+ pToolBar->AddTool( 1004, wxString(wxT(BMP_DIR)) + wxT("cut.bmp") );
+ pToolBar->AddTool( 1005, wxString(wxT(BMP_DIR)) + wxT("copy.bmp") );
+ pToolBar->AddTool( 1006, wxString(wxT(BMP_DIR)) + wxT("paste.bmp") );
mpLayout->AddBar( pToolBar, // bar window (can be NULL)
sizes2, FL_ALIGN_TOP, // alignment ( 0-top,1-bottom, etc)
0, // insert into 0th row (vert. position)
0, // offset from the start of row (in pixels)
- "ToolBar2", // name to refer in customization pop-ups
- FALSE
+ wxT("ToolBar2"), // name to refer in customization pop-ups
+ false
);
- mpLayout->EnableFloating( TRUE ); // off, thinking about wxGtk...
+ mpLayout->EnableFloating( true ); // off, thinking about wxGtk...
}
MyFrame::~MyFrame()
}
#define LINE_SIZE 3
+#if wxUSE_STATLINE
void wxMySeparatorLine::DoSetSize( int x, int y,
int width, int height,
int sizeFlags)
wxStaticLine::DoSetSize(x, y, width, height, sizeFlags);
}
+#endif // wxUSE_STATLINE