|
From: Emilien K. <cur...@us...> - 2005-01-14 14:35:15
|
Update of /cvsroot/wxdevcenter/wxDevCenter/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16571/src Modified Files: MainFrame.cpp StatusBar.cpp View.cpp Log Message: Liaison de la barre de status pour refléter le status des vues Index: StatusBar.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/StatusBar.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** StatusBar.cpp 3 Dec 2004 16:47:46 -0000 1.1 --- StatusBar.cpp 14 Jan 2005 14:34:59 -0000 1.2 *************** *** 27,36 **** using namespace wxDevCenter; ! //BEGIN_EVENT_TABLE(wxDevCenter::StatusBar, wxStatusBar) ! // EVT_SIZE(MyStatusBar::OnSize) ! // EVT_CHECKBOX(StatusBar_Checkbox, MyStatusBar::OnToggleClock) ! // EVT_BUTTON(-1, MyStatusBar::OnButton) ! // EVT_TIMER(-1, MyStatusBar::OnTimer) ! //END_EVENT_TABLE() --- 27,33 ---- using namespace wxDevCenter; ! BEGIN_EVENT_TABLE(wxDevCenter::StatusBar, wxStatusBar) ! EVT_STATUS_PANEL(StatusBar::OnStatusEvent) ! END_EVENT_TABLE() *************** *** 47,50 **** --- 44,54 ---- + void StatusBar::OnStatusEvent(StatusEvent& event) + { + SetStatusText(event.GetValue(), event.GetPane()); + event.StopPropagation(); + } + + ////////////////////////////////////////////////////////////////////// Index: MainFrame.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/MainFrame.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** MainFrame.cpp 12 Jan 2005 17:41:12 -0000 1.3 --- MainFrame.cpp 14 Jan 2005 14:34:59 -0000 1.4 *************** *** 223,227 **** void MainFrame::OnStatusChange(StatusEvent& event) { ! GetStatusBar()->SetStatusText(event.GetValue(), event.GetPane()); } --- 223,227 ---- void MainFrame::OnStatusChange(StatusEvent& event) { ! GetStatusBar()->ProcessEvent(event); } Index: View.cpp =================================================================== RCS file: /cvsroot/wxdevcenter/wxDevCenter/src/View.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** View.cpp 12 Jan 2005 13:50:55 -0000 1.2 --- View.cpp 14 Jan 2005 14:34:59 -0000 1.3 *************** *** 26,29 **** --- 26,31 ---- #include <wxDevCenter/DocView.h> + #include <wxDevCenter/StatusBar.h> + using namespace wxDevCenter; *************** *** 70,73 **** --- 72,83 ---- + // Fixe le texte du status de la vue. + void View::SetStatusText(wxString strText) + { + StatusEvent evt(StatusBar::ID_FIELD_VIEW, strText); + ProcessEvent(evt); + } + + ////////////////////////////////////////////////////////////////////// // Fonctions de gestion de base des vues |