[Gcblue-commits] gcb_wx/src/graphics tcMessageCenter.cpp,1.2,1.3 tcMessageInterface.cpp,1.1,1.2 tcPo
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-12-02 04:17:35
|
Update of /cvsroot/gcblue/gcb_wx/src/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31820/src/graphics Modified Files: tcMessageCenter.cpp tcMessageInterface.cpp tcPopupControl.cpp Log Message: Sonar work Index: tcPopupControl.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcPopupControl.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcPopupControl.cpp 2 Nov 2004 04:23:56 -0000 1.5 --- tcPopupControl.cpp 2 Dec 2004 04:17:25 -0000 1.6 *************** *** 198,201 **** --- 198,202 ---- /** * modified to handle panel, TODO system needs rework + * This is a mess. */ void tcPopupControl::OnLButtonDown(wxMouseEvent& event) *************** *** 212,215 **** --- 213,217 ---- wxPoint p = event.GetPosition(); wxRealPoint pointf((float)p.x,(float)p.y); + std::string textParam = ""; if (mpMenu != NULL) *************** *** 221,224 **** --- 223,227 ---- pythonCommand = pmd->mzCommand; uiCommand = pmd->mzUserInput; + textParam = pmd->textParam; callCommand = true; } *************** *** 256,260 **** else { ! mpCommandInterface->AddPythonCommand(pythonCommand.c_str(), builtInCommand); // builtInCommand used as a param here } } --- 259,270 ---- else { ! if (builtInCommand == -1) ! { ! mpCommandInterface->AddPythonCommand(pythonCommand.c_str(), textParam); ! } ! else ! { ! mpCommandInterface->AddPythonCommand(pythonCommand.c_str(), builtInCommand); // builtInCommand used as a param here ! } } } Index: tcMessageInterface.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcMessageInterface.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcMessageInterface.cpp 14 Nov 2004 22:52:21 -0000 1.1 --- tcMessageInterface.cpp 2 Dec 2004 04:17:25 -0000 1.2 *************** *** 45,48 **** --- 45,51 ---- } + /** + * + */ tcMessageInterface* tcMessageInterface::Get() { *************** *** 53,56 **** --- 56,69 ---- /** + * + */ + void tcMessageInterface::PopupMessage(const std::string& msg) + { + wxASSERT(messageCenter); + + messageCenter->PopupMessage(msg); + } + + /** * Must be called before using DisplayChannelMessage */ Index: tcMessageCenter.cpp =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/src/graphics/tcMessageCenter.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcMessageCenter.cpp 23 Nov 2004 23:30:56 -0000 1.2 --- tcMessageCenter.cpp 2 Dec 2004 04:17:25 -0000 1.3 *************** *** 24,27 **** --- 24,28 ---- #include "tcMessageCenter.h" #include "tcMessageChannel.h" + #include "tcPopupMessage.h" #include <stdio.h> *************** *** 170,173 **** --- 171,191 ---- } + /** + * Pops up a message for the user to see. Manages placement of + * popup to allow multiple popups to be displayed simultaneously. + */ + void tcMessageCenter::PopupMessage(const std::string& msg) + { + wxPoint pos = popupBase; + pos.y += popupCount * 25; + + + tcPopupMessage* popup = new tcPopupMessage(msg, pos, 200); + popup->SetActive(true); + + popupCount = (popupCount + 1) % 4; + } + + /** *************** *** 177,181 **** const wxSize& size, const wxString& name) : tc3DWindow(parent, pos, size, name, 0), ! activeChannelName("") { channelTab.Set(10, 140, 10, 30); --- 195,201 ---- const wxSize& size, const wxString& name) : tc3DWindow(parent, pos, size, name, 0), ! activeChannelName(""), ! popupBase(50, 70), ! popupCount(0) { channelTab.Set(10, 140, 10, 30); |