• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ Hide函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中Hide函数的典型用法代码示例。如果您正苦于以下问题:C++ Hide函数的具体用法?C++ Hide怎么用?C++ Hide使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了Hide函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: EmAddInit

// Initialize
void EmAddInit(HWND hWnd, EM_ADD *p)
{
	// Validate arguments
	if (hWnd == NULL || p == NULL)
	{
		return;
	}

	// Initialize controls
	CbAddStr(hWnd, C_PACKET_SWITCH, _UU("SM_LOG_SWITCH_0"), 0);
	CbAddStr(hWnd, C_PACKET_SWITCH, _UU("SM_LOG_SWITCH_1"), 1);
	CbAddStr(hWnd, C_PACKET_SWITCH, _UU("SM_LOG_SWITCH_2"), 2);
	CbAddStr(hWnd, C_PACKET_SWITCH, _UU("SM_LOG_SWITCH_3"), 3);
	CbAddStr(hWnd, C_PACKET_SWITCH, _UU("SM_LOG_SWITCH_4"), 4);
	CbAddStr(hWnd, C_PACKET_SWITCH, _UU("SM_LOG_SWITCH_5"), 5);

	if (p->NewMode)
	{
		// Newly creation mode
		RPC_ENUM_DEVICE t;
		HUB_LOG g;

		Zero(&g, sizeof(g));
		g.PacketLogSwitchType = LOG_SWITCH_DAY;
		g.PacketLogConfig[PACKET_LOG_TCP_CONN] = g.PacketLogConfig[PACKET_LOG_DHCP] = 1;

		EmHubLogToDlg(hWnd, &g);

		Zero(&t, sizeof(t));
		if (CALL(hWnd, EcEnumAllDevice(p->Rpc, &t)))
		{
			UINT i;
			CbSetHeight(hWnd, C_DEVICE, 18);

			for (i = 0;i < t.NumItem;i++)
			{
				RPC_ENUM_DEVICE_ITEM *dev = &t.Items[i];
				wchar_t tmp[MAX_SIZE];

				StrToUni(tmp, sizeof(tmp), dev->DeviceName);

				CbAddStr(hWnd, C_DEVICE, tmp, 0);
			}

			FreeRpcEnumDevice(&t);
		}

		SetText(hWnd, 0, _UU("EM_ADD_NEW"));
	}
	else
	{
		// Edit mode (to obtain a configuration)
		wchar_t tmp[MAX_PATH];
		RPC_ADD_DEVICE t;
		Hide(hWnd, R_PROMISCUS);

		Zero(&t, sizeof(t));
		StrCpy(t.DeviceName, sizeof(t.DeviceName), p->DeviceName);

		if (CALL(hWnd, EcGetDevice(p->Rpc, &t)))
		{
			EmHubLogToDlg(hWnd, &t.LogSetting);
		}
		else
		{
			Close(hWnd);
		}

		StrToUni(tmp, sizeof(tmp), p->DeviceName);
		CbAddStr(hWnd, C_DEVICE, tmp, 0);

		Disable(hWnd, C_DEVICE);

		SetText(hWnd, 0, _UU("EM_ADD_EDIT"));
	}

	EmAddUpdate(hWnd, p);
}
开发者ID:OchinDesh2OchinPur,项目名称:softether,代码行数:79,代码来源:EM.c


示例2: switch

