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

C++ IsVisible函数代码示例

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

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



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

示例1: IsVisible

bool Field::MakeVisible()
{
	bool wasAlreadyVisible = IsVisible();
	_visible = true;
	return !(wasAlreadyVisible); //return TRUE if we just made this field visible
}
开发者ID:narical,项目名称:asciidunge,代码行数:6,代码来源:field.cpp


示例2: OnKeyEvent

bool GuiTextEdit::OnKeyEvent(const KeyEvent& ke)
{
  if (!IsVisible())
  {
    return false;
  }

  // Buttons can generate key events, so this GuiTextEdit object may not have the focus (the button
  //  just clicked would have it). So the last GuiTextEdit to have the focus should accept this key.
  if (!HasFocus())
  {
#ifdef TEXT_EDIT_DEBUG
std::cout << "Key event ignored by " << m_name << " as does not have focus.\n";
#endif
    return false;
  }

  // Is this the current or most recent GuiTextEdit to have focus ?
  // TODO 

  if (!ke.keyDown)
  {
    return true;
  }

  switch (ke.keyType)
  {
  case AMJU_KEY_CHAR:
    // Prevent chars like Tab 
    if (ke.key >= ' ') // && ke.key <= (char)127)
    {
      Insert(ke.key);
    }
    else
    {
      // TODO Alert user that character is out of range
    }
    break;

  case AMJU_KEY_UP:
  case AMJU_KEY_DOWN:
    // TODO Multi line text
    break;

  case AMJU_KEY_LEFT:
#ifdef MACOSX
    if (ke.modifier & AMJU_KEY_MOD_ALT) // jump to prev word
#else
    if (ke.modifier & AMJU_KEY_MOD_CTRL)
#endif
    {
      // Prev word
      if (ke.modifier & AMJU_KEY_MOD_SHIFT)
      {
#ifdef TEXT_EDIT_DEBUG
std::cout << "Prev word + select\n";
#endif
        m_caret = PrevWord(m_caret);
        m_triListSelection = 0;
      }
      else
      {
#ifdef TEXT_EDIT_DEBUG
std::cout << "Prev word\n";
#endif
        m_caret = PrevWord(m_caret);
        m_selectedText = m_caret; 
        m_triListSelection = 0;
      }
    }
    else if (ke.modifier & AMJU_KEY_MOD_SHIFT)
    {
#ifdef TEXT_EDIT_DEBUG
std::cout << "Prev char + select\n";
#endif
      // Select char to left
      if (m_caret > 0)
      {
        m_caret--;
        m_triListSelection = 0;
      }
    }
    else 
    {
#ifdef TEXT_EDIT_DEBUG
std::cout << "Prev char\n";
#endif
      if (m_caret > 0)
      {
        // Move caret left
        m_caret--;
        m_selectedText = m_caret; 
        m_triListSelection = 0;
      }
    }
    break;

  case AMJU_KEY_RIGHT:
#ifdef MACOSX
    if (ke.modifier & AMJU_KEY_MOD_ALT) // jump to next word
//.........这里部分代码省略.........
开发者ID:jason-amju,项目名称:amjulib,代码行数:101,代码来源:GuiTextEdit.cpp


示例3: IsVisible

void CActiveXUI::SetInternVisible(bool bVisible)
{
    CControlUI::SetInternVisible(bVisible);
    if( m_hwndHost != NULL && !m_pControl->m_bWindowless ) 
        ::ShowWindow(m_hwndHost, IsVisible() ? SW_SHOW : SW_HIDE);
}
开发者ID:247687009,项目名称:RedisStudio,代码行数:6,代码来源:UIActiveX.cpp


示例4: SetVisible

void CEditUI::SetVisible(bool bVisible)
{
    CControlUI::SetVisible(bVisible);
    if( !IsVisible() && m_pWindow != NULL ) m_pManager->SetFocus(NULL);
}
开发者ID:Zhuguoping,项目名称:directui,代码行数:5,代码来源:UIEdit.cpp


示例5: _OnSetSize

void Container::_OnSetSize()
{
	if (IsVisible()) UpdateAllChildSizes();
}
开发者ID:Ikesters,项目名称:pioneer,代码行数:4,代码来源:GuiContainer.cpp


示例6: DebugPrintf

HRESULT UIPdfTrimColumnedDlg::Draw(DK_IMAGE drawingImg)
{
	DebugPrintf(DLC_ZHY,"enter %s::%s,%s(%d)",GetClassName(), __FUNCTION__, __FILE__, __LINE__);
	if (!IsVisible())
		return S_OK;
	HRESULT hr(S_OK);
	CTpGraphics grf(drawingImg);
	DK_IMAGE imgSelf;
	DK_RECT rcSelf={m_iLeft, m_iTop, m_iLeft + m_iWidth, m_iTop + m_iHeight};
	RTN_HR_IF_FAILED(CropImage(drawingImg, rcSelf, &imgSelf));

	RTN_HR_IF_FAILED(DrawBackGround(imgSelf));

	//draw flag
	SPtr<ITpImage> spImageCursor = ImageManager::GetImage(IMAGE_PDF_LOCATE_CURSOR);
	int w = spImageCursor->GetWidth();
	int h = spImageCursor->GetHeight();

	if (m_bIsActionFinished) 
    {
		m_btnConfirmed.SetVisible(true);
		m_btnCancel.SetVisible(true);
		RTN_HR_IF_FAILED(m_btnConfirmed.Draw(imgSelf));
		RTN_HR_IF_FAILED(m_btnCancel.Draw(imgSelf));
	} 
    else 
    {
		m_btnConfirmed.SetVisible(false);
		m_btnCancel.SetVisible(false);
	}

	//draw lines
	if (m_iCurAction == PdfTrimAction) 
    {
		//Trim
		grf.DrawImage(spImageCursor.Get(), m_iLeftCuttingEdge - w/2, m_iTopCuttingEdge -h/2);
		grf.DrawImage(spImageCursor.Get(), m_iRightCuttingEdge - w/2, m_iBottomCuttingEdge - h/2);

		DebugPrintf(DLC_ZHY,"rect,left,top,right,bottom:%d,%d,%d,%d",m_iLeftCuttingEdge, m_iTopCuttingEdge, m_iRightCuttingEdge, m_iBottomCuttingEdge);
		grf.DrawLine(m_iLeftCuttingEdge, m_iTop, 2, m_iHeight, SOLID_STROKE);
		grf.DrawLine(m_iRightCuttingEdge, m_iTop, 2, m_iHeight, SOLID_STROKE);
		grf.DrawLine(m_iLeft, m_iTopCuttingEdge, m_iWidth, 2, SOLID_STROKE);
		grf.DrawLine(m_iLeft, m_iBottomCuttingEdge, m_iWidth, 2, SOLID_STROKE);
	}
    else 
    {
		grf.DrawLine(m_iColumnedX, m_iTop, 2, m_iHeight, SOLID_STROKE);
		grf.DrawImage(spImageCursor.Get(), m_iColumnedX - w/2, m_iColumnedY - h/2);

		if (m_iCurAction==PdfColumnedComicOrderLR || m_iCurAction==PdfColumnedComicOrderRL) 
        {
			//split to 2 pages
		} 
        else 
        {
			//split to 4 pages
			grf.DrawLine(m_iLeft, m_iColumnedY, m_iWidth, 2, SOLID_STROKE);
		}
	}
	if (m_btnTips.IsVisible())
		m_btnTips.SetVisible(false);

	DebugPrintf(DLC_ZHY,"leave %s::%s,%s(%d)",GetClassName(), __FUNCTION__, __FILE__, __LINE__);

	return hr;
}
开发者ID:chenhbzl,项目名称:OriginApp,代码行数:66,代码来源:UIPdfTrimColumnedDlg.cpp


示例7: IsVisible

int Win::DoModal()
{
	WinID lastParentFC = parent ? parent->lastFocusChild : 0; 
	bool visibled = IsVisible();
	bool enabled = IsEnabled();
	try {
		if (!visibled) Show();
		if (!enabled) Enable(true);

		if (parent && type != WT_POPUP) parent->RecalcLayouts();

		AppBlock(GetID());
		UnblockTree(GetID());

		ModalStruct modalStruct;
		modal = &modalStruct;

		MSG msg;
		
		while (!modalStruct.end) 
		{
			wth_DoEvents();
			if (modalStruct.end) break;

			if (!PeekMessage(&msg, NULL, 0, 0,PM_NOREMOVE))
			{
				unsigned waitTime = RunTimers();
				if (waitTime > 5000) waitTime = 5000;
				if (modalStruct.end) break;

				HANDLE thEvent = wthInternalEvent.SignalFD();
				DWORD res = MsgWaitForMultipleObjects(1,&thEvent,FALSE, waitTime, QS_ALLINPUT);

				if (res == WAIT_TIMEOUT) CheckMousePosition();

				continue;
			}

			if (!GetMessage(&msg, NULL, 0, 0)) 
				break;

			DispatchMessage(&msg);
		}

		modal = 0;
		AppUnblock(GetID());
		if (!visibled) Hide();

///
		if (type == WT_POPUP || type == WT_CHILD && parent) 
		{
			Win *w = GetWinByID(lastParentFC);
			if (w) w->SetFocus();
		}

		return modalStruct.id;
	} catch (...) {
		modal = 0;
		AppUnblock(GetID());
		if (!visibled) Hide(); 
		throw;
	}
}
开发者ID:carriercomm,项目名称:WalCommander,代码行数:63,代码来源:swl_wincoreMS.cpp


示例8: PutEnemy

/*@Function============================================================
@Desc: PutEnemy: This function draws an enemy into the combat window.
       The only parameter given is the number of the enemy within the
       AllEnemys array. Everything else is computed in here.

@Ret: void
* $Function----------------------------------------------------------*/
void
PutEnemy (int Enum , int x , int y)
{
  SDL_Rect dst;
  enemy *droid  = &AllEnemys[Enum];
  int type = droid->type;
  int phase = droid->phase;
  char *name = Druidmap[type].druidname;

  if ( (droid->status == TERMINATED) || (droid->status == OUT) ||
       (droid->levelnum != CurLevel->levelnum) )
    return;

  // if the enemy is out of sight, we need not do anything more here
  if ((!show_all_droids) && (!IsVisible (&AllEnemys[Enum].pos)) )
    {
      DebugPrintf (3, "\nvoid PutEnemy(int Enum): ONSCREEN=FALSE --> usual end of function reached.\n");
      return;
    }

  // We check for incorrect droid types, which sometimes might occor, especially after
  // heavy editing of the crew initialisation functions ;)
  if ( droid->type >= Number_Of_Droid_Types )
    {
      DebugPrintf (0, "ERROR: nonexistant droid-type encountered: %d\n", droid->type);
      Terminate(ERR);
    }

  //--------------------
  // First blit just the enemy hat and shoes.
  SDL_BlitSurface (EnemySurfacePointer[phase], NULL, BuildBlock, NULL);

  //--------------------
  // Now the numbers should be blittet.
  dst.x = FirstDigit_Rect.x;
  dst.y = FirstDigit_Rect.y;
  SDL_BlitSurface( EnemyDigitSurfacePointer[name[0]-'1'+1 ], NULL, BuildBlock, &dst);

  dst.x = SecondDigit_Rect.x;
  dst.y = SecondDigit_Rect.y;
  SDL_BlitSurface( EnemyDigitSurfacePointer[name[1]-'1'+1 ], NULL, BuildBlock, &dst);

  dst.x = ThirdDigit_Rect.x;
  dst.y = ThirdDigit_Rect.y;
  SDL_BlitSurface( EnemyDigitSurfacePointer[name[2]-'1'+1], NULL,  BuildBlock, &dst);

  // now blit the whole construction to screen:
  if ( x == -1 )
    {
      dst.x=UserCenter_x + (droid->pos.x - Me.pos.x) * Block_Rect.w - Block_Rect.w/2;
      dst.y=UserCenter_y + (droid->pos.y - Me.pos.y) * Block_Rect.h - Block_Rect.h/2;
    }
  else
    {
      dst.x=x ;
      dst.y=y ;
    }
  SDL_BlitSurface (BuildBlock, NULL, ne_screen, &dst);

  //--------------------
  // At this point we can assume, that the enemys has been blittet to the
  // screen, whether it's a friendly enemy or not.
  //
  // So now we can add some text the enemys says.  That might be fun.
  //
  if ( (x == -1)
       && ( AllEnemys[Enum].TextVisibleTime < GameConfig.WantedTextVisibleTime )
       && GameConfig.Droid_Talk )
    {
      PutStringFont ( ne_screen , Font0_BFont ,
		      User_Rect.x+(User_Rect.w/2) + Block_Rect.w/3 + (AllEnemys[Enum].pos.x - Me.pos.x) * Block_Rect.w ,
		      User_Rect.y+(User_Rect.h/2) - Block_Rect.h/2 + (AllEnemys[Enum].pos.y - Me.pos.y) * Block_Rect.h ,
		      AllEnemys[Enum].TextToBeDisplayed );
    }



  DebugPrintf (2, "\nvoid PutEnemy(int Enum): ENEMY HAS BEEN PUT --> usual end of function reached.\n");

}	// void PutEnemy(int Enum , int x , int y)
开发者ID:WildPenquin,项目名称:FreedroidClassic-GCW0,代码行数:87,代码来源:view.c


示例9: Assemble_Combat_Picture

void
Assemble_Combat_Picture (int mask)
{
  int MapBrick;
  int line, col;
  int i;
  static float TimeSinceLastFPSUpdate=10;
  static int FPS_Displayed=1;
  SDL_Rect TargetRectangle;
  SDL_Rect TxtRect;
  finepoint pos, vect;
  float len;
  bool vis = TRUE;
  grob_point upleft, downright;


#define UPDATE_FPS_HOW_OFTEN 0.75

  DebugPrintf (2, "\nvoid Assemble_Combat_Picture(...): Real function call confirmed.");



  SDL_SetClipRect (ne_screen , &User_Rect);

  if ( !GameConfig.AllMapVisible )
    Fill_Rect (User_Rect, Black);

  if ( (mask & SHOW_FULL_MAP) != 0 )
    {
      upleft.x = -5; upleft.y = -5;
      downright.x = CurLevel->xlen + 5; downright.y = CurLevel->ylen + 5;
    }
  else
    {
      upleft.x = Me.pos.x - 6; upleft.y = Me.pos.y - 5;
      downright.x = Me.pos.x + 7; downright.y = Me.pos.y + 5;
    }


  for (line = (int)upleft.y; line < (int)downright.y; line++)
    {
      for (col = (int)upleft.x; col < (int)downright.x; col++)
	{
	  vis = TRUE;
	  if ( !GameConfig.AllMapVisible && ( (mask & SHOW_FULL_MAP) == 0x0) )
	    {
	      pos.x = col;
	      pos.y = line;
	      vect.x = Me.pos.x - pos.x;
	      vect.y = Me.pos.y - pos.y;
	      len = sqrt( vect.x * vect.x + vect.y * vect.y) + 0.01;
	      vect.x /= len;
	      vect.y /= len;
	      if (len > 0.5)
		{
		  pos.x += vect.x;
		  pos.y += vect.y;
		}
	      if ( !IsVisible (&pos) )
		continue;
	    }

	  MapBrick = GetMapBrick( CurLevel, col , line );
	  TargetRectangle.x = UserCenter_x + (int)rint( (-Me.pos.x+1.0*col-0.5 )*Block_Rect.w);
	  TargetRectangle.y = UserCenter_y + (int)rint( (-Me.pos.y+1.0*line-0.5 )*Block_Rect.h);
	  SDL_BlitSurface( MapBlockSurfacePointer[CurLevel->color][MapBrick], NULL, ne_screen, &TargetRectangle);
	}			// for(col)
    }				// for(line)


  // if we don't use Fullscreen mode, we have to clear the text-background manually
  // for the info-line text:

  TxtRect.x = Full_User_Rect.x;
  TxtRect.y = Full_User_Rect.y+Full_User_Rect.h - FontHeight (Font0_BFont);
  TxtRect.h = FontHeight (Font0_BFont);
  TxtRect.w = Full_User_Rect.w;
  SDL_SetClipRect (ne_screen, &TxtRect);
  if (!GameConfig.FullUserRect)
    SDL_FillRect(ne_screen, &TxtRect, 0);


  if ( GameConfig.Draw_Position )
    {
      PrintStringFont( ne_screen , Font0_BFont , Full_User_Rect.x+Full_User_Rect.w/6 ,
		       Full_User_Rect.y+Full_User_Rect.h - FontHeight( Font0_BFont ),
		       "GPS: X=%d Y=%d Lev=%d" , (int) rintf(Me.pos.x) , (int) rintf(Me.pos.y) ,
		       CurLevel->levelnum );
    }


  if (!(mask & ONLY_SHOW_MAP) )
    {
      if ( GameConfig.Draw_Framerate )
	{
	  TimeSinceLastFPSUpdate += Frame_Time();
	  if ( TimeSinceLastFPSUpdate > UPDATE_FPS_HOW_OFTEN )
	    {
	      FPS_Displayed=(int)(1.0/Frame_Time());
	      TimeSinceLastFPSUpdate=0;
//.........这里部分代码省略.........
开发者ID:WildPenquin,项目名称:FreedroidClassic-GCW0,代码行数:101,代码来源:view.c


示例10: Log


//.........这里部分代码省略.........
                    thisparty->exp = GetColorExp( thisclient->Stats->Level, thismon->thisnpc->level + special_lvl, exp );
                    thisparty->flag = false;
                    //LMA: bug
                    //thisparty->exp += exp * (unsigned long long) ((thisclient->Party->party->PartyLevel*2) / 100);
                    thisparty->exp += (unsigned long long) ((exp*thisclient->Party->party->PartyLevel*2) / 100);
                    thisparty->num = 1;
                    thisparty->partymember[0] = thisclient->CharInfo->charid;
                    thisparty->cheat_max_lvl=thisclient->Stats->Level;
                    thisparty->cheat_min_lvl=thisclient->Stats->Level;
                    thisparty->maxlevel = thisclient->Stats->Level;
                    for(unsigned int p=0;p<ClientList.size();p++)
                    {
                        CPlayer* otherclient = (CPlayer*) ClientList.at( p )->player;
                        if(otherclient->client==NULL) continue;
                        if(otherclient->Party->party==NULL) continue;
                        if(!otherclient->client->isActive) continue;
                        if(!otherclient->Session->inGame) continue;

                        //LMA: checking the gap between the max and min level of people in the party.
                        if (thisclient->Party->party == otherclient->Party->party)
                        {
                            if(otherclient->Stats->Level>thisparty->cheat_max_lvl)
                            {
                                thisparty->cheat_max_lvl=otherclient->Stats->Level;
                            }

                            if(otherclient->Stats->Level<thisparty->cheat_min_lvl)
                            {
                                thisparty->cheat_min_lvl=otherclient->Stats->Level;
                            }

                        }

                        if( IsVisible(thisclient, otherclient))
                        {
                            if(thisclient->Party->party == otherclient->Party->party )
                            {
                                //LMA: Little stupid check.
                                if (thisparty->num==7)
                                {
                                    Log(MSG_WARNING,"Too many people in this party, already at max, skipping");
                                    break;
                                }

                                thisparty->partymember[thisparty->num] = otherclient->CharInfo->charid;
                                thisparty->num++;
                                thisparty->maxlevel += otherclient->Stats->Level;
                            }
                        }
                    }
                    PartyExp.push_back( thisparty );
                }
                continue;
            }

             //LMA BEGIN
             //20070621-211100
            //mod for CF
            //Adding bonusxp (mileage)
            //UINT prev_xp=thisclient->CharInfo->Exp;

            //LMA: Xp nullifier.
            if(!thisclient->no_exp)
            {
                int tempexp = thisclient->bonusxp*GetColorExp( thisclient->Stats->Level, thismon->thisnpc->level + special_lvl, exp );
				if (tempexp <= 0) 
开发者ID:PurpleYouko,项目名称:KTRose_Server,代码行数:67,代码来源:Worldprocess.cpp


示例11: IsVisible

bool CGUIRenderingControl::CanFocusFromPoint(const CPoint &point) const
{ // mouse is allowed to focus this control, but it doesn't actually receive focus
  return IsVisible() && HitTest(point);
}
开发者ID:FLyrfors,项目名称:xbmc,代码行数:4,代码来源:GUIRenderingControl.cpp


示例12: UplinkAssert

void UserIDScreenInterface::Create ( ComputerScreen *newcs )
{

	UplinkAssert ( newcs );
	cs = newcs;

	if ( !IsVisible () ) {

		EclRegisterButton ( 130, 90, 320, 25, GetComputerScreen ()->maintitle, "", "useridscreen_maintitle" );
		EclRegisterButtonCallbacks ( "useridscreen_maintitle", DrawMainTitle, NULL, NULL, NULL );
		EclRegisterButton ( 130, 110, 320, 20, GetComputerScreen ()->subtitle, "", "useridscreen_subtitle" );
		EclRegisterButtonCallbacks ( "useridscreen_subtitle", DrawSubTitle, NULL, NULL, NULL );

		EclRegisterButton ( 168, 155, 220, 120, "", "", "useridscreen_image" );
		button_assignbitmap ( "useridscreen_image", "userid.tif" );
		EclRegisterButtonCallbacks ( "useridscreen_image", imagebutton_draw, CodeButtonClick, button_click, button_highlight );

		EclRegisterButton ( 227, 210, 148, 15, "", "Enter your userID here", "useridscreen_name" );
		EclRegisterButtonCallbacks ( "useridscreen_name", UserIDButtonDraw, CodeButtonClick, button_click, button_highlight );

		EclRegisterButton ( 227, 236, 148, 15, "", "Enter your access code here", "useridscreen_code" );
		EclRegisterButtonCallbacks ( "useridscreen_code", CodeButtonDraw, CodeButtonClick, button_click, button_highlight );

		EclRegisterButton ( 168, 280, 120, 15, "", "", "useridscreen_message" );
		EclRegisterButtonCallbacks ( "useridscreen_message", textbutton_draw, NULL, NULL, NULL );

		EclRegisterButton ( 308, 280, 80, 15, "Proceed", "Click here when done", "useridscreen_proceed" );
		button_assignbitmaps ( "useridscreen_proceed", "proceed.tif", "proceed_h.tif", "proceed_c.tif" );
		EclRegisterButtonCallback ( "useridscreen_proceed", ProceedClick );

		EclMakeButtonEditable ( "useridscreen_name" );
		EclMakeButtonEditable ( "useridscreen_code" );

		// Create the box that will show the currently known codes for this screen

		UplinkAssert ( cs->GetComputer () );

		if ( game->GetWorld ()->GetPlayer ()->codes.LookupTree ( cs->GetComputer ()->ip ) ) {

			DArray <char *> *codes = game->GetWorld ()->GetPlayer ()->codes.ConvertToDArray ();
			DArray <char *> *ips   = game->GetWorld ()->GetPlayer ()->codes.ConvertIndexToDArray ();

			EclRegisterButton ( 200, 310, 250, 15, "Known Access Codes", "", "useridscreen_codestitle" );
			EclRegisterButtonCallbacks ( "useridscreen_codestitle", textbutton_draw, NULL, NULL, NULL );

			int currentcode = 0;

			for ( int i = 0; i < codes->Size (); ++i ) {
				if ( codes->ValidIndex (i) && ips->ValidIndex (i) ) {
					if ( strcmp ( ips->GetData (i), cs->GetComputer ()->ip ) == 0 ) {

						char name [64];
						UplinkSnprintf ( name, sizeof ( name ), "useridscreen_code %d", currentcode );
						EclRegisterButton ( 200, 330 + currentcode*15, 250, 15, codes->GetData (i), "Use this code", name );
						EclRegisterButtonCallbacks ( name, textbutton_draw, AccessCodeClick, button_click, button_highlight );
						++currentcode;

					}
				}
			}

			delete codes;
			delete ips;

		}

#ifdef CHEATMODES_ENABLED
		// Create a symbol for quick entry into this screen
		EclRegisterButton ( 3, 20, 30, 15, "#", "Click here to bypass this screen (DEBUG MODE ONLY)", "useridscreen_bypass" );
		EclRegisterButtonCallbacks ( "useridscreen_bypass", textbutton_draw, BypassClick, button_click, button_highlight );
#endif

	}

}
开发者ID:gene9,项目名称:uplink-source-code,代码行数:75,代码来源:useridscreen_interface.cpp


示例13: Update

void CriminalScreenInterface::Update ()
{

	if ( searchname && IsVisible () ) {

		int timems = (int)EclGetAccurateTime () - lastupdate;

		if ( timems > 100 ) {

			// We are searching for a record

			// Is this one it?

			Computer *comp = game->GetWorld ()->GetComputer ( "Global Criminal Database" );
			UplinkAssert (comp);

			// Have we searched all records?

			//if ( recordindex == comp->recordbank.records.Size () ) {
			if ( recordindex == -1 ) {

				delete [] searchname;
				searchname = NULL;
				recordindex = -1;
				return;

			}

			Record *rec = comp->recordbank.GetRecord ( recordindex );
			char *thisname = rec->GetField ( RECORDBANK_NAME );
			UplinkAssert (thisname);
			char *lowercasethisname = LowerCaseString (thisname);

			// Update display with the current record

			UpdateScreen ();


			if ( strcmp ( searchname, lowercasethisname ) == 0 ) {

				// Record found - stop searching

				delete [] searchname;
				searchname = NULL;

			}
			else {

				// Record not found

				//recordindex++;
				recordindex = comp->recordbank.FindNextRecordIndexNameNotSystemAccount ( recordindex );

			}

			delete [] lowercasethisname;
			lastupdate = (int)EclGetAccurateTime ();

		}

	}

}
开发者ID:gene9,项目名称:uplink-source-code,代码行数:63,代码来源:criminalscreen_interface.cpp


示例14: UplinkAssert

void CriminalScreenInterface::Create ( ComputerScreen *newcs )
{

	UplinkAssert (newcs);
	cs = newcs;

	if ( !IsVisible () ) {

		// Draw the screen titles

		EclRegisterButton ( 80, 60, 350, 25, GetComputerScreen ()->maintitle, "", "criminalscreen_maintitle" );
		EclRegisterButtonCallbacks ( "criminalscreen_maintitle", DrawMainTitle, NULL, NULL, NULL );
		EclRegisterButton ( 80, 80, 350, 20, GetComputerScreen ()->subtitle, "", "criminalscreen_subtitle" );
		EclRegisterButtonCallbacks ( "criminalscreen_subtitle", DrawSubTitle, NULL, NULL, NULL );

		EclRegisterButton ( 30, 130, 128, 160, "", "Shows the person's photograph", "criminal_photo" );
		button_assignbitmap ( "criminal_photo", "photos/image0.tif" );

        EclRegisterButton ( 180, 130, 210, 15, "Name", " ", "criminal_nametitle" );
        EclRegisterButtonCallbacks ( "criminal_nametitle", button_draw, NULL, NULL, NULL );

        EclRegisterButton ( 190, 146, 190, 38, " ", " ", "criminal_name" );
        EclRegisterButtonCallbacks ( "criminal_name", NameDraw, NULL, NULL, NULL );

        EclRegisterButton ( 180, 145, 210, 40, " ", " ", "criminal_nameborder" );
        EclRegisterButtonCallbacks ( "criminal_nameborder", NameBorderDraw, NULL, NULL, NULL );

		// History text box

		EclRegisterButton ( 180, 200, 210, 15, "Criminal History", "", "criminal_historytitle" );
		EclRegisterButtonCallbacks ( "criminal_historytitle", button_draw, NULL, NULL, NULL );

		EclRegisterButton ( 180, 215, 210, 140, "", "", "criminal_history" );
		EclRegisterButtonCallbacks ( "criminal_history", HistoryDraw, NULL, NULL, NULL );

		if ( game->GetInterface ()->GetRemoteInterface ()->security_level <= 2 ) {

			EclRegisterButton ( 180, 354, 180, 16, "", "Enter new convictions here", "criminal_newconvictiontext" );
			EclRegisterButtonCallbacks ( "criminal_newconvictiontext", HistoryDraw, NULL, NULL, button_highlight );

			EclRegisterButton ( 360, 355, 30, 15, "Add", "Click to add this conviction", "criminal_newconvictionadd" );
			EclRegisterButtonCallback ( "criminal_newconvictionadd", AddConvictionClick );

			// Control buttons

			EclRegisterButton ( 30, 315, 128, 15, "Clear history", "Click here to clear this man's record", "criminal_clear" );
			EclRegisterButtonCallback ( "criminal_clear", ClearClick );

			EclRegisterButton ( 30, 335, 128, 15, "Authorise Arrest", "Click here to authorise this man's arrest", "criminal_arrest" );
			EclRegisterButtonCallback ( "criminal_arrest", ArrestClick );

		}

		EclRegisterButton ( 30, 355, 128, 15, "Done", "Close this screen", "criminal_close" );
		EclRegisterButtonCallback ( "criminal_close", CloseClick );

        EclMakeButtonEditable ( "criminal_newconvictiontext" );

	}

}
开发者ID:gene9,项目名称:uplink-source-code,代码行数:61,代码来源:criminalscreen_interface.cpp


示例15: CoGetInterfaceAndReleaseStream

HRESULT CWordObject::Release()
{
	HRESULT hr;
	
	if (m_pUnknown == NULL) 
		return S_OK;

	LPUNKNOWN lpUnk = NULL;
	
	if (m_pStrUnknown != NULL)
	{
		hr = CoGetInterfaceAndReleaseStream(m_pStrUnknown, IID_IUnknown, (void**) &lpUnk);
		if (FAILED(hr))
		{
			LOG_WS_ERROR(_T("CoGetInterfaceAndReleaseStream FAILED."));	
		}
	}
	else
	{
		lpUnk = m_pUnknown;
		m_pWordCreator->AddRef(lpUnk);
	}


	try
	{
		m_pUnknown->Release();
		m_pUnknown = NULL;
	}
	catch(...)
	{
		m_pUnknown = NULL;
		LOG_WS_ERROR(_T("m_pUnknown Failed to release"));
	}

	
	if (NULL == lpUnk)
	{
		LOG_WS_ERROR(_T("lpUnk == NULL"));
		return E_FAIL;
	}



	if (m_bUsingCurrentInstance)
	{	
		hr = S_FALSE;
	}
	else if (!IsVisible(lpUnk))
	{
		hr = Quit(lpUnk);
	}
	else
	{
		// If Word is visible, then only quit the cached Word instance if we are sure that
		// there aren't any manually opened documents.  i.e. if the user has opened a document,
		// so that there is a visible instance of Word open while DeltaVw is still open.
		Word::_ApplicationPtr pApp = GetApplicationPtr();

		if( pApp )
		{
			long lNumDocs = pApp->Documents->Count;

			if( lNumDocs <= 0 )
			{
				LOG_WS_INFO(L"No open documents found for the current Word instance.  Quitting Word");

				SetVisible(false);
				hr = Quit(lpUnk);
			}
			else
			{
				LOG_WS_INFO(L"Documents are still open in the current Word instance.  NOT quitting Word");
			}
		}
	}

	if (IsCachingWordEnabled())
		m_pGit->RevokeInterfaceFromGlobal(m_dwSessionCookie);

	try
	{
		if (lpUnk)
		{
			lpUnk->Release();
			lpUnk = NULL;			
		}
	}
	catch(...)
	{
		lpUnk = NULL;	
		LOG_WS_ERROR(_T("m_pUnknown Failed to release"));
	}

	// This is required to stop the DeltaView app tests from hanging
	Sleep(125);
	
	return hr;
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:99,代码来源:WordObject.cpp


示例16: CRegDWORD

void CSVNStatusListCtrl::ColumnManager::ReadSettings
    ( DWORD defaultColumns
    , const CString& containerName)
{
    // defaults

    DWORD selectedStandardColumns = defaultColumns;

    columns.resize (SVNSLC_NUMCOLUMNS);
    for (size_t i = 0; i < SVNSLC_NUMCOLUMNS; ++i)
    {
        columns[i].index = static_cast<int>(i);
        columns[i].width = 0;
        columns[i].visible = true;
        columns[i].relevant = true;
    }

    userProps.clear();

    // where the settings are stored within the registry

    registryPrefix
        = L"Software\\TortoiseSVN\\StatusColumns\\" + containerName;

    // we accept only the current version
    bool valid = (DWORD)CRegDWORD (registryPrefix + L"Version", 0xff) == SVNSLC_COL_VERSION;
    if (valid)
    {
        // read (possibly different) column selection

        selectedStandardColumns
            = CRegDWORD (registryPrefix, selectedStandardColumns);

        // read user-prop lists

        CString userPropList
            = CRegString (registryPrefix + L"UserProps");
        CString shownUserProps
            = CRegString (registryPrefix + L"ShownUserProps");

        ParseUserPropSettings (userPropList, shownUserProps);

        // read column widths

        CString colWidths
            = CRegString (registryPrefix + L"_Width");

        ParseWidths (colWidths);
    }

    // process old-style visibility setting

    SetStandardColumnVisibility (selectedStandardColumns);

    // clear all previously set header columns

    int c = ((CHeaderCtrl*)(control->GetDlgItem(0)))->GetItemCount()-1;
    while (c>=0)
        control->DeleteColumn(c--);

    // create columns

    for (int i = 0, count = GetColumnCount(); i < count; ++i)
        control->InsertColumn (i, GetName(i), LVCFMT_LEFT, IsVisible(i) ? -1 : GetVisibleWidth(i, false));

    // restore column ordering

    if (valid)
        ParseColumnOrder (CRegString (registryPrefix + L"_Order"));
    else
        ParseColumnOrder (CString());

    ApplyColumnOrder();

    // auto-size the columns so we can see them while fetching status
    // (seems the same values will not take affect in InsertColumn)

    for (int i = 0, count = GetColumnCount(); i < count; ++i)
        if (IsVisible(i))
            control->SetColumnWidth (i, GetVisibleWidth (i, true));
}
开发者ID:webtronix1,项目名称:tortoisesvn,代码行数:81,代码来源:SVNStatusListCtrlHelpers.cpp


示例17: IsPunctuation

			bool IsPunctuation(const char &ch)
			{
				return !IsAlphaNumeric(ch) && IsVisible(ch);
			}
开发者ID:links234,项目名称:PkTex,代码行数:4,代码来源:StringEx.cpp


示例18: IsVisible

int CSVNStatusListCtrl::ColumnManager::GetVisibleWidth (int column, bool useDefaults) const
{
    return IsVisible (column)
        ? GetWidth (column, useDefaults)
        : 0;
}
开发者ID:webtronix1,项目名称:tortoisesvn,代码行数:6,代码来源:SVNStatusListCtrlHelpers.cpp


示例19: IsVisible

	//************************************
	// 函数名称: OnTimer
	// 返回类型: void
	// 参数信息: IDuiTimer * pTimer
	// 参数信息: HWND hWnd
	// 参数信息: CTrayIconUI * lParam
	// 参数信息: WPARAM wParam
	// 函数说明: 
	//************************************
	void CTrayIconUI::OnTimer( IDuiTimer* pTimer,HWND hWnd,CTrayIconUI* lParam,WPARAM wParam )
	{
		IsVisible()?SetHideIcon():SetShowIcon();
	}
开发者ID:yuechuanbingzhi163,项目名称:myduilib,代码行数:13,代码来源:UITrayIcon.cpp


示例20: cellSize

void mitk::PolyDataGLMapper2D::Paint( mitk::BaseRenderer * renderer )
{
    if ( IsVisible( renderer ) == false )
        return ;

    // ok, das ist aus GenerateData kopiert
    mitk::BaseData::Pointer input = const_cast<mitk::BaseData*>( GetData() );

    assert( input );

    input->Update();

    vtkPolyData * vtkpolydata = this->GetVtkPolyData();
    assert( vtkpolydata );


    vtkLinearTransform * vtktransform = GetDataNode() ->GetVtkTransform();

    if (vtktransform)
    {
      vtkLinearTransform * inversetransform = vtktransform->GetLinearInverse();

      Geometry2D::ConstPointer worldGeometry = renderer->GetCurrentWorldGeometry2D();
      PlaneGeometry::ConstPointer worldPlaneGeometry = dynamic_cast<const PlaneGeometry*>( worldGeometry.GetPointer() );

      if ( vtkpolydata != NULL )
      {
          Point3D point;
          Vector3D normal;

          if(worldPlaneGeometry.IsNotNull())
          {
            // set up vtkPlane according to worldGeometry
            point=worldPlaneGeometry->GetOrigin();
            normal=worldPlaneGeometry->GetNormal(); normal.Normalize();
            m_Plane->SetTransform((vtkAbstractTransform*)NULL);
          }
          else
          {
            //@FIXME: does not work correctly. Does m_Plane->SetTransform really transforms a "plane plane" into a "curved plane"?
            return;
            AbstractTransformGeometry::ConstPointer worldAbstractGeometry = dynamic_cast<const AbstractTransformGeometry*>(renderer->GetCurrentWorldGeometry2D());
            if(worldAbstractGeometry.IsNotNull())
            {
              // set up vtkPlane according to worldGeometry
              point=const_cast<mitk::BoundingBox*>(worldAbstractGeometry->GetParametricBoundingBox())->GetMinimum();
              FillVector3D(normal, 0, 0, 1);
              m_Plane->SetTransform(worldAbstractGeometry->GetVtkAbstractTransform()->GetInverse());
            }
            else
              return;
          }

          vtkFloatingPointType vp[ 3 ], vnormal[ 3 ];

          vnl2vtk(point.Get_vnl_vector(), vp);
          vnl2vtk(normal.Get_vnl_vector(), vnormal);

          //normally, we would need to transform the surface and cut the transformed surface with the cutter.
          //This might be quite slow. Thus, the idea is, to perform an inverse transform of the plane instead.
          //@todo It probably does not work for scaling operations yet:scaling operations have to be
          //dealed with after the cut is performed by scaling the contour.
          inversetransform->TransformPoint( vp, vp );
          inversetransform->TransformNormalAtPoint( vp, vnormal, vnormal );

          m_Plane->SetOrigin( vp );
          m_Plane->SetNormal( vnormal );

          // set data into cutter
          m_Cutter->SetInput( vtkpolydata );
          //    m_Cutter->GenerateCutScalarsOff();
          //    m_Cutter->SetSortByToSortByCell();

          // calculate the cut
          m_Cutter->Update();

          // fetch geometry
          mitk::DisplayGeometry::Pointer displayGeometry = renderer->GetDisplayGeometry();
          assert( displayGeometry );
          //  float toGL=displayGeometry->GetSizeInDisplayUnits()[1];

          //apply color and opacity read from the PropertyList
          ApplyProperties( renderer );

          // traverse the cut contour
          vtkPolyData * contour = m_Cutter->GetOutput();

          vtkPoints *vpoints = contour->GetPoints();
          vtkCellArray *vpolys = contour->GetLines();
          vtkPointData *vpointdata = contour->GetPointData();
          vtkDataArray* vscalars = vpointdata->GetScalars();

          vtkCellData *vcelldata = contour->GetCellData();
          vtkDataArray* vcellscalars = vcelldata->GetScalars();

          int i, numberOfCells = vpolys->GetNumberOfCells();

          Point3D p;
          Point2D p2d, last, first;

//.........这里部分代码省略.........
开发者ID:saschazelzer,项目名称:MITK,代码行数:101,代码来源:mitkPolyDataGLMapper2D.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ IsWhiteSpace函数代码示例发布时间:2022-05-30
下一篇:
C++ IsVarTerm函数代码示例发布时间: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