当前位置: 首页>>代码示例>>C++>>正文


C++ Visible函数代码示例

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


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

示例1: Visible

Light::Light(LIGHT_TYPE type)
{
    lights.push_back(this);

    if(availableLights.size() > 0)
    {
        lightNum = availableLights[0];
        availableLights.erase(availableLights.begin());
        Visible(true);
        setLightType(type);
        setPosition(0, 0, 0);
        setCutoff(45);
        setExponent(12);
        setSpotDirection(0, -1, 0);
        setAmbient(0, 0, 0, 1);
        setDiffuse(1, 1, 1, 1);
        setSpecular(1, 1, 1, 1);

        updateLight();
    }

    else
    {
        lightNum = 0;
        Visible(false);
    }
}
开发者ID:mikestaub,项目名称:interactiveKnightsTour,代码行数:27,代码来源:light.cpp

示例2: EntityRender

void EntityRender ()
{

  int       polymode[2];
  bool      wireframe;
  int       x, y;
  int       elapsed;

  //Draw all textured objects
  glGetIntegerv (GL_POLYGON_MODE, &polymode[0]);
  wireframe = polymode[0] != GL_FILL;
  if (RenderFlat ())
    glDisable (GL_TEXTURE_2D);
  //If we're not using a loading screen, make the wireframe fade out via fog
  if (!LOADING_SCREEN && wireframe) {
    elapsed = 6000 - WorldSceneElapsed ();
    if (elapsed >= 0 && elapsed <= 6000)
      RenderFogFX ((float)elapsed / 6000.0f);
    else
      return;
  }
  for (x = 0; x < GRID_SIZE; x++) {
    for (y = 0; y < GRID_SIZE; y++) {
      if (Visible (x,y))
        glCallList (cell_list[x][y].list_textured);
    }
  }
  //draw all flat colored objects
  glBindTexture(GL_TEXTURE_2D, 0);
  glColor3f (0, 0, 0);
  for (x = 0; x < GRID_SIZE; x++) {
    for (y = 0; y < GRID_SIZE; y++) {
      if (Visible (x, y)) {
        if (wireframe)
          glCallList (cell_list[x][y].list_flat_wireframe);
        else 
          glCallList (cell_list[x][y].list_flat);
      }
    }
  }
  //draw all alpha-blended objects
  glBindTexture(GL_TEXTURE_2D, 0);
  glColor3f (0, 0, 0);
  glEnable (GL_BLEND);
  for (x = 0; x < GRID_SIZE; x++) {
    for (y = 0; y < GRID_SIZE; y++) {
      if (Visible (x,y)) {
        glCallList (cell_list[x][y].list_alpha);
      }
    }
  }
  
}
开发者ID:willhurlburt,项目名称:pixelcity,代码行数:53,代码来源:Entity.cpp

示例3: SetFlagVisible

ARCEMU_INLINE bool SetFlagVisible(uint8 & flag, bool set)
{
	if(ForcedInvisible(flag) || Hidden(flag))
		return false;
	else if(set && !Visible(flag))
		flag |= FACTION_FLAG_VISIBLE;
	else if(!set && Visible(flag))
		flag &= ~FACTION_FLAG_VISIBLE;
	else
		return false;

	return true;
}
开发者ID:hamedloknat,项目名称:WOWDIAMOND,代码行数:13,代码来源:ReputationHandler.cpp

示例4: GetParent

int GDialog::DoModal(OsView OverideParent)
{
	d->ModalStatus = 0;

	if (Wnd && Attach(0))
	{
		GWindow *Owner = GetParent() ? GetParent()->GetWindow() : 0;
		if (Owner)
		{
			GRect Pr = Owner->GetPos();
			GRect Mr = GetPos();
			Mr.Offset(	Pr.x1 + (Pr.X() - Mr.X()) / 2 - Mr.x1,
						Pr.y1 + (Pr.Y() - Mr.Y()) / 2 - Mr.y1);
			SetPos(Mr);
			Owner->SetChildDialog(this);
		}
		
		d->IsModal = true;
		AttachChildren();
		Visible(true);
		
		RunAppModalLoopForWindow(Wnd);

		if (Owner) Owner->SetChildDialog(0);
	}

	return d->ModalStatus;
}
开发者ID:FEI17N,项目名称:Lgi,代码行数:28,代码来源:GWidgets.cpp

示例5: RemoveIcon

void WeaselTrayIcon::Refresh()
{
	if (!m_style.display_tray_icon)
	{
		if (m_mode != INITIAL)
		{
			RemoveIcon();
			m_mode = INITIAL;
		}
		return;
	}
	WeaselTrayMode mode = m_status.disabled ? DISABLED : 
		m_status.ascii_mode ? ASCII : ZHUNG;
	if (mode != m_mode)
	{
		m_mode = mode;
		ShowIcon();
		SetIcon(mode_icon[mode]);
		if (mode_label[mode])
		{
			ShowBalloon(mode_label[mode], WEASEL_IME_NAME);
		}
	}
	else if (!Visible())
	{
		ShowIcon();
	}
}
开发者ID:wyrover,项目名称:weasel,代码行数:28,代码来源:WeaselTrayIcon.cpp

示例6: Render

void CLight::Render ()
{

    int       angle;
    GLvector  pos;
    GLvector  camera;
    GLvector  camera_position;
    GLvector2 offset;

    if (!Visible (_cell_x, _cell_z))
        return;
    camera = CameraAngle ();
    camera_position = CameraPosition ();
    if (fabs (camera_position.x - _position.x) > RenderFogDistance ())
        return;
    if (fabs (camera_position.z - _position.z) > RenderFogDistance ())
        return;
    if (_blink && (GetTickCount () % _blink_interval) > 200)
        return;
    angle = (int)MathAngle (camera.y);
    offset = angles[_size][angle];
    pos = _position;
    glColor4fv (&_color.red);
    glTexCoord2f (0, 0);
    glVertex3f (pos.x + offset.x, pos.y - _vert_size, pos.z + offset.y);
    glTexCoord2f (0, 1);
    glVertex3f (pos.x - offset.x, pos.y - _vert_size, pos.z - offset.y);
    glTexCoord2f (1, 1);
    glVertex3f (pos.x - offset.x, pos.y + _vert_size, pos.z - offset.y);
    glTexCoord2f (1, 0);
    glVertex3f (pos.x + offset.x, pos.y + _vert_size, pos.z + offset.y);

}
开发者ID:MigrenusMaximus,项目名称:pixelcity,代码行数:33,代码来源:Light.cpp

示例7: CrearVentana

const BOOL VentanaDump::Mostrar(const TCHAR *PathDump) { 
	
	
	
	_PathDump = PathDump;
	UINT YC = 6;
	if (Sistema.App.Config.UtilizarBarraTituloWindows == true) { 
		CrearVentana(0, TEXT("BubaTronik_VentanaDump"), WS_OVERLAPPED | WS_SYSMENU, IDIOMA__ERROR_GRAVE, DWL_CENTRADO, DWL_CENTRADO, 547, 150, 0);
		YC = 80;
	}
	else {
		CrearVentana(0, TEXT("BubaTronik_VentanaDump"), WS_POPUP, IDIOMA__ERROR_GRAVE, DWL_CENTRADO, DWL_CENTRADO, 543, 145, 0);
		HRGN Region = CreateRoundRectRgn(0, 0, 544, 146, 11, 11);
		SetWindowRgn(_hWnd, Region, false);
		YC = 100;
	}
	if (_hWnd == NULL) return FALSE;
	_Barra.CrearBarraEx(WS_CHILD | WS_VISIBLE, _hWnd, 10, YC, 522, 8, ID_BARRA_DUMP, DWL_BARRAEX_PROGRESO_HORIZONTAL, 0, 1000);
	_BotonGuardar.CrearBotonEx(WS_CHILD | WS_VISIBLE, _hWnd, IDIOMA__ENVIAR, 196, YC + 13, 70, 20, 101);
	_BotonTerminar.CrearBotonEx(WS_CHILD | WS_VISIBLE, _hWnd, IDIOMA__TERMINAR, 276, YC + 13, 70, 20, 100);

	Visible(true);
	_BotonGuardar.AsignarFoco();
	return TRUE;
};
开发者ID:devildrey33,项目名称:BubaTronik,代码行数:25,代码来源:VentanaDump.cpp

示例8: GetTextHeight

void EditBox::Render(){
	if(!Visible() || !mText) return;

	gUiRender->PushTranslate(mPosition.x, mPosition.y);
	gUiRender->DrawText(mText);

	if(UiState::mFocus == this){
		if(mSelectStart != mSelectEnd){
			int x1, x2, h = GetTextHeight();
			x1 = GetXFromCaret(mSelectStart);
			x2 = GetXFromCaret(mSelectEnd);

			gUiRender->SetDrawColour(0, 150, 255, 128);
			gUiRender->DrawRect(x1, 0, x2, h);
			gUiRender->ResetDrawColour();
		}

		if(clock() - mCaretTimer > 600){
			mCaretVisible = !mCaretVisible;
			mCaretTimer = clock();
		}

		if(mCaretVisible){
			int y = mText->GetCharHeight('y') - 1;
			int x1 = GetXFromCaret(mCaret);
			gUiRender->DrawLine(x1, 0, x1, y);
		}
	}

	gUiRender->PopTranslate(mPosition.x, mPosition.y);
}
开发者ID:exjam,项目名称:r3e,代码行数:31,代码来源:EditBox.cpp

示例9: ShowFlag

void DtPrinterIcon::ShowFlag()
{
   if (app_mode == CONFIG_PRINTERS)
      return;

   if (Visible() == false || mainw->setPrefD->ShowStatusFlags() == false)
    {
      flag->Visible(false);
      return;
    }
   // Update problem flag's visiblity
#ifdef aix
   boolean show_it;
   if (_print_queue_up)
    {
      int i;
      show_it = false;
      for (i = 0; i < n_devices; i++)
         if (_print_device_up[i] == false)
	  {
	    show_it = true;
	    break;
	  }
    }
   else
      show_it = true;
   flag->Visible(show_it);
#else
   if (_print_queue_up && _print_device_up)
      flag->Visible(false);
   else
      flag->Visible(true);
#endif
}
开发者ID:juddy,项目名称:edcde,代码行数:34,代码来源:DtPrinterIcon.C

示例10: SetFlagVisible

void Player::Reputation_OnTalk(FactionDBC * dbc)
{
	// set faction visible if not visible
	if(!dbc || dbc->RepListId < 0)
		return;

	FactionReputation * rep = reputationByListId[dbc->RepListId];
	if(!rep)
		return;

	if(!Visible(rep->flag))
	{
		SetFlagVisible(rep->flag);
		if(IsInWorld())
		{
#ifdef USING_BIG_ENDIAN
			uint32 swapped = swap32(dbc->RepListId);
			m_session->OutPacket(SMSG_SET_FACTION_VISIBLE, 4, &swapped);
#else
			m_session->OutPacket(SMSG_SET_FACTION_VISIBLE, 4, &dbc->RepListId);
#endif
		}

#ifdef OPTIMIZED_PLAYER_SAVING
		save_Reputation();
#endif
	}
}
开发者ID:AwkwardDev,项目名称:ascent_classic,代码行数:28,代码来源:ReputationHandler.cpp

示例11: CrearArbolEx

HWND ArbolOpcionesBasicas::Crear(HWND hWndParent, const int cID, const int cX, const int cY, const int cAncho, const int cAlto) {
	DWL::ControlesEx::DWLArbolEx_Nodo *Nodo = NULL;
	CrearArbolEx(WS_CHILD, hWndParent, cX, cY, cAncho, cAlto, cID, false);
	RecargarIdioma();
/*	AgregarNodo(NULL, NULL, IDI_INICIO2, IDIOMA__INICIO, 0);					// 0
	AgregarNodo(NULL, NULL, IDI_GUARDAR, IDIOMA__ABRIR_ARCHIVO, 1);				// 1
	Nodo = AgregarNodo(NULL, NULL, IDI_AUDIO, IDIOMA__BASE_DE_DATOS, 2);		// 3
		AgregarNodo(NULL, Nodo, IDI_BD_BUSCAR, IDIOMA__BUSCAR_ARCHIVOS, 1);			// 9
		AgregarNodo(NULL, Nodo, IDI_BD_REVISAR, IDIOMA__REVISAR, 2);				// 9
	
	AgregarNodo(NULL, NULL, IDI_LISTA, IDIOMA__LISTA_DE_REPRODUCCION, 3);		// 8
	AgregarNodo(NULL, NULL, IDI_EQ, IDIOMA__ECUALIZADOR, 4);					// 4
	Nodo = AgregarNodo(NULL, NULL, IDI_OPCIONES, IDIOMA__OPCIONES, 5);			// 10
		AgregarNodo(NULL, Nodo, IDI_LISTA_LLENA, IDIOMA__ASPECTO);						// 10
		AgregarNodo(NULL, Nodo, IDI_BDV, IDIOMA__BASE_DE_DATOS);					// 10
		AgregarNodo(NULL, Nodo, IDI_LISTA_MODIFICARPISTA, IDIOMA__TECLAS_RAPIDAS);						// 10
		AgregarNodo(NULL, Nodo, IDI_LISTA, IDIOMA__LISTA);					// 10
		AgregarNodo(NULL, Nodo, IDI_OPCIONESV, IDIOMA__VIDEO);								// 10
	
	AgregarNodo(NULL, NULL, IDI_PANTALLA, IDIOMA__VER_VIDEO, 6);				// 7
	AgregarNodo(NULL, NULL, IDI_AYUDA, IDIOMA__AYUDA, 7);						// 13*/
	
//	Nodo = AgregarNodo(NULL, NULL, IDI_BDA, TEXT("Audio"), 2);					// 2
//	Nodo = AgregarNodo(NULL, NULL, IDI_BDV, TEXT("Video"), 3);					// 5
//	 AgregarNodo(NULL, Nodo, IDI_VIDEO, IDIOMA__BASE_DE_DATOS);					// 6
//	 AgregarNodo(NULL, Nodo, IDI_DISCO, TEXT("Audio"));							// 11
//	 AgregarNodo(NULL, Nodo, IDI_OPCIONESV, TEXT("Video"));						// 12
//	Nodo = AgregarNodo(NULL, NULL, IDI_AYUDA, TEXT("Acerca de.."), 8);			// 14

	ArbolEx_Estilos.MultiSeleccion = false;
	ArbolEx_Estilos.SubSeleccion = false;
	ActualizarTodo(true, true);
	Visible(true);
	return _hWnd;
}
开发者ID:devildrey33,项目名称:BubaTronik,代码行数:35,代码来源:ArbolOpcionesBasicas.cpp

示例12: fade_animator_

Filter::Filter()
  : fade_animator_(FADE_DURATION)
{
  auto& wm = WindowManager::Default();
  auto& settings = Settings::Instance();
  auto const& work_area = wm.GetWorkAreaGeometry(0);
  int monitor = wm.MonitorGeometryIn(work_area);
  int launcher_width = settings.LauncherWidth(monitor);
  auto const& cv = settings.em(monitor);

  search_bar_ = SearchBar::Ptr(new SearchBar());
  search_bar_->SetMinimumWidth(WIDTH.CP(cv));
  search_bar_->SetMaximumWidth(WIDTH.CP(cv));
  search_bar_->scale = cv->DPIScale();
  search_bar_->live_search_wait = DEFAULT_SEARCH_WAIT;
  text.SetGetterFunction([this] { return search_bar_->search_string(); });
  text.SetSetterFunction([this] (std::string const& t) { search_bar_->search_string = t; return false; });
  debug::Introspectable::AddChild(search_bar_.GetPointer());

  auto layout = new nux::HLayout(NUX_TRACKER_LOCATION);
  layout->SetVerticalExternalMargin(0);
  layout->SetHorizontalExternalMargin(0);
  layout->AddView(search_bar_.GetPointer());

  view_window_ = new nux::BaseWindow(GetName().c_str());
  view_window_->SetLayout(layout);
  view_window_->SetBackgroundColor(nux::color::Transparent);
  view_window_->SetWindowSizeMatchLayout(true);
  view_window_->ShowWindow(true);
  view_window_->PushToFront();
  view_window_->SetOpacity(0.0f);
  view_window_->SetEnterFocusInputArea(search_bar_.GetPointer());
  view_window_->SetInputFocus();
  view_window_->SetXY(OFFSET_X.CP(cv) + std::max(work_area.x, launcher_width), OFFSET_Y.CP(cv) + work_area.y);
  fade_animator_.updated.connect([this] (double opacity) { view_window_->SetOpacity(opacity); });

  nux::GetWindowCompositor().SetKeyFocusArea(search_bar_->text_entry());

  search_bar_->search_changed.connect([this] (std::string const& search) {
    if (!Visible())
      animation::StartOrReverse(fade_animator_, animation::Direction::FORWARD);

    if (search.empty())
    {
      UpdateFilteredWindows();
      text.changed.emit(search);
      animation::StartOrReverse(fade_animator_, animation::Direction::BACKWARD);
    }
  });

  search_bar_->live_search_reached.connect([this] (std::string const& search) {
    if (!search.empty())
    {
      UpdateFilteredWindows();
      text.changed.emit(search);
      search_bar_->SetSearchFinished();
    }
  });
}
开发者ID:jonjahren,项目名称:unity,代码行数:59,代码来源:SpreadFilter.cpp

示例13: Visible

    void UiProxyWidget::hideEvent(QHideEvent *hide_event)
    {
        QGraphicsProxyWidget::hideEvent(hide_event);
        emit Visible(false);

        if (control_button_)
            control_button_->ControlledWidgetHidden();
    }
开发者ID:jonnenauha,项目名称:naali,代码行数:8,代码来源:UiProxyWidget.cpp

示例14: Render

void CCar::Render ()
{

  GLvector  pos;
  int       angle;
  int       turn;

  if (!m_ready)
    return;
  if (!Visible (m_drive_position))
    return;
  if (m_front)
    glColor3f (1, 1, 0.8f);
  else
    glColor3f (1, 0.2f, 0);

  glBegin (GL_QUADS);

  angle = dangles[m_direction];
  pos = m_drive_position;// 
  angle = 360 - (int)MathAngle (m_position.x, m_position.z, pos.x, pos.z);
  angle %= 360;
  turn = (int)MathAngleDifference ((float)m_drive_angle, (float)angle);
  m_drive_angle += SIGN (turn);
  pos += glVector (0.5f, 0.0f, 0.5f);
  

  glTexCoord2f (0, 0);   
  glVertex3f (pos.x + angles[angle].x, -CAR_SIZE, pos.z + angles[angle].y);
  glTexCoord2f (1, 0);   
  glVertex3f (pos.x - angles[angle].x, -CAR_SIZE, pos.z - angles[angle].y);
  glTexCoord2f (1, 1);   
  glVertex3f (pos.x - angles[angle].x,  CAR_SIZE, pos.z - angles[angle].y);
  glTexCoord2f (0, 1);   
  glVertex3f (pos.x + angles[angle].x,  CAR_SIZE, pos.z +  angles[angle].y);


  /*
  glVertex3f (m_position.x, m_position.y, m_position.z);
  glVertex3f (m_position.x, m_position.y, m_position.z + 1);
  glVertex3f (m_position.x + 1, m_position.y, m_position.z + 1);
  glVertex3f (m_position.x + 1, m_position.y, m_position.z);
*/
  /*
  glTexCoord2f (0, 0);   
  glVertex3f (m_position.x, m_position.y, m_position.z + 0.2f);
  glTexCoord2f (0, 2);   
  glVertex3f (m_position.x, m_position.y, m_position.z + 1 - 0.2f);
  glTexCoord2f (1, 2);   
  glVertex3f (m_position.x + 1, m_position.y, m_position.z + 1 - 0.2f);
  glTexCoord2f (1, 0);   
  glVertex3f (m_position.x + 1, m_position.y, m_position.z + 0.2f);

*/
  
  glEnd ();

}
开发者ID:elcerdo,项目名称:pixelcity,代码行数:58,代码来源:Car.cpp

示例15: switch

void GWindow::SetZoom(GWindowZoom i)
{
	if (_View && IsWindowVisible(_View))
	{
		switch (i)
		{
			case GZoomMax:
			{
				ShowWindow(Handle(), SW_MAXIMIZE);
				break;
			}
			case GZoomMin:
			{
				ShowWindow(Handle(), SW_MINIMIZE);
				break;
			}
			case GZoomNormal:
			{
				if (!Visible())
				{
					Visible(true);
				}

				if (IsIconic(Handle()) || IsZoomed(Handle()))
				{
					ShowWindow(Handle(), SW_NORMAL);
				}

				LgiYield();

				RECT r;
				GetWindowRect(Handle(), &r);

				if (r.left != Pos.x1 ||
					r.top != Pos.y1)
				{
					SetWindowPos(Handle(), 0, Pos.x1, Pos.y1, Pos.X(), Pos.Y(), SWP_NOZORDER);
				}
				break;
			}
		}
	}

	d->Show = i;
}
开发者ID:FEI17N,项目名称:Lgi,代码行数:45,代码来源:GWindow.cpp


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