CaptionImpl(Modeler* pmodeler, Pane* ppane, ICaptionSite* psite) : m_ppane(ppane), m_psite(psite) { DoCreateButton(pmodeler, m_pbuttonClose, "btnclosebmp", WinPoint(780, 5), ppane); DoCreateButton(pmodeler, m_pbuttonRestore, "btnrestorebmp", WinPoint(761, 5), ppane); DoCreateButton(pmodeler, m_pbuttonMinimize, "btnminimizebmp", WinPoint(744, 5), ppane); // mdvalley: Three pointers and class names AddEventTarget(&CaptionImpl::OnClose, m_pbuttonClose->GetEventSource()); AddEventTarget(&CaptionImpl::OnRestore, m_pbuttonRestore->GetEventSource()); AddEventTarget(&CaptionImpl::OnMinimize, m_pbuttonMinimize->GetEventSource()); }
ChatListPaneImpl(const WinPoint& ptSize): m_ptItemSize(ptSize.X(), 12), m_bAutoscroll(true), m_bIgnoreScrollingEvents(false) { m_bPlayerChatsOnly = true; m_pListPane = ListPaneOld::Create(ptSize, 12, true, NULL), InsertAtBottom(m_pListPane); //mdvalley: I hate C3867. AddEventTarget(&ChatListPaneImpl::OnListSelect, m_pListPane->GetEventSource()); AddEventTarget(&ChatListPaneImpl::OnScroll, m_pListPane->GetScrollEvent()); UpdateContents(); m_keyboardDelegate = IKeyboardInput::CreateDelegate(this); GetWindow()->AddKeyboardInputFilter(m_keyboardDelegate); }
CDKeyDialogImpl() { TRef<INameSpace> pns = GetModeler()->GetNameSpace("cdkeydialog"); CastTo(m_ppane, pns->FindMember("CDKeyDialog")); CastTo(m_pbuttonOK, pns->FindMember("CDKeyOkButtonPane")); CastTo(m_pbuttonCancel, pns->FindMember("CDKeyCancelButtonPane")); CastTo(m_peditPane, (Pane*)pns->FindMember("CDKeyEditPane")); m_peditPane->SetMaxLength(c_cbCDKey - 1); // mdvalley: These button events need a pointer now, as well as the class spelled out. AddEventTarget(&CDKeyDialogImpl::OnButtonOK, m_pbuttonOK->GetEventSource()); AddEventTarget(&CDKeyDialogImpl::OnButtonCancel, m_pbuttonCancel->GetEventSource()); }
TeleportPane(Modeler* pmodeler) : m_peventDestinations(NULL), m_sortDestination(sortName) { TRef<IObject> pobjColumns; // a team pane is meaningless without a team if (trekClient.MyMission() == NULL) return; // Load the members from MDL TRef<INameSpace> pns = pmodeler->GetNameSpace("teleportpane"); CastTo(m_pbuttonTeleport, pns->FindMember("teleportTeleportButtonPane")); CastTo(m_pbuttonBack, pns->FindMember("teleportBackButtonPane")); CastTo(m_plistPaneDestinations, (Pane*)pns->FindMember("teleportPaneDestinationListPane")); CastTo(pobjColumns, pns->FindMember("teleportPaneDestinationColumns")); CastTo(m_pbuttonbarDestinations, pns->FindMember("teleportPaneDestinationListHeader")); // // Buttons // // mdvalley: Pointers and class names to shut up error C3867 AddEventTarget(&TeleportPane::OnButtonTeleport, m_pbuttonTeleport->GetEventSource()); AddEventTarget(&TeleportPane::OnButtonBack, m_pbuttonBack->GetEventSource()); AddEventTarget(&TeleportPane::OnButtonBar, m_pbuttonbarDestinations->GetEventSource()); // // The Destination list // ParseIntVector(pobjColumns, m_viColumns); m_plistPaneDestinations->SetItemPainter(new DestinationPainter(m_viColumns)); m_peventDestinations = m_plistPaneDestinations->GetSelectionEventSource(); if (m_psinkDestinations) m_peventDestinations->RemoveSink(m_psinkDestinations); m_peventDestinations->AddSink(m_psinkDestinations = new IItemEvent::Delegate(this)); // mdvalley: It's a pointer. AddEventTarget(&TeleportPane::OnButtonTeleport, m_plistPaneDestinations->GetDoubleClickEventSource()); RebuildList(); }
TabPaneImpl() : m_nPaneIDCurrent(-1), m_fShowSelPane(false) { m_pColumnPane = new ColumnPane(); m_pButtonBarPane = CreateButtonBarPane(true); m_pColumnPane->InsertAtBottom(m_pButtonBarPane); InsertAtBottom(m_pColumnPane); m_pEventSource = new IntegerEventSourceImpl(); // mdvalley: Pointer, class name AddEventTarget(&TabPaneImpl::OnSelectTab, m_pButtonBarPane->GetEventSource()); }
TrainLiveDialogPopup (TRef<INameSpace> pns, TrainingScreen* pparent) { m_pparent = pparent; // find the dialog stuff in the namespace CastTo (m_ppane, pns->FindMember("TrainLiveDialog")); CastTo (m_pbuttonOk, pns->FindMember("okButtonPane")); CastTo (m_pbuttonCancel, pns->FindMember("cancelButtonPane")); CastTo (m_pbuttonCancel2, pns->FindMember("cancelButtonPane2")); CastTo (m_pcomboCiv, pns->FindMember("civComboPane")); // handle the ok and cancel buttons // mdvalley: Pointers, Names. AddEventTarget(&TrainingScreen::TrainLiveDialogPopup::OnButtonOk, m_pbuttonOk->GetEventSource()); AddEventTarget(&TrainingScreen::TrainLiveDialogPopup::OnButtonCancel, m_pbuttonCancel->GetEventSource()); AddEventTarget(&TrainingScreen::TrainLiveDialogPopup::OnButtonCancel, m_pbuttonCancel2->GetEventSource()); // fill in the combo pane of civs m_pcomboCiv->AddItem("Iron Coalition", 25); m_pcomboCiv->AddItem("Bios", 35); m_pcomboCiv->AddItem("Gigacorp", 18); //m_pcomboCiv->AddItem("Belters", 101); }
void Dismiss (void) { Slideshow::Dismiss (); // pop up the Connecting... dialog. GetWindow()->SetWaitCursor(); // open up a dialog to let the player know the world hasn't ended TRef<IMessageBox> pMsgBox = CreateMessageBox ("Training simulation initiated...", NULL, false); GetWindow ()->GetPopupContainer ()->OpenPopup (pMsgBox, false); // pause to let the "starting..." box draw itself // mdvalley: pause to add in another pointer and class name AddEventTarget (&TrainingSlideshow::OnSwitchOut, GetWindow(), 0.1f); }
bool DoTrainLive (void) { // pop up the "creating game..." dialog. GetWindow()->SetWaitCursor (); TRef<IMessageBox> pMsgBox = CreateMessageBox ("Creating game...", NULL, false); GetWindow ()->GetPopupContainer ()->OpenPopup (pMsgBox, false); // pause to let the "creating game..." box draw itself // mdvalley: Pointer, name, repeat. AddEventTarget(&TrainingScreen::OnTrainLive, GetWindow(), 0.1f); // this then goes to OnTrainLive // return false, I don't know why return false; }
HRESULT CreateTrainingMissionGame (void) { HRESULT hr; assert (m_spAdminGamesPtr); // Create a GameParameters object IAGCGameParametersPtr spParams; if (!Error (hr = spParams.CreateInstance (CLSID_AGCGameParameters))) { // set up game parameters associated with the training game spParams->put_MinPlayers (1); spParams->put_TotalMaxPlayers (1); spParams->put_CivIDs (0, m_civID); // default is iron league, but user may pick a different one spParams->put_CivIDs (1, 35); // bios spParams->put_GameName (_bstr_t (TRAINING_MISSION_7_GAME_NAME)); spParams->put_LockTeamSettings (true); // Create a new game if (!Error (hr = m_spAdminGamesPtr->Add (spParams))) { // get the game if (!Error (hr = m_spAdminGamesPtr->get_Item (& (_variant_t) (0L), &m_spAdminGamePtr))) { // set up the teams m_spAdminGamePtr->SetTeamName (0, _bstr_t ("Training Academy")); m_spAdminGamePtr->SetTeamName (1, _bstr_t ("Bios")); // pop up the Connecting... dialog. GetWindow()->SetWaitCursor (); TRef<IMessageBox> pMsgBox = CreateMessageBox ("Connecting...", NULL, false); GetWindow ()->GetPopupContainer ()->OpenPopup (pMsgBox, false); // pause to let the "connecting..." box draw itself // mdvalley: repeat AddEventTarget(&TrainingScreen::OnTryLogon, GetWindow(), 0.1f); // this then goes to OnTryLogon } } } // terminate the games admin pointer m_spAdminGamesPtr = 0; return hr; }
ListPaneOldImpl(WinPoint size, int nItemHeight, bool bScroll, Pane* ppane) : m_iSelItem(-1), m_iTopItem(0), m_nItemHeight(nItemHeight), m_bMouseSel(false) { m_nItemWidth = size.X(); m_pEventSource = new IntegerEventSourceImpl(); m_pRightClickEventSource = new IntegerEventSourceImpl(); // TE: Initialized RightClick event m_pDoubleClickEventSource = new IntegerEventSourceImpl(); // TE: Initialized RightClick event m_pMouseOverEventSource = new IntegerEventSourceImpl(); m_pEventScroll = new EventSourceImpl(); m_cVisibleItems = size.Y()/nItemHeight; TRef<RowPane> pRowPane = new RowPane(); m_pBlankPane = new Pane(); InternalSetSize(m_pBlankPane, size); pRowPane->InsertAtBottom(m_pBlankPane); // Add the scroll bar TRef<Modeler> pModeler = GetModeler(); TRef<Image> pImageUp = pModeler->LoadImage(AWF_CONTROL_UP_ARROW, true); TRef<Image> pImageUpSel = pModeler->LoadImage(AWF_CONTROL_SELECTED_UP_ARROW, true); TRef<Image> pImageDown = pModeler->LoadImage(AWF_CONTROL_DOWN_ARROW, true); TRef<Image> pImageDownSel = pModeler->LoadImage(AWF_CONTROL_SELECTED_DOWN_ARROW, true); TRef<ButtonPane> pbuttonUp = CreateButton(new ImagePane(pImageUp), new ImagePane(pImageUpSel), false, 0.1f, 0.5f); TRef<ButtonPane> pbuttonDown = CreateButton(new ImagePane(pImageDown), new ImagePane(pImageDownSel), false, 0.1f, 0.5f); if (bScroll) { m_pScrollPane = CreateScrollPane( new ColumnPane(),//new BorderPane(0, MakeColorFromCOLORREF(TrekResources::BlackColor())), ThumbPane::Create(pModeler, false, NULL), pbuttonUp, pbuttonUp->GetEventSource(), pbuttonDown, pbuttonDown->GetEventSource(), false, 0.25f, 1, 1, 1, 1 ); // mdvalley: another pointer &ClassName AddEventTarget(&ListPaneOldImpl::OnScroll, m_pScrollPane->GetEventSource()); m_pScrollPane->SetPageSize(m_cVisibleItems); m_pScrollPane->SetSize(0); m_pScrollBar = //new EdgePane( new JustifyPane( JustifyPane::Center, WinPoint(17, size.Y()-2), m_pScrollPane)); //new EdgePane( m_pScrollPane;// ); TRef<ColumnPane> pcol = new ColumnPane(); if (ppane) { pcol->InsertAtBottom(ppane); } pcol->InsertAtBottom(m_pScrollBar); pcol->InsertAtBottom(new Pane(NULL, WinPoint(0, 8))); pRowPane->InsertAtBottom(pcol); } InsertAtBottom(pRowPane); }
MMLPopup(Modeler* pmodeler, const ZString& strTopic, bool bText) { // // Exports // m_pns = pmodeler->GetNameSpace("mmlpane"); // // The Help pane // CastTo(m_ppane, m_pns->FindMember("mmlPane")); // // Buttons // CastTo(m_pbuttonClose, m_pns->FindMember("closeButton")); // mdvalley: OnButtonClose now needs to be pointer and with class spelled out in 2005. AddEventTarget(&MMLPopup::OnButtonClose, m_pbuttonClose->GetEventSource()); // // Default attributes // TRef<FontValue> pfont; TRef<ColorValue> pcolor; TRef<ColorValue> pcolorMain; TRef<ColorValue> pcolorSecondary; TRef<ColorValue> pcolorHighlight; CastTo(pfont, m_pns->FindMember("helpFont" )); CastTo(pcolor, m_pns->FindMember("helpColor" )); CastTo(pcolorMain, m_pns->FindMember("mainLinkColor" )); CastTo(pcolorSecondary, m_pns->FindMember("secondaryLinkColor")); CastTo(pcolorHighlight, m_pns->FindMember("highlightColor" )); // // PagePanes // CastTo(m_ppageMain, m_pns->FindMember("mainPage")); m_ppageMain->SetAttributes( pfont->GetValue(), pcolor->GetValue(), pcolorMain->GetValue(), pcolorSecondary->GetValue(), pcolorHighlight->GetValue() ); // // Scroll Bars // CastTo(m_pscrollMain, (Pane*)m_pns->FindMember("mainPageScrollBar")); // // Set the initial page // if (bText) { m_ppageMain->SetTopicText(m_pns, strTopic); } else { m_ppageMain->SetTopic(m_pns, strTopic); } }
LogonPopup(Modeler* pmodeler, LogonSite* psite, LogonType lt, LPCSTR szPrompt, LPCSTR szName, LPCSTR szPW, BOOL fRememberPW) : m_psite(psite), m_lt(lt) { enum LogonNameType { lntCallsign, lntZone, lntPassport } logonNameType; if (lt == LogonLAN) logonNameType = lntCallsign; else if (trekClient.GetCfgInfo().bUsePassport) logonNameType = lntPassport; else logonNameType = lntZone; TRef<INameSpace> pnsLogonData = pmodeler->CreateNameSpace("logondata", pmodeler->GetNameSpace("gamepanes")); pnsLogonData->AddMember("promptText", new ModifiableString(szPrompt)); pnsLogonData->AddMember("Callsign", new ModifiableNumber((float)lntCallsign)); pnsLogonData->AddMember("ZoneID", new ModifiableNumber((float)lntZone)); pnsLogonData->AddMember("PassportID", new ModifiableNumber((float)lntPassport)); pnsLogonData->AddMember("logonNameType", new ModifiableNumber((float)logonNameType)); TRef<INameSpace> pns = pmodeler->GetNameSpace("logon"); CastTo(m_ppane, pns->FindMember("popup")); // mdvalley: Needs the pointer and class name. CastTo(m_pbuttonLogon, pns->FindMember("logonButtonPane")); AddEventTarget(&LogonPopup::OnButtonLogon, m_pbuttonLogon->GetEventSource()); CastTo(m_pbuttonAbort, pns->FindMember("abortButtonPane")); AddEventTarget(&LogonPopup::OnButtonAbort, m_pbuttonAbort->GetEventSource()); CastTo(m_pbuttonSignUp, pns->FindMember("signUpButtonPane")); AddEventTarget(&LogonPopup::OnButtonSignUp, m_pbuttonSignUp->GetEventSource()); CastTo(m_pbuttonCDKey, pns->FindMember("cdKeyButtonPane")); AddEventTarget(&LogonPopup::OnButtonCDKey, m_pbuttonCDKey->GetEventSource()); CastTo(m_peditName, (Pane*)pns->FindMember("nameEditPane" )); AddEventTarget(&LogonPopup::OnNameClick, m_peditName->GetClickEvent()); CastTo(m_pbuttonSavePassword, pns->FindMember("savePasswordButtonPane")); CastTo(m_ppanePassword, pns->FindMember("passwordPane")); CastTo(m_peditPassword, (Pane*)pns->FindMember("passwordEditPane")); AddEventTarget(&LogonPopup::OnPasswordClick, m_peditPassword->GetClickEvent()); m_peditPassword->SetType(EditPane::Password); m_peditPassword->SetString(ZString()); m_peditName->SetString(ZString()); // !!! disable logon button if name is empty // Get defaults if (LogonLAN == lt) { m_ppanePassword->SetHidden(true); m_pbuttonSavePassword->SetHidden(true); m_pbuttonCDKey->SetHidden(true); m_pbuttonSignUp->SetHidden(true); } else { m_peditPassword->SetString(szPW); m_pbuttonSavePassword->SetChecked(!!fRememberPW); } m_peditName->SetString(szName); m_peditName->SetMaxLength((LogonLAN != lt && trekClient.GetCfgInfo().bUsePassport) ? (c_cbPassportName - 1) : (c_cbName - 1) ); if (m_peditName->GetString().IsEmpty()) { SetFocus(m_peditName); } else { SetFocus(m_peditPassword); } pmodeler->UnloadNameSpace(pns); }
TrainingScreen(Modeler* pmodeler) { // terminate existing training game if there was one KillStandaloneGame (); //no more standalone training game Imago 6/22/09 // // exports // TRef<INameSpace> pnsTrainingData = pmodeler->CreateNameSpace("trainingdata", pmodeler->GetNameSpace("gamepanes")); pnsTrainingData->AddMember("missionNumber", g_pnumberMissionNumber = new ModifiableNumber(m_iMissionNext)); // Load the members from MDL TRef<INameSpace> pns = pmodeler->GetNameSpace("TrainingScreen"); CastTo(m_ppane, pns->FindMember("screen" )); CastTo(m_pbuttonBack, pns->FindMember("backButtonPane" )); CastTo(m_pbuttonTrainMission1, pns->FindMember("trainMission1ButtonPane" )); CastTo(m_pbuttonTrainMission2, pns->FindMember("trainMission2ButtonPane" )); CastTo(m_pbuttonTrainMission3, pns->FindMember("trainMission3ButtonPane" )); CastTo(m_pbuttonTrainMission4, pns->FindMember("trainMission4ButtonPane" )); CastTo(m_pbuttonTrainMission5, pns->FindMember("trainMission5ButtonPane" )); CastTo(m_pbuttonTrainMission6, pns->FindMember("trainMission6ButtonPane" )); CastTo(m_pbuttonTrainMission7, pns->FindMember("trainMission7ButtonPane" )); CastTo(m_pbuttonTrainMission8, pns->FindMember("trainMission8ButtonPane" )); //TheBored 06-JUL-07: nanite mission CastTo(m_pbuttonTrain, pns->FindMember("trainButtonPane" )); m_pTrainLivePopup = new TrainLiveDialogPopup(pns, this); //imago 6/22/09 pmodeler->UnloadNameSpace("TrainingScreen"); // // buttons // // mdvalley: Pointers, Classes, and bears, oh my! AddEventTarget(&TrainingScreen::OnButtonBack, m_pbuttonBack->GetEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrain, m_pbuttonTrain->GetEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrainMission1, m_pbuttonTrainMission1->GetEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrainMission2, m_pbuttonTrainMission2->GetEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrainMission3, m_pbuttonTrainMission3->GetEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrainMission4, m_pbuttonTrainMission4->GetEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrainMission5, m_pbuttonTrainMission5->GetEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrainMission6, m_pbuttonTrainMission6->GetEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrainMission7, m_pbuttonTrainMission7->GetEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrainMission8, m_pbuttonTrainMission8->GetEventSource()); //TheBored 06-JUL-07: nanite mission // // buttons // AddEventTarget(&TrainingScreen::OnButtonTrain, m_pbuttonTrainMission1->GetDoubleClickEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrain, m_pbuttonTrainMission2->GetDoubleClickEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrain, m_pbuttonTrainMission3->GetDoubleClickEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrain, m_pbuttonTrainMission4->GetDoubleClickEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrain, m_pbuttonTrainMission5->GetDoubleClickEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrain, m_pbuttonTrainMission6->GetDoubleClickEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrain, m_pbuttonTrainMission7->GetDoubleClickEventSource()); AddEventTarget(&TrainingScreen::OnButtonTrain, m_pbuttonTrainMission8->GetDoubleClickEventSource()); //TheBored 06-JUL-07: nanite mission // hilite the current mission switch (m_iMissionNext) { // here we will determine which button to hilight case Training::c_TM_1_Introduction: m_pbuttonTrainMission1->SetChecked (true); break; case Training::c_TM_2_Basic_Flight: m_pbuttonTrainMission2->SetChecked (true); break; case Training::c_TM_3_Basic_Weaponry: m_pbuttonTrainMission3->SetChecked (true); break; case Training::c_TM_4_Enemy_Engagement: m_pbuttonTrainMission4->SetChecked (true); break; case Training::c_TM_5_Command_View: m_pbuttonTrainMission5->SetChecked (true); break; case Training::c_TM_6_Practice_Arena: m_pbuttonTrainMission6->SetChecked (true); break; //TheBored 06-JUL-07: nanite mission case Training::c_TM_8_Nanite: m_pbuttonTrainMission8->SetChecked (true); break; //End TB case Training::c_TM_7_Live: default: m_pbuttonTrainMission7->SetChecked (true); break; } m_pbuttonTrain->SetChecked (true); #ifdef _DEBUG if (bStartTraining) { g_pnumberMissionNumber->SetValue(6); OnButtonTrain(); } #endif }
SelectionPane(IEventSource* peventSourceOnSelChange) { InsertAtBottom(m_prowPane = new RowPane()); // mdvalley: needs pointer and class. AddEventTarget(&SelectionPane::OnSelChange, peventSourceOnSelChange); }
HelpPaneImpl(Modeler* pmodeler, const ZString& strTopic, PagePaneIncluder* ppagePageIncluder) : m_pmodeler(pmodeler) { // // Exports // m_pmodeler->SetColorKeyHint( true ); m_pnsData = pmodeler->CreateNameSpace("helpdata"); // // Exports // m_pns = pmodeler->GetNameSpace("helppane"); // // The Help pane // TRef<Pane> ppane; CastTo(ppane, m_pns->FindMember("helpPane")); InsertAtBottom(ppane); // // Buttons // CastTo(m_pbuttonBack, m_pns->FindMember("backButton" )); // mdvalley: OnButtonBack now pointered and with class named. AddEventTarget(&HelpPaneImpl::OnButtonBack, m_pbuttonBack->GetEventSource()); CastTo(m_pbuttonClose, m_pns->FindMember("closeButton")); // // Default attributes // TRef<FontValue> pfont; TRef<ColorValue> pcolor; TRef<ColorValue> pcolorMain; TRef<ColorValue> pcolorSecondary; TRef<ColorValue> pcolorHighlight; CastTo(pfont, m_pns->FindMember("helpFont" )); CastTo(pcolor, m_pns->FindMember("helpColor" )); CastTo(pcolorMain, m_pns->FindMember("mainLinkColor" )); CastTo(pcolorSecondary, m_pns->FindMember("secondaryLinkColor")); CastTo(pcolorHighlight, m_pns->FindMember("highlightColor" )); // // The Nav pane // CastTo(m_pnavPane, m_pns->FindMember("navPane" )); // // PagePanes // CastTo(m_ppageMain, m_pns->FindMember("mainPage" )); CastTo(m_ppageSecondary, m_pns->FindMember("secondaryPage")); m_ppageMain->SetAttributes( pfont->GetValue(), pcolor->GetValue(), pcolorMain->GetValue(), pcolorSecondary->GetValue(), pcolorHighlight->GetValue() ); m_ppageSecondary->SetAttributes( pfont->GetValue(), pcolor->GetValue(), pcolorMain->GetValue(), pcolorSecondary->GetValue(), pcolorHighlight->GetValue() ); // // Includer // m_ppageMain ->SetPagePaneIncluder(ppagePageIncluder); m_ppageSecondary->SetPagePaneIncluder(ppagePageIncluder); // // Scroll Bars // CastTo(m_pscrollMain, (Pane*)m_pns->FindMember("mainPageScrollBar")); CastTo(m_pscrollSecondary, (Pane*)m_pns->FindMember("secondaryPageScrollBar")); // // Sink topic event // TRef<MainSink> psinkMain = new MainSink(this); m_ppageMain ->GetMainLinkEventSource()->AddSink(psinkMain); m_ppageSecondary->GetMainLinkEventSource()->AddSink(psinkMain); m_pnavPane ->GetEventSource() ->AddSink(psinkMain); TRef<SecondarySink> psinkSecondary = new SecondarySink(this); m_ppageMain ->GetSecondaryLinkEventSource()->AddSink(psinkSecondary); m_ppageSecondary->GetSecondaryLinkEventSource()->AddSink(psinkSecondary); // // Set the initial page // SetTopic(strTopic); }