// --------------------------------------------------------------------------
void CToolTipWnd::RelayEvent( LPMSG lpMsg )
{
   switch( lpMsg->message ) 
   {
      case WM_KEYDOWN:
         Hide();
         break;
  
      case WM_LBUTTONDOWN:
      case WM_RBUTTONDOWN:
      case WM_NCLBUTTONDOWN:
      case WM_NCRBUTTONDOWN:
         Hide();
         break;
      
      case WM_MOUSEMOVE:
      case WM_NCMOUSEMOVE:
      {
         // This is a fix to allow for messages to be made visible when not
         // using the mouse.
         if ( m_bSkipNextMove )
         { 
//            TRACE0("Move skipped\n");
            m_bSkipNextMove = false; 
            return;
         }
         else
		 {
//	         TRACE0("Move\n");
		 }

         HWND wndPt = lpMsg->hwnd;
         CPoint pt;
         pt.x = lpMsg->pt.x;
         pt.y = lpMsg->pt.y;

         // Don't show the tooltips if the application does not have the input focus
         CWnd *pFocusWnd = AfxGetApp()->m_pMainWnd->GetFocus();
         if ( pFocusWnd == NULL )
            break;

         // There are 3 possible states regarding tooltip controls:
         // a) moving outside any ctrl
         // b) going from outside a ctrl to inside
         // c) moving inside the control
         // d) going from inside a ctrl to outside

         BTOOLINFO *stToolInfo = NULL;
         BOOL found = m_toolPtr.Lookup( wndPt, (void *&)stToolInfo );

         if ( m_pCurrwnd == NULL ) // was not in a control
         {
            if ( found ) // enters a control (now in a control)
            {
//               TRACE0("OUT -> IN\n");
               m_clrTextColor = stToolInfo->clrToolTextClr;
               m_strText = stToolInfo->strToolText;
               Show( pt.x, pt.y, stToolInfo->iTimerDelay, stToolInfo->iTimerDelayShow );
               m_pCurrwnd = wndPt;
            }
            else // still not in a control
			{
//               TRACE0("OUT -> OUT\n");
			}
         }
         else // was in a control
         {
            ASSERT( m_pCurrwnd != NULL );
            CRect rect;
            ::GetWindowRect( m_pCurrwnd, &rect );
            if ( rect.PtInRect( lpMsg->pt ) ) // still in the same control
            {
//               TRACE0("IN -> IN (same)\n");
               if ( m_bStuck )
                  if ( IsWindowVisible() )
                  {
                     // may be over a tooltip, so look for previous control
                     if ( ! found )
                        found = m_toolPtr.Lookup( m_pCurrwnd, (void *&)stToolInfo );
                     ASSERT( found );
		               Show( pt.x, pt.y, stToolInfo->iTimerDelay, stToolInfo->iTimerDelayShow );
                  }
            }
            else // gone outside the control
            {
               Hide(); 
               m_pCurrwnd = NULL;

               if ( found )  // to another control
               {
//                  TRACE0("IN -> IN (other)\n");
                  m_clrTextColor = stToolInfo->clrToolTextClr;
                  m_strText = stToolInfo->strToolText;
	               Show( pt.x, pt.y, stToolInfo->iTimerDelay, stToolInfo->iTimerDelayShow );
                  m_pCurrwnd = wndPt;
               }
               else
			   {
//                  TRACE0("IN -> OUT\n");
//.........这里部分代码省略.........
开发者ID:akhileshzmishra,项目名称:Excel-comparion-tool,代码行数:101,代码来源:ToolTipWnd.cpp


示例3: wxASSERT_MSG


//.........这里部分代码省略.........
            if (    estimated > m_display_estimated
                 && m_ctdelay >= 0
               )
            {
                ++m_ctdelay;
            }
            else if (    estimated < m_display_estimated
                      && m_ctdelay <= 0
                    )
            {
                --m_ctdelay;
            }
            else
            {
                m_ctdelay = 0;
            }
            if (    m_ctdelay >= m_delay          // enough confirmations for a higher value
                 || m_ctdelay <= (m_delay*-1)     // enough confirmations for a lower value
                 || value == m_maximum            // to stay consistent
                 || elapsed > m_display_estimated // to stay consistent
                 || ( elapsed > 0 && elapsed < 4 ) // additional updates in the beginning
               )
            {
                m_display_estimated = estimated;
                m_ctdelay = 0;
            }
        }

        long display_remaining = m_display_estimated - elapsed;
        if ( display_remaining < 0 )
        {
            display_remaining = 0;
        }

        SetTimeLabel(elapsed, m_elapsed);
        SetTimeLabel(m_display_estimated, m_estimated);
        SetTimeLabel(display_remaining, m_remaining);
    }

    if ( value == m_maximum )
    {
        if ( m_state == Finished )
        {
            // ignore multiple calls to Update(m_maximum): it may sometimes be
            // troublesome to ensure that Update() is not called twice with the
            // same value (e.g. because of the rounding errors) and if we don't
            // return now we're going to generate asserts below
            return true;
        }

        // so that we return true below and that out [Cancel] handler knew what
        // to do
        m_state = Finished;
        if( !HasFlag(wxPD_AUTO_HIDE) )
        {
            EnableClose();
            DisableSkip();
#if defined(__WXMSW__) && !defined(__WXUNIVERSAL__)
            EnableCloseButton();
#endif // __WXMSW__

            if ( newmsg.empty() )
            {
                // also provide the finishing message if the application didn't
                m_msg->SetLabel(_("Done."));
            }

            wxCHECK_MSG(wxEventLoopBase::GetActive(), false,
                        "wxProgressDialog::Update needs a running event loop");

            // allow the window to repaint:
            // NOTE: since we yield only for UI events with this call, there
            //       should be no side-effects
            wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI);

            // NOTE: this call results in a new event loop being created
            //       and to a call to ProcessPendingEvents() (which may generate
            //       unwanted re-entrancies).
            (void)ShowModal();
        }
        else // auto hide
        {
            // reenable other windows before hiding this one because otherwise
            // Windows wouldn't give the focus back to the window which had
            // been previously focused because it would still be disabled
            ReenableOtherWindows();

            Hide();
        }
    }
    else // not at maximum yet
    {
        return DoAfterUpdate(skip);
    }

    // update the display in case yielding above didn't do it
    Update();

    return m_state != Canceled;
}
开发者ID:DumaGit,项目名称:winsparkle,代码行数:101,代码来源:progdlgg.cpp


示例4: new_event

void CompaniesFrame::OnTryClose(wxCloseEvent& event) {
  event.Veto();
  wxCloseEvent new_event(wxEVT_COMMAND_BUTTON_CLICKED);
  button_cancel_->ProcessWindowEvent(new_event);
  Hide();
}
开发者ID:adavydow,项目名称:tms,代码行数:6,代码来源:companies_frame.cpp


示例5: Hide

void NMNotificationWindow::update()
{
    Hide();
}
开发者ID:PatheticNeatness,项目名称:NorcomInternetManager,代码行数:4,代码来源:NMNotificationWindow.cpp


示例6: AI_Control

void AI_Control( WorldStuff *world_stuff, int vehicle_number )
    {
     Player *player;
     team_type team, enemy_team;

     short frames_till_traitor_deactivate;
     short frames_till_unscramble;
     short scramble_life;
     short traitor_life;


     /* Alias pointer to this player */
     player = world_stuff->player_array;

     frames_till_traitor_deactivate = player[vehicle_number].tank.frames_till_traitor_deactivate;
     frames_till_unscramble         = player[vehicle_number].tank.frames_till_unscramble; 
     scramble_life                  = player[vehicle_number].tank.scramble_life;
     traitor_life                   = player[vehicle_number].tank.traitor_life;


     if( player[vehicle_number].tank.team == RED_TEAM )
         {
          team = RED_TEAM;
          enemy_team = BLUE_TEAM;
         }
     else
         {
          team = BLUE_TEAM;
          enemy_team = RED_TEAM;
         }



     if( player[vehicle_number].character.skill_level > 2 && player[vehicle_number].controller != USER_CONTROL )
         {
          if( player[vehicle_number].tank.traitor_active )
          if( frames_till_traitor_deactivate < (traitor_life - 40) )
              player[vehicle_number].tank.traitor_active = FALSE;

          /*
          if( player[vehicle_number].tank.controls_scrambled )
          if( frames_till_unscramble < (scramble_life - 40) )
              player[vehicle_number].tank.controls_scrambled = FALSE;
          */
         }


     if( player[vehicle_number].tank.traitor_active )
         {    
          player[vehicle_number].tank.team = enemy_team;
          player[vehicle_number].team = enemy_team;
         }

     
     /* Clear this players input table */
     Clear_Input_Table( player[vehicle_number].table );

     /* Fill up this players events data structure */
     Update_Player_Events( world_stuff, vehicle_number );

     /* Figure out what state we are in now */
     world_stuff->player_array[vehicle_number].character.state = Find_State( world_stuff, vehicle_number );


     if( player[vehicle_number].tank.traitor_active )
         {    
          world_stuff->player_array[vehicle_number].character.state = ATTACK;
         }

     /* Based on the state of the ai call appropriate control function */
     switch( world_stuff->player_array[vehicle_number].character.state )
         {
          case ATTACK:
              Attack( world_stuff, vehicle_number );
              break;
          case GET_ENERGY:
              Get_Energy( world_stuff, vehicle_number );
              break;
          case PANIC:
              Panic( world_stuff, vehicle_number );
              break;
          case BEZERK:
              Bezerk( world_stuff, vehicle_number );
              break;
          case HIDE:
              Hide( world_stuff, vehicle_number );
              break;
          case GROUPUP:
              Group( world_stuff, vehicle_number );
              break;
          case GET_PYLONS:
              Get_Pylons( world_stuff, vehicle_number );
              break;
          case PROTECT:
              Protect( world_stuff, vehicle_number );
              break;
          case KILL_RADAR_BASE:
              Kill_Radar_Base( world_stuff, vehicle_number );
              break;
          case PROTECT_RADAR_BASE:
//.........这里部分代码省略.........
开发者ID:hyperlogic,项目名称:cylindrix,代码行数:101,代码来源:ai.cpp


示例7: Hide

void XrcDlg::OnSimpleButton(wxCommandEvent &inEvent) {
    Hide();
    EndModal(inEvent.GetId());
}
开发者ID:colonelqubit,项目名称:halyard,代码行数:4,代码来源:XrcDlg.cpp


示例8: Hide

//---------------------------------------------------------------------------
void __fastcall TWebF::BrowserNavigateComplete2(TObject *Sender,
      LPDISPATCH pDisp, Variant *URL)
{
    Hide();
}
开发者ID:thespooler,项目名称:mediainfo-code,代码行数:6,代码来源:GUI_Web.cpp


示例9: switch

void ServerWindow::DispatchMessage(int32 code)
{
	switch(code)
	{
	/********** BWindow Messages ***********/
		case AS_QUIT_WINDOW:
		{
			if (created){
				window->Destroy(window);
				window = NULL;
				created = false;
			}
			break;
		}
		case AS_SEND_BEHIND:
		{
			// TODO
			// DFBResult err = x;
			fSession->WriteInt32 (AS_SEND_BEHIND);
			fSession->WriteInt32 (SERVER_TRUE);
			fSession->Sync();
			break;
		}
		case AS_ACTIVATE_WINDOW:
		{
			bool act;
			fSession->ReadBool (&act);
			active = act;
			break;
		}
		case AS_SHOW_WINDOW:
		{
			Show();
			break;
		}
		case AS_HIDE_WINDOW:
		{
			Hide();
			break;
		}
		case AS_WINDOW_TITLE:
		{
			char *title = fSession->ReadString();
			fTitle = BString(title);
			if (created)	
				UpdateTitle (title);
			break;
		}
		case AS_SET_LOOK:
		{
			fSession->ReadInt32 (&fType);
			if (!created)
				break;
			char title[fTitle.CountChars()+1];
			fTitle.CopyInto(title, 0, fTitle.CountChars());
			
			fSession->WriteInt32 (AS_SEND_BEHIND);
			if (UpdateTitle (title)==B_ERROR)
				fSession->WriteInt32 (SERVER_FALSE);
			else
				fSession->WriteInt32 (SERVER_TRUE);
			fSession->Sync();
			break;
		}
		case B_MINIMIZE:
		{
			Hide();
			break;
		}
		case B_WINDOW_MOVE_TO:
		{
			// TODO: Implement
			break;
		}
	/* Graphic Messages */
		case AS_SET_HIGH_COLOR:
		{
			break;
		}
		case AS_SET_LOW_COLOR:
		{
			break;
		}
		case AS_SET_VIEW_COLOR:
		{
			break;
		}
		case AS_STROKE_ARC:
		{
			break;
		}
		case AS_STROKE_BEZIER:
		{
			break;
		}
		case AS_STROKE_ELLIPSE:
		{
			break;
		}
		case AS_STROKE_LINE:
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:nemo,代码行数:101,代码来源:ServerWindow.cpp


示例10: Hide

void InternetRetrievalDialog::OnClose( wxCommandEvent& event )
{
    Hide();
}
开发者ID:seaside82,项目名称:weatherfax_pi,代码行数:4,代码来源:InternetRetrievalDialog.cpp


示例11: VALIDATE_FINDWHAT

void FindReplaceDialog::OnClick(wxCommandEvent& event)
{
    wxObject* btnClicked = event.GetEventObject();
    size_t flags = m_data.GetFlags();
    m_data.SetFindString(m_findString->GetValue());
    m_data.SetReplaceString(m_replaceString->GetValue());

    // disable the 'Find/Replace' buttons when the 'Selection only' is enabled
    if(m_selectionOnly->IsChecked()) {
        m_find->Enable(false);
        m_replace->Enable(false);
    } else {
        m_find->Enable(true);
        m_replace->Enable(true);
    }

    if(btnClicked == m_find) {
        VALIDATE_FINDWHAT();
        SendEvent(wxEVT_FRD_FIND_NEXT);
    } else if(btnClicked == m_replace) {
        VALIDATE_FINDWHAT();
        SendEvent(wxEVT_FRD_REPLACE);
    } else if(btnClicked == m_replaceAll) {
        VALIDATE_FINDWHAT();
        SendEvent(wxEVT_FRD_REPLACEALL);
    } else if(btnClicked == m_markAll) {
        VALIDATE_FINDWHAT();
        SendEvent(wxEVT_FRD_BOOKMARKALL);
    } else if(btnClicked == m_clearBookmarks) {
        SendEvent(wxEVT_FRD_CLEARBOOKMARKS);
    } else if(btnClicked == m_cancel) {
        // Fire a close event
        SendEvent(wxEVT_FRD_CLOSE);
        // Hide the dialog
        Hide();
        // Make sure the Search in Selected Text flag is clear, otherwise we can't Find Next
        flags &= ~(wxFRD_SELECTIONONLY);
    } else if(btnClicked == m_matchCase) {
        if(m_matchCase->IsChecked()) {
            flags |= wxFRD_MATCHCASE;
        } else {
            flags &= ~(wxFRD_MATCHCASE);
        }
    } else if(btnClicked == m_matchWholeWord) {
        if(m_matchWholeWord->IsChecked()) {
            flags |= wxFRD_MATCHWHOLEWORD;
        } else {
            flags &= ~(wxFRD_MATCHWHOLEWORD);
        }
    } else if(btnClicked == m_regualrExpression) {
        if(m_regualrExpression->IsChecked()) {
            flags |= wxFRD_REGULAREXPRESSION;
        } else {
            flags &= ~(wxFRD_REGULAREXPRESSION);
        }
    } else if(btnClicked == m_searchUp) {
        if(m_searchUp->IsChecked()) {
            flags |= wxFRD_SEARCHUP;
        } else {
            flags &= ~(wxFRD_SEARCHUP);
        }
    } else if(btnClicked == m_selectionOnly) {
        if(m_selectionOnly->IsChecked()) {
            flags |= wxFRD_SELECTIONONLY;
        } else {
            flags &= ~(wxFRD_SELECTIONONLY);
        }
    }

    // Set the updated flags, unless it was ReplaceAll which does this itself
    if(btnClicked != m_replaceAll) { m_data.SetFlags(flags); }

// update the data of the find/replace dialog, in particular,
// update the history of the Find What / replace with controls
#if defined(__WXGTK__) && wxVERSION_NUMBER >= 2900
    // But if it's a findNext or a Replace, do it by posting an event,
    // otherwise strange duplications happen (because scintilla steals the primary selection?)
    wxCommandEvent e(wxEVT_FRD_FIND_NEXT); // Arbitrary choice of event-type
    wxPostEvent(this, e);
#else
    SetFindReplaceData(m_data, false);
#endif
}
开发者ID:lpc1996,项目名称:codelite,代码行数:83,代码来源:findreplacedlg.cpp


示例12: Hide

void __fastcall Tikf_hqq::Image1Click(TObject *Sender)
{
Hide();
  ikf_hqq->BringToFront();

}
开发者ID:rzdannisa,项目名称:APP-TAJWID,代码行数:6,代码来源:ikfa_hqq.cpp


示例13: BWindow

DownloadWindow::DownloadWindow(BRect frame, bool visible,
		SettingsMessage* settings)
	: BWindow(frame, B_TRANSLATE("Downloads"),
		B_TITLED_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
		B_AUTO_UPDATE_SIZE_LIMITS | B_ASYNCHRONOUS_CONTROLS | B_NOT_ZOOMABLE),
	fMinimizeOnClose(false)
{
	SetPulseRate(1000000);

	settings->AddListener(BMessenger(this));
	BPath downloadPath;
	if (find_directory(B_DESKTOP_DIRECTORY, &downloadPath) != B_OK)
		downloadPath.SetTo("/boot/home/Desktop");
	fDownloadPath = settings->GetValue(kSettingsKeyDownloadPath,
		downloadPath.Path());
	settings->SetValue(kSettingsKeyDownloadPath, fDownloadPath);

	SetLayout(new BGroupLayout(B_VERTICAL, 0.0));

	DownloadsContainerView* downloadsGroupView = new DownloadsContainerView();
	fDownloadViewsLayout = downloadsGroupView->GroupLayout();

	BMenuBar* menuBar = new BMenuBar("Menu bar");
	BMenu* menu = new BMenu(B_TRANSLATE("Downloads"));
	menu->AddItem(new BMenuItem(B_TRANSLATE("Open downloads folder"),
		new BMessage(OPEN_DOWNLOADS_FOLDER)));
	BMessage* newWindowMessage = new BMessage(NEW_WINDOW);
	newWindowMessage->AddString("url", "");
	BMenuItem* newWindowItem = new BMenuItem(B_TRANSLATE("New browser window"),
		newWindowMessage, 'N');
	menu->AddItem(newWindowItem);
	newWindowItem->SetTarget(be_app);
	menu->AddSeparatorItem();
	menu->AddItem(new BMenuItem(B_TRANSLATE("Hide"),
		new BMessage(B_QUIT_REQUESTED), 'D'));
	menuBar->AddItem(menu);

	fDownloadsScrollView = new DownloadContainerScrollView(downloadsGroupView);

	fRemoveFinishedButton = new BButton(B_TRANSLATE("Remove finished"),
		new BMessage(REMOVE_FINISHED_DOWNLOADS));
	fRemoveFinishedButton->SetEnabled(false);

	fRemoveMissingButton = new BButton(B_TRANSLATE("Remove missing"),
		new BMessage(REMOVE_MISSING_DOWNLOADS));
	fRemoveMissingButton->SetEnabled(false);

	const float spacing = be_control_look->DefaultItemSpacing();

	AddChild(BGroupLayoutBuilder(B_VERTICAL, 0.0)
		.Add(menuBar)
		.Add(fDownloadsScrollView)
		.Add(new BSeparatorView(B_HORIZONTAL, B_PLAIN_BORDER))
		.Add(BGroupLayoutBuilder(B_HORIZONTAL, spacing)
			.AddGlue()
			.Add(fRemoveMissingButton)
			.Add(fRemoveFinishedButton)
			.SetInsets(12, 5, 12, 5)
		)
	);

	PostMessage(INIT);

	if (!visible)
		Hide();
	Show();
}
开发者ID:Barrett17,项目名称:haiku-contacts-kit-old,代码行数:67,代码来源:DownloadWindow.cpp


示例14: Hide

void AboutWindow::OnDestroy (HWND hWnd)
{			
	Hide ();
}
开发者ID:dannydraper,项目名称:CedeCryptClassic,代码行数:4,代码来源:AboutWindow.cpp


示例15: Hide

/*
================
idObjectiveComplete::Spawn
================
*/
void idObjectiveComplete::Spawn( void ) {
	spawnArgs.SetBool( "objEnabled", false );
	Hide();
}
开发者ID:angjminer,项目名称:deamos,代码行数:9,代码来源:Item.cpp


示例16: Hide

bool PrefWindow::QuitRequested(){
   Hide();
   return false;
}
开发者ID:HaikuArchives,项目名称:BeAE,代码行数:4,代码来源:PrefWindow.cpp


示例17: if

//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CTFFreezePanel::FireGameEvent( IGameEvent * event )
{
	const char *pEventName = event->GetName();

	if ( Q_strcmp( "player_death", pEventName ) == 0 )
	{
		// see if the local player died
		int iPlayerIndexVictim = engine->GetPlayerForUserID( event->GetInt( "userid" ) );
		C_TFPlayer *pLocalPlayer = C_TFPlayer::GetLocalTFPlayer();
		if ( pLocalPlayer && iPlayerIndexVictim == pLocalPlayer->entindex() )
		{
			// the local player is dead, see if this is a new nemesis or a revenge
			if ( event->GetInt( "dominated" ) > 0 )
			{
				m_iShowNemesisPanel = SHOW_NEW_NEMESIS;
			}
			else if ( event->GetInt( "revenge" ) > 0 )
			{
				m_iShowNemesisPanel = SHOW_REVENGE;
			}
			else
			{
				m_iShowNemesisPanel = SHOW_NO_NEMESIS;
			}
		}		
	}
	else if ( Q_strcmp( "hide_freezepanel", pEventName ) == 0 )
	{
		Hide();
	}
	else if ( Q_strcmp( "freezecam_started", pEventName ) == 0 )
	{
		ShowCalloutsIn( 1.0 );
		ShowSnapshotPanelIn( 1.25 );
	}
	else if ( Q_strcmp( "teamplay_win_panel", pEventName ) == 0 )
	{
		Hide();
	}
	else if ( Q_strcmp( "show_freezepanel", pEventName ) == 0 )
	{
		C_TF_PlayerResource *tf_PR = dynamic_cast<C_TF_PlayerResource *>(g_PR);
		if ( !tf_PR )
		{
			m_pNemesisSubPanel->SetDialogVariable( "nemesisname", NULL );
			return;
		}

		Show();

		ShowSnapshotPanel( false );
		m_bHoldingAfterScreenshot = false;

		if ( m_iBasePanelOriginalX > -1 && m_iBasePanelOriginalY > -1 )
		{
			m_pBasePanel->SetPos( m_iBasePanelOriginalX, m_iBasePanelOriginalY );
		}

		// Get the entity who killed us
		m_iKillerIndex = event->GetInt( "killer" );
		C_BaseEntity *pKiller =  ClientEntityList().GetBaseEntity( m_iKillerIndex );

		int xp,yp;
		GetPos( xp, yp );
		if ( TFGameRules()->RoundHasBeenWon() )
		{
			SetPos( xp, m_iYBase - YRES(50) );
		}
		else
		{
			SetPos( xp, m_iYBase );
		}

		if ( pKiller )
		{
			CTFPlayer *pPlayer = ToTFPlayer ( pKiller );
			int iMaxBuffedHealth = 0;

			if ( pPlayer )
			{
				iMaxBuffedHealth = pPlayer->m_Shared.GetMaxBuffedHealth();
			}

			int iKillerHealth = pKiller->GetHealth();
			if ( !pKiller->IsAlive() )
			{
				iKillerHealth = 0;
			}
			m_pKillerHealth->SetHealth( iKillerHealth, pKiller->GetMaxHealth(), iMaxBuffedHealth );

			if ( pKiller->IsPlayer() )
			{
				C_TFPlayer *pVictim = C_TFPlayer::GetLocalTFPlayer();
				CTFPlayer *pTFKiller = ToTFPlayer( pKiller );

				//If this was just a regular kill but this guy is our nemesis then just show it.
				if ( pVictim && pTFKiller && pTFKiller->m_Shared.IsPlayerDominated( pVictim->entindex() ) )
//.........这里部分代码省略.........
开发者ID:Axitonium,项目名称:SourceEngine2007,代码行数:101,代码来源:tf_hud_freezepanel.cpp


示例18: CreateAddSpecialDialog

extern void CreateAddSpecialDialog (
  GrouP prnt,
  SscTablesPtr stp
)

{
  Char         buf [64];
  GrouP        g, h, m, p;
  MiscRatePtr  mrp;
  SscSpecPtr   ssp;
  Char         str [16];

  if (stp == NULL) return;
  mrp = stp->miscrate_table;
  if (mrp == NULL) return;

  ssp = (SscSpecPtr) MemNew (sizeof (SscSpec));
  if (ssp == NULL) return;

  p = HiddenGroup (prnt, -1, 0, NULL);
  SetGroupSpacing (p, 10, 10);

  SetObjectExtra (p, ssp, StdCleanupExtraProc);

  ssp->dialog = (DialoG) p;

  ssp->tables = stp;

  ssp->whichspec = HiddenGroup (p, 5, 0, ChangeSpecType);
  SetObjectExtra (ssp->whichspec, ssp, NULL);

  RadioButton (ssp->whichspec, "Visiting");
  RadioButton (ssp->whichspec, "Affiliated");
  RadioButton (ssp->whichspec, "Transient");

  ssp->namegroup = HiddenGroup (p, 15, 0, NULL);
  SetGroupSpacing (ssp->namegroup, 5, 3);

  StaticPrompt (ssp->namegroup, "Name", 0, dialogTextHeight, programFont, 'l');
  ssp->name = DialogText (ssp->namegroup,
                          "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
                          0, ChangeSpecName);
  SetObjectExtra (ssp->name, (Pointer) ssp, NULL);
  SetTitle (ssp->name, "");

  Hide (ssp->namegroup);

  h = HiddenGroup (p, 0, 0, NULL);
  SetGroupMargins (h, 10, 10);

  g = HiddenGroup (h, -1, 0, NULL);

  Hide (g);
  ssp->controls [EMPTY_PAGE] = g;

  g = HiddenGroup (h, -1, 0, NULL);

  if (PrintWholeDollar (mrp->visiting_fee, str)) {
    sprintf (buf, "Charge $%s Visiting Fee", str);
  } else {
    sprintf (buf, "Charge Visiting Fee");
  }
  ssp->visitfee = CheckBox (g, buf, NULL);
  SetStatus (ssp->visitfee, TRUE);

  Hide (g);
  ssp->controls [ADD_VISIT_PAGE] = g;

  g = HiddenGroup (h, -1, 0, NULL);

  if (PrintWholeDollar (mrp->affiliated_fee, str)) {
    sprintf (buf, "Charge $%s Affiliated Fee", str);
  } else {
    sprintf (buf, "Charge Affiliated Fee");
  }
  ssp->affilfee = CheckBox (g, buf, NULL);
  SetStatus (ssp->visitfee, TRUE);

  Hide (g);
  ssp->controls [ADD_AFFIL_PAGE] = g;

  g = HiddenGroup (h, -1, 0, NULL);
  SetGroupSpacing (g, 10, 10);

  m = HiddenGroup (g, 1, 0, NULL);
  SetGroupSpacing (m, 5, 3);

  ProrateDollarAmount (mrp->transient_fee, 1, FALSE, stp, &(ssp->proratedtrans));

  if (PrintWholeDollar (&(ssp->proratedtrans), str)) {
    sprintf (buf, "Charge $%s Transient Dues", str);
  } else {
    sprintf (buf, "Charge Transient Dues");
  }
  ssp->transfee = CheckBox (m, buf, NULL);
  SetStatus (ssp->transfee, TRUE);

  ProrateDollarAmount (mrp->ssa_regular, 5, TRUE, stp, &(ssp->proratedssa));

  if (PrintWholeDollar (&(ssp->proratedssa), str)) {
//.........这里部分代码省略.........
开发者ID:fbtestrepo,项目名称:hw,代码行数:101,代码来源:sscspec.c


示例19: Hide

GUI::EEventStatus::Enum GCovertActionsNewMissionWindow::OnMouseClick(const GEventData & in_EventData, GUI::GBaseObject *in_pCaller)
{
   __super::OnMouseClick(in_EventData, in_pCaller);
   
   if(in_pCaller)
   {
      if(in_EventData.Mouse.Actor.Bits.Left || in_EventData.Mouse.Down.Bits.Left)
      {
         if(in_pCaller == m_pObjCancel)
            Hide();
         else if(in_pCaller == m_pObjConfirm)
         {
            for(UINT32 i = 0; i < m_viCellsID.size(); i++)
            {
               SDK::GGameEventSPtr l_Event = CREATE_GAME_EVENT(SP2::Event::GEventCellNewMission);
               SP2::Event::GEventCellNewMission* l_pUpdate = (SP2::Event::GEventCellNewMission*)l_Event.get();
               
               l_pUpdate->m_iSource = g_SP2Client->Id();
               l_pUpdate->m_iTarget = SDK::Event::ESpecialTargets::Server;

               l_pUpdate->m_iCellID         = m_viCellsID[i];
               l_pUpdate->m_eComplexity     = g_ClientDAL.ConvertMissionComplexityToEnum( m_pObjComplexityCbo->Selected_Content() );
               l_pUpdate->m_eSector         = g_ClientDAL.ConvertTargetSectorToEnum( m_pObjSectorCbo->Selected_Content() );
               
               if( m_pObjFramedCbo->Selected_Content() == g_ClientDAL.GetString(EStrId::None) )
                  l_pUpdate->m_iFramedCountry  = 0;
               else
                  l_pUpdate->m_iFramedCountry  = g_ClientDAL.Country( m_pObjFramedCbo->Selected_Content() ).Id();

               l_pUpdate->m_eType           = g_ClientDAL.ConvertMissionTypeToEnum( m_pObjTypeCbo->Selected_Content() );

               if(m_pObjSectorCbo->Selected_Content() == g_ClientDAL.ConvertTargetSectorToString(SP2::ECovertActionsTargetSector::Military) )
               {
                  l_pUpdate->m_eUnitCategory = g_ClientDAL.ConvertUnitCategoryToEnum( m_pObjResourceCbo->Selected_Content() );
               }
               else if(m_pObjSectorCbo->Selected_Content() == g_ClientDAL.ConvertTargetSectorToString(SP2::ECovertActionsTargetSector::Civilian))
               {
                  l_pUpdate->m_eResourceType = g_ClientDAL.ConvertResourcesToEnum( m_pObjResourceCbo->Selected_Content() );
               }

               g_Joshua.RaiseEvent(l_Event);


               //Locally modify the cell 
               GCovertActionCell*      l_pCell = &g_ClientDAL.m_PlayerCountryData.CovertActionCell(m_viCellsID[i]);
               gassert(l_pCell,"Cell should exist");
               if(l_pCell)
               {
                  l_pCell->TargetSector( l_pUpdate->m_eSector );
                  l_pCell->MissionComplexity( l_pUpdate->m_eComplexity );
                  l_pCell->CountryToFrame( l_pUpdate->m_iFramedCountry );
                  
                  l_pCell->MissionType( l_pUpdate->m_eType );
                  
                  if( l_pUpdate->m_eSector == SP2::ECovertActionsTargetSector::Civilian )
                     l_pCell->ResourceType(l_pUpdate->m_eResourceType);
                  else if( l_pUpdate->m_eSector == SP2::ECovertActionsTargetSector::Military )
                     l_pCell->UnitCategory(l_pUpdate->m_eUnitCategory);

                  if(l_pCell->ActualState() == ECovertActionsCellState::Dormant)
                  {
                     l_pCell->ChangeState(ECovertActionsCellState::GettingReady);
                     l_pCell->SubsequentStateAdd(ECovertActionsCellState::PreparingMission);
                  }
                  else if(l_pCell->ActualState() == ECovertActionsCellState::Active)
                  {
                     l_pCell->ChangeState(ECovertActionsCellState::PreparingMission);
                  }
               
               }
            }

            g_ClientDDL.CovertActionsWindow()->Update();
            Hide();
         }
      }
   }

   return GUI::EEventStatus::Handled;
}
开发者ID:zhudavi2,项目名称:SP2-HDM,代码行数:80,代码来源:sp2_covert_actions_new_mission.cpp


示例20: WXUNUSED

void CompaniesFrame::OnExitClick(wxCommandEvent& WXUNUSED(event)) {
  Hide();
}
开发者ID:adavydow,项目名称:tms,代码行数:3,代码来源:companies_frame.cpp



注:本文中的Hide函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ HideCaret函数代码示例发布时间:2022-05-30
下一篇:
C++ HiSax_getrev函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap